2005-12-29 13:58:21 +00:00
|
|
|
// parking.hxx - A class to handle airport startup locations in
|
|
|
|
// FlightGear. This code is intended to be used by AI code and
|
|
|
|
// initial user-startup location selection.
|
|
|
|
//
|
|
|
|
// Written by Durk Talsma, started December 2004.
|
|
|
|
//
|
|
|
|
// 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 _PARKING_HXX_
|
|
|
|
#define _PARKING_HXX_
|
|
|
|
|
2006-04-17 12:59:35 +00:00
|
|
|
#ifndef __cplusplus
|
2005-12-29 13:58:21 +00:00
|
|
|
# error This library requires C++
|
2006-04-17 12:59:35 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <simgear/compiler.h>
|
2012-09-25 00:31:17 +01:00
|
|
|
#include <simgear/sg_inlines.h>
|
2005-12-29 13:58:21 +00:00
|
|
|
|
2008-07-25 18:38:29 +00:00
|
|
|
#include <string>
|
2005-12-29 13:58:21 +00:00
|
|
|
|
2007-07-05 19:00:59 +00:00
|
|
|
#include "gnnode.hxx"
|
2015-12-01 00:01:27 +00:00
|
|
|
#include <Airports/airports_fwd.hxx>
|
- 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
|
|
|
|
2012-09-25 00:31:17 +01:00
|
|
|
class FGParking : public FGTaxiNode
|
|
|
|
{
|
2005-12-29 13:58:21 +00:00
|
|
|
private:
|
2012-10-01 17:18:36 +01:00
|
|
|
const double heading;
|
|
|
|
const double radius;
|
|
|
|
const std::string type;
|
|
|
|
const std::string airlineCodes;
|
2015-12-01 00:01:27 +00:00
|
|
|
FGTaxiNodeRef pushBackPoint;
|
2005-12-29 13:58:21 +00:00
|
|
|
|
2012-09-25 00:31:17 +01:00
|
|
|
SG_DISABLE_COPY(FGParking);
|
2005-12-29 13:58:21 +00:00
|
|
|
public:
|
2018-05-07 16:40:38 +01:00
|
|
|
static bool isType(FGPositioned::Type ty)
|
|
|
|
{ return (ty == FGPositioned::PARKING); }
|
|
|
|
|
2015-12-01 00:01:27 +00:00
|
|
|
FGParking(int index,
|
|
|
|
const SGGeod& pos,
|
2012-09-25 00:31:17 +01:00
|
|
|
double heading, double radius,
|
|
|
|
const std::string& name, const std::string& type,
|
2015-12-01 00:01:27 +00:00
|
|
|
const std::string& codes);
|
2012-09-25 00:31:17 +01:00
|
|
|
virtual ~FGParking();
|
2005-12-29 13:58:21 +00:00
|
|
|
|
2012-09-23 21:42:40 +01:00
|
|
|
double getHeading () const { return heading; };
|
|
|
|
double getRadius () const { return radius; };
|
2007-07-05 19:00:59 +00:00
|
|
|
|
2012-09-23 21:42:40 +01:00
|
|
|
std::string getType () const { return type; };
|
|
|
|
std::string getCodes () const { return airlineCodes;};
|
2018-05-07 16:41:10 +01:00
|
|
|
std::string getName () const { return ident(); };
|
2013-03-04 19:24:47 +01:00
|
|
|
|
2015-12-01 00:01:27 +00:00
|
|
|
void setPushBackPoint(const FGTaxiNodeRef& node);
|
|
|
|
FGTaxiNodeRef getPushBackPoint () { return pushBackPoint; };
|
- 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
|
|
|
|
2007-07-05 19:00:59 +00:00
|
|
|
bool operator< (const FGParking &other) const {
|
|
|
|
return radius < other.radius; };
|
2005-12-29 13:58:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|