Transponder Database for Gpredict

From MyLabWiki
Jump to: navigation, search

Once the new Doppler Tuning Algorithm for Gpredict is implemented and tested, Gpredict needs to have some kind of transponder database to allow easy and convenient selection of transponders for the currently selected satellite.

The idea is to have a data file for each satellite containing one transponder definition per section & or configuration group as it is called in g_key_file terminology. This would also prevent having two transponders for the same satellite having the same name.

$HOME/.gpredict2/trsp/12345.trsp

[MODE U/V]
UP_LOW=435200000
UP_HIGH=435300000
DOWN_LOW=145800000
DOWN_HIGH=145900000
INVERT=TRUE

We will also need to create utility functions for reading and writing these data files, just as we have it for radio configuration. The API for this utility lib could be:

typedef struct {
    gchar *name;   /*!< The name of the transponder (same as config group) */
    gdouble uplow;
    gdouble uphigh;
    gdouble downlow;
    gdouble downhigh;
    gboolean invert;
} trsp_t;

/* The actual data would then be a singly linked list with pointers to transponder_t structures */

GSList *read_tranponders (guint catnum);
void write_transponders (guint catnum, GSList *trsplist);
void free_transponders (GSList *trsplist);