2000-08-16 01:28:33 +00:00
|
|
|
// runways.hxx -- a simple class to manage airport runway info
|
|
|
|
//
|
|
|
|
// Written by Curtis Olson, started August 2000.
|
|
|
|
//
|
2004-11-19 22:10:41 +00:00
|
|
|
// Copyright (C) 2000 Curtis L. Olson - http://www.flightgear.org/~curt
|
2000-08-16 01:28:33 +00:00
|
|
|
//
|
|
|
|
// 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.
|
2000-08-16 01:28:33 +00:00
|
|
|
//
|
|
|
|
// $Id$
|
|
|
|
|
|
|
|
|
2003-08-29 04:11:23 +00:00
|
|
|
#ifndef _FG_RUNWAYS_HXX
|
|
|
|
#define _FG_RUNWAYS_HXX
|
2000-08-16 01:28:33 +00:00
|
|
|
|
|
|
|
#include <simgear/compiler.h>
|
|
|
|
|
2008-07-25 18:38:29 +00:00
|
|
|
#include <string>
|
2008-08-14 18:13:39 +00:00
|
|
|
#include <vector>
|
2000-08-16 01:28:33 +00:00
|
|
|
|
2008-08-14 18:13:39 +00:00
|
|
|
class FGRunway
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
FGRunway();
|
|
|
|
|
2008-08-21 16:34:33 +00:00
|
|
|
FGRunway(const std::string& rwy_no,
|
2008-08-14 18:13:39 +00:00
|
|
|
const double longitude, const double latitude,
|
|
|
|
const double heading, const double length,
|
|
|
|
const double width,
|
|
|
|
const double displ_thresh1, const double displ_thresh2,
|
|
|
|
const double stopway1, const double stopway2,
|
2008-08-21 16:34:33 +00:00
|
|
|
const int surface_code);
|
2008-08-14 18:13:39 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* given a runway identifier (06, 18L, 31R) compute the identifier for the
|
|
|
|
* opposite heading runway (24, 36R, 13L) string.
|
|
|
|
*/
|
|
|
|
static std::string reverseIdent(const std::string& aRunayIdent);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* score this runway according to the specified weights. Used by
|
|
|
|
* FGAirport::findBestRunwayForHeading
|
|
|
|
*/
|
|
|
|
double score(double aLengthWt, double aWidthWt, double aSurfaceWt) const;
|
|
|
|
|
|
|
|
bool isTaxiway() const;
|
|
|
|
|
|
|
|
std::string _rwy_no;
|
|
|
|
std::string _type; // runway / taxiway
|
2004-12-22 23:57:07 +00:00
|
|
|
|
|
|
|
double _lon;
|
|
|
|
double _lat;
|
|
|
|
double _heading;
|
|
|
|
double _length;
|
|
|
|
double _width;
|
|
|
|
double _displ_thresh1;
|
|
|
|
double _displ_thresh2;
|
|
|
|
double _stopway1;
|
|
|
|
double _stopway2;
|
|
|
|
|
|
|
|
int _surface_code;
|
2000-08-16 01:28:33 +00:00
|
|
|
};
|
|
|
|
|
2008-08-14 18:13:39 +00:00
|
|
|
typedef std::vector<FGRunway> FGRunwayVector;
|
2000-08-16 01:28:33 +00:00
|
|
|
|
2003-08-29 04:11:23 +00:00
|
|
|
#endif // _FG_RUNWAYS_HXX
|