]> git.mxchange.org Git - flightgear.git/commitdiff
Don't snap to runway heading if an offset azimuth is supplied.
authordavid <david>
Wed, 16 Jul 2003 19:12:02 +0000 (19:12 +0000)
committerdavid <david>
Wed, 16 Jul 2003 19:12:02 +0000 (19:12 +0000)
src/Main/fg_init.cxx

index 85c04926a866d65030a9352b88abe7dd6b27f12e..59b7104285ee31c09a13dfb1004cc3ee2b580ffd 100644 (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;
         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 );
         }
         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;
        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 );
        }
        while ( oaz >= 360.0 ) { oaz -= 360.0; }
        geo_direct_wgs_84 ( 0, lat2, lon2, oaz, odist, &olat, &olon, &az2 );