diff --git a/src/FGFDMExec.cpp b/src/FGFDMExec.cpp index 84a0cea0aa..7470d4ad70 100644 --- a/src/FGFDMExec.cpp +++ b/src/FGFDMExec.cpp @@ -155,17 +155,17 @@ FGFDMExec::FGFDMExec(FGPropertyManager* root, unsigned int* fdmctr) Constructing = true; typedef int (FGFDMExec::*iPMF)(void) const; - instance->Tie("simulation/do_simple_trim", this, (iPMF)0, &FGFDMExec::DoTrim, false); - instance->Tie("simulation/reset", this, (iPMF)0, &FGFDMExec::ResetToInitialConditions, false); + instance->Tie("simulation/do_simple_trim", this, (iPMF)0, &FGFDMExec::DoTrim); + instance->Tie("simulation/reset", this, (iPMF)0, &FGFDMExec::ResetToInitialConditions); instance->Tie("simulation/disperse", this, &FGFDMExec::GetDisperse); - instance->Tie("simulation/randomseed", this, (iPMF)&FGFDMExec::SRand, &FGFDMExec::SRand, false); + instance->Tie("simulation/randomseed", this, (iPMF)&FGFDMExec::SRand, &FGFDMExec::SRand); instance->Tie("simulation/terminate", (int *)&Terminate); instance->Tie("simulation/pause", (int *)&holding); instance->Tie("simulation/sim-time-sec", this, &FGFDMExec::GetSimTime); instance->Tie("simulation/dt", this, &FGFDMExec::GetDeltaT); instance->Tie("simulation/jsbsim-debug", this, &FGFDMExec::GetDebugLevel, &FGFDMExec::SetDebugLevel); - instance->Tie("simulation/frame", (int *)&Frame, false); - instance->Tie("simulation/trim-completed", (int *)&trim_completed, false); + instance->Tie("simulation/frame", (int *)&Frame); + instance->Tie("simulation/trim-completed", (int *)&trim_completed); instance->Tie("forces/hold-down", this, &FGFDMExec::GetHoldDown, &FGFDMExec::SetHoldDown); Constructing = false; diff --git a/src/initialization/FGInitialCondition.cpp b/src/initialization/FGInitialCondition.cpp index 056397fff7..774b5596b1 100644 --- a/src/initialization/FGInitialCondition.cpp +++ b/src/initialization/FGInitialCondition.cpp @@ -1450,80 +1450,61 @@ void FGInitialCondition::bind(FGPropertyManager* PropertyManager) { PropertyManager->Tie("ic/vc-kts", this, &FGInitialCondition::GetVcalibratedKtsIC, - &FGInitialCondition::SetVcalibratedKtsIC, - true); + &FGInitialCondition::SetVcalibratedKtsIC); PropertyManager->Tie("ic/ve-kts", this, &FGInitialCondition::GetVequivalentKtsIC, - &FGInitialCondition::SetVequivalentKtsIC, - true); + &FGInitialCondition::SetVequivalentKtsIC); PropertyManager->Tie("ic/vg-kts", this, &FGInitialCondition::GetVgroundKtsIC, - &FGInitialCondition::SetVgroundKtsIC, - true); + &FGInitialCondition::SetVgroundKtsIC); PropertyManager->Tie("ic/vt-kts", this, &FGInitialCondition::GetVtrueKtsIC, - &FGInitialCondition::SetVtrueKtsIC, - true); + &FGInitialCondition::SetVtrueKtsIC); PropertyManager->Tie("ic/mach", this, &FGInitialCondition::GetMachIC, - &FGInitialCondition::SetMachIC, - true); + &FGInitialCondition::SetMachIC); PropertyManager->Tie("ic/roc-fpm", this, &FGInitialCondition::GetClimbRateFpmIC, - &FGInitialCondition::SetClimbRateFpmIC, - true); + &FGInitialCondition::SetClimbRateFpmIC); PropertyManager->Tie("ic/gamma-deg", this, &FGInitialCondition::GetFlightPathAngleDegIC, - &FGInitialCondition::SetFlightPathAngleDegIC, - true); + &FGInitialCondition::SetFlightPathAngleDegIC); PropertyManager->Tie("ic/alpha-deg", this, &FGInitialCondition::GetAlphaDegIC, - &FGInitialCondition::SetAlphaDegIC, - true); + &FGInitialCondition::SetAlphaDegIC); PropertyManager->Tie("ic/beta-deg", this, &FGInitialCondition::GetBetaDegIC, - &FGInitialCondition::SetBetaDegIC, - true); + &FGInitialCondition::SetBetaDegIC); PropertyManager->Tie("ic/theta-deg", this, &FGInitialCondition::GetThetaDegIC, - &FGInitialCondition::SetThetaDegIC, - true); + &FGInitialCondition::SetThetaDegIC); PropertyManager->Tie("ic/phi-deg", this, &FGInitialCondition::GetPhiDegIC, - &FGInitialCondition::SetPhiDegIC, - true); + &FGInitialCondition::SetPhiDegIC); PropertyManager->Tie("ic/psi-true-deg", this, &FGInitialCondition::GetPsiDegIC, - &FGInitialCondition::SetPsiDegIC, - true); + &FGInitialCondition::SetPsiDegIC); PropertyManager->Tie("ic/lat-gc-deg", this, &FGInitialCondition::GetLatitudeDegIC, - &FGInitialCondition::SetLatitudeDegIC, - true); + &FGInitialCondition::SetLatitudeDegIC); PropertyManager->Tie("ic/long-gc-deg", this, &FGInitialCondition::GetLongitudeDegIC, - &FGInitialCondition::SetLongitudeDegIC, - true); + &FGInitialCondition::SetLongitudeDegIC); PropertyManager->Tie("ic/h-sl-ft", this, &FGInitialCondition::GetAltitudeASLFtIC, - &FGInitialCondition::SetAltitudeASLFtIC, - true); + &FGInitialCondition::SetAltitudeASLFtIC); PropertyManager->Tie("ic/h-agl-ft", this, &FGInitialCondition::GetAltitudeAGLFtIC, - &FGInitialCondition::SetAltitudeAGLFtIC, - true); + &FGInitialCondition::SetAltitudeAGLFtIC); PropertyManager->Tie("ic/terrain-elevation-ft", this, &FGInitialCondition::GetTerrainElevationFtIC, - &FGInitialCondition::SetTerrainElevationFtIC, - true); + &FGInitialCondition::SetTerrainElevationFtIC); PropertyManager->Tie("ic/vg-fps", this, &FGInitialCondition::GetVgroundFpsIC, - &FGInitialCondition::SetVgroundFpsIC, - true); + &FGInitialCondition::SetVgroundFpsIC); PropertyManager->Tie("ic/vt-fps", this, &FGInitialCondition::GetVtrueFpsIC, - &FGInitialCondition::SetVtrueFpsIC, - true); + &FGInitialCondition::SetVtrueFpsIC); PropertyManager->Tie("ic/vw-bx-fps", this, &FGInitialCondition::GetWindUFpsIC); PropertyManager->Tie("ic/vw-by-fps", this, @@ -1540,96 +1521,74 @@ void FGInitialCondition::bind(FGPropertyManager* PropertyManager) &FGInitialCondition::GetWindFpsIC); PropertyManager->Tie("ic/vw-dir-deg", this, &FGInitialCondition::GetWindDirDegIC, - &FGInitialCondition::SetWindDirDegIC, - true); + &FGInitialCondition::SetWindDirDegIC); PropertyManager->Tie("ic/roc-fps", this, &FGInitialCondition::GetClimbRateFpsIC, - &FGInitialCondition::SetClimbRateFpsIC, - true); + &FGInitialCondition::SetClimbRateFpsIC); PropertyManager->Tie("ic/u-fps", this, &FGInitialCondition::GetUBodyFpsIC, - &FGInitialCondition::SetUBodyFpsIC, - true); + &FGInitialCondition::SetUBodyFpsIC); PropertyManager->Tie("ic/v-fps", this, &FGInitialCondition::GetVBodyFpsIC, - &FGInitialCondition::SetVBodyFpsIC, - true); + &FGInitialCondition::SetVBodyFpsIC); PropertyManager->Tie("ic/w-fps", this, &FGInitialCondition::GetWBodyFpsIC, - &FGInitialCondition::SetWBodyFpsIC, - true); + &FGInitialCondition::SetWBodyFpsIC); PropertyManager->Tie("ic/vn-fps", this, &FGInitialCondition::GetVNorthFpsIC, - &FGInitialCondition::SetVNorthFpsIC, - true); + &FGInitialCondition::SetVNorthFpsIC); PropertyManager->Tie("ic/ve-fps", this, &FGInitialCondition::GetVEastFpsIC, - &FGInitialCondition::SetVEastFpsIC, - true); + &FGInitialCondition::SetVEastFpsIC); PropertyManager->Tie("ic/vd-fps", this, &FGInitialCondition::GetVDownFpsIC, - &FGInitialCondition::SetVDownFpsIC, - true); + &FGInitialCondition::SetVDownFpsIC); PropertyManager->Tie("ic/gamma-rad", this, &FGInitialCondition::GetFlightPathAngleRadIC, - &FGInitialCondition::SetFlightPathAngleRadIC, - true); + &FGInitialCondition::SetFlightPathAngleRadIC); PropertyManager->Tie("ic/alpha-rad", this, &FGInitialCondition::GetAlphaRadIC, - &FGInitialCondition::SetAlphaRadIC, - true); + &FGInitialCondition::SetAlphaRadIC); PropertyManager->Tie("ic/theta-rad", this, &FGInitialCondition::GetThetaRadIC, - &FGInitialCondition::SetThetaRadIC, - true); + &FGInitialCondition::SetThetaRadIC); PropertyManager->Tie("ic/beta-rad", this, &FGInitialCondition::GetBetaRadIC, - &FGInitialCondition::SetBetaRadIC, - true); + &FGInitialCondition::SetBetaRadIC); PropertyManager->Tie("ic/phi-rad", this, &FGInitialCondition::GetPhiRadIC, - &FGInitialCondition::SetPhiRadIC, - true); + &FGInitialCondition::SetPhiRadIC); PropertyManager->Tie("ic/psi-true-rad", this, &FGInitialCondition::GetPsiRadIC, - &FGInitialCondition::SetPsiRadIC, - true); + &FGInitialCondition::SetPsiRadIC); PropertyManager->Tie("ic/lat-gc-rad", this, &FGInitialCondition::GetLatitudeRadIC, - &FGInitialCondition::SetLatitudeRadIC, - true); + &FGInitialCondition::SetLatitudeRadIC); PropertyManager->Tie("ic/long-gc-rad", this, &FGInitialCondition::GetLongitudeRadIC, - &FGInitialCondition::SetLongitudeRadIC, - true); + &FGInitialCondition::SetLongitudeRadIC); PropertyManager->Tie("ic/p-rad_sec", this, &FGInitialCondition::GetPRadpsIC, - &FGInitialCondition::SetPRadpsIC, - true); + &FGInitialCondition::SetPRadpsIC); PropertyManager->Tie("ic/q-rad_sec", this, &FGInitialCondition::GetQRadpsIC, - &FGInitialCondition::SetQRadpsIC, - true); + &FGInitialCondition::SetQRadpsIC); PropertyManager->Tie("ic/r-rad_sec", this, &FGInitialCondition::GetRRadpsIC, - &FGInitialCondition::SetRRadpsIC, - true); + &FGInitialCondition::SetRRadpsIC); PropertyManager->Tie("ic/lat-geod-rad", this, &FGInitialCondition::GetGeodLatitudeRadIC, - &FGInitialCondition::SetGeodLatitudeRadIC, - true); + &FGInitialCondition::SetGeodLatitudeRadIC); PropertyManager->Tie("ic/lat-geod-deg", this, &FGInitialCondition::GetGeodLatitudeDegIC, - &FGInitialCondition::SetGeodLatitudeDegIC, - true); + &FGInitialCondition::SetGeodLatitudeDegIC); PropertyManager->Tie("ic/geod-alt-ft", &position, &FGLocation::GetGeodAltitude); PropertyManager->Tie("ic/targetNlf", this, &FGInitialCondition::GetTargetNlfIC, - &FGInitialCondition::SetTargetNlfIC, - true); + &FGInitialCondition::SetTargetNlfIC); } //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/src/input_output/FGOutputType.cpp b/src/input_output/FGOutputType.cpp index caa605fbb0..62465c617e 100644 --- a/src/input_output/FGOutputType.cpp +++ b/src/input_output/FGOutputType.cpp @@ -92,7 +92,7 @@ void FGOutputType::SetIdx(unsigned int idx) { string outputProp = CreateIndexedPropertyName("simulation/output", idx); - PropertyManager->Tie(outputProp + "/log_rate_hz", this, &FGOutputType::GetRateHz, &FGOutputType::SetRateHz, false); + PropertyManager->Tie(outputProp + "/log_rate_hz", this, &FGOutputType::GetRateHz, &FGOutputType::SetRateHz); PropertyManager->Tie(outputProp + "/enabled", &enabled); OutputIdx = idx; } diff --git a/src/input_output/FGPropertyManager.h b/src/input_output/FGPropertyManager.h index 947160b34a..4015f91181 100644 --- a/src/input_output/FGPropertyManager.h +++ b/src/input_output/FGPropertyManager.h @@ -432,12 +432,9 @@ class FGPropertyManager * * @param name The property name to tie (full path). * @param pointer A pointer to the variable. - * @param useDefault true if any existing property value should be - * copied to the variable; false if the variable should not - * be modified; defaults to true. */ template void - Tie (const std::string &name, T *pointer, bool useDefault = true) + Tie (const std::string &name, T *pointer) { SGPropertyNode* property = root->getNode(name.c_str(), true); if (!property) { @@ -445,7 +442,7 @@ class FGPropertyManager return; } - if (!property->tie(SGRawValuePointer(pointer), useDefault)) + if (!property->tie(SGRawValuePointer(pointer), false)) cerr << "Failed to tie property " << name << " to a pointer" << endl; else { tied_properties.push_back(property); @@ -465,14 +462,10 @@ class FGPropertyManager * @param name The property name to tie (full path). * @param getter The getter function, or 0 if the value is unreadable. * @param setter The setter function, or 0 if the value is unmodifiable. - * @param useDefault true if the setter should be invoked with any existing - * property value should be; false if the old value should be - * discarded; defaults to true. */ template void - Tie (const std::string &name, T (*getter)(), void (*setter)(T) = nullptr, - bool useDefault = true) + Tie (const std::string &name, T (*getter)(), void (*setter)(T) = nullptr) { SGPropertyNode* property = root->getNode(name.c_str(), true); if (!property) { @@ -480,7 +473,7 @@ class FGPropertyManager return; } - if (!property->tie(SGRawValueFunctions(getter, setter), useDefault)) + if (!property->tie(SGRawValueFunctions(getter, setter), false)) std::cerr << "Failed to tie property " << name << " to functions" << std::endl; else { @@ -505,13 +498,10 @@ class FGPropertyManager * setter functions. * @param getter The getter function, or 0 if the value is unreadable. * @param setter The setter function, or 0 if the value is unmodifiable. - * @param useDefault true if the setter should be invoked with any existing - * property value should there be one; false if the old value should - * be discarded; defaults to true. */ template void Tie (const std::string &name, int index, T (*getter)(int), - void (*setter)(int, T) = nullptr, bool useDefault = true) + void (*setter)(int, T) = nullptr) { SGPropertyNode* property = root->getNode(name.c_str(), true); if (!property) { @@ -520,7 +510,7 @@ class FGPropertyManager } if (!property->tie(SGRawValueFunctionsIndexed(index, getter, setter), - useDefault)) + false)) std::cerr << "Failed to tie property " << name << " to indexed functions" << std::endl; else { @@ -546,13 +536,10 @@ class FGPropertyManager * unreadable. * @param setter The object's setter method, or 0 if the value is * unmodifiable. - * @param useDefault true if the setter should be invoked with any existing - * property value should there be one; false if the old value should - * be discarded; defaults to true. */ template void Tie (const std::string &name, T * obj, V (T::*getter)() const, - void (T::*setter)(V) = nullptr, bool useDefault = true) + void (T::*setter)(V) = nullptr) { SGPropertyNode* property = root->getNode(name.c_str(), true); if (!property) { @@ -560,7 +547,7 @@ class FGPropertyManager return; } - if (!property->tie(SGRawValueMethods(*obj, getter, setter), useDefault)) + if (!property->tie(SGRawValueMethods(*obj, getter, setter), false)) std::cerr << "Failed to tie property " << name << " to object methods" << std::endl; else { @@ -586,13 +573,10 @@ class FGPropertyManager * setter methods. * @param getter The getter method, or 0 if the value is unreadable. * @param setter The setter method, or 0 if the value is unmodifiable. - * @param useDefault true if the setter should be invoked with any existing - * property value should there be one; false if the old value should - * be discarded; defaults to true. */ template void Tie (const std::string &name, T * obj, int index, V (T::*getter)(int) const, - void (T::*setter)(int, V) = nullptr, bool useDefault = true) + void (T::*setter)(int, V) = nullptr) { SGPropertyNode* property = root->getNode(name.c_str(), true); if (!property) { @@ -601,7 +585,7 @@ class FGPropertyManager } if (!property->tie(SGRawValueMethodsIndexed(*obj, index, getter, setter), - useDefault)) + false)) std::cerr << "Failed to tie property " << name << " to indexed object methods" << std::endl; else { diff --git a/src/models/FGAerodynamics.cpp b/src/models/FGAerodynamics.cpp index c107eb0d88..2cb7cda7b8 100644 --- a/src/models/FGAerodynamics.cpp +++ b/src/models/FGAerodynamics.cpp @@ -585,8 +585,8 @@ void FGAerodynamics::bind(void) PropertyManager->Tie("forces/lod-norm", this, &FGAerodynamics::GetLoD); PropertyManager->Tie("aero/cl-squared", this, &FGAerodynamics::GetClSquared); PropertyManager->Tie("aero/qbar-area", &qbar_area); - PropertyManager->Tie("aero/alpha-max-rad", this, &FGAerodynamics::GetAlphaCLMax, &FGAerodynamics::SetAlphaCLMax, true); - PropertyManager->Tie("aero/alpha-min-rad", this, &FGAerodynamics::GetAlphaCLMin, &FGAerodynamics::SetAlphaCLMin, true); + PropertyManager->Tie("aero/alpha-max-rad", this, &FGAerodynamics::GetAlphaCLMax, &FGAerodynamics::SetAlphaCLMax); + PropertyManager->Tie("aero/alpha-min-rad", this, &FGAerodynamics::GetAlphaCLMin, &FGAerodynamics::SetAlphaCLMin); PropertyManager->Tie("aero/bi2vel", this, &FGAerodynamics::GetBI2Vel); PropertyManager->Tie("aero/ci2vel", this, &FGAerodynamics::GetCI2Vel); PropertyManager->Tie("aero/alpha-wing-rad", this, &FGAerodynamics::GetAlphaW); diff --git a/src/models/FGBuoyantForces.cpp b/src/models/FGBuoyantForces.cpp index ed1a1c833c..ec1dfe729f 100644 --- a/src/models/FGBuoyantForces.cpp +++ b/src/models/FGBuoyantForces.cpp @@ -241,20 +241,19 @@ string FGBuoyantForces::GetBuoyancyValues(const string& delimeter) void FGBuoyantForces::bind(void) { - typedef double (FGBuoyantForces::*PGF)(int) const; - typedef void (FGBuoyantForces::*PSF)(int, double); + using PSF = void (FGBuoyantForces::*)(int, double); PropertyManager->Tie("moments/l-buoyancy-lbsft", this, eL, - (PGF)&FGBuoyantForces::GetMoments, (PSF)0, false); + &FGBuoyantForces::GetMoments, (PSF)nullptr); PropertyManager->Tie("moments/m-buoyancy-lbsft", this, eM, - (PGF)&FGBuoyantForces::GetMoments, (PSF)0, false); + &FGBuoyantForces::GetMoments, (PSF)nullptr); PropertyManager->Tie("moments/n-buoyancy-lbsft", this, eN, - (PGF)&FGBuoyantForces::GetMoments, (PSF)0, false); + &FGBuoyantForces::GetMoments, (PSF)nullptr); PropertyManager->Tie("forces/fbx-buoyancy-lbs", this, eX, - (PGF)&FGBuoyantForces::GetForces, (PSF)0, false); + &FGBuoyantForces::GetForces, (PSF)nullptr); PropertyManager->Tie("forces/fby-buoyancy-lbs", this, eY, - (PGF)&FGBuoyantForces::GetForces, (PSF)0, false); + &FGBuoyantForces::GetForces, (PSF)nullptr); PropertyManager->Tie("forces/fbz-buoyancy-lbs", this, eZ, - (PGF)&FGBuoyantForces::GetForces, (PSF)0, false); + &FGBuoyantForces::GetForces, (PSF)nullptr); } //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/src/models/FGGasCell.cpp b/src/models/FGGasCell.cpp index 15a071bf8c..3aecd5c05b 100644 --- a/src/models/FGGasCell.cpp +++ b/src/models/FGGasCell.cpp @@ -194,20 +194,20 @@ FGGasCell::FGGasCell(FGFDMExec* exec, Element* el, unsigned int num, base_property_name = CreateIndexedPropertyName("buoyant_forces/gas-cell", CellNum); property_name = base_property_name + "/max_volume-ft3"; - PropertyManager->Tie( property_name.c_str(), &MaxVolume, false ); + PropertyManager->Tie( property_name.c_str(), &MaxVolume); PropertyManager->GetNode()->SetWritable( property_name, false ); property_name = base_property_name + "/temp-R"; - PropertyManager->Tie( property_name.c_str(), &Temperature, false ); + PropertyManager->Tie( property_name.c_str(), &Temperature); property_name = base_property_name + "/pressure-psf"; - PropertyManager->Tie( property_name.c_str(), &Pressure, false ); + PropertyManager->Tie( property_name.c_str(), &Pressure); property_name = base_property_name + "/volume-ft3"; - PropertyManager->Tie( property_name.c_str(), &Volume, false ); + PropertyManager->Tie( property_name.c_str(), &Volume); property_name = base_property_name + "/buoyancy-lbs"; - PropertyManager->Tie( property_name.c_str(), &Buoyancy, false ); + PropertyManager->Tie( property_name.c_str(), &Buoyancy); property_name = base_property_name + "/contents-mol"; - PropertyManager->Tie( property_name.c_str(), &Contents, false ); + PropertyManager->Tie( property_name.c_str(), &Contents); property_name = base_property_name + "/valve_open"; - PropertyManager->Tie( property_name.c_str(), &ValveOpen, false ); + PropertyManager->Tie( property_name.c_str(), &ValveOpen); Debug(0); @@ -622,23 +622,23 @@ FGBallonet::FGBallonet(FGFDMExec* exec, Element* el, unsigned int num, base_property_name = CreateIndexedPropertyName(base_property_name + "/ballonet", CellNum); property_name = base_property_name + "/max_volume-ft3"; - PropertyManager->Tie( property_name, &MaxVolume, false ); + PropertyManager->Tie( property_name, &MaxVolume); PropertyManager->GetNode()->SetWritable( property_name, false ); property_name = base_property_name + "/temp-R"; - PropertyManager->Tie( property_name, &Temperature, false ); + PropertyManager->Tie( property_name, &Temperature); property_name = base_property_name + "/pressure-psf"; - PropertyManager->Tie( property_name, &Pressure, false ); + PropertyManager->Tie( property_name, &Pressure); property_name = base_property_name + "/volume-ft3"; - PropertyManager->Tie( property_name, &Volume, false ); + PropertyManager->Tie( property_name, &Volume); property_name = base_property_name + "/contents-mol"; - PropertyManager->Tie( property_name, &Contents, false ); + PropertyManager->Tie( property_name, &Contents); property_name = base_property_name + "/valve_open"; - PropertyManager->Tie( property_name, &ValveOpen, false ); + PropertyManager->Tie( property_name, &ValveOpen); Debug(0); diff --git a/src/models/FGMassBalance.cpp b/src/models/FGMassBalance.cpp index ae9138c735..bc0c7d33b5 100644 --- a/src/models/FGMassBalance.cpp +++ b/src/models/FGMassBalance.cpp @@ -416,7 +416,7 @@ void FGMassBalance::bind(void) &FGMassBalance::GetIyz); typedef int (FGMassBalance::*iOPV)() const; PropertyManager->Tie("inertia/print-mass-properties", this, (iOPV)0, - &FGMassBalance::GetMassPropertiesReport, false); + &FGMassBalance::GetMassPropertiesReport); } //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/src/models/FGOutput.cpp b/src/models/FGOutput.cpp index 96b86b8969..23147f31a1 100644 --- a/src/models/FGOutput.cpp +++ b/src/models/FGOutput.cpp @@ -60,7 +60,7 @@ FGOutput::FGOutput(FGFDMExec* fdmex) : FGModel(fdmex) Name = "FGOutput"; enabled = true; - PropertyManager->Tie("simulation/force-output", this, (iOPV)0, &FGOutput::ForceOutput, false); + PropertyManager->Tie("simulation/force-output", this, (iOPV)0, &FGOutput::ForceOutput); Debug(0); } diff --git a/src/models/FGPropagate.cpp b/src/models/FGPropagate.cpp index 2396fd3324..3b55ea5154 100644 --- a/src/models/FGPropagate.cpp +++ b/src/models/FGPropagate.cpp @@ -792,22 +792,22 @@ void FGPropagate::bind(void) PropertyManager->Tie("velocities/eci-velocity-mag-fps", this, &FGPropagate::GetInertialVelocityMagnitude); PropertyManager->Tie("velocities/ned-velocity-mag-fps", this, &FGPropagate::GetNEDVelocityMagnitude); - PropertyManager->Tie("position/h-sl-ft", this, &FGPropagate::GetAltitudeASL, &FGPropagate::SetAltitudeASL, false); - PropertyManager->Tie("position/h-sl-meters", this, &FGPropagate::GetAltitudeASLmeters, &FGPropagate::SetAltitudeASLmeters, false); - PropertyManager->Tie("position/lat-gc-rad", this, &FGPropagate::GetLatitude, &FGPropagate::SetLatitude, false); - PropertyManager->Tie("position/long-gc-rad", this, &FGPropagate::GetLongitude, &FGPropagate::SetLongitude, false); - PropertyManager->Tie("position/lat-gc-deg", this, &FGPropagate::GetLatitudeDeg, &FGPropagate::SetLatitudeDeg, false); - PropertyManager->Tie("position/long-gc-deg", this, &FGPropagate::GetLongitudeDeg, &FGPropagate::SetLongitudeDeg, false); + PropertyManager->Tie("position/h-sl-ft", this, &FGPropagate::GetAltitudeASL, &FGPropagate::SetAltitudeASL); + PropertyManager->Tie("position/h-sl-meters", this, &FGPropagate::GetAltitudeASLmeters, &FGPropagate::SetAltitudeASLmeters); + PropertyManager->Tie("position/lat-gc-rad", this, &FGPropagate::GetLatitude, &FGPropagate::SetLatitude); + PropertyManager->Tie("position/long-gc-rad", this, &FGPropagate::GetLongitude, &FGPropagate::SetLongitude); + PropertyManager->Tie("position/lat-gc-deg", this, &FGPropagate::GetLatitudeDeg, &FGPropagate::SetLatitudeDeg); + PropertyManager->Tie("position/long-gc-deg", this, &FGPropagate::GetLongitudeDeg, &FGPropagate::SetLongitudeDeg); PropertyManager->Tie("position/lat-geod-rad", this, &FGPropagate::GetGeodLatitudeRad); PropertyManager->Tie("position/lat-geod-deg", this, &FGPropagate::GetGeodLatitudeDeg); PropertyManager->Tie("position/geod-alt-ft", this, &FGPropagate::GetGeodeticAltitude); - PropertyManager->Tie("position/h-agl-ft", this, &FGPropagate::GetDistanceAGL, &FGPropagate::SetDistanceAGL, false); + PropertyManager->Tie("position/h-agl-ft", this, &FGPropagate::GetDistanceAGL, &FGPropagate::SetDistanceAGL); PropertyManager->Tie("position/geod-alt-km", this, &FGPropagate::GetGeodeticAltitudeKm); - PropertyManager->Tie("position/h-agl-km", this, &FGPropagate::GetDistanceAGLKm, &FGPropagate::SetDistanceAGLKm, false); + PropertyManager->Tie("position/h-agl-km", this, &FGPropagate::GetDistanceAGLKm, &FGPropagate::SetDistanceAGLKm); PropertyManager->Tie("position/radius-to-vehicle-ft", this, &FGPropagate::GetRadius); PropertyManager->Tie("position/terrain-elevation-asl-ft", this, &FGPropagate::GetTerrainElevation, - &FGPropagate::SetTerrainElevation, false); + &FGPropagate::SetTerrainElevation); PropertyManager->Tie("position/eci-x-ft", this, eX, (PMF)&FGPropagate::GetInertialPosition); PropertyManager->Tie("position/eci-y-ft", this, eY, (PMF)&FGPropagate::GetInertialPosition); diff --git a/src/models/FGPropulsion.cpp b/src/models/FGPropulsion.cpp index 84245f01fe..6c25b3205e 100644 --- a/src/models/FGPropulsion.cpp +++ b/src/models/FGPropulsion.cpp @@ -804,7 +804,7 @@ void FGPropulsion::bind(void) typedef int (FGPropulsion::*iPMF)(void) const; IsBound = true; - PropertyManager->Tie("propulsion/set-running", this, (iPMF)0, &FGPropulsion::InitRunning, false); + PropertyManager->Tie("propulsion/set-running", this, (iPMF)0, &FGPropulsion::InitRunning); if (HaveTurbineEngine || HaveTurboPropEngine) { PropertyManager->Tie("propulsion/starter_cmd", this, &FGPropulsion::GetStarter, &FGPropulsion::SetStarter); PropertyManager->Tie("propulsion/cutoff_cmd", this, &FGPropulsion::GetCutoff, &FGPropulsion::SetCutoff); @@ -812,11 +812,11 @@ void FGPropulsion::bind(void) if (HavePistonEngine) { PropertyManager->Tie("propulsion/starter_cmd", this, &FGPropulsion::GetStarter, &FGPropulsion::SetStarter); - PropertyManager->Tie("propulsion/magneto_cmd", this, (iPMF)0, &FGPropulsion::SetMagnetos, false); + PropertyManager->Tie("propulsion/magneto_cmd", this, (iPMF)0, &FGPropulsion::SetMagnetos); } PropertyManager->Tie("propulsion/active_engine", this, (iPMF)&FGPropulsion::GetActiveEngine, - &FGPropulsion::SetActiveEngine, true); + &FGPropulsion::SetActiveEngine); PropertyManager->Tie("forces/fbx-prop-lbs", this, eX, (PMF)&FGPropulsion::GetForces); PropertyManager->Tie("forces/fby-prop-lbs", this, eY, (PMF)&FGPropulsion::GetForces); PropertyManager->Tie("forces/fbz-prop-lbs", this, eZ, (PMF)&FGPropulsion::GetForces); diff --git a/tests/TestMiscellaneous.py b/tests/TestMiscellaneous.py index 63409f772c..6b2a7ee21b 100644 --- a/tests/TestMiscellaneous.py +++ b/tests/TestMiscellaneous.py @@ -87,7 +87,8 @@ def test_FG_reset(self): self.assertTrue(pm.hasNode('fdm/jsbsim/ic/lat-geod-deg')) # Re-use the property manager just as FlightGear does. + # Check ic/lat-geod-deg is reset to 0.0 fdm = self.create_fdm(pm) - self.assertAlmostEqual(fdm['ic/lat-geod-deg'], 45.0) + self.assertAlmostEqual(fdm['ic/lat-geod-deg'], 0.0) RunTest(TestMiscellaneous)