zapit/src/scannit.cpp: fix satellite descriptor satellite position

This commit is contained in:
[CST] Focus
2012-10-10 18:33:11 +04:00
parent 1c113127ce
commit a9950f10eb

View File

@@ -293,12 +293,17 @@ bool CNit::ParseSatelliteDescriptor(SatelliteDeliverySystemDescriptor * sd, Tran
newSat += ((sd->getOrbitalPosition() >> 8) & 0xF) * 100; newSat += ((sd->getOrbitalPosition() >> 8) & 0xF) * 100;
newSat += ((sd->getOrbitalPosition() >> 4) & 0xF) * 10; newSat += ((sd->getOrbitalPosition() >> 4) & 0xF) * 10;
newSat += ((sd->getOrbitalPosition()) & 0xF); newSat += ((sd->getOrbitalPosition()) & 0xF);
if (newSat && (!sd->getWestEastFlag()))
if (newSat > 1800)
newSat = 3600 - newSat; newSat = 3600 - newSat;
if (!sd->getWestEastFlag())
newSat = -newSat;
if (abs(newSat - satellitePosition) < 5)
newSat = satellitePosition;
if(satellitePosition != newSat) { if(satellitePosition != newSat) {
printf("NIT: different satellite position: our %d nit %d\n", printf("NIT: different satellite position: our %d nit %d (%X)\n",
satellitePosition, sd->getOrbitalPosition()); satellitePosition, newSat, sd->getOrbitalPosition());
return false; return false;
} }
@@ -320,7 +325,7 @@ bool CNit::ParseSatelliteDescriptor(SatelliteDeliverySystemDescriptor * sd, Tran
break; break;
default: default:
#ifdef DEBUG_NIT #ifdef DEBUG_NIT
printf("NIT: undefined modulation system %08x\n", modulation_system; printf("NIT: undefined modulation system %08x\n", modulation_system);
#endif #endif
feparams.delsys = SYS_UNDEFINED; feparams.delsys = SYS_UNDEFINED;
break; break;