#endif
#include <simgear/math/sg_geodesy.hxx>
-#include <simgear/math/polar3d.hxx>
#include <Aircraft/controls.hxx>
#include <Main/globals.hxx>
double yaw = fabs(rudder) < .2 ? 0.0 : rudder / (25 + fabs(speed) * .1);
// update (lon/lat) position
- double lat2, lon2, az2;
+ double lat2 = 0.0, lon2 = 0.0, az2 = 0.0;
if ( fabs(speed) > SG_EPSILON ) {
geo_direct_wgs_84 ( get_Altitude(),
get_Latitude() * SGD_RADIANS_TO_DEGREES,
get_Psi() * SGD_RADIANS_TO_DEGREES,
dist, &lat2, &lon2, &az2 );
- _set_Longitude( lon2 * SGD_DEGREES_TO_RADIANS );
- _set_Latitude( lat2 * SGD_DEGREES_TO_RADIANS );
+ _set_Geodetic_Position( lat2 * SGD_DEGREES_TO_RADIANS, lon2 * SGD_DEGREES_TO_RADIANS );
}
// cout << "lon error = " << fabs(end.x()*SGD_RADIANS_TO_DEGREES - lon2)