1
0
Fork 0

- fixed ANSI C++ namespace problems

- added final newlines to files to avoid compiler warnings

- adjusted for FG_NEW_ENVIRONMENT
This commit is contained in:
david 2002-04-04 01:32:00 +00:00
parent e78a4d3727
commit 8b18201ced
10 changed files with 25 additions and 9 deletions

View file

@ -68,4 +68,5 @@ protected:
};
#endif // _FG_AIEntity_HXX
#endif // _FG_AIEntity_HXX

View file

@ -97,4 +97,4 @@ private:
};
#endif // _FG_AILocalTraffic_HXX
#endif // _FG_AILocalTraffic_HXX

View file

@ -67,4 +67,4 @@ void FGAIMgr::update(int dt) {
(*ai_list_itr)->Update();
++ai_list_itr;
}
}
}

View file

@ -22,9 +22,14 @@
#ifndef _FG_ATC_HXX
#define _FG_ATC_HXX
#include <simgear/compiler.h>
#include <iostream>
#include <string>
SG_USING_STD(ostream);
SG_USING_STD(string);
// Possible types of ATC type that the radios may be tuned to.
// INVALID implies not tuned in to anything.
enum atc_type {

View file

@ -185,7 +185,10 @@ void FGApproach::Update() {
void FGApproach::get_active_runway() {
sgVec3 position = { lat, lon, elev };
#ifndef FG_NEW_ENVIRONMENT
FGPhysicalProperty stationweather = WeatherDatabase->get(position);
#endif
SGPath path( globals->get_fg_root() );
path.append( "Airports" );
@ -193,8 +196,13 @@ void FGApproach::get_active_runway() {
FGRunways runways( path.c_str() );
//Set the heading to into the wind
#ifndef FG_NEW_ENVIRONMENT
double wind_x = stationweather.Wind[0];
double wind_y = stationweather.Wind[1];
#else
double wind_x = 0;
double wind_y = 0; // FIXME
#endif
double speed = sqrt( wind_x*wind_x + wind_y*wind_y ) * SG_METER_TO_NM / (60.0*60.0);
double hdg;
@ -363,4 +371,4 @@ int FGApproach::RemovePlane() {
}
num_planes = np;
return num_planes;
}
}

View file

@ -263,4 +263,4 @@ operator >> ( istream& in, FGApproach& a )
return in >> skipeol;
}
#endif // _FG_APPROACH_HXX
#endif // _FG_APPROACH_HXX

View file

@ -231,4 +231,4 @@ bool FGApproachList::get_name( string apt_id )
return 0;
}
}

View file

@ -27,9 +27,11 @@
#include <simgear/math/sg_geodesy.hxx>
#include <plib/sg.h>
#include <iostream>
#include <string>
SG_USING_STD(string);
SG_USING_STD(ios);
#include "ATC.hxx"
@ -145,4 +147,4 @@ operator >> ( istream& in, FGTower& t )
}
#endif //_FG_TOWER_HXX
#endif //_FG_TOWER_HXX

View file

@ -131,4 +131,4 @@ bool FGTowerList::query( double lon, double lat, double elev, double freq,
}
return false;
}
}

View file

@ -71,4 +71,4 @@ public:
extern FGTowerList *current_towerlist;
#endif // _FG_TOWERLIST_HXX
#endif // _FG_TOWERLIST_HXX