- eDebug("Entry for %d,%d? not in Rotor Table found... i try gotoXX?", sat.orbital_position / 10, sat.orbital_position % 10 );
- useGotoXX = true;
-
- int satDir = sat.orbital_position < 0 ?
- eDVBSatelliteRotorParameters::WEST :
- eDVBSatelliteRotorParameters::EAST;
-
- double SatLon = abs(sat.orbital_position)/10.00,
- SiteLat = rotor_param.m_gotoxx_parameters.m_latitude,
- SiteLon = rotor_param.m_gotoxx_parameters.m_longitude;
-
- if ( rotor_param.m_gotoxx_parameters.m_la_direction == eDVBSatelliteRotorParameters::SOUTH )
- SiteLat = -SiteLat;
-
- if ( rotor_param.m_gotoxx_parameters.m_lo_direction == eDVBSatelliteRotorParameters::WEST )
- SiteLon = 360 - SiteLon;
-
- if (satDir == eDVBSatelliteRotorParameters::WEST )
- SatLon = 360 - SatLon;
-
- eDebug("siteLatitude = %lf, siteLongitude = %lf, %lf degrees", SiteLat, SiteLon, SatLon );
- double satHourAngle =
- calcSatHourangle( SatLon, SiteLat, SiteLon );
- eDebug("PolarmountHourAngle=%lf", satHourAngle );
-
- static int gotoXTable[10] =
- { 0x00, 0x02, 0x03, 0x05, 0x06, 0x08, 0x0A, 0x0B, 0x0D, 0x0E };
-
- if (SiteLat >= 0) // Northern Hemisphere
- {
- int tmp=(int)round( fabs( 180 - satHourAngle ) * 10.0 );
- RotorCmd = (tmp/10)*0x10 + gotoXTable[ tmp % 10 ];
-
- if (satHourAngle < 180) // the east
- RotorCmd |= 0xE000;
- else // west
- RotorCmd |= 0xD000;
- }
- else // Southern Hemisphere
- {
- if (satHourAngle < 180) // the east
- {
- int tmp=(int)round( fabs( satHourAngle ) * 10.0 );
- RotorCmd = (tmp/10)*0x10 + gotoXTable[ tmp % 10 ];
- RotorCmd |= 0xD000;
- }
- else // west
- {
- int tmp=(int)round( fabs( 360 - satHourAngle ) * 10.0 );
- RotorCmd = (tmp/10)*0x10 + gotoXTable[ tmp % 10 ];
- RotorCmd |= 0xE000;
- }
- }
- eDebug("RotorCmd = %04x", RotorCmd);
+ diseqc.len = 3;
+ diseqc.data[0] = 0xE0;
+ diseqc.data[1] = 0x31; // positioner
+ diseqc.data[2] = 0x60; // stop
+ sec_sequence.push_back( eSecCommand(eSecCommand::IF_ROTORPOS_VALID_GOTO, +3) );
+ sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) );
+ // wait 300msec after send rotor stop cmd
+ sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, 300) );