1
0
Fork 0

Don't snap to runway heading if an offset azimuth is supplied.

This commit is contained in:
david 2003-07-16 19:12:02 +00:00
parent b8a8d2194a
commit 16e9d1940b

View file

@ -699,6 +699,7 @@ static bool fgSetPosFromAirportIDandHdg( const string& id, double tgt_hdg ) {
double oaz = azimuth;
if ( fabs(fgGetDouble("/sim/presets/offset-azimuth")) > SG_EPSILON ) {
oaz = fgGetDouble("/sim/presets/offset-azimuth") + 180;
heading = tgt_hdg;
}
while ( oaz >= 360.0 ) { oaz -= 360.0; }
geo_direct_wgs_84 ( 0, lat2, lon2, oaz, odist, &olat, &olon, &az2 );
@ -776,6 +777,7 @@ static bool fgSetPosFromAirportIDandRwy( const string& id, const string& rwy ) {
if ( fabs(fgGetDouble("/sim/presets/offset-azimuth")) > SG_EPSILON )
{
oaz = fgGetDouble("/sim/presets/offset-azimuth") + 180;
heading = fgGetDouble("/sim/presets/heading-deg");
}
while ( oaz >= 360.0 ) { oaz -= 360.0; }
geo_direct_wgs_84 ( 0, lat2, lon2, oaz, odist, &olat, &olon, &az2 );