Difference between revisions of "Doppler Tuning Algorithm for Gpredict"

From MyLabWiki
Jump to: navigation, search
(Configurations)
(Operating Modes)
Line 23: Line 23:
  
 
== Operating Modes ==
 
== Operating Modes ==
 
In order to accommodate for all configurations that allow using one or two rigs at the same time, the controller user interface shall be able to use either one or two configured devices at the same time. We call them '''Device A''' and '''Device B'''. The '''Device B''' selector is disabled unless the selected operating mode requires two devices.
 
 
The controller user interface will distinguish between the following operating modes:
 
 
; DEV A Simplex
 
: Device A is used for both uplink and downlink in simplex mode. Gpredict will perform Doppler tuning on the downlink and uplink depending on the PTT setting.
 
 
; DEV A Duplex
 
: Device A is used for both uplink and downlink in duplex mode. Gpredict will perform continuous Doppler tuning  using VFO_MAIN for uplink and VFO_SUB on the downlink regardless of the PTT setting.
 
 
; RXA +
 
 
 
  
 
The operating mode for the controller depends on what kind of radio is used. For now, the following options are considered:
 
The operating mode for the controller depends on what kind of radio is used. For now, the following options are considered:
 
  
 
; Receiver Mode
 
; Receiver Mode

Revision as of 20:55, 28 March 2009


Objectives

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.

Requirements

  1. Gpredict shall be able to perform Doppler tuning for both uplink and downlink.
  2. Gpredict shall be able to take external frequency changes into account, e.g. when the user turns the dial.
  3. Gpredict shall be able to perform Doppler tuning using a receiver, a transmitter, a simplex transceiver, a duplex transceiver — or any combination of these (i.e. separate device for uplink and downlink).
  4. Gpredict shall take into account that there might be transverters in the loop.

Configurations

In order to configure a radio device for use, the user has to specify:

  1. The host name where rigctld is running
  2. The port number of the rigctld server
  3. The radio type, i.e. whether it is RIG_TYPE_RX, RIG_TYPE_TX, RIG_TYPE_TRX or RIG_TYPE_DUPLEX
  4. The conversion frequencies for the transverters, if any.

Operating Modes

The operating mode for the controller depends on what kind of radio is used. For now, the following options are considered:

Receiver Mode
The radio is only a receiver or a transceiver where tuning via CAT is only possible in receive mode. In this case, Gpredict shall perform Doppler tuning on the downlink only.
Transmitter Mode
The radio is only used as transmitter only. Tuning via CAT must be possible in transmit mode. Gpredict shall perform Doppler tuning on the uplink only.
Simplex Mode
The radio can be tuned via CAT both in receive and transmit modes. Gpredict will perform Doppler tuning on the downlink and uplink depending on the PTT setting.
Duplex Mode
The radio is a full duplex transceiver like the IC-910H or FT-847. Gpredict will perform continuous Doppler tuning using VFO_MAIN for uplink and VFO_SUB on the downlink regardless of the PTT setting.

The Controller Algorithm

The control algorithm will need the following parameters:

Doppler
The current Doppler shift at 100 MHz.
SatRX
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).
SatTX
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).
RadioRX
The downlink frequency of the radio.
RadioTX
The uplink frequency of the radio.
RadioPTT
The PTT status of the radio. When available, this is used to switch between RadioRX and RadioTX tuning on simplex radios.
UsePTT
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).
PrevRX
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.
PrevTX
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.


Receiver Mode

In this mode the radio is used for reception only even if it is a transceiver. The reason could be that frequency setting via CAT is not possible in transmit mode as would be the case for the FT-817. If configured with UsePTT = true, gpredict will also poll the PTT setting and ensure that downlink correction are only set to the radio when RadioPTT = false.

Pseudo code


/* Receiver chain */
if ((UsePTT = true) AND (RadioPTT = true))
    return;
endif;

read RadioRX;

if (RadioRX != PrevRX)
    update SatRX;
    calculate SatTX if locked to SatRX;
    PrevRX = RadioRX;
else
    /* update Doppler correction */
    RadioRX += SatRX * Doppler / 100 MHz;
    PrevRX = RadioRX;
    write RadioRX;
endif;

Transmitter Mode

In this mode the radio is used for uplink only even if it is a transceiver. A prerequisite for this mode is the the frequency can be adjusted via CAT in transmit mode as well. If configured with UsePTT = true, gpredict will also poll the PTT setting and ensure that uplink correction are only sent to the radio when RadioPTT = true.

Pseudo code


/* Transmitter chain */
if ((UsePTT = true) AND (RadioPTT = false))
    return;
endif;

read RadioTX;

if (RadioTX != PrevTX)
    update SatTX;
    calculate SatRX if locked to SatTX;
    PrevTX = RadioTX;
else
    /* update Doppler correction */
    RadioTX += SatTX * Doppler / 100 MHz;
    PrevTX = RadioTX;
    write RadioTX;
endif;


Simplex Mode

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.


Pseudo code

/* Are we in RX mode? */
if (RadioPTT = false)

    read RadioRX;

    /* did user change RX frequency on dial? */
    if (RadioRX != PrevRX)
        update SatRX;
        calculate SatTX if locked to SatRX;
        PrevRX = RadioRX;
    else
        /* update Doppler correction */
        RadioRX += SatRX * Doppler / 100 MHz;
        PrevRX = RadioRX;
        write RadioRX;
    endif;

else   /* we are in TX mode */

    read RadioTX;

    /* did user change TX frequency on dial? */
    if (RadioTX != PrevTX)
        update SatTX;
        calculate SatRX if locked to SatTX;
        PrevTX = RadioTX;
    else
        /* update Doppler correction */
        RadioTX += SatTX * Doppler / 100 MHz;
        PrevTX = RadioTX;
        write RadioTX;
    endif;

endif;

Duplex Mode

In this mode, gpredict updates both uplink and downlink frequencies continuously and at the same time regardless of the RadioPTT setting — RadioPTT is still used though to decide which VFO to track.

Pseudo code

To be written


Configurations

Implementation

Tests

Conclusion