1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-25 17:25:13 +03:00

Double test removed

This commit is contained in:
bsongis 2012-02-19 22:30:42 +00:00
parent e5161c9622
commit 5d557c73e8

View file

@ -555,9 +555,7 @@ void resetTelemetry()
frskyHubData.maxGpsSpeed = 0;
frskyHubData.cellsCount = 0;
frskyHubData.minCellVolts = 0;
if (frskyHubData.gpsLatitude_bp && frskyHubData.gpsLongitude_bp) {
getGpsPilotPosition();
}
getGpsPilotPosition();
#endif
#ifdef SIMU
@ -592,7 +590,7 @@ void getGpsPilotPosition()
if (frskyHubData.gpsLatitude_bp && frskyHubData.gpsLongitude_bp) {
frskyHubData.pilotLatitude = (((uint32_t)frskyHubData.gpsLatitude_bp / 100) * 1000000) + (((frskyHubData.gpsLatitude_bp % 100) * 10000 + frskyHubData.gpsLatitude_ap) * 5) / 3;
frskyHubData.pilotLongitude = (((uint32_t)frskyHubData.gpsLongitude_bp / 100) * 1000000) + (((frskyHubData.gpsLongitude_bp % 100) * 10000 + frskyHubData.gpsLongitude_ap) * 5) / 3;
uint32_t lat = ((uint32_t)frskyHubData.gpsLatitude_bp/100)*100+ (((uint32_t)frskyHubData.gpsLatitude_bp % 100)*5)/3;
uint32_t lat = ((uint32_t)frskyHubData.gpsLatitude_bp / 100) * 100+ (((uint32_t)frskyHubData.gpsLatitude_bp % 100) * 5) / 3;
uint32_t angle2 = (lat*lat) / 10000;
uint32_t angle4 = angle2 * angle2;
frskyHubData.distFromEarthAxis = 139*(((uint32_t)10000000-((angle2*(uint32_t)123370)/81)+(angle4/25))/12500);