1
0
Fork 0

** Properties Renamed

- /autopilot/locks/nav1 => /autopilot/locks/nav[0]
- /autopilot/settings/altitude += "-ft"
- /autopilot/settings/climb-rate += "-fpm"
- /autopilot/settings/heading-bug += "-deg"
- /consumables/fuel/tank1/level => /consumables/fuel/tank[0]/level-gal_us
- /consumables/fuel/tank2/level => /consumables/fuel/tank[1]/level-gal_us
- /engines/engine0/cht => /engines/engine[0]/cht-degf
- /engines/engine0/egt => /engines/engine[0]/egt-degf
- /engines/engine0/fuel-flow => /engines/engine[0]/fuel-flow-gph
- /engines/engine0/mp => /engines/engine[0]/mp-osi
- /engines/engine0/rpm => /engines/engine[0]/rpm
- /environment/clouds/altitude += "-ft"
- /environment/magnetic-dip += "-deg"
- /environment/magnetic-varation += "-deg"
- /environment/visibility += "-m"
- /environment/wind-down += "-fps"
- /environment/wind-east += "-fps"
- /environment/wind-north += "-fps"
- /orientation/heading += "-deg"
- /orientation/heading-magnetic += "-deg"
- /orientation/pitch += "-deg"
- /orientation/roll += "-deg"
- /position/altitude += "-ft"
- /position/altitude-agl += "-ft"
- /position/latitude += "-deg"
- /position/longitude += "-deg"
- /radios/adf/frequencies/selected += "-khz"
- /radios/adf/frequencies/standby += "-khz"
- /radios/adf/rotation += "-deg"
- /radios/nav1/* => /radios/nav[0]/*
- /radios/nav2/* => /radios/nav[1]/*
- /radios/nav[*]/dme/distance += "-nm"
- /radios/nav[*]/frequencies/selected += "-mhz"
- /radios/nav[*]/frequencies/standby += "-mhz"
- /radios/nav[*]/radials/actual += "-deg"
- /radios/nav[*]/radials/selected += "-deg"
- /sim/view/goal-offset += "-deg"
- /sim/view/offset += "-deg"
- /steam/adf += "-deg"
- /steam/airspeed += "-kt"
- /steam/altitude += "-ft"
- /steam/gyro-compass += "-deg"
- /steam/gyro-compass-error += "-deg"
- /steam/mag-compass += "-deg"
- /steam/vertical-speed += "-fpm"
- /velocities/airspeed += "-kt"
- /velocities/side-slip += "-rad"
- /velocities/speed-down += "-fps"
- /velocities/speed-east += "-fps"
- /velocities/speed-north += "-fps"
- /velocities/uBody += "-fps"
- /velocities/vBody += "-fps"
- /velocities/wBody += "-fps"
- /velocities/vertical-speed += "-fps"
This commit is contained in:
curt 2001-07-02 22:27:24 +00:00
parent 75fd10601a
commit 72a95d570c
12 changed files with 218 additions and 218 deletions

View file

@ -218,7 +218,7 @@ void NewHeadingInit(void)
char NewHeadingLabel[] = "Enter New Heading";
char *s;
float heading = fgGetDouble("/orientation/heading");
float heading = fgGetDouble("/orientation/heading-deg");
int len = 260/2 -
(puGetStringWidth( puGetDefaultLabelFont(), NewHeadingLabel ) /2 );
@ -662,7 +662,7 @@ void PopWayPoint(puObject *cb)
// use current heading
current_autopilot
->set_TargetHeading(fgGetDouble("/orientation/heading"));
->set_TargetHeading(fgGetDouble("/orientation/heading-deg"));
}
}

View file

@ -218,13 +218,13 @@ void FGAutopilot::update_old_control_values() {
void FGAutopilot::init() {
SG_LOG( SG_AUTOPILOT, SG_INFO, "Init AutoPilot Subsystem" );
latitude_node = fgGetNode("/position/latitude", true);
longitude_node = fgGetNode("/position/longitude", true);
altitude_node = fgGetNode("/position/altitude", true);
altitude_agl_node = fgGetNode("/position/altitude-agl", true);
vertical_speed_node = fgGetNode("/velocities/vertical-speed", true);
heading_node = fgGetNode("/orientation/heading", true);
roll_node = fgGetNode("/orientation/roll", true);
latitude_node = fgGetNode("/position/latitude-deg", true);
longitude_node = fgGetNode("/position/longitude-deg", true);
altitude_node = fgGetNode("/position/altitude-ft", true);
altitude_agl_node = fgGetNode("/position/altitude-agl-ft", true);
vertical_speed_node = fgGetNode("/velocities/vertical-speed-fps", true);
heading_node = fgGetNode("/orientation/heading-deg", true);
roll_node = fgGetNode("/orientation/roll-deg", true);
heading_hold = false ; // turn the heading hold off
altitude_hold = false ; // turn the altitude hold off
@ -1045,7 +1045,7 @@ void FGAutopilot::set_AutoThrottleEnabled( bool value ) {
auto_throttle = value;
if ( auto_throttle == true ) {
TargetSpeed = fgGetDouble("/velocities/airspeed");
TargetSpeed = fgGetDouble("/velocities/airspeed-kt");
speed_error_accum = 0.0;
}

View file

@ -84,9 +84,9 @@ FGRadioStack::FGRadioStack() {
nav2_radial = 0.0;
nav2_dme_dist = 0.0;
need_update = true;
lon_node = fgGetNode("/position/longitude");
lat_node = fgGetNode("/position/latitude");
alt_node = fgGetNode("/position/altitude");
lon_node = fgGetNode("/position/longitude-deg");
lat_node = fgGetNode("/position/latitude-deg");
alt_node = fgGetNode("/position/altitude-ft");
}
@ -128,67 +128,67 @@ void
FGRadioStack::bind ()
{
// User inputs
fgTie("/radios/nav1/frequencies/selected", this,
fgTie("/radios/nav[0]/frequencies/selected-mhz", this,
&FGRadioStack::get_nav1_freq, &FGRadioStack::set_nav1_freq);
fgTie("/radios/nav1/frequencies/standby", this,
fgTie("/radios/nav[0]/standby-mhz", this,
&FGRadioStack::get_nav1_alt_freq, &FGRadioStack::set_nav1_alt_freq);
fgTie("/radios/nav1/radials/selected", this,
fgTie("/radios/nav[0]/radials/selected-deg", this,
&FGRadioStack::get_nav1_sel_radial,
&FGRadioStack::set_nav1_sel_radial);
fgTie("/radios/nav1/volume", this,
fgTie("/radios/nav[0]/volume", this,
&FGRadioStack::get_nav1_vol_btn,
&FGRadioStack::set_nav1_vol_btn);
fgTie("/radios/nav1/ident", this,
fgTie("/radios/nav[0]/ident", this,
&FGRadioStack::get_nav1_ident_btn,
&FGRadioStack::set_nav1_ident_btn);
// Radio outputs
fgTie("/radios/nav1/radials/actual", this, &FGRadioStack::get_nav1_radial);
fgTie("/radios/nav1/to-flag", this, &FGRadioStack::get_nav1_to_flag);
fgTie("/radios/nav1/from-flag", this, &FGRadioStack::get_nav1_from_flag);
fgTie("/radios/nav1/in-range", this, &FGRadioStack::get_nav1_inrange);
fgTie("/radios/nav1/dme/distance", this, &FGRadioStack::get_nav1_dme_dist);
fgTie("/radios/nav1/dme/in-range", this,
fgTie("/radios/nav[0]/radials/actual-deg", this, &FGRadioStack::get_nav1_radial);
fgTie("/radios/nav[0]/to-flag", this, &FGRadioStack::get_nav1_to_flag);
fgTie("/radios/nav[0]/from-flag", this, &FGRadioStack::get_nav1_from_flag);
fgTie("/radios/nav[0]/in-range", this, &FGRadioStack::get_nav1_inrange);
fgTie("/radios/nav[0]/dme/distance-nm", this, &FGRadioStack::get_nav1_dme_dist);
fgTie("/radios/nav[0]/dme/in-range", this,
&FGRadioStack::get_nav1_dme_inrange);
fgTie("/radios/nav1/heading-needle-deflection", this,
fgTie("/radios/nav[0]/heading-needle-deflection", this,
&FGRadioStack::get_nav1_heading_needle_deflection);
fgTie("/radios/nav1/gs-needle-deflection", this,
fgTie("/radios/nav[0]/gs-needle-deflection", this,
&FGRadioStack::get_nav1_gs_needle_deflection);
// User inputs
fgTie("/radios/nav2/frequencies/selected", this,
fgTie("/radios/nav[1]/frequencies/selected-mhz", this,
&FGRadioStack::get_nav2_freq, &FGRadioStack::set_nav2_freq);
fgTie("/radios/nav2/frequencies/standby", this,
fgTie("/radios/nav[1]/standby-mhz", this,
&FGRadioStack::get_nav2_alt_freq, &FGRadioStack::set_nav2_alt_freq);
fgTie("/radios/nav2/radials/selected", this,
fgTie("/radios/nav[1]/radials/selected-deg", this,
&FGRadioStack::get_nav2_sel_radial,
&FGRadioStack::set_nav2_sel_radial);
fgTie("/radios/nav2/volume", this,
fgTie("/radios/nav[1]/volume", this,
&FGRadioStack::get_nav2_vol_btn,
&FGRadioStack::set_nav2_vol_btn);
fgTie("/radios/nav2/ident", this,
fgTie("/radios/nav[1]/ident", this,
&FGRadioStack::get_nav2_ident_btn,
&FGRadioStack::set_nav2_ident_btn);
// Radio outputs
fgTie("/radios/nav2/radials/actual", this, &FGRadioStack::get_nav2_radial);
fgTie("/radios/nav2/to-flag", this, &FGRadioStack::get_nav2_to_flag);
fgTie("/radios/nav2/from-flag", this, &FGRadioStack::get_nav2_from_flag);
fgTie("/radios/nav2/in-range", this, &FGRadioStack::get_nav2_inrange);
fgTie("/radios/nav2/dme/distance", this, &FGRadioStack::get_nav2_dme_dist);
fgTie("/radios/nav2/dme/in-range", this,
fgTie("/radios/nav[1]/radials/actual-deg", this, &FGRadioStack::get_nav2_radial);
fgTie("/radios/nav[1]/to-flag", this, &FGRadioStack::get_nav2_to_flag);
fgTie("/radios/nav[1]/from-flag", this, &FGRadioStack::get_nav2_from_flag);
fgTie("/radios/nav[1]/in-range", this, &FGRadioStack::get_nav2_inrange);
fgTie("/radios/nav[1]/dme/distance-nm", this, &FGRadioStack::get_nav2_dme_dist);
fgTie("/radios/nav[1]/dme/in-range", this,
&FGRadioStack::get_nav2_dme_inrange);
fgTie("/radios/nav2/heading-needle-deflection", this,
fgTie("/radios/nav[1]/heading-needle-deflection", this,
&FGRadioStack::get_nav2_heading_needle_deflection);
fgTie("/radios/nav2/gs-needle-deflection", this,
fgTie("/radios/nav[1]/gs-needle-deflection", this,
&FGRadioStack::get_nav2_gs_needle_deflection);
// User inputs
fgTie("/radios/adf/frequencies/selected", this,
fgTie("/radios/adf/frequencies/selected-khz", this,
&FGRadioStack::get_adf_freq, &FGRadioStack::set_adf_freq);
fgTie("/radios/adf/frequencies/standby", this,
fgTie("/radios/adf/frequencies/standby-khz", this,
&FGRadioStack::get_adf_alt_freq, &FGRadioStack::set_adf_alt_freq);
fgTie("/radios/adf/rotation", this,
fgTie("/radios/adf/rotation-deg", this,
&FGRadioStack::get_adf_rotation, &FGRadioStack::set_adf_rotation);
fgTie("/radios/adf/volume", this,
&FGRadioStack::get_adf_vol_btn,
@ -208,37 +208,37 @@ FGRadioStack::bind ()
void
FGRadioStack::unbind ()
{
fgUntie("/radios/nav1/frequencies/selected");
fgUntie("/radios/nav1/frequencies/standby");
fgUntie("/radios/nav1/radials/actual");
fgUntie("/radios/nav1/radials/selected");
fgUntie("/radios/nav1/on");
fgUntie("/radios/nav1/ident");
fgUntie("/radios/nav1/to-flag");
fgUntie("/radios/nav1/from-flag");
fgUntie("/radios/nav1/in-range");
fgUntie("/radios/nav1/dme/distance");
fgUntie("/radios/nav1/dme/in-range");
fgUntie("/radios/nav1/heading-needle-deflection");
fgUntie("/radios/nav1/gs-needle-deflection");
fgUntie("/radios/nav[0]/frequencies/selected-mhz");
fgUntie("/radios/nav[0]/standby-mhz");
fgUntie("/radios/nav[0]/radials/actual-deg");
fgUntie("/radios/nav[0]/radials/selected-deg");
fgUntie("/radios/nav[0]/on");
fgUntie("/radios/nav[0]/ident");
fgUntie("/radios/nav[0]/to-flag");
fgUntie("/radios/nav[0]/from-flag");
fgUntie("/radios/nav[0]/in-range");
fgUntie("/radios/nav[0]/dme/distance-nm");
fgUntie("/radios/nav[0]/dme/in-range");
fgUntie("/radios/nav[0]/heading-needle-deflection");
fgUntie("/radios/nav[0]/gs-needle-deflection");
fgUntie("/radios/nav2/frequencies/selected");
fgUntie("/radios/nav2/frequencies/standby");
fgUntie("/radios/nav2/radials/actual");
fgUntie("/radios/nav2/radials/selected");
fgUntie("/radios/nav2/on");
fgUntie("/radios/nav2/ident");
fgUntie("/radios/nav2/to-flag");
fgUntie("/radios/nav2/from-flag");
fgUntie("/radios/nav2/in-range");
fgUntie("/radios/nav2/dme/distance");
fgUntie("/radios/nav2/dme/in-range");
fgUntie("/radios/nav2/heading-needle-deflection");
fgUntie("/radios/nav2/gs-needle-deflection");
fgUntie("/radios/nav[1]/frequencies/selected-mhz");
fgUntie("/radios/nav[1]/standby-mhz");
fgUntie("/radios/nav[1]//radials/actual-deg");
fgUntie("/radios/nav[1]/radials/selected-deg");
fgUntie("/radios/nav[1]/on");
fgUntie("/radios/nav[1]/ident");
fgUntie("/radios/nav[1]/to-flag");
fgUntie("/radios/nav[1]/from-flag");
fgUntie("/radios/nav[1]/in-range");
fgUntie("/radios/nav[1]/dme/distance-nm");
fgUntie("/radios/nav[1]/dme/in-range");
fgUntie("/radios/nav[1]/heading-needle-deflection");
fgUntie("/radios/nav[1]/gs-needle-deflection");
fgUntie("/radios/adf/frequencies/selected");
fgUntie("/radios/adf/frequencies/standby");
fgUntie("/radios/adf/rotation");
fgUntie("/radios/adf/frequencies/selected-khz");
fgUntie("/radios/adf/frequencies/standby-khz");
fgUntie("/radios/adf/rotation-deg");
fgUntie("/radios/adf/on");
fgUntie("/radios/adf/ident");
@ -1052,7 +1052,7 @@ double FGRadioStack::get_nav2_heading_needle_deflection() const {
double FGRadioStack::get_nav1_gs_needle_deflection() const {
if ( nav1_inrange && nav1_has_gs ) {
double x = nav1_gs_dist;
double y = (fgGetDouble("/position/altitude") - nav1_elev)
double y = (fgGetDouble("/position/altitude-ft") - nav1_elev)
* SG_FEET_TO_METER;
double angle = atan2( y, x ) * SGD_RADIANS_TO_DEGREES;
return (nav1_target_gs - angle) * 5.0;
@ -1067,7 +1067,7 @@ double FGRadioStack::get_nav1_gs_needle_deflection() const {
double FGRadioStack::get_nav2_gs_needle_deflection() const {
if ( nav2_inrange && nav2_has_gs ) {
double x = nav2_gs_dist;
double y = (fgGetDouble("/position/altitude") - nav2_elev)
double y = (fgGetDouble("/position/altitude-ft") - nav2_elev)
* SG_FEET_TO_METER;
double angle = atan2( y, x ) * SGD_RADIANS_TO_DEGREES;
return (nav2_target_gs - angle) * 5.0;

View file

@ -56,7 +56,7 @@ void FGSteam::set_ALT_datum_mb ( double datum_mb ) {
the_ALT_datum_mb = datum_mb;
}
double FGSteam::get_ASI_kias() { return fgGetDouble("/velocities/airspeed"); }
double FGSteam::get_ASI_kias() { return fgGetDouble("/velocities/airspeed-kt"); }
double FGSteam::the_VSI_case = 29.92;
double FGSteam::the_VSI_fps = 0.0;
@ -102,20 +102,20 @@ void FGSteam::update ( int timesteps )
{
if (!isTied) {
isTied = true;
fgTie("/steam/airspeed", FGSteam::get_ASI_kias);
fgTie("/steam/altitude", FGSteam::get_ALT_ft);
fgTie("/steam/airspeed-kt", FGSteam::get_ASI_kias);
fgTie("/steam/altitude-ft", FGSteam::get_ALT_ft);
fgTie("/steam/altimeter-datum-mb",
FGSteam::get_ALT_datum_mb, FGSteam::set_ALT_datum_mb,
false); /* don't modify the value */
fgTie("/steam/turn-rate", FGSteam::get_TC_std);
fgTie("/steam/slip-skid", FGSteam::get_TC_rad);
fgTie("/steam/vertical-speed", FGSteam::get_VSI_fps);
fgTie("/steam/gyro-compass", FGSteam::get_DG_deg);
fgTie("/steam/adf", FGSteam::get_HackADF_deg);
fgTie("/steam/gyro-compass-error",
fgTie("/steam/vertical-speed-fpm", FGSteam::get_VSI_fps);
fgTie("/steam/gyro-compass-deg", FGSteam::get_DG_deg);
fgTie("/steam/adf-deg", FGSteam::get_HackADF_deg);
fgTie("/steam/gyro-compass-error-deg",
FGSteam::get_DG_err, FGSteam::set_DG_err,
false); /* don't modify the value */
fgTie("/steam/mag-compass", FGSteam::get_MH_deg);
fgTie("/steam/mag-compass-deg", FGSteam::get_MH_deg);
}
_UpdatesPending += timesteps;
}
@ -268,16 +268,16 @@ void FGSteam::_CatchUp()
if ( fabs(the_TC_rad) > 0.2 )
{ /* Massive sideslip jams it; it stops turning */
the_MH_degps = 0.0;
the_MH_err = fgGetDouble("/orientation/heading") - the_MH_deg;
the_MH_err = fgGetDouble("/orientation/heading-deg") - the_MH_deg;
} else
{ double MagDip, MagVar, CosDip;
double FrcN, FrcE, FrcU, AccTot;
double EdgN, EdgE, EdgU;
double TrqN, TrqE, TrqU, Torque;
/* Find a force vector towards exact magnetic north */
MagVar = fgGetDouble("/environment/magnetic-variation")
MagVar = fgGetDouble("/environment/magnetic-variation-deg")
/ SGD_RADIANS_TO_DEGREES;
MagDip = fgGetDouble("/environment/magnetic-dip")
MagDip = fgGetDouble("/environment/magnetic-dip-deg")
/ SGD_RADIANS_TO_DEGREES;
CosDip = cos ( MagDip );
FrcN = CosDip * cos ( MagVar );
@ -308,7 +308,7 @@ void FGSteam::_CatchUp()
}
if ( the_MH_err > 180.0 ) the_MH_err -= 360.0; else
if ( the_MH_err < -180.0 ) the_MH_err += 360.0;
the_MH_deg = fgGetDouble("/orientation/heading") - the_MH_err;
the_MH_deg = fgGetDouble("/orientation/heading-deg") - the_MH_err;
}
/**************************
@ -325,7 +325,7 @@ void FGSteam::_CatchUp()
account for the line impedance of the plumbing.
*/
double static_inhg
= altFtToPressInHg(fgGetDouble("/position/altitude"));
= altFtToPressInHg(fgGetDouble("/position/altitude-ft"));
set_lowpass ( & the_STATIC_inhg, static_inhg, dt );
/*
@ -385,10 +385,10 @@ void FGSteam::_CatchUp()
> put in those insidious turning errors ... for now anyway.
*/
if ( _UpdatesPending > 999999 )
the_DG_err = fgGetDouble("/environment/magnetic-variation");
the_DG_err = fgGetDouble("/environment/magnetic-variation-deg");
the_DG_degps = 0.01; /* HACK! */
if (dt<1.0) the_DG_err += dt * the_DG_degps;
the_DG_deg = fgGetDouble("/orientation/heading") - the_DG_err;
the_DG_deg = fgGetDouble("/orientation/heading-deg") - the_DG_err;
/**************************
Finished updates, now clear the timer
@ -412,7 +412,7 @@ double FGSteam::get_HackGS_deg () {
current_radiostack->get_nav1_has_gs() )
{
double x = current_radiostack->get_nav1_gs_dist();
double y = (fgGetDouble("/position/altitude")
double y = (fgGetDouble("/position/altitude-ft")
- current_radiostack->get_nav1_elev())
* SG_FEET_TO_METER;
double angle = atan2( y, x ) * SGD_RADIANS_TO_DEGREES;

View file

@ -101,9 +101,9 @@ void FGBalloonSim::init() {
//set velocities
sgSetVec3( temp,
fgGetDouble("/velocities/uBody"),
fgGetDouble("/velocities/vBody"),
fgGetDouble("/velocities/wBody") );
fgGetDouble("/velocities/uBody-fps"),
fgGetDouble("/velocities/vBody-fps"),
fgGetDouble("/velocities/wBody-fps") );
current_balloon.setVelocity( temp );
SG_LOG( SG_FLIGHT, SG_INFO, "Finished initializing BalloonSim" );

View file

@ -184,14 +184,14 @@ FGInterface::init ()
// Set initial position
SG_LOG(SG_FLIGHT, SG_INFO, "...initializing position...");
set_Longitude(fgGetDouble("/position/longitude") * SGD_DEGREES_TO_RADIANS);
set_Latitude(fgGetDouble("/position/latitude") * SGD_DEGREES_TO_RADIANS);
set_Longitude(fgGetDouble("/position/longitude-deg") * SGD_DEGREES_TO_RADIANS);
set_Latitude(fgGetDouble("/position/latitude-deg") * SGD_DEGREES_TO_RADIANS);
double ground_elev_m = scenery.cur_elev + 1;
double ground_elev_ft = ground_elev_m * METERS_TO_FEET;
if (fgGetBool("/sim/startup/onground") ||
fgGetDouble("/position/altitude") < ground_elev_ft)
fgSetDouble("/position/altitude", ground_elev_ft);
set_Altitude(fgGetDouble("/position/altitude"));
fgGetDouble("/position/altitude-ft") < ground_elev_ft)
fgSetDouble("/position/altitude-ft", ground_elev_ft);
set_Altitude(fgGetDouble("/position/altitude-ft"));
// Set ground elevation
SG_LOG(SG_FLIGHT, SG_INFO,
@ -214,17 +214,17 @@ FGInterface::init ()
} else {
const string speedset = fgGetString("/sim/startup/speed-set");
if (speedset == "knots" || speedset == "KNOTS") {
set_V_calibrated_kts(fgGetDouble("/velocities/airspeed"));
set_V_calibrated_kts(fgGetDouble("/velocities/airspeed-kt"));
} else if (speedset == "mach" || speedset == "MACH") {
set_Mach_number(fgGetDouble("/velocities/mach"));
} else if (speedset == "UVW" || speedset == "uvw") {
set_Velocities_Wind_Body(fgGetDouble("/velocities/uBody"),
fgGetDouble("/velocities/vBody"),
fgGetDouble("/velocities/wBody"));
set_Velocities_Wind_Body(fgGetDouble("/velocities/uBody-fps"),
fgGetDouble("/velocities/vBody-fps"),
fgGetDouble("/velocities/wBody-fps"));
} else if (speedset == "NED" || speedset == "ned") {
set_Velocities_Local(fgGetDouble("/velocities/speed-north"),
fgGetDouble("/velocities/speed-east"),
fgGetDouble("/velocities/speed-down"));
set_Velocities_Local(fgGetDouble("/velocities/speed-north-fps"),
fgGetDouble("/velocities/speed-east-fps"),
fgGetDouble("/velocities/speed-down-fps"));
} else {
SG_LOG(SG_FLIGHT, SG_ALERT,
"Unrecognized value for /sim/startup/speed-set: " << speedset);
@ -235,9 +235,9 @@ FGInterface::init ()
// Set initial Euler angles
SG_LOG(SG_FLIGHT, SG_INFO, "...initializing Euler angles...");
set_Euler_Angles
(fgGetDouble("/orientation/roll") * SGD_DEGREES_TO_RADIANS,
fgGetDouble("/orientation/pitch") * SGD_DEGREES_TO_RADIANS,
fgGetDouble("/orientation/heading") * SGD_DEGREES_TO_RADIANS);
(fgGetDouble("/orientation/roll-deg") * SGD_DEGREES_TO_RADIANS,
fgGetDouble("/orientation/pitch-deg") * SGD_DEGREES_TO_RADIANS,
fgGetDouble("/orientation/heading-deg") * SGD_DEGREES_TO_RADIANS);
SG_LOG(SG_FLIGHT, SG_INFO, "End initializing FGInterface");
}
@ -266,63 +266,63 @@ FGInterface::bind ()
&FGInterface::get_multi_loop); // read-only
// Aircraft position
fgTie("/position/latitude", this,
fgTie("/position/latitude-deg", this,
&FGInterface::get_Latitude_deg,
&FGInterface::set_Latitude_deg,
false);
fgTie("/position/longitude", this,
fgTie("/position/longitude-deg", this,
&FGInterface::get_Longitude_deg,
&FGInterface::set_Longitude_deg,
false);
fgTie("/position/altitude", this,
fgTie("/position/altitude-ft", this,
&FGInterface::get_Altitude,
&FGInterface::set_Altitude,
false);
fgTie("/position/altitude-agl", this,
fgTie("/position/altitude-agl-ft", this,
&FGInterface::get_Altitude_AGL); // read-only
// Orientation
fgTie("/orientation/roll", this,
fgTie("/orientation/roll-deg", this,
&FGInterface::get_Phi_deg,
&FGInterface::set_Phi_deg);
fgTie("/orientation/pitch", this,
fgTie("/orientation/pitch-deg", this,
&FGInterface::get_Theta_deg,
&FGInterface::set_Theta_deg);
fgTie("/orientation/heading", this,
fgTie("/orientation/heading-deg", this,
&FGInterface::get_Psi_deg,
&FGInterface::set_Psi_deg);
// Calibrated airspeed
fgTie("/velocities/airspeed", this,
fgTie("/velocities/airspeed-kt", this,
&FGInterface::get_V_calibrated_kts,
&FGInterface::set_V_calibrated_kts);
// Local velocities
fgTie("/velocities/speed-north", this,
fgTie("/velocities/speed-north-fps", this,
&FGInterface::get_V_north,
&FGInterface::set_V_north);
fgTie("/velocities/speed-east", this,
fgTie("/velocities/speed-east-fps", this,
&FGInterface::get_V_east,
&FGInterface::set_V_east);
fgTie("/velocities/speed-down", this,
fgTie("/velocities/speed-down-fps", this,
&FGInterface::get_V_down,
&FGInterface::set_V_down);
// Relative wind
fgTie("/velocities/uBody", this,
fgTie("/velocities/uBody-fps", this,
&FGInterface::get_uBody,
&FGInterface::set_uBody);
fgTie("/velocities/vBody", this,
fgTie("/velocities/vBody-fps", this,
&FGInterface::get_vBody,
&FGInterface::set_vBody);
fgTie("/velocities/wBody", this,
fgTie("/velocities/wBody-fps", this,
&FGInterface::get_wBody,
&FGInterface::set_wBody);
// Climb and slip (read-only)
fgTie("/velocities/vertical-speed", this,
fgTie("/velocities/vertical-speed-fps", this,
&FGInterface::get_Climb_Rate); // read-only
fgTie("/velocities/side-slip", this,
fgTie("/velocities/side-slip-rad", this,
&FGInterface::get_Beta); // read-only
}
@ -340,21 +340,21 @@ FGInterface::unbind ()
fgUntie("/fdm/time/elapsed");
fgUntie("/fdm/time/remainder");
fgUntie("/fdm/time/multi_loop");
fgUntie("/position/latitude");
fgUntie("/position/longitude");
fgUntie("/position/altitude");
fgUntie("/position/latitude-deg");
fgUntie("/position/longitude-deg");
fgUntie("/position/altitude-ft");
fgUntie("/position/heading");
fgUntie("/position/pitch");
fgUntie("/position/roll");
fgUntie("/velocities/airspeed");
fgUntie("/velocities/speed-north");
fgUntie("/velocities/speed-east");
fgUntie("/velocities/speed-down");
fgUntie("/velocities/uBody");
fgUntie("/velocities/vBody");
fgUntie("/velocities/wBody");
fgUntie("/velocities/vertical-speed");
fgUntie("/velocities/side-slip");
fgUntie("/velocities/airspeed-kt");
fgUntie("/velocities/speed-north-fps");
fgUntie("/velocities/speed-east-fps");
fgUntie("/velocities/speed-down-fps");
fgUntie("/velocities/uBody-fps");
fgUntie("/velocities/vBody-fps");
fgUntie("/velocities/wBody-fps");
fgUntie("/velocities/vertical-speed-fps");
fgUntie("/velocities/side-slip-rad");
}

View file

@ -79,7 +79,7 @@ void AptDialog_OK (puObject *)
if ( airports.search( AptId, &a ) )
{
fgSetString("/sim/startup/airport-id", AptId.c_str() );
// fgSetDouble("/position/altitude", -9999.0 );
// fgSetDouble("/position/altitude-ft", -9999.0 );
// fgSetPosFromAirportID( AptId );
fgSetPosFromAirportIDandHdg( AptId,
cur_fdm_state->get_Psi() *

View file

@ -187,8 +187,8 @@ do_tile_cache_reload (const SGPropertyNode * arg, SGCommandState ** state)
BusyCursor(0);
if ( global_tile_mgr.init() ) {
// Load the local scenery data
global_tile_mgr.update(fgGetDouble("/position/longitude"),
fgGetDouble("/position/latitude"));
global_tile_mgr.update(fgGetDouble("/position/longitude-deg"),
fgGetDouble("/position/latitude-deg"));
} else {
SG_LOG( SG_GENERAL, SG_ALERT,
"Error in Tile Manager initialization!" );

View file

@ -276,8 +276,8 @@ bool fgSetPosFromAirportID( const string& id ) {
"Attempting to set starting position from airport code " << id );
if ( fgFindAirportID( id, &a ) ) {
fgSetDouble("/position/longitude", a.longitude );
fgSetDouble("/position/latitude", a.latitude );
fgSetDouble("/position/longitude-deg", a.longitude );
fgSetDouble("/position/latitude-deg", a.latitude );
SG_LOG( SG_GENERAL, SG_INFO,
"Position for " << id << " is ("
<< a.longitude << ", "
@ -397,9 +397,9 @@ bool fgSetPosFromAirportIDandHdg( const string& id, double tgt_hdg ) {
lat2=olat;
lon2=olon;
}
fgSetDouble("/position/longitude", lon2 );
fgSetDouble("/position/latitude", lat2 );
fgSetDouble("/orientation/heading", heading );
fgSetDouble("/position/longitude-deg", lon2 );
fgSetDouble("/position/latitude-deg", lat2 );
fgSetDouble("/orientation/heading-deg", heading );
SG_LOG( SG_GENERAL, SG_INFO,
"Position for " << id << " is ("
@ -488,8 +488,8 @@ bool fgInitSubsystems( void ) {
if ( global_tile_mgr.init() ) {
// Load the local scenery data
global_tile_mgr.update( fgGetDouble("/position/longitude"),
fgGetDouble("/position/latitude") );
global_tile_mgr.update( fgGetDouble("/position/longitude-deg"),
fgGetDouble("/position/latitude-deg") );
} else {
SG_LOG( SG_GENERAL, SG_ALERT, "Error in Tile Manager initialization!" );
exit(-1);
@ -634,7 +634,7 @@ bool fgInitSubsystems( void ) {
WeatherDatabase = FGLocalWeatherDatabase::theFGLocalWeatherDatabase;
double init_vis = fgGetDouble("/environment/visibility");
double init_vis = fgGetDouble("/environment/visibility-m");
if ( init_vis > 0 ) {
WeatherDatabase->setWeatherVisibility( init_vis );
}
@ -751,7 +751,7 @@ bool fgInitSubsystems( void ) {
// Initialize the default (kludged) properties.
////////////////////////////////////////////////////////////////////
fgInitProps ();
fgInitProps();
////////////////////////////////////////////////////////////////////
@ -787,7 +787,7 @@ bool fgInitSubsystems( void ) {
void fgReInitSubsystems( void )
{
SG_LOG( SG_GENERAL, SG_INFO,
"/position/altitude = " << fgGetDouble("/position/altitude") );
"/position/altitude = " << fgGetDouble("/position/altitude-ft") );
bool freeze = globals->get_freeze();
if( !freeze )
@ -801,8 +801,8 @@ void fgReInitSubsystems( void )
if( global_tile_mgr.init() ) {
// Load the local scenery data
global_tile_mgr.update( fgGetDouble("/position/longitude"),
fgGetDouble("/position/latitude") );
global_tile_mgr.update( fgGetDouble("/position/longitude-deg"),
fgGetDouble("/position/latitude-deg") );
} else {
SG_LOG( SG_GENERAL, SG_ALERT, "Error in Tile Manager initialization!" );
exit(-1);

View file

@ -855,37 +855,37 @@ fgInitProps ()
// Simulation
fgTie("/sim/freeze", getFreeze, setFreeze);
fgTie("/sim/aircraft-dir", getAircraftDir, setAircraftDir);
fgTie("/sim/view/offset", getViewOffset, setViewOffset);
fgTie("/sim/view/goal-offset", getGoalViewOffset, setGoalViewOffset);
fgTie("/sim/view/offset-deg", getViewOffset, setViewOffset);
fgTie("/sim/view/goal-offset-deg", getGoalViewOffset, setGoalViewOffset);
fgTie("/sim/time/gmt", getDateString, setDateString);
fgTie("/sim/time/gmt-string", getGMTString);
fgTie("/sim/rendering/textures", getTextures, setTextures);
// Orientation
fgTie("/orientation/heading-magnetic", getHeadingMag);
fgTie("/orientation/heading-magnetic-deg", getHeadingMag);
// Engine
fgTie("/engines/engine0/rpm", getRPM);
fgTie("/engines/engine0/egt", getEGT);
fgTie("/engines/engine0/cht", getCHT);
fgTie("/engines/engine0/mp", getMP);
fgTie("/engines/engine0/fuel-flow", getFuelFlow);
fgTie("/engines/engine[0]/rpm", getRPM);
fgTie("/engines/engine[0]/egt-degf", getEGT);
fgTie("/engines/engine[0]/cht-degf", getCHT);
fgTie("/engines/engine[0]/mp-osi", getMP);
fgTie("/engines/engine[0]/fuel-flow-gph", getFuelFlow);
//consumables
fgTie("/consumables/fuel/tank1/level", getTank1Fuel, setTank1Fuel, false);
fgTie("/consumables/fuel/tank2/level", getTank2Fuel, setTank2Fuel, false);
fgTie("/consumables/fuel/tank[0]/level-gal_us", getTank1Fuel, setTank1Fuel, false);
fgTie("/consumables/fuel/tank2/level-gal_us", getTank2Fuel, setTank2Fuel, false);
// Autopilot
fgTie("/autopilot/locks/altitude", getAPAltitudeLock, setAPAltitudeLock);
fgTie("/autopilot/settings/altitude", getAPAltitude, setAPAltitude);
fgTie("/autopilot/settings/altitude-ft", getAPAltitude, setAPAltitude);
fgTie("/autopilot/locks/glide-slope", getAPGSLock, setAPGSLock);
fgTie("/autopilot/locks/terrain", getAPTerrainLock, setAPTerrainLock);
fgTie("/autopilot/settings/climb-rate", getAPClimb, setAPClimb, false);
fgTie("/autopilot/settings/climb-rate-fpm", getAPClimb, setAPClimb, false);
fgTie("/autopilot/locks/heading", getAPHeadingLock, setAPHeadingLock);
fgTie("/autopilot/settings/heading-bug", getAPHeadingBug, setAPHeadingBug,
fgTie("/autopilot/settings/heading-bug-deg", getAPHeadingBug, setAPHeadingBug,
false);
fgTie("/autopilot/locks/wing-leveler", getAPWingLeveler, setAPWingLeveler);
fgTie("/autopilot/locks/nav1", getAPNAV1Lock, setAPNAV1Lock);
fgTie("/autopilot/locks/nav[0]", getAPNAV1Lock, setAPNAV1Lock);
fgTie("/autopilot/locks/auto-throttle",
getAPAutoThrottleLock, setAPAutoThrottleLock);
fgTie("/autopilot/control-overrides/rudder",
@ -896,12 +896,12 @@ fgInitProps ()
getAPThrottleControl, setAPThrottleControl);
// Environment
fgTie("/environment/visibility", getVisibility, setVisibility);
fgTie("/environment/wind-north", getWindNorth, setWindNorth);
fgTie("/environment/wind-east", getWindEast, setWindEast);
fgTie("/environment/wind-down", getWindDown, setWindDown);
fgTie("/environment/magnetic-variation", getMagVar);
fgTie("/environment/magnetic-dip", getMagDip);
fgTie("/environment/visibility-m", getVisibility, setVisibility);
fgTie("/environment/wind-north-fps", getWindNorth, setWindNorth);
fgTie("/environment/wind-east-fps", getWindEast, setWindEast);
fgTie("/environment/wind-down-fps", getWindDown, setWindDown);
fgTie("/environment/magnetic-variation-deg", getMagVar);
fgTie("/environment/magnetic-dip-deg", getMagDip);
// View
fgTie("/sim/field-of-view", getFOV, setFOV);

View file

@ -718,7 +718,7 @@ void fgRenderFrame( void ) {
if (prop_selector != NULL) {
int propsel_mask = 0;
double rpm = fgGetDouble("/engines/engine0/rpm");
double rpm = fgGetDouble("/engines/engine[0]/rpm");
for (int i = 0; i < acmodel_npropsettings; i++) {
if (rpm >= acmodel_proprpms[i][0] &&
rpm <= acmodel_proprpms[i][1]) {
@ -1553,14 +1553,14 @@ int main( int argc, char **argv ) {
if ( fgGetString("/sim/startup/airport-id").length() ) {
// fgSetPosFromAirportID( fgGetString("/sim/startup/airport-id") );
fgSetPosFromAirportIDandHdg( fgGetString("/sim/startup/airport-id"),
fgGetDouble("/orientation/heading") );
fgGetDouble("/orientation/heading-deg") );
}
// Initialize time
SGPath zone( globals->get_fg_root() );
zone.append( "Timezone" );
SGTime *t = new SGTime( fgGetDouble("/position/longitude") * SGD_DEGREES_TO_RADIANS,
fgGetDouble("/position/latitude") * SGD_DEGREES_TO_RADIANS,
SGTime *t = new SGTime( fgGetDouble("/position/longitude-deg") * SGD_DEGREES_TO_RADIANS,
fgGetDouble("/position/latitude-deg") * SGD_DEGREES_TO_RADIANS,
zone.str() );
// Handle potential user specified time offsets

View file

@ -114,24 +114,24 @@ fgSetDefaults ()
globals->set_fg_scenery("");
}
// Position (Globe, AZ)
fgSetDouble("/position/longitude", -110.6642444);
fgSetDouble("/position/latitude", 33.3528917);
fgSetDouble("/position/altitude", -9999.0);
fgSetDouble("/position/longitude-deg", -110.6642444);
fgSetDouble("/position/latitude-deg", 33.3528917);
fgSetDouble("/position/altitude-ft", -9999.0);
// Orientation
fgSetDouble("/orientation/heading", 270);
fgSetDouble("/orientation/roll", 0);
fgSetDouble("/orientation/pitch", 0.424);
fgSetDouble("/orientation/heading-deg", 270);
fgSetDouble("/orientation/roll-deg", 0);
fgSetDouble("/orientation/pitch-deg", 0.424);
// Velocities
fgSetString("/sim/startup/speed-set", "knots");
fgSetDouble("/velocities/uBody", 0.0);
fgSetDouble("/velocities/vBody", 0.0);
fgSetDouble("/velocities/wBody", 0.0);
fgSetDouble("/velocities/speed-north", 0.0);
fgSetDouble("/velocities/speed-east", 0.0);
fgSetDouble("/velocities/speed-down", 0.0);
fgSetDouble("/velocities/airspeed", 0.0);
fgSetDouble("/velocities/uBody-fps", 0.0);
fgSetDouble("/velocities/vBody-fps", 0.0);
fgSetDouble("/velocities/wBody-fps", 0.0);
fgSetDouble("/velocities/speed-north-fps", 0.0);
fgSetDouble("/velocities/speed-east-fps", 0.0);
fgSetDouble("/velocities/speed-down-fps", 0.0);
fgSetDouble("/velocities/airspeed-kt", 0.0);
fgSetDouble("/velocities/mach", 0.0);
// Miscellaneous
@ -161,7 +161,7 @@ fgSetDefaults ()
// Rendering options
fgSetString("/sim/rendering/fog", "nicest");
fgSetBool("/environment/clouds/status", true);
fgSetDouble("/environment/clouds/altitude", 5000);
fgSetDouble("/environment/clouds/altitude-ft", 5000);
fgSetBool("/sim/startup/fullscreen", false);
fgSetBool("/sim/rendering/shading", true);
fgSetBool("/sim/rendering/skyblend", true);
@ -171,8 +171,8 @@ fgSetDefaults ()
fgSetInt("/sim/startup/ysize", 600);
fgSetInt("/sim/rendering/bits-per-pixel", 16);
fgSetString("/sim/view-mode", "pilot");
fgSetDouble("/sim/view/offset", 0);
fgSetDouble("/environment/visibility", 20000);
fgSetDouble("/sim/view/offset-deg", 0);
fgSetDouble("/environment/visibility-m", 20000);
// HUD options
fgSetString("/sim/startup/units", "feet");
@ -578,74 +578,74 @@ parse_option (const string& arg)
} else if ( arg.find( "--offset-azimuth=") == 0 ) {
fgSetDouble("/sim/startup/offset-azimuth", atof(arg.substr(17)));
} else if ( arg.find( "--lon=" ) == 0 ) {
fgSetDouble("/position/longitude",
fgSetDouble("/position/longitude-deg",
parse_degree(arg.substr(6)));
fgSetString("/sim/startup/airport-id", "");
} else if ( arg.find( "--lat=" ) == 0 ) {
fgSetDouble("/position/latitude",
fgSetDouble("/position/latitude-deg",
parse_degree(arg.substr(6)));
fgSetString("/sim/startup/airport-id", "");
} else if ( arg.find( "--altitude=" ) == 0 ) {
fgSetBool("/sim/startup/onground", false);
if ( fgGetString("/sim/startup/units") == "feet" )
fgSetDouble("/position/altitude", atof(arg.substr(11)));
fgSetDouble("/position/altitude-ft", atof(arg.substr(11)));
else
fgSetDouble("/position/altitude",
fgSetDouble("/position/altitude-ft",
atof(arg.substr(11)) * SG_METER_TO_FEET);
} else if ( arg.find( "--uBody=" ) == 0 ) {
fgSetString("/sim/startup/speed-set", "UVW");
if ( fgGetString("/sim/startup/units") == "feet" )
fgSetDouble("/velocities/uBody", atof(arg.substr(8)));
fgSetDouble("/velocities/uBody-fps", atof(arg.substr(8)));
else
fgSetDouble("/velocities/uBody",
fgSetDouble("/velocities/uBody-fps",
atof(arg.substr(8)) * SG_METER_TO_FEET);
} else if ( arg.find( "--vBody=" ) == 0 ) {
fgSetString("/sim/startup/speed-set", "UVW");
if ( fgGetString("/sim/startup/units") == "feet" )
fgSetDouble("/velocities/vBody", atof(arg.substr(8)));
fgSetDouble("/velocities/vBody-fps", atof(arg.substr(8)));
else
fgSetDouble("/velocities/vBody",
fgSetDouble("/velocities/vBody-fps",
atof(arg.substr(8)) * SG_METER_TO_FEET);
} else if ( arg.find( "--wBody=" ) == 0 ) {
fgSetString("/sim/startup/speed-set", "UVW");
if ( fgGetString("/sim/startup/units") == "feet" )
fgSetDouble("/velocities/wBody", atof(arg.substr(8)));
fgSetDouble("/velocities/wBody-fps", atof(arg.substr(8)));
else
fgSetDouble("/velocities/wBody",
fgSetDouble("/velocities/wBody-fps",
atof(arg.substr(8)) * SG_METER_TO_FEET);
} else if ( arg.find( "--vNorth=" ) == 0 ) {
fgSetString("/sim/startup/speed-set", "NED");
if ( fgGetString("/sim/startup/units") == "feet" )
fgSetDouble("/velocities/speed-north", atof(arg.substr(9)));
fgSetDouble("/velocities/speed-north-fps", atof(arg.substr(9)));
else
fgSetDouble("/velocities/speed-north",
fgSetDouble("/velocities/speed-north-fps",
atof(arg.substr(9)) * SG_METER_TO_FEET);
} else if ( arg.find( "--vEast=" ) == 0 ) {
fgSetString("/sim/startup/speed-set", "NED");
if ( fgGetString("/sim/startup/units") == "feet" )
fgSetDouble("/velocities/speed-east", atof(arg.substr(8)));
fgSetDouble("/velocities/speed-east-fps", atof(arg.substr(8)));
else
fgSetDouble("/velocities/speed-east",
atof(arg.substr(8)) * SG_METER_TO_FEET);
fgSetDouble("/velocities/speed-east-fps",
atof(arg.substr(8)) * SG_METER_TO_FEET);
} else if ( arg.find( "--vDown=" ) == 0 ) {
fgSetString("/sim/startup/speed-set", "NED");
if ( fgGetString("/sim/startup/units") == "feet" )
fgSetDouble("/velocities/speed-down", atof(arg.substr(8)));
fgSetDouble("/velocities/speed-down-fps", atof(arg.substr(8)));
else
fgSetDouble("/velocities/speed-down",
fgSetDouble("/velocities/speed-down-fps",
atof(arg.substr(8)) * SG_METER_TO_FEET);
} else if ( arg.find( "--vc=" ) == 0) {
fgSetString("/sim/startup/speed-set", "knots");
fgSetDouble("/velocities/airspeed", atof(arg.substr(5)));
fgSetDouble("/velocities/airspeed-kt", atof(arg.substr(5)));
} else if ( arg.find( "--mach=" ) == 0) {
fgSetString("/sim/startup/speed-set", "mach");
fgSetDouble("/velocities/mach", atof(arg.substr(7)));
} else if ( arg.find( "--heading=" ) == 0 ) {
fgSetDouble("/orientation/heading", atof(arg.substr(10)));
fgSetDouble("/orientation/heading-deg", atof(arg.substr(10)));
} else if ( arg.find( "--roll=" ) == 0 ) {
fgSetDouble("/orientation/roll", atof(arg.substr(7)));
fgSetDouble("/orientation/roll-deg", atof(arg.substr(7)));
} else if ( arg.find( "--pitch=" ) == 0 ) {
fgSetDouble("/orientation/pitch", atof(arg.substr(8)));
fgSetDouble("/orientation/pitch-deg", atof(arg.substr(8)));
} else if ( arg.find( "--fg-root=" ) == 0 ) {
globals->set_fg_root(arg.substr( 10 ));
} else if ( arg.find( "--fg-scenery=" ) == 0 ) {
@ -681,10 +681,10 @@ parse_option (const string& arg)
} else if ( arg.find( "--clouds-asl=" ) == 0 ) {
// FIXME: check units
if ( fgGetString("/sim/startup/units") == "feet" )
fgSetDouble("/environment/clouds/altitude",
fgSetDouble("/environment/clouds/altitude-ft",
atof(arg.substr(13)) * SG_FEET_TO_METER);
else
fgSetDouble("/environment/clouds/altitude",
fgSetDouble("/environment/clouds/altitude-ft",
atof(arg.substr(13)));
} else if ( arg.find( "--fov=" ) == 0 ) {
parse_fov( arg.substr(6) );
@ -837,13 +837,13 @@ parse_option (const string& arg)
(FGViewerRPH *)globals->get_viewmgr()->get_view( 0 );
pilot_view->set_view_offset( default_view_offset );
pilot_view->set_goal_view_offset( default_view_offset );
fgSetDouble("/sim/view/offset", default_view_offset);
fgSetDouble("/sim/view/offset-deg", default_view_offset);
// $$$ end - added VS Renganathan, 14 Oct 2K
} else if ( arg.find( "--visibility=" ) == 0 ) {
fgSetDouble("/environment/visibility", atof(arg.substr(13)));
fgSetDouble("/environment/visibility-m", atof(arg.substr(13)));
} else if ( arg.find( "--visibility-miles=" ) == 0 ) {
double visibility = atof(arg.substr(19)) * 5280.0 * SG_FEET_TO_METER;
fgSetDouble("/environment/visibility", visibility);
fgSetDouble("/environment/visibility-m", visibility);
} else if ( arg.find( "--wind=" ) == 0 ) {
string val = arg.substr(7);
unsigned int pos = val.find('@');
@ -861,9 +861,9 @@ parse_option (const string& arg)
if (dir >= 360)
dir -= 360;
dir *= SGD_DEGREES_TO_RADIANS;
fgSetDouble("/environment/wind-north",
fgSetDouble("/environment/wind-north-fps",
speed * cos(dir));
fgSetDouble("/environment/wind-east",
fgSetDouble("/environment/wind-east-fps",
speed * sin(dir));
} else if ( arg.find( "--wp=" ) == 0 ) {
parse_wp( arg.substr( 5 ) );