Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
linuxdvb rotor: improve GOTOX mode (separate sat longtitute and posit…
…ion byte)
  • Loading branch information
perexg committed Dec 2, 2014
1 parent 3e505d7 commit 6967a9a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/input/mpegts/linuxdvb/linuxdvb_rotor.c
Expand Up @@ -77,9 +77,15 @@ const idclass_t linuxdvb_rotor_gotox_class =
{
.type = PT_U16,
.id = "position",
.name = "Position",
.name = "GOTOX Position",
.off = offsetof(linuxdvb_rotor_t, lr_position),
},
{
.type = PT_DBL,
.id = "sat_lon",
.name = "Satellite Longitude",
.off = offsetof(linuxdvb_rotor_t, lr_sat_lon),
},
{
.type = PT_U16,
.id = "rate",
Expand Down Expand Up @@ -140,12 +146,11 @@ linuxdvb_rotor_grace
if (!ls->ls_orbital_dir || lr->lr_rate == 0)
return ls->ls_max_rotor_move;

newpos = (lr->lr_sat_lon + 0.05) * 10;
if (idnode_is_instance(&lr->ld_id, &linuxdvb_rotor_gotox_class)) {
newpos = lr->lr_position; /* GotoX */
tunit = 1000;
tunit = 1000; /* GOTOX */
} else {
newpos = (lr->lr_sat_lon + 0.05) * 10; /* USALS */
tunit = 10000;
tunit = 10000; /* USALS */
}

curpos = ls->ls_orbital_pos;
Expand Down

0 comments on commit 6967a9a

Please sign in to comment.