Doppler Tuning Algorithm for Gpredict
The first beta version of Gpredict 1.0 included a simple Doppler tuning algorithm that could adjust the receiver frequency and even take external frequency changes (e.g. tuning dial) into account. While it was a very good first cut at automatic Doppler tuning, the shortcomings were quickly identified. For example, it didn't take the PTT status for simplex radios into account and so Gpredict kept on sending RX correction commands to the radio even when the user was trying to transmit.
Clearly, a more sophisticated algorithm is needed and this page describes the design and prototyping of that algorithm.
- Gpredict shall be able to perform Doppler tuning for both uplink and downlink.
- Gpredict shall be able to take external frequency changes into account, e.g. when the user turns the dial.
- Gpredict chall be able to perform Doppler tuning using receivers, transmitters, simplex and duplex transceivers, including any combinations of these
- Gpredict shall take into account that there might be transverters in the loop.
- Separate RX and TX — possibly only one of them, possibly both.
- Simplex TRX
- Duplex TRX
The Controller Algorithm
The control algorithm will need the following parameters:
- The current Doppler shift at 100 MHz.
- The downlink frequency at the satellite. This is set by the user on the Gpredict control panel or automatically if the uplink and downlink frequencies are locked, or if RadioRX is changed externally (e.g. via tuning dial).
- The uplink frequency at the satellite. This is set by the user on the Gpredict control panel or automatically if the uplink and downlink frequencies are locked, or if RadioTX is changed externally (e.g. via tuning dial).
- The downlink frequency of the radio.
- The uplink frequency of the radio.
- The PTT status of the radio. When available, this is used to switch between RadioRX and RadioTX tuning on simplex radios.
- Flag indicating whether the PTT status on the radio should be polled and taken into acount (i.e. don't set RadioRX when RadioPTT = true).
- The RadioRX frequency set during the previous cycle. This can be different than RadioRX in that the user may have turned the tuning dial since the last cycle.
- The RadioTX frequency set during the previous cycle. This can be different than RadioTX in that the user may have turned the tuning dial since the last cycle.
There are also other user interface parameters like Engage and Track that influence the overall functionality, but these parameters are outside the scope of the controller algorithm.
Separate RX and TX
In this situation the user uses the same radio for uplink and downlink but in simplex mode, i.e. can not receive and transmit at the same time. The prerequisites for this mode are:
- Radio is set to split mode. Gpredict will not care about VFO A and B — it will simply send uplink or downlink correction to the active VFO.
- RadioPTT can be read
- Radio can receive SET_FREQ commands via CAT in both receive and transmit modes.
/* Are we in RX mode? */ if (RadioPTT = false) read RadioRX; /* did user change RX frequency on dial? */ if (RadioRX != LastRX) update SatRX; calculate SatTX if locked to SatRX; LastRX = RadioRX; else /* update Doppler correction */ RadioRX += SatRX * Doppler / 100 MHz; LastRX = RadioRX; endif; else /* we are in TX mode */ read RadioTX; /* did user change TX frequency on dial? */ if (RadioTX != LastTX) update SatTX; calculate SatRX if locked to SatTX; LastTX = RadioTX; else /* update Doppler correction */ RadioTX += SatTX * Doppler / 100 MHz; LastTX = RadioTX; endif; endif;