Initial revision.
This commit is contained in:
10
simgear/route/Makefile.am
Normal file
10
simgear/route/Makefile.am
Normal file
@@ -0,0 +1,10 @@
|
||||
includedir = @includedir@/route
|
||||
|
||||
lib_LIBRARIES = libsgroute.a
|
||||
|
||||
include_HEADERS = waypoint.hxx
|
||||
|
||||
libsgroute_a_SOURCES = \
|
||||
waypoint.cxx
|
||||
|
||||
INCLUDES += -I$(top_srcdir)
|
||||
48
simgear/route/waypoint.cxx
Normal file
48
simgear/route/waypoint.cxx
Normal file
@@ -0,0 +1,48 @@
|
||||
// waypoint.cxx -- Class to hold data and return info relating to a waypoint
|
||||
//
|
||||
// Written by Curtis Olson, started September 2000.
|
||||
//
|
||||
// Copyright (C) 2000 Curtis L. Olson - curt@hfrl.umn.edu
|
||||
//
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// $Id$
|
||||
|
||||
|
||||
#include "waypoint.hxx"
|
||||
|
||||
|
||||
// Constructor
|
||||
SGWayPoint::SGWayPoint( const double _lon, const double _lat,
|
||||
const modetype _mode ) {
|
||||
lon = _lon;
|
||||
lat = _lat;
|
||||
mode = _mode;
|
||||
}
|
||||
|
||||
|
||||
SGWayPoint::SGWayPoint( const double _lon, const double _lat ) {
|
||||
SGWayPoint( _lon, _lat, LATLON );
|
||||
}
|
||||
|
||||
|
||||
SGWayPoint::SGWayPoint() {
|
||||
SGWayPoint( 0.0, 0.0, LATLON );
|
||||
}
|
||||
|
||||
|
||||
// Destructor
|
||||
SGWayPoint::~SGWayPoint() {
|
||||
}
|
||||
67
simgear/route/waypoint.hxx
Normal file
67
simgear/route/waypoint.hxx
Normal file
@@ -0,0 +1,67 @@
|
||||
// waypoint.hxx -- Class to hold data and return info relating to a waypoint
|
||||
//
|
||||
// Written by Curtis Olson, started September 2000.
|
||||
//
|
||||
// Copyright (C) 2000 Curtis L. Olson - curt@hfrl.umn.edu
|
||||
//
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// $Id$
|
||||
|
||||
|
||||
#ifndef _WAYPOINT_HXX
|
||||
#define _WAYPOINT_HXX
|
||||
|
||||
|
||||
#ifndef __cplusplus
|
||||
# error This library requires C++
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
|
||||
class SGWayPoint {
|
||||
|
||||
public:
|
||||
|
||||
enum modetype {
|
||||
LATLON = 0,
|
||||
XY = 1,
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
modetype mode;
|
||||
|
||||
double lon;
|
||||
double lat;
|
||||
|
||||
public:
|
||||
|
||||
SGWayPoint();
|
||||
SGWayPoint( const double _lon, const double _lat );
|
||||
SGWayPoint( const double _lon, const double _lat, const modetype _mode );
|
||||
~SGWayPoint();
|
||||
|
||||
inline modetype get_mode() const { return mode; }
|
||||
inline double get_lon() const { return lon; }
|
||||
inline double get_lat() const { return lat; }
|
||||
};
|
||||
|
||||
|
||||
#endif // _WAYPOINT_HXX
|
||||
Reference in New Issue
Block a user