From: curt Date: Wed, 4 Feb 2004 20:16:30 +0000 (+0000) Subject: Add vertical speed fpm conversion since the fdm provides this value in X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=266534259dcec46f805ba05ef2f5d4624584cb23;p=flightgear.git Add vertical speed fpm conversion since the fdm provides this value in fps. --- diff --git a/src/Autopilot/xmlauto.cxx b/src/Autopilot/xmlauto.cxx index bf37d442c..e329d46b3 100644 --- a/src/Autopilot/xmlauto.cxx +++ b/src/Autopilot/xmlauto.cxx @@ -646,6 +646,14 @@ static void update_helper( double dt ) { if ( diff < -180.0 ) { diff += 360.0; } if ( diff > 180.0 ) { diff -= 360.0; } true_nav1->setDoubleValue( diff ); + + // Calculate vertical speed in fpm + static SGPropertyNode *vs_fps + = fgGetNode( "/velocities/vertical-speed-fps", true ); + static SGPropertyNode *vs_fpm + = fgGetNode( "/autopilot/internal/vert-speed-fpm", true ); + + vs_fpm->setDoubleValue( vs_fps->getDoubleValue() * 60.0 ); }