Skip to content

Commit a0a5636

Browse files
jasonuhercsete
authored andcommitted
Force autotrack to respect minimum elevation setting
1 parent 56f31d5 commit a0a5636

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/gtk-sat-module.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,13 @@ static void update_autotrack(GtkSatModule * module)
8080
guint i, n;
8181
double next_aos;
8282
gint next_sat;
83+
int min_ele = sat_cfg_get_int(SAT_CFG_INT_PRED_MIN_EL);
8384

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

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

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

106107
/* if sat is above horizon, select it and we are done */
107-
if (sat->el > 0.0)
108+
if (sat->el > min_ele)
108109
{
109110
next_sat = sat->tle.catnr;
110111
break;

0 commit comments

Comments
 (0)