From: curt Date: Sat, 31 Jan 2004 19:50:35 +0000 (+0000) Subject: Fix a slight ambiguity in variable names. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=828e10773c93a41ad71ef7d24c3c85696c381719;p=simgear.git Fix a slight ambiguity in variable names. --- diff --git a/simgear/route/waypoint.cxx b/simgear/route/waypoint.cxx index b29d046b..9e6820b9 100644 --- a/simgear/route/waypoint.cxx +++ b/simgear/route/waypoint.cxx @@ -50,15 +50,15 @@ SGWayPoint::~SGWayPoint() { void SGWayPoint::CourseAndDistance( const double cur_lon, const double cur_lat, const double cur_alt, - double *course, double *distance ) const { + double *course, double *dist ) const { if ( mode == WGS84 ) { double reverse; geo_inverse_wgs_84( cur_alt, cur_lat, cur_lon, target_lat, target_lon, - course, &reverse, distance ); + course, &reverse, dist ); } else if ( mode == SPHERICAL ) { Point3D current( cur_lon * SGD_DEGREES_TO_RADIANS, cur_lat * SGD_DEGREES_TO_RADIANS, 0.0 ); Point3D target( target_lon * SGD_DEGREES_TO_RADIANS, target_lat * SGD_DEGREES_TO_RADIANS, 0.0 ); - calc_gc_course_dist( current, target, course, distance ); + calc_gc_course_dist( current, target, course, dist ); *course = 360.0 - *course * SGD_RADIANS_TO_DEGREES; } else if ( mode == CARTESIAN ) { double dx = target_lon - cur_lon; @@ -70,15 +70,15 @@ void SGWayPoint::CourseAndDistance( const double cur_lon, while ( *course > 360.0 ) { *course -= 360.0; } - *distance = sqrt( dx * dx + dy * dy ); + *dist = sqrt( dx * dx + dy * dy ); } } // Calculate course and distances between two waypoints void SGWayPoint::CourseAndDistance( const SGWayPoint &wp, - double *course, double *distance ) const { + double *course, double *dist ) const { CourseAndDistance( wp.get_target_lon(), wp.get_target_lat(), wp.get_target_alt(), - course, distance ); + course, dist ); } diff --git a/simgear/route/waypoint.hxx b/simgear/route/waypoint.hxx index f9835977..afa21598 100644 --- a/simgear/route/waypoint.hxx +++ b/simgear/route/waypoint.hxx @@ -104,21 +104,21 @@ public: * @param cur_lat (in) current latitude * @param cur_alt (in) current altitude * @param course (out) heading from current location to this waypoint - * @param distance (out) distance 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 *distance ) const; + 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 distance (out) distance from current location to this waypoint + * @param dist (out) distance from current location to this waypoint */ void CourseAndDistance( const SGWayPoint &wp, - double *course, double *distance ) const; + double *course, double *dist ) const; /** @return waypoint mode */ inline modetype get_mode() const { return mode; }