Roy Vegard Ovesen:

I'm working on a route manager in the GPS module. So I've added a name
parameter to the waypoint class in Simgear. I use the existing ID parameter
to store the ID, for example KLAX, and the name parameter to store the name,
San Francisco Intl.
This commit is contained in:
ehofman
2004-10-16 12:23:53 +00:00
parent ef486b2cc6
commit ba1b96e518
2 changed files with 8 additions and 2 deletions

View File

@@ -29,12 +29,13 @@
// Constructor
SGWayPoint::SGWayPoint( const double lon, const double lat, const double alt,
const modetype m, const string s ) {
const modetype m, const string s, const string n ) {
target_lon = lon;
target_lat = lat;
target_alt = alt;
mode = m;
id = s;
name = n;
}

View File

@@ -76,6 +76,7 @@ private:
double distance;
string id;
string name;
public:
@@ -86,10 +87,11 @@ public:
* @param alt target altitude
* @param mode type of coordinates/math to use
* @param s waypoint identifier
* @param n waypoint name
*/
SGWayPoint( const double lon = 0.0, const double lat = 0.0,
const double alt = 0.0, const modetype m = WGS84,
const string s = "" );
const string s = "", const string n = "" );
/** Destructor */
~SGWayPoint();
@@ -153,6 +155,9 @@ public:
/** @return waypoint id */
inline string get_id() const { return id; }
/** @return waypoint name */
inline string get_name() const { return name; }
};