]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
linuxdvb rotor: USALS addr zero longtitute
authorJaroslav Kysela <perex@perex.cz>
Tue, 2 Dec 2014 16:16:39 +0000 (17:16 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 2 Dec 2014 16:16:39 +0000 (17:16 +0100)
src/input/mpegts/linuxdvb/linuxdvb_rotor.c

index a1c75beda4b9abc4a3e9c6bd2a9e73875ad52b07..735a0e825c71599562031d97c236f88c612873eb 100644 (file)
@@ -42,6 +42,7 @@ typedef struct linuxdvb_rotor
   double    lr_site_lat;
   double    lr_site_lon;
   double    lr_sat_lon;
+  double    lr_zero_lon;
   
   /* GOTOX */
   uint32_t  lr_position;
@@ -86,6 +87,12 @@ const idclass_t linuxdvb_rotor_gotox_class =
       .name   = "Satellite Longitude",
       .off    = offsetof(linuxdvb_rotor_t, lr_sat_lon),
     },
+    {
+      .type   = PT_DBL,
+      .id     = "zero_lon",
+      .name   = "Zero Sat Longitude",
+      .off    = offsetof(linuxdvb_rotor_t, lr_zero_lon),
+    },
     {
       .type   = PT_U16,
       .id     = "rate",
@@ -236,7 +243,7 @@ linuxdvb_rotor_usals_tune
 
   double lat = TO_RAD(lr->lr_site_lat);
   double lon = TO_RAD(lr->lr_site_lon);
-  double pos = TO_RAD(lr->lr_sat_lon);
+  double pos = TO_RAD(lr->lr_sat_lon - lr->lr_zero_lon);
      
   double dishVector[3] = {
     (r_eq * cos(lat)),