[mythtv-commits] Ticket #10845: Rotor with usals not working correct after upgrade to 0.25

MythTV noreply at mythtv.org
Sun Sep 23 07:49:34 UTC 2012


#10845: Rotor with usals not working correct after upgrade to 0.25
----------------------------------+-------------------------
 Reporter:  cyberneticbrain@…     |          Owner:
     Type:  Bug Report - General  |         Status:  new
 Priority:  minor                 |      Milestone:  unknown
Component:  MythTV - General      |        Version:  0.25
 Severity:  medium                |     Resolution:
 Keywords:  rotor usals           |  Ticket locked:  0
----------------------------------+-------------------------

Comment (by cyberneticbrain@…):

 Update. Installed mythtv 0.25 from source and adapted
 mythtv/libs/libmythtv/diseqc.cpp before compiling.

 {{{
 double DiSEqCDevRotor::CalculateAzimuth(double angle) const
 {
         // Azimuth Calculation references:
         // http://engr.nmsu.edu/~etti/3_2/3_2e.html
         // http://www.angelfire.com/trek/ismail/theory.html
         // Earth Station Latitude and Longitude in radians
         double P  = gCoreContext->GetSetting("Latitude",  "").toFloat() *
 TO_RADS;
         double Ue = gCoreContext->GetSetting("Longitude", "").toFloat() *
 TO_RADS;      // Satellite Longitude in radians
         double Us = angle * TO_RADS;
         return TO_DEC * atan( tan(Us - Ue) / sin(P) );
 }
 }}}

 changed to


 {{{
 double DiSEqCDevRotor::CalculateAzimuth(double angle) const
 {
         // Equation lifted from VDR rotor plugin by
         // Thomas Bergwinkl <Thomas.Bergwinkl at t-online.de>
         // Earth Station Latitude and Longitude in radians
         double P  = gCoreContext->GetSetting("Latitude",  "").toFloat() *
 TO_RADS;
         double Ue = gCoreContext->GetSetting("Longitude", "").toFloat() *
 TO_RADS;
         // Satellite Longitude in radians
         double Us = angle * TO_RADS;
         double az         = M_PI + atan( tan(Us - Ue) / sin(P) );
         double x           = acos( cos(Us - Ue)  *cos(P) );
         double el         = atan( (cos(x) - 0.1513) / sin(x) );
         double tmp_a   = -cos(el)  *sin(az);
         double tmp_b   = (sin(el)  *cos(P)) - (cos(el)  *sin(P)
 *cos(az));
         double azimuth = atan(tmp_a / tmp_B)  *TO_DEC;
         return azimuth;
 }
 }}}

 After this my rotor with usals was working again.

-- 
Ticket URL: <http://code.mythtv.org/trac/ticket/10845#comment:7>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center


More information about the mythtv-commits mailing list