AP_HAL_SITL: Use double point precision when converting langitudes and longitudes from degrees to radians.

See #9536
This commit is contained in:
Kristian Klausen 2018-10-10 21:03:11 +02:00 committed by Andrew Tridgell
parent e9c1abfc3c
commit d7f529d3c6

View File

@ -252,8 +252,8 @@ void SITL_State::_output_to_flightgear(void)
fdm.version = 0x18;
fdm.padding = 0;
fdm.longitude = radians(sfdm.longitude);
fdm.latitude = radians(sfdm.latitude);
fdm.longitude = DEG_TO_RAD_DOUBLE*sfdm.longitude;
fdm.latitude = DEG_TO_RAD_DOUBLE*sfdm.latitude;
fdm.altitude = sfdm.altitude;
fdm.agl = sfdm.altitude;
fdm.phi = radians(sfdm.rollDeg);