Beispiel #1
0
/** \brief Load configuration data.
 *  \return 0 if everything OK, 1 otherwise.
 *
 * This function reads the configuration data from gpredict.cfg into
 * memory. This function must be called very early at program start.
 *
 * The the configuration data in memory is already "loaded" the data will
 * be ereased first.
 */
guint sat_cfg_load        ()
{
    gchar  *keyfile,*confdir;
    GError *error = NULL;

    if (config != NULL)
        sat_cfg_close ();

    /* load the configuration file */
    config = g_key_file_new ();
    confdir = get_user_conf_dir ();
    keyfile = g_strconcat (confdir, G_DIR_SEPARATOR_S, "gpredict.cfg", NULL);
    g_free (confdir);

    g_key_file_load_from_file (config, keyfile, G_KEY_FILE_KEEP_COMMENTS, &error);

    g_free (keyfile);

    if (error != NULL) {

        sat_log_log (SAT_LOG_LEVEL_WARN,
                     _("%s: Error reading config file (%s)"),
                     __FUNCTION__, error->message);

        sat_log_log (SAT_LOG_LEVEL_WARN,
                     _("%s: Using built-in defaults"),
                     __FUNCTION__);

        g_clear_error (&error);

        return 1;
    }
    else {
        sat_log_log (SAT_LOG_LEVEL_DEBUG,
                     _("%s: Everything OK."), __FUNCTION__);
    }

    /* if config version is < 1.1; reset SAT_CFG_STR_TLE_FILES */
    guint ver;
    ver = 10*sat_cfg_get_int (SAT_CFG_INT_VERSION_MAJOR) + sat_cfg_get_int (SAT_CFG_INT_VERSION_MINOR);
    if (ver < 11) {
        sat_cfg_reset_str (SAT_CFG_STR_TLE_FILES);
        sat_cfg_set_int (SAT_CFG_INT_VERSION_MAJOR, 1);
        sat_cfg_set_int (SAT_CFG_INT_VERSION_MINOR, 1);
    }


    return 0;
}
/** \brief User pressed OK. Any changes should be stored in config.
 */
void
sat_pref_conditions_ok     ()
{
     if (dirty) {
          sat_cfg_set_int (SAT_CFG_INT_PRED_MIN_EL,
                               gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (minel)));
          sat_cfg_set_int (SAT_CFG_INT_PRED_NUM_PASS,
                               gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (numpass)));
          sat_cfg_set_int (SAT_CFG_INT_PRED_LOOK_AHEAD,
                               gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (lookahead)));
          sat_cfg_set_int (SAT_CFG_INT_PRED_RESOLUTION,
                               gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (res)));
          sat_cfg_set_int (SAT_CFG_INT_PRED_NUM_ENTRIES,
                               gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (nument)));
        sat_cfg_set_int (SAT_CFG_INT_PRED_TWILIGHT_THLD,
                         gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (twspin)));
        sat_cfg_set_bool (SAT_CFG_BOOL_PRED_USE_REAL_T0,
                          gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (tzero)));

          dirty = FALSE;
     }
     else if (reset) {
          sat_cfg_reset_int (SAT_CFG_INT_PRED_MIN_EL);
          sat_cfg_reset_int (SAT_CFG_INT_PRED_NUM_PASS);
          sat_cfg_reset_int (SAT_CFG_INT_PRED_LOOK_AHEAD);
          sat_cfg_reset_int (SAT_CFG_INT_PRED_RESOLUTION);
          sat_cfg_reset_int (SAT_CFG_INT_PRED_NUM_ENTRIES);
        sat_cfg_reset_int (SAT_CFG_INT_PRED_TWILIGHT_THLD);
        sat_cfg_reset_bool (SAT_CFG_BOOL_PRED_USE_REAL_T0);

          reset = FALSE;
     }
}
/** \brief User pressed OK. Any changes should be stored in config.
 */
void
sat_pref_single_pass_ok     ()
{

     if (dirty) {
          sat_cfg_set_int (SAT_CFG_INT_PRED_SINGLE_COL, flags);
          dirty = FALSE;
     }
     else if (reset) {
          sat_cfg_reset_int (SAT_CFG_INT_PRED_SINGLE_COL);
          reset = FALSE;
     }
}
Beispiel #4
0
/* User pressed OK. Any changes should be stored in config. */
void sat_pref_debug_ok()
{
    gint            num = gtk_combo_box_get_active(GTK_COMBO_BOX(age));

    if (dirty)
    {
        /* store new values */
        sat_cfg_set_int(SAT_CFG_INT_LOG_LEVEL,
                        gtk_combo_box_get_active(GTK_COMBO_BOX(level)));

        switch (num)
        {
        case 1:
            sat_cfg_set_int(SAT_CFG_INT_LOG_CLEAN_AGE, SEC_PER_DAY);
            break;

        case 2:
            sat_cfg_set_int(SAT_CFG_INT_LOG_CLEAN_AGE, SEC_PER_WEEK);
            break;

        case 3:
            sat_cfg_set_int(SAT_CFG_INT_LOG_CLEAN_AGE, SEC_PER_MONTH);
            break;

        default:
            sat_cfg_set_int(SAT_CFG_INT_LOG_CLEAN_AGE, 0);
        }
    }

    else if (reset)
    {
        /* reset values */
        sat_cfg_reset_int(SAT_CFG_INT_LOG_LEVEL);
        sat_cfg_reset_int(SAT_CFG_INT_LOG_CLEAN_AGE);
    }

    dirty = FALSE;
    reset = FALSE;
}
/** \brief User pressed OK. Any changes should be stored in config.
 */
void
sat_pref_help_ok     ()
{
    gint idx;

    if (dirty) {
        /* get and store browser type */
        idx = gtk_combo_box_get_active (GTK_COMBO_BOX (combo));
        sat_cfg_set_int (SAT_CFG_INT_WEB_BROWSER_TYPE, idx);

        /* if type is OTHER, store command, otherwise clear command */
        if (idx == BROWSER_TYPE_OTHER) {
            sat_cfg_set_str (SAT_CFG_STR_WEB_BROWSER,
                             gtk_entry_get_text (GTK_ENTRY (entry)));
        }
        else {
            sat_cfg_reset_str (SAT_CFG_STR_WEB_BROWSER);
        }

    }
    dirty = FALSE;
}
/** \brief User pressed OK. Any changes should be stored in config.
 */
void
sat_pref_single_sat_ok     (GKeyFile *cfg)
{

    if (dirty) {

        if (cfg != NULL) {
            g_key_file_set_integer (cfg,
                        MOD_CFG_SINGLE_SAT_SECTION,
                        MOD_CFG_SINGLE_SAT_FIELDS,
                        flags);
                        
        }
        else {
            sat_cfg_set_int (SAT_CFG_INT_SINGLE_SAT_FIELDS, flags);
        }
    }
    else if (reset) {

        if (cfg != NULL) {
            /* local mode; remove key */
            g_key_file_remove_key (cfg,
                           MOD_CFG_SINGLE_SAT_SECTION,
                           MOD_CFG_SINGLE_SAT_FIELDS,
                           NULL);
                        
        }
        else {
            /* global mode; reset value */
            sat_cfg_reset_int (SAT_CFG_INT_SINGLE_SAT_FIELDS);
        }
    }

    dirty = FALSE;
    reset = FALSE;
}
Beispiel #7
0
/** \brief User pressed OK. Any changes should be stored in config.
 */
void
sat_pref_refresh_ok     (GKeyFile *cfg)
{
     if (dirty) {

          if (cfg != NULL) {

               g_key_file_set_integer (cfg,
                              MOD_CFG_GLOBAL_SECTION,
                              MOD_CFG_TIMEOUT_KEY,
                              gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (dataspin)));

               g_key_file_set_integer (cfg,
                              MOD_CFG_LIST_SECTION,
                              MOD_CFG_LIST_REFRESH,
                              gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (listspin)));

               g_key_file_set_integer (cfg,
                              MOD_CFG_MAP_SECTION,
                              MOD_CFG_MAP_REFRESH,
                              gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (mapspin)));

               g_key_file_set_integer (cfg,
                              MOD_CFG_POLAR_SECTION,
                              MOD_CFG_POLAR_REFRESH,
                              gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (polarspin)));

               g_key_file_set_integer (cfg,
                              MOD_CFG_SINGLE_SAT_SECTION,
                              MOD_CFG_SINGLE_SAT_REFRESH,
                              gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (singlespin)));

          }
          else {

               sat_cfg_set_int (SAT_CFG_INT_MODULE_TIMEOUT,
                          gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (dataspin)));

               sat_cfg_set_int (SAT_CFG_INT_LIST_REFRESH,
                          gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (listspin)));

               sat_cfg_set_int (SAT_CFG_INT_MAP_REFRESH,
                          gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (mapspin)));

               sat_cfg_set_int (SAT_CFG_INT_POLAR_REFRESH,
                          gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (polarspin)));

               sat_cfg_set_int (SAT_CFG_INT_SINGLE_SAT_REFRESH,
                          gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (singlespin)));

          }

     }
     else if (reset) {
          /* we have to reset the values to global or default settings */
          if (cfg == NULL) {
               /* reset values in sat-cfg */
               sat_cfg_reset_int (SAT_CFG_INT_MODULE_TIMEOUT);
               sat_cfg_reset_int (SAT_CFG_INT_LIST_REFRESH);
               sat_cfg_reset_int (SAT_CFG_INT_MAP_REFRESH);
               sat_cfg_reset_int (SAT_CFG_INT_POLAR_REFRESH);
               sat_cfg_reset_int (SAT_CFG_INT_SINGLE_SAT_REFRESH);
          }
          else {
               /* remove keys */
               g_key_file_remove_key ((GKeyFile *)(cfg),
                                MOD_CFG_GLOBAL_SECTION,
                                MOD_CFG_TIMEOUT_KEY,
                                NULL);
               g_key_file_remove_key ((GKeyFile *)(cfg),
                                MOD_CFG_LIST_SECTION,
                                MOD_CFG_LIST_REFRESH,
                                NULL);
               g_key_file_remove_key ((GKeyFile *)(cfg),
                                MOD_CFG_MAP_SECTION,
                                MOD_CFG_MAP_REFRESH,
                                NULL);
               g_key_file_remove_key ((GKeyFile *)(cfg),
                                MOD_CFG_POLAR_SECTION,
                                MOD_CFG_POLAR_REFRESH,
                                NULL);
               g_key_file_remove_key ((GKeyFile *)(cfg),
                                MOD_CFG_SINGLE_SAT_SECTION,
                                MOD_CFG_SINGLE_SAT_REFRESH,
                                NULL);
          }
     }

     dirty = FALSE;
     reset = FALSE;
}
Beispiel #8
0
/** \brief Update TLE files from local files.
 *  \param dir Directory where files are located.
 *  \param filter File filter, e.g. *.txt (not used at the moment!)
 *  \param silent TRUE if function should execute without graphical status indicator.
 *  \param label1 Activity label (can be NULL)
 *  \param label2 Statistics label (can be NULL)
 *  \param progress Pointer to progress indicator.
 *  \param init_prgs Initial value of progress indicator, e.g 0.5 if we are updating
 *                   from network.
 *
 * This function is used to update the TLE data from local files.
 *
 * Functional description: TBD
 *
 */
void tle_update_from_files (const gchar *dir, const gchar *filter,
                            gboolean silent, GtkWidget *progress,
                            GtkWidget *label1, GtkWidget *label2)
{
    static GMutex tle_file_in_progress;

    GHashTable  *data;        /* hash table with fresh TLE data */
    GDir        *cache_dir;   /* directory to scan fresh TLE */
    GDir        *loc_dir;     /* directory for gpredict TLE files */
    GError      *err = NULL;
    gchar       *text;
    gchar       *ldname;
    gchar       *userconfdir;
    const gchar *fnam;
    guint        num = 0;
    guint        updated,updated_tmp;
    guint        skipped,skipped_tmp;
    guint        nodata,nodata_tmp;
    guint        newsats = 0;
    guint        total,total_tmp;
    gdouble      fraction = 0.0;
    gdouble      start = 0.0;

    (void) filter; /* avoid unused parameter compiler warning */

    if (g_mutex_trylock(&tle_file_in_progress) == FALSE)
    {
        sat_log_log (SAT_LOG_LEVEL_ERROR,
                     _("%s: A TLE update process is already running. Aborting."),
                     __FUNCTION__);

        return;
    }

    /* create hash table */
    data = g_hash_table_new_full (g_int_hash, g_int_equal, g_free, free_new_tle);

    /* open directory and read files one by one */
    cache_dir = g_dir_open (dir, 0, &err);

    if (err != NULL) {

        /* send an error message */
        sat_log_log (SAT_LOG_LEVEL_ERROR,
                     _("%s: Error opening directory %s (%s)"),
                     __FUNCTION__, dir, err->message);

        /* insert error message into the status string, too */
        if (!silent && (label1 != NULL)) {
            text = g_strdup_printf (_("<b>ERROR</b> opening directory %s\n%s"),
                                    dir, err->message);

            gtk_label_set_markup (GTK_LABEL (label1), text);
            g_free (text);

        }

        g_clear_error (&err);
        err = NULL;
    }
    else {

        /* scan directory for tle files */
        while ((fnam = g_dir_read_name (cache_dir)) != NULL) {
            /* check that we got a TLE file */
            if (is_tle_file(dir, fnam)) {
                
                /* status message */
                if (!silent && (label1 != NULL)) {
                    text = g_strdup_printf (_("Reading data from %s"), fnam);
                    gtk_label_set_text (GTK_LABEL (label1), text);
                    g_free (text);

                    /* Force the drawing queue to be processed otherwise there will
                        not be any visual feedback, ie. frozen GUI
                        - see Gtk+ FAQ http://www.gtk.org/faq/#AEN602
                    */
                    while (g_main_context_iteration (NULL, FALSE));

                    /* give user a chance to follow progress */
                    g_usleep (G_USEC_PER_SEC / 100);
                }

                /* now, do read the fresh data */
                num = read_fresh_tle (dir, fnam, data);
            } else {
                num = 0;
            }

            if (num < 1) {
                sat_log_log (SAT_LOG_LEVEL_ERROR,
                             _("%s: No valid TLE data found in %s"),
                             __FUNCTION__, fnam);
            }
            else {
                sat_log_log (SAT_LOG_LEVEL_INFO,
                             _("%s: Read %d sats from %s into memory"),
                             __FUNCTION__, num, fnam);
            }
        }

        /* close directory since we don't need it anymore */
        g_dir_close (cache_dir);

        /* now we load each .sat file and update if we have new data */
        userconfdir = get_user_conf_dir ();
        ldname = g_strconcat (userconfdir, G_DIR_SEPARATOR_S, "satdata", NULL);
        g_free (userconfdir);

        /* open directory and read files one by one */
        loc_dir = g_dir_open (ldname, 0, &err);

        if (err != NULL) {

            /* send an error message */
            sat_log_log (SAT_LOG_LEVEL_ERROR,
                         _("%s: Error opening directory %s (%s)"),
                         __FUNCTION__, dir, err->message);

            /* insert error message into the status string, too */
            if (!silent && (label1 != NULL)) {
                text = g_strdup_printf (_("<b>ERROR</b> opening directory %s\n%s"),
                                        dir, err->message);

                gtk_label_set_markup (GTK_LABEL (label1), text);
                g_free (text);
            }

            g_clear_error (&err);
            err = NULL;
        }
        else {
            /* clear statistics */
            updated = 0;
            skipped = 0;
            nodata = 0;
            total = 0;

            /* get initial value of progress indicator */
            if (progress != NULL)
                start = gtk_progress_bar_get_fraction (GTK_PROGRESS_BAR (progress));

            /* This is insane but I don't know how else to count the number of sats */
            num = 0;
            while ((fnam = g_dir_read_name (loc_dir)) != NULL) {
                /* only consider .sat files */
                if (g_str_has_suffix (fnam, ".sat")) {
                    num++;
                }
            }

            g_dir_rewind (loc_dir);

            /* update TLE files one by one */
            while ((fnam = g_dir_read_name (loc_dir)) != NULL) {
                /* only consider .sat files */
                if (g_str_has_suffix (fnam, ".sat")) {

                    /* clear stat bufs */
                    updated_tmp = 0;
                    skipped_tmp = 0;
                    nodata_tmp = 0;
                    total_tmp = 0;

                    /* update TLE data in this file */
                    update_tle_in_file (ldname, fnam, data, 
                                        &updated_tmp,
                                        &skipped_tmp,
                                        &nodata_tmp,
                                        &total_tmp);

                    /* update statistics */
                    updated += updated_tmp;
                    skipped += skipped_tmp;
                    nodata  += nodata_tmp;
                    total   = updated+skipped+nodata;

                    if (!silent) {

                        if (label1 != NULL) {
                            gtk_label_set_text (GTK_LABEL (label1),
                                                _("Updating data..."));
                        }

                        if (label2 != NULL) {
                            text = g_strdup_printf (_("Satellites updated:\t %d\n"\
                                                      "Satellites skipped:\t %d\n"\
                                                      "Missing Satellites:\t %d\n"),
                                                    updated, skipped, nodata);
                            gtk_label_set_text (GTK_LABEL (label2), text);
                            g_free (text);
                        }

                        if (progress != NULL) {
                            /* two different calculations for completeness depending on whether 
                               we are adding new satellites or not. */
                            if (sat_cfg_get_bool (SAT_CFG_BOOL_TLE_ADD_NEW)) {
                                /* In this case we are possibly processing more than num satellites
                                   How many more? We do not know yet.  Worst case is g_hash_table_size more.
                                   
                                   As we update skipped and updated we can reduce the denominator count
                                   as those are in both pools (files and hash table). When we have processed 
                                   all the files, updated and skipped are completely correct and the progress 
                                   is correct. It may be correct sooner if the missed satellites are the 
                                   last files to process.
                                   
                                   Until then, if we eliminate the ones that are updated and skipped from being 
                                   double counted, our progress will shown will always be less or equal to our 
                                   true progress since the denominator will be larger than is correct.
                                   
                                   Advantages to this are that the progress bar does not stall close to 
                                   finished when there are a large number of new satellites.
                                */
                                fraction = start + (1.0-start) * ((gdouble) total) / 
                                    ((gdouble) num + g_hash_table_size(data) - updated - skipped);
                            } else {
                                /* here we only process satellites we have have files for so divide by num */
                                fraction = start + (1.0-start) * ((gdouble) total) / ((gdouble) num);
                            }
                            gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progress),
                                                           fraction);

                        }

                        /* update the gui only every so often to speed up the process */
                        /* 47 was selected empirically to balance the update looking smooth but not take too much time. */
                        /* it also tumbles all digits in the numbers so that there is no obvious pattern. */
                        /* on a developer machine this improved an update from 5 minutes to under 20 seconds. */
                        if (total%47 == 0) {
                            /* Force the drawing queue to be processed otherwise there will
                               not be any visual feedback, ie. frozen GUI
                               - see Gtk+ FAQ http://www.gtk.org/faq/#AEN602
                            */
                            while (g_main_context_iteration (NULL, FALSE));
                        
                            /* give user a chance to follow progress */
                            g_usleep (G_USEC_PER_SEC / 1000);
                        }
                    }
                }
            }
            
            /* force gui update */
            while (g_main_context_iteration (NULL, FALSE));


            /* close directory handle */
            g_dir_close (loc_dir);
            
            /* see if we have any new sats that need to be added */
            if (sat_cfg_get_bool (SAT_CFG_BOOL_TLE_ADD_NEW)) {
                
                newsats = add_new_sats (data);
                
                if (!silent && (label2 != NULL)) {
                    text = g_strdup_printf (_("Satellites updated:\t %d\n"\
                                              "Satellites skipped:\t %d\n"\
                                              "Missing Satellites:\t %d\n"\
                                              "New Satellites:\t\t %d"),
                                            updated, skipped, nodata, newsats);
                    gtk_label_set_text (GTK_LABEL (label2), text);
                    g_free (text);

                }
                
                sat_log_log (SAT_LOG_LEVEL_INFO,
                             _("%s: Added %d new satellites to local database"),
                             __FUNCTION__, newsats);
            }

            /* store time of update if we have updated something */
            if ((updated > 0) || (newsats > 0)) {
                GTimeVal tval;
                
                g_get_current_time (&tval);
                sat_cfg_set_int (SAT_CFG_INT_TLE_LAST_UPDATE, tval.tv_sec);
            }

        }

        g_free (ldname);

        sat_log_log (SAT_LOG_LEVEL_INFO,
                     _("%s: TLE elements updated."),
                     __FUNCTION__);
    }

    /* destroy hash tables */
    g_hash_table_destroy (data);

    g_mutex_unlock(&tle_file_in_progress);
}
/** \brief User pressed OK. Any changes should be stored in config.
 */
void
sat_pref_sky_at_glance_ok     ()
{
    GdkColor col;
    guint    rgb;


    if (dirty) {
        /* values have changed; store new values */
        sat_cfg_set_int (SAT_CFG_INT_SKYATGL_TIME,
                         gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (timesp)));

        gtk_color_button_get_color (GTK_COLOR_BUTTON (col1), &col);
        gdk2rgb (&col, &rgb);
        sat_cfg_set_int (SAT_CFG_INT_SKYATGL_COL_01, rgb);

        gtk_color_button_get_color (GTK_COLOR_BUTTON (col2), &col);
        gdk2rgb (&col, &rgb);
        sat_cfg_set_int (SAT_CFG_INT_SKYATGL_COL_02, rgb);

        gtk_color_button_get_color (GTK_COLOR_BUTTON (col3), &col);
        gdk2rgb (&col, &rgb);
        sat_cfg_set_int (SAT_CFG_INT_SKYATGL_COL_03, rgb);

        gtk_color_button_get_color (GTK_COLOR_BUTTON (col4), &col);
        gdk2rgb (&col, &rgb);
        sat_cfg_set_int (SAT_CFG_INT_SKYATGL_COL_04, rgb);

        gtk_color_button_get_color (GTK_COLOR_BUTTON (col5), &col);
        gdk2rgb (&col, &rgb);
        sat_cfg_set_int (SAT_CFG_INT_SKYATGL_COL_05, rgb);

        gtk_color_button_get_color (GTK_COLOR_BUTTON (col6), &col);
        gdk2rgb (&col, &rgb);
        sat_cfg_set_int (SAT_CFG_INT_SKYATGL_COL_06, rgb);

        gtk_color_button_get_color (GTK_COLOR_BUTTON (col7), &col);
        gdk2rgb (&col, &rgb);
        sat_cfg_set_int (SAT_CFG_INT_SKYATGL_COL_07, rgb);

        gtk_color_button_get_color (GTK_COLOR_BUTTON (col8), &col);
        gdk2rgb (&col, &rgb);
        sat_cfg_set_int (SAT_CFG_INT_SKYATGL_COL_08, rgb);

        gtk_color_button_get_color (GTK_COLOR_BUTTON (col9), &col);
        gdk2rgb (&col, &rgb);
        sat_cfg_set_int (SAT_CFG_INT_SKYATGL_COL_09, rgb);

        gtk_color_button_get_color (GTK_COLOR_BUTTON (col10), &col);
        gdk2rgb (&col, &rgb);
        sat_cfg_set_int (SAT_CFG_INT_SKYATGL_COL_10, rgb);


    }
    else if (reset) {
        /* values haven't changed since last reset */
        sat_cfg_reset_int (SAT_CFG_INT_SKYATGL_TIME);
        sat_cfg_reset_int (SAT_CFG_INT_SKYATGL_COL_01);
        sat_cfg_reset_int (SAT_CFG_INT_SKYATGL_COL_02);
        sat_cfg_reset_int (SAT_CFG_INT_SKYATGL_COL_03);
        sat_cfg_reset_int (SAT_CFG_INT_SKYATGL_COL_04);
        sat_cfg_reset_int (SAT_CFG_INT_SKYATGL_COL_05);
        sat_cfg_reset_int (SAT_CFG_INT_SKYATGL_COL_06);
        sat_cfg_reset_int (SAT_CFG_INT_SKYATGL_COL_07);
        sat_cfg_reset_int (SAT_CFG_INT_SKYATGL_COL_08);
        sat_cfg_reset_int (SAT_CFG_INT_SKYATGL_COL_09);
        sat_cfg_reset_int (SAT_CFG_INT_SKYATGL_COL_10);

        /* FIXME: sats */
    }
}