mirror of
https://github.com/Hamlib/Hamlib
synced 2026-08-13 17:32:05 -04:00
I tried to control my "FUNcube Dongle Pro" SDR with Hamlib. At first it worked fine, but when I tried to correct the frequency divergence with the vfo_comp parameter, I found a bug in the software. Example: $ ./rigctl -m 2513 -C vfo_comp=0.01 Rig command: F 100000000 Rig command: f Frequency: 102010000 The correction must toke place when setting the frequency and when it is read back. But one time the correction must work in on direction, the other time quite opposite. I found the code in the file rig.c and could see, that both times the same calculation is used. The simplest way to correct this is to go to the “rig_get_freq(“ subroutine and change it in the line 1188 from “+=” to “-=” , even that is mathematically not correct. Result: $ ./rigctl -m 2513 -C vfo_comp=0.01 Rig command: F 100000000 Rig command: f Frequency: 99990000 $ ./rigctl -m 2513 -C vfo_comp=0.000022 Rig command: F 100000000 Rig command: f Frequency: 99999999 You can see, that the result is quite good for small divergences of some ppm, but there is still an error for bigger divergences. So I changed the line 1188 to the form I hope it is the mathematically correct one: *freq = (freq_t)(*freq/(1.0+(double)rig->state.vfo_comp)); Result: $ ./rigctl -m 2513 -C vfo_comp=0.01 Rig command: F 100000000 Rig command: f Frequency: 100000000 $ ./rigctl -m 2513 -C vfo_comp=0.000022 Rig command: F 100000000 Rig command: f Frequency: 100000000 Now the result looks good for small and for bigger divergences. Best regards Dieter Röver (DK6OV) |
||
|---|---|---|
| .. | ||
| Android.mk | ||
| cal.c | ||
| cal.h | ||
| cm108.c | ||
| cm108.h | ||
| conf.c | ||
| debug.c | ||
| event.c | ||
| event.h | ||
| ext.c | ||
| gpio.c | ||
| gpio.h | ||
| idx_builtin.h | ||
| iofunc.c | ||
| iofunc.h | ||
| locator.c | ||
| Makefile.am | ||
| mem.c | ||
| microham.c | ||
| microham.h | ||
| misc.c | ||
| misc.h | ||
| network.c | ||
| network.h | ||
| par_nt.h | ||
| parallel.c | ||
| parallel.h | ||
| register.c | ||
| register.h | ||
| rig.c | ||
| rot_conf.c | ||
| rot_conf.h | ||
| rot_reg.c | ||
| rotator.c | ||
| serial.c | ||
| serial.h | ||
| settings.c | ||
| token.h | ||
| tones.c | ||
| tones.h | ||
| usb_port.c | ||
| usb_port.h | ||