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

@ -69,3 +69,4 @@ protected:
};
#endif // _FG_AIEntity_HXX

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;

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"