head 1.4; access; symbols; locks; strict; comment @# @; 1.4 date 2002.09.07.01.50.41; author curt; state Exp; branches; next 1.3; 1.3 date 2002.08.31.19.01.59; author curt; state Exp; branches; next 1.2; 1.2 date 2002.08.31.18.54.05; author curt; state Exp; branches; next 1.1; 1.1 date 2002.02.15.17.22.03; author curt; state Exp; branches; next ; desc @@ 1.4 log @Updated doxygen docs. @ text @
Main Page Class Hierarchy Compound List File List Compound Members File Members

# waypoint.hxx

Go to the documentation of this file.

    00001
    00006 // Written by Curtis Olson, started September 2000.
    00007 //
    00008 // Copyright (C) 2000  Curtis L. Olson  - curt@@hfrl.umn.edu
    00009 //
    00010 // This program is free software; you can redistribute it and/or
    00011 // modify it under the terms of the GNU General Public License as
    00012 // published by the Free Software Foundation; either version 2 of the
    00013 // License, or (at your option) any later version.
    00014 //
    00015 // This program is distributed in the hope that it will be useful, but
    00016 // WITHOUT ANY WARRANTY; without even the implied warranty of
    00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00018 // General Public License for more details.
    00019 //
    00020 // You should have received a copy of the GNU General Public License
    00021 // along with this program; if not, write to the Free Software
    00022 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    00023 //
    00024 // $Id: waypoint.hxx,v 1.8 2001/11/27 03:17:43 curt Exp $
    00025
    00026
    00027 #ifndef _WAYPOINT_HXX
    00028 #define _WAYPOINT_HXX
    00029
    00030
    00031 #ifndef __cplusplus
    00032 # error This library requires C++
    00033 #endif
    00034
    00035
    00036 #include <simgear/compiler.h>
    00037
    00038 #include STL_STRING
    00039
    00040 SG_USING_STD(string);
    00041
    00042
    00047 class SGWayPoint {
    00048
    00049 public:
    00050
    00063     enum modetype {
    00064         WGS84 = 0,
    00065         SPHERICAL = 1,
    00066         CARTESIAN = 2
    00067     };
    00068
    00069 private:
    00070
    00071     modetype mode;
    00072
    00073     double target_lon;
    00074     double target_lat;
    00075     double target_alt;
    00076     double distance;
    00077
    00078     string id;
    00079
    00080 public:
    00081
    00090     SGWayPoint( const double lon = 0.0, const double lat = 0.0,
    00091                 const double alt = 0.0, const modetype m = WGS84,
    00092                 const string s = "" );
    00093
    00095     ~SGWayPoint();
    00096
    00109     void CourseAndDistance( const double cur_lon, const double cur_lat,
    00110                             const double cur_alt,
    00111                             double *course, double *distance ) const;
    00112
    00120     void CourseAndDistance( const SGWayPoint &wp,
    00121                             double *course, double *distance ) const;
    00122
    00124     inline modetype get_mode() const { return mode; }
    00125
    00127     inline double get_target_lon() const { return target_lon; }
    00128
    00130     inline double get_target_lat() const { return target_lat; }
    00131
    00133     inline double get_target_alt() const { return target_alt; }
    00134
    00145     inline double get_distance() const { return distance; }
    00146
    00151     inline void set_distance( double d ) { distance = d; }
    00152
    00154     inline string get_id() const { return id; }
    00155
    00156 };
    00157
    00158
    00159 #endif // _WAYPOINT_HXX

@ 1.3 log @Oops, try again. @ text @d101 1 a101 1