2005-12-29 13:58:21 +00:00
|
|
|
// groundnet.hxx - A number of classes to handle taxiway
|
|
|
|
// assignments by the AI code
|
|
|
|
//
|
|
|
|
// Written by Durk Talsma, started June 2005.
|
|
|
|
//
|
|
|
|
// Copyright (C) 2004 Durk Talsma.
|
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License as
|
|
|
|
// published by the Free Software Foundation; either version 2 of the
|
|
|
|
// License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful, but
|
|
|
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
// General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with this program; if not, write to the Free Software
|
2006-02-21 01:16:04 +00:00
|
|
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2005-12-29 13:58:21 +00:00
|
|
|
//
|
|
|
|
// $Id$
|
|
|
|
|
|
|
|
#ifndef _GROUNDNETWORK_HXX_
|
|
|
|
#define _GROUNDNETWORK_HXX_
|
|
|
|
|
2006-04-17 12:59:35 +00:00
|
|
|
#include <simgear/compiler.h>
|
2006-11-11 10:52:05 +00:00
|
|
|
#include <simgear/route/waypoint.hxx>
|
2006-04-17 12:59:35 +00:00
|
|
|
|
2005-12-29 13:58:21 +00:00
|
|
|
#include STL_STRING
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
SG_USING_STD(string);
|
|
|
|
SG_USING_STD(vector);
|
|
|
|
|
2007-07-05 19:00:59 +00:00
|
|
|
#include "gnnode.hxx"
|
2005-12-29 13:58:21 +00:00
|
|
|
#include "parking.hxx"
|
2008-07-13 12:51:06 +00:00
|
|
|
#include <ATC/trafficcontrol.hxx>
|
2006-08-26 07:22:20 +00:00
|
|
|
|
2005-12-29 13:58:21 +00:00
|
|
|
class FGTaxiSegment; // forward reference
|
2006-08-26 07:22:20 +00:00
|
|
|
class FGAIFlightPlan; // forward reference
|
2006-11-11 10:52:05 +00:00
|
|
|
class FGAirport; // forward reference
|
2005-12-29 13:58:21 +00:00
|
|
|
|
2006-10-06 17:36:31 +00:00
|
|
|
typedef vector<FGTaxiSegment*> FGTaxiSegmentVector;
|
|
|
|
typedef vector<FGTaxiSegment*>::iterator FGTaxiSegmentVectorIterator;
|
|
|
|
|
|
|
|
//typedef vector<FGTaxiSegment*> FGTaxiSegmentPointerVector;
|
|
|
|
//typedef vector<FGTaxiSegment*>::iterator FGTaxiSegmentPointerVectorIterator;
|
2005-12-29 13:58:21 +00:00
|
|
|
|
|
|
|
/***************************************************************************************
|
|
|
|
* class FGTaxiSegment
|
|
|
|
**************************************************************************************/
|
|
|
|
class FGTaxiSegment
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
int startNode;
|
|
|
|
int endNode;
|
|
|
|
double length;
|
2006-11-11 10:52:05 +00:00
|
|
|
double course;
|
|
|
|
double headingDiff;
|
|
|
|
bool isActive;
|
- Ground network XML parsing code reads the new attributes "holdPointType"
and "isOnRunway".
- Added initial support for AI controlled pushback operations, making use of the
current editing capabilities of TaxiDraw CVS / New_GUI_CODE. The current
implementation is slightly more computationally intensive than strictly
required, due to the currently inability of taxidraw to link one specific
pushBack point to to a particular startup location. FlightGear now determines
this dynamically, and once we have that functionality in TaxiDraw, the
initialization part of createPushBack() can be further simplified.
- Smoother transition from pushback to taxi. No more skipping of waypoints, and
aircraft wait for two minutes at pushback point.
- The classes FGTaxiNode, FGTaxiSegment, and FGParking, now have copy
constructors, and assignment operators.
- Removed declaration of undefined constructor FGTaxiNode(double, double, int)
- Array boundry checks and cleanup.
- Modified Dijkstra path search algoritm to solve partial problems. Currently
limited to include pushback points and routes only, but can probably be
extended to a more general approach.
- Added initial support for giving certain routes in the network a penalty, in
order to discourage the use of certain routes over others.
2007-08-08 06:09:58 +00:00
|
|
|
bool isPushBackRoute;
|
2005-12-29 13:58:21 +00:00
|
|
|
FGTaxiNode *start;
|
|
|
|
FGTaxiNode *end;
|
|
|
|
int index;
|
2006-09-19 17:04:22 +00:00
|
|
|
FGTaxiSegment *oppositeDirection;
|
2005-12-29 13:58:21 +00:00
|
|
|
|
2006-11-11 10:52:05 +00:00
|
|
|
|
|
|
|
|
2005-12-29 13:58:21 +00:00
|
|
|
public:
|
- Ground network XML parsing code reads the new attributes "holdPointType"
and "isOnRunway".
- Added initial support for AI controlled pushback operations, making use of the
current editing capabilities of TaxiDraw CVS / New_GUI_CODE. The current
implementation is slightly more computationally intensive than strictly
required, due to the currently inability of taxidraw to link one specific
pushBack point to to a particular startup location. FlightGear now determines
this dynamically, and once we have that functionality in TaxiDraw, the
initialization part of createPushBack() can be further simplified.
- Smoother transition from pushback to taxi. No more skipping of waypoints, and
aircraft wait for two minutes at pushback point.
- The classes FGTaxiNode, FGTaxiSegment, and FGParking, now have copy
constructors, and assignment operators.
- Removed declaration of undefined constructor FGTaxiNode(double, double, int)
- Array boundry checks and cleanup.
- Modified Dijkstra path search algoritm to solve partial problems. Currently
limited to include pushback points and routes only, but can probably be
extended to a more general approach.
- Added initial support for giving certain routes in the network a penalty, in
order to discourage the use of certain routes over others.
2007-08-08 06:09:58 +00:00
|
|
|
FGTaxiSegment() :
|
|
|
|
startNode(0),
|
|
|
|
endNode(0),
|
|
|
|
length(0),
|
|
|
|
course(0),
|
|
|
|
headingDiff(0),
|
|
|
|
isActive(0),
|
|
|
|
isPushBackRoute(0),
|
|
|
|
start(0),
|
|
|
|
end(0),
|
|
|
|
index(0),
|
|
|
|
oppositeDirection(0)
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
|
|
|
FGTaxiSegment (const FGTaxiSegment &other) :
|
|
|
|
startNode (other.startNode),
|
|
|
|
endNode (other.endNode),
|
|
|
|
length (other.length),
|
|
|
|
course (other.course),
|
|
|
|
headingDiff (other.headingDiff),
|
|
|
|
isActive (other.isActive),
|
|
|
|
isPushBackRoute (other.isPushBackRoute),
|
|
|
|
start (other.start),
|
|
|
|
end (other.end),
|
|
|
|
index (other.index),
|
|
|
|
oppositeDirection (other.oppositeDirection)
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
|
|
|
FGTaxiSegment& operator=(const FGTaxiSegment &other)
|
|
|
|
{
|
|
|
|
startNode = other.startNode;
|
|
|
|
endNode = other.endNode;
|
|
|
|
length = other.length;
|
|
|
|
course = other.course;
|
|
|
|
headingDiff = other.headingDiff;
|
|
|
|
isActive = other.isActive;
|
|
|
|
isPushBackRoute = other.isPushBackRoute;
|
|
|
|
start = other.start;
|
|
|
|
end = other.end;
|
|
|
|
index = other.index;
|
|
|
|
oppositeDirection = other.oppositeDirection;
|
|
|
|
return *this;
|
|
|
|
};
|
2005-12-29 13:58:21 +00:00
|
|
|
|
|
|
|
void setIndex (int val) { index = val; };
|
|
|
|
void setStartNodeRef (int val) { startNode = val; };
|
|
|
|
void setEndNodeRef (int val) { endNode = val; };
|
|
|
|
|
2006-09-19 17:04:22 +00:00
|
|
|
void setOpposite(FGTaxiSegment *opp) { oppositeDirection = opp; };
|
|
|
|
|
2005-12-29 13:58:21 +00:00
|
|
|
void setStart(FGTaxiNodeVector *nodes);
|
|
|
|
void setEnd (FGTaxiNodeVector *nodes);
|
- Ground network XML parsing code reads the new attributes "holdPointType"
and "isOnRunway".
- Added initial support for AI controlled pushback operations, making use of the
current editing capabilities of TaxiDraw CVS / New_GUI_CODE. The current
implementation is slightly more computationally intensive than strictly
required, due to the currently inability of taxidraw to link one specific
pushBack point to to a particular startup location. FlightGear now determines
this dynamically, and once we have that functionality in TaxiDraw, the
initialization part of createPushBack() can be further simplified.
- Smoother transition from pushback to taxi. No more skipping of waypoints, and
aircraft wait for two minutes at pushback point.
- The classes FGTaxiNode, FGTaxiSegment, and FGParking, now have copy
constructors, and assignment operators.
- Removed declaration of undefined constructor FGTaxiNode(double, double, int)
- Array boundry checks and cleanup.
- Modified Dijkstra path search algoritm to solve partial problems. Currently
limited to include pushback points and routes only, but can probably be
extended to a more general approach.
- Added initial support for giving certain routes in the network a penalty, in
order to discourage the use of certain routes over others.
2007-08-08 06:09:58 +00:00
|
|
|
void setPushBackType(bool val) { isPushBackRoute = val; };
|
2005-12-29 13:58:21 +00:00
|
|
|
void setTrackDistance();
|
|
|
|
|
|
|
|
FGTaxiNode * getEnd() { return end;};
|
2006-09-19 17:04:22 +00:00
|
|
|
FGTaxiNode * getStart() { return start; };
|
2005-12-29 13:58:21 +00:00
|
|
|
double getLength() { return length; };
|
|
|
|
int getIndex() { return index; };
|
- Ground network XML parsing code reads the new attributes "holdPointType"
and "isOnRunway".
- Added initial support for AI controlled pushback operations, making use of the
current editing capabilities of TaxiDraw CVS / New_GUI_CODE. The current
implementation is slightly more computationally intensive than strictly
required, due to the currently inability of taxidraw to link one specific
pushBack point to to a particular startup location. FlightGear now determines
this dynamically, and once we have that functionality in TaxiDraw, the
initialization part of createPushBack() can be further simplified.
- Smoother transition from pushback to taxi. No more skipping of waypoints, and
aircraft wait for two minutes at pushback point.
- The classes FGTaxiNode, FGTaxiSegment, and FGParking, now have copy
constructors, and assignment operators.
- Removed declaration of undefined constructor FGTaxiNode(double, double, int)
- Array boundry checks and cleanup.
- Modified Dijkstra path search algoritm to solve partial problems. Currently
limited to include pushback points and routes only, but can probably be
extended to a more general approach.
- Added initial support for giving certain routes in the network a penalty, in
order to discourage the use of certain routes over others.
2007-08-08 06:09:58 +00:00
|
|
|
|
|
|
|
bool isPushBack() { return isPushBackRoute; };
|
|
|
|
|
|
|
|
int getPenalty(int nGates);
|
2005-12-29 13:58:21 +00:00
|
|
|
|
- Ground network XML parsing code reads the new attributes "holdPointType"
and "isOnRunway".
- Added initial support for AI controlled pushback operations, making use of the
current editing capabilities of TaxiDraw CVS / New_GUI_CODE. The current
implementation is slightly more computationally intensive than strictly
required, due to the currently inability of taxidraw to link one specific
pushBack point to to a particular startup location. FlightGear now determines
this dynamically, and once we have that functionality in TaxiDraw, the
initialization part of createPushBack() can be further simplified.
- Smoother transition from pushback to taxi. No more skipping of waypoints, and
aircraft wait for two minutes at pushback point.
- The classes FGTaxiNode, FGTaxiSegment, and FGParking, now have copy
constructors, and assignment operators.
- Removed declaration of undefined constructor FGTaxiNode(double, double, int)
- Array boundry checks and cleanup.
- Modified Dijkstra path search algoritm to solve partial problems. Currently
limited to include pushback points and routes only, but can probably be
extended to a more general approach.
- Added initial support for giving certain routes in the network a penalty, in
order to discourage the use of certain routes over others.
2007-08-08 06:09:58 +00:00
|
|
|
FGTaxiSegment *getAddress() { return this;};
|
2006-07-29 18:17:19 +00:00
|
|
|
|
2006-09-19 17:04:22 +00:00
|
|
|
bool operator<(const FGTaxiSegment &other) const { return index < other.index; };
|
2006-11-11 10:52:05 +00:00
|
|
|
bool hasSmallerHeadingDiff (const FGTaxiSegment &other) const { return headingDiff < other.headingDiff; };
|
2006-09-19 17:04:22 +00:00
|
|
|
FGTaxiSegment *opposite() { return oppositeDirection; };
|
2006-11-11 10:52:05 +00:00
|
|
|
void setCourseDiff(double crse);
|
|
|
|
|
2006-09-19 17:04:22 +00:00
|
|
|
|
2005-12-29 13:58:21 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2006-11-11 10:52:05 +00:00
|
|
|
|
|
|
|
|
2005-12-29 13:58:21 +00:00
|
|
|
typedef vector<int> intVec;
|
|
|
|
typedef vector<int>::iterator intVecIterator;
|
|
|
|
|
2006-11-11 10:52:05 +00:00
|
|
|
|
|
|
|
|
2006-07-29 18:17:19 +00:00
|
|
|
/***************************************************************************************
|
|
|
|
* class FGTaxiRoute
|
|
|
|
**************************************************************************************/
|
2005-12-29 13:58:21 +00:00
|
|
|
class FGTaxiRoute
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
intVec nodes;
|
2006-07-29 18:17:19 +00:00
|
|
|
intVec routes;
|
2005-12-29 13:58:21 +00:00
|
|
|
double distance;
|
2006-11-11 10:52:05 +00:00
|
|
|
int depth;
|
2005-12-29 13:58:21 +00:00
|
|
|
intVecIterator currNode;
|
2006-07-29 18:17:19 +00:00
|
|
|
intVecIterator currRoute;
|
2005-12-29 13:58:21 +00:00
|
|
|
|
|
|
|
public:
|
2006-07-29 18:17:19 +00:00
|
|
|
FGTaxiRoute() { distance = 0; currNode = nodes.begin(); currRoute = routes.begin();};
|
2006-11-11 10:52:05 +00:00
|
|
|
FGTaxiRoute(intVec nds, intVec rts, double dist, int dpth) {
|
2006-07-29 18:17:19 +00:00
|
|
|
nodes = nds;
|
|
|
|
routes = rts;
|
|
|
|
distance = dist;
|
|
|
|
currNode = nodes.begin();
|
2006-11-11 10:52:05 +00:00
|
|
|
depth = dpth;
|
2006-07-29 18:17:19 +00:00
|
|
|
};
|
2007-07-15 14:08:31 +00:00
|
|
|
|
|
|
|
FGTaxiRoute& operator= (const FGTaxiRoute &other) {
|
|
|
|
nodes = other.nodes;
|
|
|
|
routes = other.routes;
|
|
|
|
distance = other.distance;
|
|
|
|
depth = other.depth;
|
|
|
|
currNode = nodes.begin();
|
|
|
|
currRoute = routes.begin();
|
|
|
|
return *this;
|
|
|
|
};
|
|
|
|
|
|
|
|
FGTaxiRoute(const FGTaxiRoute& copy) :
|
|
|
|
nodes(copy.nodes),
|
|
|
|
routes(copy.routes),
|
|
|
|
distance(copy.distance),
|
|
|
|
depth(copy.depth),
|
|
|
|
currNode(nodes.begin()),
|
|
|
|
currRoute(routes.begin())
|
|
|
|
{};
|
|
|
|
|
2005-12-29 13:58:21 +00:00
|
|
|
bool operator< (const FGTaxiRoute &other) const {return distance < other.distance; };
|
|
|
|
bool empty () { return nodes.begin() == nodes.end(); };
|
2006-07-29 18:17:19 +00:00
|
|
|
bool next(int *nde);
|
|
|
|
bool next(int *nde, int *rte);
|
2006-08-26 07:22:20 +00:00
|
|
|
void rewind(int legNr);
|
2005-12-29 13:58:21 +00:00
|
|
|
|
2006-07-29 18:17:19 +00:00
|
|
|
void first() { currNode = nodes.begin(); currRoute = routes.begin(); };
|
2006-03-26 21:40:35 +00:00
|
|
|
int size() { return nodes.size(); };
|
2006-11-11 10:52:05 +00:00
|
|
|
int getDepth() { return depth; };
|
2005-12-29 13:58:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef vector<FGTaxiRoute> TaxiRouteVector;
|
|
|
|
typedef vector<FGTaxiRoute>::iterator TaxiRouteVectorIterator;
|
|
|
|
|
|
|
|
/**************************************************************************************
|
|
|
|
* class FGGroundNetWork
|
|
|
|
*************************************************************************************/
|
2006-08-26 07:22:20 +00:00
|
|
|
class FGGroundNetwork : public FGATCController
|
2005-12-29 13:58:21 +00:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
bool hasNetwork;
|
2007-06-28 07:54:39 +00:00
|
|
|
//int maxDepth;
|
2006-11-11 10:52:05 +00:00
|
|
|
int count;
|
2005-12-29 13:58:21 +00:00
|
|
|
FGTaxiNodeVector nodes;
|
- Ground network XML parsing code reads the new attributes "holdPointType"
and "isOnRunway".
- Added initial support for AI controlled pushback operations, making use of the
current editing capabilities of TaxiDraw CVS / New_GUI_CODE. The current
implementation is slightly more computationally intensive than strictly
required, due to the currently inability of taxidraw to link one specific
pushBack point to to a particular startup location. FlightGear now determines
this dynamically, and once we have that functionality in TaxiDraw, the
initialization part of createPushBack() can be further simplified.
- Smoother transition from pushback to taxi. No more skipping of waypoints, and
aircraft wait for two minutes at pushback point.
- The classes FGTaxiNode, FGTaxiSegment, and FGParking, now have copy
constructors, and assignment operators.
- Removed declaration of undefined constructor FGTaxiNode(double, double, int)
- Array boundry checks and cleanup.
- Modified Dijkstra path search algoritm to solve partial problems. Currently
limited to include pushback points and routes only, but can probably be
extended to a more general approach.
- Added initial support for giving certain routes in the network a penalty, in
order to discourage the use of certain routes over others.
2007-08-08 06:09:58 +00:00
|
|
|
FGTaxiNodeVector pushBackNodes;
|
2005-12-29 13:58:21 +00:00
|
|
|
FGTaxiSegmentVector segments;
|
|
|
|
//intVec route;
|
- Ground network XML parsing code reads the new attributes "holdPointType"
and "isOnRunway".
- Added initial support for AI controlled pushback operations, making use of the
current editing capabilities of TaxiDraw CVS / New_GUI_CODE. The current
implementation is slightly more computationally intensive than strictly
required, due to the currently inability of taxidraw to link one specific
pushBack point to to a particular startup location. FlightGear now determines
this dynamically, and once we have that functionality in TaxiDraw, the
initialization part of createPushBack() can be further simplified.
- Smoother transition from pushback to taxi. No more skipping of waypoints, and
aircraft wait for two minutes at pushback point.
- The classes FGTaxiNode, FGTaxiSegment, and FGParking, now have copy
constructors, and assignment operators.
- Removed declaration of undefined constructor FGTaxiNode(double, double, int)
- Array boundry checks and cleanup.
- Modified Dijkstra path search algoritm to solve partial problems. Currently
limited to include pushback points and routes only, but can probably be
extended to a more general approach.
- Added initial support for giving certain routes in the network a penalty, in
order to discourage the use of certain routes over others.
2007-08-08 06:09:58 +00:00
|
|
|
//intVec nodesStack;
|
|
|
|
//intVec routesStack;
|
2005-12-29 13:58:21 +00:00
|
|
|
TaxiRouteVector routes;
|
2006-08-26 07:22:20 +00:00
|
|
|
TrafficVector activeTraffic;
|
|
|
|
TrafficVectorIterator currTraffic;
|
2006-11-11 10:52:05 +00:00
|
|
|
SGWayPoint destination;
|
- Ground network XML parsing code reads the new attributes "holdPointType"
and "isOnRunway".
- Added initial support for AI controlled pushback operations, making use of the
current editing capabilities of TaxiDraw CVS / New_GUI_CODE. The current
implementation is slightly more computationally intensive than strictly
required, due to the currently inability of taxidraw to link one specific
pushBack point to to a particular startup location. FlightGear now determines
this dynamically, and once we have that functionality in TaxiDraw, the
initialization part of createPushBack() can be further simplified.
- Smoother transition from pushback to taxi. No more skipping of waypoints, and
aircraft wait for two minutes at pushback point.
- The classes FGTaxiNode, FGTaxiSegment, and FGParking, now have copy
constructors, and assignment operators.
- Removed declaration of undefined constructor FGTaxiNode(double, double, int)
- Array boundry checks and cleanup.
- Modified Dijkstra path search algoritm to solve partial problems. Currently
limited to include pushback points and routes only, but can probably be
extended to a more general approach.
- Added initial support for giving certain routes in the network a penalty, in
order to discourage the use of certain routes over others.
2007-08-08 06:09:58 +00:00
|
|
|
|
2005-12-29 13:58:21 +00:00
|
|
|
bool foundRoute;
|
|
|
|
double totalDistance, maxDistance;
|
2006-10-06 17:36:31 +00:00
|
|
|
FGTowerController *towerController;
|
2006-11-11 10:52:05 +00:00
|
|
|
FGAirport *parent;
|
2006-08-16 09:58:26 +00:00
|
|
|
|
- Ground network XML parsing code reads the new attributes "holdPointType"
and "isOnRunway".
- Added initial support for AI controlled pushback operations, making use of the
current editing capabilities of TaxiDraw CVS / New_GUI_CODE. The current
implementation is slightly more computationally intensive than strictly
required, due to the currently inability of taxidraw to link one specific
pushBack point to to a particular startup location. FlightGear now determines
this dynamically, and once we have that functionality in TaxiDraw, the
initialization part of createPushBack() can be further simplified.
- Smoother transition from pushback to taxi. No more skipping of waypoints, and
aircraft wait for two minutes at pushback point.
- The classes FGTaxiNode, FGTaxiSegment, and FGParking, now have copy
constructors, and assignment operators.
- Removed declaration of undefined constructor FGTaxiNode(double, double, int)
- Array boundry checks and cleanup.
- Modified Dijkstra path search algoritm to solve partial problems. Currently
limited to include pushback points and routes only, but can probably be
extended to a more general approach.
- Added initial support for giving certain routes in the network a penalty, in
order to discourage the use of certain routes over others.
2007-08-08 06:09:58 +00:00
|
|
|
|
|
|
|
//void printRoutingError(string);
|
2006-09-19 17:04:22 +00:00
|
|
|
|
|
|
|
void checkSpeedAdjustment(int id, double lat, double lon,
|
|
|
|
double heading, double speed, double alt);
|
|
|
|
void checkHoldPosition(int id, double lat, double lon,
|
|
|
|
double heading, double speed, double alt);
|
- Ground network XML parsing code reads the new attributes "holdPointType"
and "isOnRunway".
- Added initial support for AI controlled pushback operations, making use of the
current editing capabilities of TaxiDraw CVS / New_GUI_CODE. The current
implementation is slightly more computationally intensive than strictly
required, due to the currently inability of taxidraw to link one specific
pushBack point to to a particular startup location. FlightGear now determines
this dynamically, and once we have that functionality in TaxiDraw, the
initialization part of createPushBack() can be further simplified.
- Smoother transition from pushback to taxi. No more skipping of waypoints, and
aircraft wait for two minutes at pushback point.
- The classes FGTaxiNode, FGTaxiSegment, and FGParking, now have copy
constructors, and assignment operators.
- Removed declaration of undefined constructor FGTaxiNode(double, double, int)
- Array boundry checks and cleanup.
- Modified Dijkstra path search algoritm to solve partial problems. Currently
limited to include pushback points and routes only, but can probably be
extended to a more general approach.
- Added initial support for giving certain routes in the network a penalty, in
order to discourage the use of certain routes over others.
2007-08-08 06:09:58 +00:00
|
|
|
|
2005-12-29 13:58:21 +00:00
|
|
|
public:
|
|
|
|
FGGroundNetwork();
|
2006-10-06 17:36:31 +00:00
|
|
|
~FGGroundNetwork();
|
2005-12-29 13:58:21 +00:00
|
|
|
|
|
|
|
void addNode (const FGTaxiNode& node);
|
|
|
|
void addNodes (FGParkingVec *parkings);
|
|
|
|
void addSegment(const FGTaxiSegment& seg);
|
|
|
|
|
|
|
|
void init();
|
|
|
|
bool exists() { return hasNetwork; };
|
2006-10-06 17:36:31 +00:00
|
|
|
void setTowerController(FGTowerController *twrCtrlr) { towerController = twrCtrlr; };
|
2005-12-29 13:58:21 +00:00
|
|
|
int findNearestNode(double lat, double lon);
|
|
|
|
FGTaxiNode *findNode(int idx);
|
2006-07-29 18:17:19 +00:00
|
|
|
FGTaxiSegment *findSegment(int idx);
|
- Ground network XML parsing code reads the new attributes "holdPointType"
and "isOnRunway".
- Added initial support for AI controlled pushback operations, making use of the
current editing capabilities of TaxiDraw CVS / New_GUI_CODE. The current
implementation is slightly more computationally intensive than strictly
required, due to the currently inability of taxidraw to link one specific
pushBack point to to a particular startup location. FlightGear now determines
this dynamically, and once we have that functionality in TaxiDraw, the
initialization part of createPushBack() can be further simplified.
- Smoother transition from pushback to taxi. No more skipping of waypoints, and
aircraft wait for two minutes at pushback point.
- The classes FGTaxiNode, FGTaxiSegment, and FGParking, now have copy
constructors, and assignment operators.
- Removed declaration of undefined constructor FGTaxiNode(double, double, int)
- Array boundry checks and cleanup.
- Modified Dijkstra path search algoritm to solve partial problems. Currently
limited to include pushback points and routes only, but can probably be
extended to a more general approach.
- Added initial support for giving certain routes in the network a penalty, in
order to discourage the use of certain routes over others.
2007-08-08 06:09:58 +00:00
|
|
|
FGTaxiRoute findShortestRoute(int start, int end, bool fullSearch=true);
|
2007-06-28 07:54:39 +00:00
|
|
|
//void trace(FGTaxiNode *, int, int, double dist);
|
2006-08-26 07:22:20 +00:00
|
|
|
|
- Ground network XML parsing code reads the new attributes "holdPointType"
and "isOnRunway".
- Added initial support for AI controlled pushback operations, making use of the
current editing capabilities of TaxiDraw CVS / New_GUI_CODE. The current
implementation is slightly more computationally intensive than strictly
required, due to the currently inability of taxidraw to link one specific
pushBack point to to a particular startup location. FlightGear now determines
this dynamically, and once we have that functionality in TaxiDraw, the
initialization part of createPushBack() can be further simplified.
- Smoother transition from pushback to taxi. No more skipping of waypoints, and
aircraft wait for two minutes at pushback point.
- The classes FGTaxiNode, FGTaxiSegment, and FGParking, now have copy
constructors, and assignment operators.
- Removed declaration of undefined constructor FGTaxiNode(double, double, int)
- Array boundry checks and cleanup.
- Modified Dijkstra path search algoritm to solve partial problems. Currently
limited to include pushback points and routes only, but can probably be
extended to a more general approach.
- Added initial support for giving certain routes in the network a penalty, in
order to discourage the use of certain routes over others.
2007-08-08 06:09:58 +00:00
|
|
|
int getNrOfNodes() { return nodes.size(); };
|
|
|
|
|
2006-11-11 10:52:05 +00:00
|
|
|
void setParent(FGAirport *par) { parent = par; };
|
|
|
|
|
2006-08-26 07:22:20 +00:00
|
|
|
virtual void announcePosition(int id, FGAIFlightPlan *intendedRoute, int currentRoute,
|
2006-11-11 10:52:05 +00:00
|
|
|
double lat, double lon, double hdg, double spd, double alt,
|
2008-07-13 12:51:06 +00:00
|
|
|
double radius, int leg, FGAIAircraft *aircraft);
|
2006-08-26 07:22:20 +00:00
|
|
|
virtual void signOff(int id);
|
2006-09-19 17:04:22 +00:00
|
|
|
virtual void update(int id, double lat, double lon, double heading, double speed, double alt, double dt);
|
2006-08-26 07:22:20 +00:00
|
|
|
virtual bool hasInstruction(int id);
|
|
|
|
virtual FGATCInstruction getInstruction(int id);
|
2007-06-28 07:54:39 +00:00
|
|
|
|
|
|
|
bool checkForCircularWaits(int id);
|
2005-12-29 13:58:21 +00:00
|
|
|
};
|
|
|
|
|
2006-08-26 07:22:20 +00:00
|
|
|
|
2005-12-29 13:58:21 +00:00
|
|
|
#endif
|