+ /**
+ * Calculate course and distances. For WGS84 and SPHERICAL
+ * coordinates lat, lon, and course are in degrees, alt and
+ * distance are in meters. For CARTESIAN coordinates x = lon, y =
+ * lat. Course is in degrees and distance is in what ever units x
+ * and y are in.
+ * @param cur_lon (in) current longitude
+ * @param cur_lat (in) current latitude
+ * @param cur_alt (in) current altitude
+ * @param course (out) heading from current location to this waypoint
+ * @param dist (out) distance from current location to this waypoint
+ */
+ void CourseAndDistance( const double cur_lon, const double cur_lat,
+ const double cur_alt,
+ double *course, double *dist ) const;
+
+ void CourseAndDistance(const SGGeod& current,
+ double& course, double& dist ) const;
+
+ /**
+ * Calculate course and distances between a specified starting waypoint
+ * and this waypoint.
+ * @param wp (in) original waypoint
+ * @param course (out) heading from current location to this waypoint
+ * @param dist (out) distance from current location to this waypoint
+ */
+ void CourseAndDistance( const SGWayPoint &wp,
+ double *course, double *dist ) const;
+
+ /** @return waypoint longitude */
+ inline double get_target_lon() const { return pos.getLongitudeDeg(); }
+
+ /** @return waypoint latitude */
+ inline double get_target_lat() const { return pos.getLatitudeDeg(); }
+
+ /** @return waypoint altitude */
+ inline double get_target_alt() const { return pos.getElevationM(); }
+
+ inline const SGGeod& get_target() const { return pos; }
+
+ /**
+ *
+ */
+ inline void setTargetAltFt(double elev)
+ { pos.setElevationFt(elev); }
+
+ /**
+ * This value is not calculated by this class. It is simply a
+ * placeholder for the user to stash a distance value. This is useful
+ * when you stack waypoints together into a route. You can calculate the
+ * distance from the previous waypoint once and save it here. Adding up
+ * all the distances here plus the distance to the first waypoint gives you
+ * the total route length. Note, you must update this value yourself, this
+ * is for your convenience only.
+ * @return waypoint distance holder (what ever the user has stashed here)
+ */
+ inline double get_distance() const { return _distance; }
+
+ /**
+ * Set the waypoint distance value to a value of our choice.
+ * @param d distance
+ */
+ inline void set_distance( double d ) { _distance = d; }
+
+ inline double get_track() const { return _track; }
+ inline void set_track(double t) { _track = t; }
+
+ inline double get_speed() const { return _speed; }
+ inline void set_speed(double v) { _speed = v; }
+
+ /** @return waypoint id */
+ inline const std::string& get_id() const { return id; }
+
+ /** @return waypoint name */
+ inline const std::string& get_name() const { return name; }
+