From 4f67824f09d397cca72177b8c01f3cb40ecff5c2 Mon Sep 17 00:00:00 2001 From: curt <curt> Date: Fri, 15 Feb 2002 22:00:49 +0000 Subject: [PATCH] - Removed redundant FG*:: qualifications from class members - Fixed comparisons between signed and unsigned ints --- src/Airports/runways.hxx | 2 +- src/FDM/External.hxx | 4 ++-- src/FDM/IO360.hxx | 10 +++++----- src/FDM/JSBSim.hxx | 4 ++-- src/FDM/MagicCarpet.hxx | 4 ++-- src/FDM/NullFDM.hxx | 4 ++-- src/FDM/YASim/YASim.cxx | 7 ++++++- src/Navaids/mkrbeacons.hxx | 3 +-- src/Objects/matlib.cxx | 2 +- src/WeatherCM/FGWeatherParse.cpp | 2 +- 10 files changed, 23 insertions(+), 19 deletions(-) diff --git a/src/Airports/runways.hxx b/src/Airports/runways.hxx index 49fd41d0f..041e90476 100644 --- a/src/Airports/runways.hxx +++ b/src/Airports/runways.hxx @@ -130,7 +130,7 @@ public: bool search( const string& aptid, const int hdg, FGRunway* runway ); // Return the runway number of the runway closest to a given heading - string FGRunways::search( const string& aptid, const int tgt_hdg ); + string search( const string& aptid, const int tgt_hdg ); FGRunway search( const string& aptid ); bool next( FGRunway* runway ); diff --git a/src/FDM/External.hxx b/src/FDM/External.hxx index 5ebad88e3..2cc20b425 100644 --- a/src/FDM/External.hxx +++ b/src/FDM/External.hxx @@ -31,8 +31,8 @@ class FGExternal: public FGInterface { public: - FGExternal::FGExternal( double dt ); - FGExternal::~FGExternal(); + FGExternal( double dt ); + ~FGExternal(); // reset flight params to a specific position void init(); diff --git a/src/FDM/IO360.hxx b/src/FDM/IO360.hxx index ce459e02e..6eccec850 100644 --- a/src/FDM/IO360.hxx +++ b/src/FDM/IO360.hxx @@ -158,16 +158,16 @@ private: float Calculate_Delta_T_Exhaust(void); // Calculate cylinder head temperature - void FGNewEngine::Calc_CHT(void); + void Calc_CHT(void); // Calculate exhaust gas temperature - void FGNewEngine::Calc_EGT(void); + void Calc_EGT(void); // Calculate fuel flow in gals/hr - void FGNewEngine::Calc_Fuel_Flow_Gals_Hr(void); + void Calc_Fuel_Flow_Gals_Hr(void); // Calculate current percentage power - void FGNewEngine::Calc_Percentage_Power(bool mag_left, bool mag_right); + void Calc_Percentage_Power(bool mag_left, bool mag_right); // Calculate Oil Temperature float Calc_Oil_Temp (float oil_temp); @@ -176,7 +176,7 @@ private: float Calc_Oil_Press (float Oil_Temp, float Engine_RPM); // Propeller calculations. - void FGNewEngine::Do_Prop_Calcs(void); + void Do_Prop_Calcs(void); public: diff --git a/src/FDM/JSBSim.hxx b/src/FDM/JSBSim.hxx index 8e58aa9d8..b2da20edf 100644 --- a/src/FDM/JSBSim.hxx +++ b/src/FDM/JSBSim.hxx @@ -99,9 +99,9 @@ class FGJSBsim: public FGInterface { public: /// Constructor - FGJSBsim::FGJSBsim( double dt ); + FGJSBsim( double dt ); /// Destructor - FGJSBsim::~FGJSBsim(); + ~FGJSBsim(); /// copy FDM state to LaRCsim structures bool copy_to_JSBsim(); diff --git a/src/FDM/MagicCarpet.hxx b/src/FDM/MagicCarpet.hxx index 12d3c656e..32fa71f24 100644 --- a/src/FDM/MagicCarpet.hxx +++ b/src/FDM/MagicCarpet.hxx @@ -31,8 +31,8 @@ class FGMagicCarpet: public FGInterface { public: - FGMagicCarpet::FGMagicCarpet( double dt ); - FGMagicCarpet::~FGMagicCarpet(); + FGMagicCarpet( double dt ); + ~FGMagicCarpet(); // reset flight params to a specific position void init(); diff --git a/src/FDM/NullFDM.hxx b/src/FDM/NullFDM.hxx index c970d4dbf..1d2dd2844 100644 --- a/src/FDM/NullFDM.hxx +++ b/src/FDM/NullFDM.hxx @@ -32,8 +32,8 @@ class FGNullFDM: public FGInterface { public: - FGNullFDM::FGNullFDM( double dt ); - FGNullFDM::~FGNullFDM(); + FGNullFDM( double dt ); + ~FGNullFDM(); // reset flight params to a specific position void init(); diff --git a/src/FDM/YASim/YASim.cxx b/src/FDM/YASim/YASim.cxx index 404138653..3253715a5 100644 --- a/src/FDM/YASim/YASim.cxx +++ b/src/FDM/YASim/YASim.cxx @@ -223,7 +223,12 @@ void YASim::copyToYASim(bool copyState) wind[0] = get_V_north_airmass() * FT2M; wind[1] = get_V_east_airmass() * FT2M; wind[2] = get_V_down_airmass() * FT2M; - double ground = get_Runway_altitude() * FT2M; + + // The ground elevation doesn't come from FGInterface; query it + // from the scenery and set it for others to find. + double ground = scenery.get_cur_elev(); + set_Runway_altitude(ground * FT2M); + // cout << "YASIM: ground = " << ground << endl; // You'd this this would work, but it doesn't. These values are // always zero. Use a "standard" pressure intstead. diff --git a/src/Navaids/mkrbeacons.hxx b/src/Navaids/mkrbeacons.hxx index b573f7202..619f88cea 100644 --- a/src/Navaids/mkrbeacons.hxx +++ b/src/Navaids/mkrbeacons.hxx @@ -90,8 +90,7 @@ class FGMarkerBeacons { beacon_map_type beacon_map; // real add a marker beacon - bool FGMarkerBeacons::real_add( const int master_index, - const FGMkrBeacon& b ); + bool real_add( const int master_index, const FGMkrBeacon& b ); public: diff --git a/src/Objects/matlib.cxx b/src/Objects/matlib.cxx index 859f1c0ea..0ea5d7b90 100644 --- a/src/Objects/matlib.cxx +++ b/src/Objects/matlib.cxx @@ -86,7 +86,7 @@ bool FGMaterialLib::load( const string& mpath ) { FGNewMat * m = new FGNewMat(node); vector<const SGPropertyNode *>names = node->getChildren("name"); - for (int j = 0; j < names.size(); j++) { + for (unsigned int j = 0; j < names.size(); j++) { m->ref(); matlib[names[j]->getStringValue()] = m; SG_LOG( SG_TERRAIN, SG_INFO, " Loading material " diff --git a/src/WeatherCM/FGWeatherParse.cpp b/src/WeatherCM/FGWeatherParse.cpp index 7fb7bf2a9..2172ab890 100644 --- a/src/WeatherCM/FGWeatherParse.cpp +++ b/src/WeatherCM/FGWeatherParse.cpp @@ -112,7 +112,7 @@ void FGWeatherParse::input(const char *file) in >> temp.airpressure_history[2]; in >> temp.airpressure_history[3]; - for (int i = 0; i < weather_station.size(); i++) + for (unsigned int i = 0; i < weather_station.size(); i++) { if ((weather_station[i].lat == temp.lat) && (weather_station[i].lon == temp.lon)) {