1
0
Fork 0

set north/east/down speed to make radar map mode work

This commit is contained in:
mfranz 2007-06-27 15:28:23 +00:00
parent 50c7a31de8
commit 0b84cddee7

View file

@ -195,8 +195,8 @@ void FGUFO::update( double dt ) {
sgGeodToGeoc( get_Latitude(), get_Altitude(), &sl_radius, &lat_geoc ); sgGeodToGeoc( get_Latitude(), get_Altitude(), &sl_radius, &lat_geoc );
// update euler angles // update euler angles
_set_Euler_Angles( roll, pitch, double heading = fmod(get_Psi() + turn + yaw, SGD_2PI);
fmod(get_Psi() + turn + yaw, SGD_2PI) ); _set_Euler_Angles(roll, pitch, heading);
_set_Euler_Rates(0,0,0); _set_Euler_Rates(0,0,0);
_set_Geocentric_Position( lat_geoc, get_Longitude(), _set_Geocentric_Position( lat_geoc, get_Longitude(),
@ -207,4 +207,8 @@ void FGUFO::update( double dt ) {
_set_Sea_level_radius( sl_radius * SG_METER_TO_FEET); _set_Sea_level_radius( sl_radius * SG_METER_TO_FEET);
_set_Altitude( get_Altitude() + climb ); _set_Altitude( get_Altitude() + climb );
_set_Altitude_AGL( get_Altitude() - get_Runway_altitude() ); _set_Altitude_AGL( get_Altitude() - get_Runway_altitude() );
set_V_north(cos(heading) * velocity * SG_METER_TO_FEET);
set_V_east(sin(heading) * velocity * SG_METER_TO_FEET);
set_V_down(-real_climb_rate);
} }