11#include <unordered_map>
13#include <simgear/compiler.h>
19class FGAirportDynamicsXMLLoader;
32 Block(
int i, time_t bt, time_t curr) : blocktime{bt}, touch{curr}
43 blocktime = (bt < blocktime) ? bt : blocktime;
49 bool operator<(
const Block& other)
const {
return blocktime < other.blocktime; }
80 void block(
int id, time_t blockTime, time_t now);
103 return index < other.index;
108 return oppositeDirection;
121 FGTaxiNodeVector::iterator currNode;
122 intVec::iterator currRoute;
128 currNode = nodes.begin();
129 currRoute = routes.begin();
138 routes = other.routes;
139 distance = other.distance;
140 currNode = nodes.begin();
141 currRoute = routes.begin();
147 distance(copy.distance),
148 currNode(nodes.begin()),
149 currRoute(routes.begin()) {}
153 return distance < other.distance;
157 return nodes.empty();
163 currNode = nodes.begin();
164 currRoute = routes.begin();
172 return nodes.end() - currNode;
185 bool networkInitialized;
201 void addAwosFreq(
int val)
203 freqAwos.push_back(val);
205 void addUnicomFreq(
int val)
207 freqUnicom.push_back(val);
209 void addClearanceFreq(
int val)
211 freqClearance.push_back(val);
213 void addGroundFreq(
int val)
215 freqGround.push_back(val);
217 void addTowerFreq(
int val)
219 freqTower.push_back(val);
221 void addApproachFreq(
int val)
223 freqApproach.push_back(val);
233 using NodeFromSegmentMap = std::unordered_multimap<FGTaxiNode*, FGTaxiSegment*>;
236 NodeFromSegmentMap m_segmentsEndingAtNodeMap;
SGSharedPtr< FGTaxiNode > FGTaxiNodeRef
std::vector< FGTaxiSegment * > FGTaxiSegmentVector
std::vector< FGParkingRef > FGParkingList
std::vector< Block > BlockList
std::vector< FGTaxiNodeRef > FGTaxiNodeVector
SGSharedPtr< FGParking > FGParkingRef
bool operator<(const Block &other) const
Block(int i, time_t bt, time_t curr)
time_t getBlockTime() const
void updateTimeStamps(time_t bt, time_t now)
FGTaxiNodeRef findNearestNodeOffRunway(const SGGeod &aGeod, FGRunway *aRunway, double distanceM) const
FGGroundNetwork(FGAirport *pr)
FGTaxiNodeRef findNearestNodeOnRunwayExit(const SGGeod &aGeod, FGRunway *aRunway=NULL) const
Returns the nearest node in that is in direction of runway heading.
FGTaxiNodeVector findSegmentsFrom(const FGTaxiNodeRef &from) const
Find the segments connected to the node.
FGTaxiSegment * findSegmentByHeading(const FGTaxiNode *from, const double heading) const
Find the taxiway segment best matching the heading.
FGAirport * airport() const
FGParkingRef findParkingByName(const std::string &name) const
const intVec & getApproachFrequencies() const
FGTaxiNodeRef findNearestNodeOnRunwayEntry(const SGGeod &aGeod) const
const intVec & getGroundFrequencies() const
FGParkingRef getParkingByIndex(unsigned int index) const
void unblockAllSegments(time_t now)
FGTaxiSegment * findSegment(const FGTaxiNode *from, const FGTaxiNode *to) const
Find the taxiway segment joining two (ground-net) nodes.
FGTaxiSegment * findSegment(unsigned int idx) const
FGTaxiNodeRef findNearestNode(const SGGeod &aGeod) const
friend class FGGroundNetXMLLoader
virtual ~FGGroundNetwork()
FGTaxiSegment * findOppositeSegment(unsigned int index) const
FGTaxiRoute findShortestRoute(FGTaxiNode *start, FGTaxiNode *end, bool fullSearch=true)
void blockSegmentsEndingAt(const FGTaxiSegment *seg, int blockId, time_t blockTime, time_t now)
const intVec & getTowerFrequencies() const
const FGParkingList & allParkings() const
bool operator<(const FGTaxiRoute &other) const
FGTaxiRoute & operator=(const FGTaxiRoute &other)
bool next(FGTaxiNodeRef &nde, int *rte)
FGTaxiRoute(const FGTaxiRoute ©)
FGTaxiSegment(FGTaxiNode *start, FGTaxiNode *end)
void setDimensions(double elevation)
FGTaxiNodeRef getEnd() const
int getPenalty(int nGates)
bool hasBlock(time_t now)
FGTaxiSegment * opposite()
bool operator<(const FGTaxiSegment &other) const
FGTaxiNodeRef getStart() const
void block(int id, time_t blockTime, time_t now)
double getHeading() const
friend class FGGroundNetwork
std::vector< int > intVec
std::vector< int >::iterator intVecIterator