3 #include <boost/foreach.hpp>
5 #include "groundnetwork.hxx"
7 #include <Navaids/NavDataCache.hxx>
8 #include <Main/globals.hxx>
9 #include <Scenery/scenery.hxx>
11 using namespace flightgear;
13 /**************************************************************************
15 *************************************************************************/
17 FGTaxiNode::FGTaxiNode(int index, const SGGeod& pos, bool aOnRunway, int aHoldType) :
18 FGPositioned(TRANSIENT_ID, FGPositioned::PARKING, "", pos),
20 isOnRunway(aOnRunway),
27 FGTaxiNode::~FGTaxiNode()
31 void FGTaxiNode::setElevation(double val)
33 // ignored for the moment
36 double FGTaxiNode::getElevationFt()
38 const SGGeod& pos = geod();
39 if( pos.getElevationFt() == 0.0)
42 FGScenery* local_scenery = globals->get_scenery();
43 center2.setElevationM(SG_MAX_ELEVATION_M);
44 double elevationEnd = -100;
45 if (local_scenery->get_elevation_m( center2, elevationEnd, NULL ))
48 newPos.setElevationM(elevationEnd);
49 // this will call modifyPosition to update mPosition
50 modifyPosition(newPos);
54 return pos.getElevationFt();
57 int FGTaxiNode::getIndex() const
62 void FGTaxiNode::setIsPushback()
67 double FGTaxiNode::getElevationM()
69 return getElevationFt() * SG_FEET_TO_METER;