Skip to content

Commit

Permalink
Force autotrack to respect minimum elevation setting
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonuher authored and csete committed May 8, 2021
1 parent 56f31d5 commit a0a5636
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gtk-sat-module.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,13 @@ static void update_autotrack(GtkSatModule * module)
guint i, n;
double next_aos;
gint next_sat;
int min_ele = sat_cfg_get_int(SAT_CFG_INT_PRED_MIN_EL);

if (module->target > 0)
sat = g_hash_table_lookup(module->satellites, &module->target);

/* do nothing if current target is still above horizon */
if (sat != NULL && sat->el > 0.0)
if (sat != NULL && sat->el > min_ele)
return;

/* set target to satellite with next AOS */
Expand All @@ -104,7 +105,7 @@ static void update_autotrack(GtkSatModule * module)
sat = (sat_t *) iter->data;

/* if sat is above horizon, select it and we are done */
if (sat->el > 0.0)
if (sat->el > min_ele)
{
next_sat = sat->tle.catnr;
break;
Expand Down

0 comments on commit a0a5636

Please sign in to comment.