SG_LOG(SG_FLIGHT,SG_INFO, "FGJSBsim::set_Climb_Rate: " << roc );
update_ic();
- fgic->SetClimbRateFpsIC(roc);
+ //since both climb rate and flight path angle are set in the FG
+ //startup sequence, something is needed to keep one from cancelling
+ //out the other.
+ if( !(fabs(roc) > 1 && fabs(fgic->GetFlightPathAngleRadIC()) < 0.01) ) {
+ fgic->SetClimbRateFpsIC(roc);
+ }
needTrim=true;
}
SG_LOG(SG_FLIGHT,SG_INFO, "FGJSBsim::set_Gamma_vert_rad: " << gamma );
update_ic();
- fgic->SetFlightPathAngleRadIC(gamma);
+ if( !(fabs(gamma) < 0.01 && fabs(fgic->GetClimbRateFpsIC()) > 1) ) {
+ fgic->SetFlightPathAngleRadIC(gamma);
+ }
needTrim=true;
}
// Climb and slip (read-only)
fgTie("/velocities/vertical-speed-fps", this,
- &FGInterface::get_Climb_Rate); // read-only
+ &FGInterface::get_Climb_Rate,
+ &FGInterface::set_Climb_Rate );
+ fgTie("/velocities/glideslope", this,
+ &FGInterface::get_Gamma_vert_rad,
+ &FGInterface::set_Gamma_vert_rad );
fgTie("/velocities/side-slip-rad", this,
&FGInterface::get_Beta); // read-only
fgTie("/velocities/side-slip-deg", this,
&FGInterface::get_Alpha_deg); // read-only
fgTie("/accelerations/nlf", this,
&FGInterface::get_Nlf); // read-only
-
-
}
fgUntie("/velocities/vBody-fps");
fgUntie("/velocities/wBody-fps");
fgUntie("/velocities/vertical-speed-fps");
+ fgUntie("/velocities/glideslope");
fgUntie("/velocities/side-slip-rad");
fgUntie("/velocities/side-slip-deg");
fgUntie("/velocities/alpha-deg");
fgSetDouble("/orientation/roll-deg", atof(arg.substr(7)));
} else if ( arg.find( "--pitch=" ) == 0 ) {
fgSetDouble("/orientation/pitch-deg", atof(arg.substr(8)));
+ } else if ( arg.find( "--glideslope=" ) == 0 ) {
+ fgSetDouble("/velocities/glideslope", atof(arg.substr(13))
+ *SG_DEGREES_TO_RADIANS);
+ } else if ( arg.find( "--roc=" ) == 0 ) {
+ fgSetDouble("/velocities/vertical-speed-fps", atof(arg.substr(6))/60);
} else if ( arg.find( "--fg-root=" ) == 0 ) {
globals->set_fg_root(arg.substr( 10 ));
} else if ( arg.find( "--fg-scenery=" ) == 0 ) {
<< " (in feet unless --units-meters specified)" << endl
<< " --vc=knots Specify initial airspeed" << endl
<< " --mach=num Specify initial mach number" << endl
+ << " --glideslope=degreees Specify flight path angle (can be positive)" << endl
+ << " --roc=fpm Specify initial climb rate (can be negative)" << endl
<< endl
<< "Rendering Options:" << endl