From fa094c9980bf619e3baf0a20d63b852c3efc8dea Mon Sep 17 00:00:00 2001 From: daveluff Date: Mon, 31 Mar 2003 16:23:23 +0000 Subject: [PATCH] Slight change of function api --- src/ATC/ATCutils.cxx | 10 +++++----- src/ATC/ATCutils.hxx | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ATC/ATCutils.cxx b/src/ATC/ATCutils.cxx index 59b32f2ab..1c182357e 100644 --- a/src/ATC/ATCutils.cxx +++ b/src/ATC/ATCutils.cxx @@ -284,10 +284,10 @@ double dclGetAirportElev( const string& id ) { // Runway stuff // Given a Point3D (lon/lat/elev) and an FGRunway struct, determine if the point lies on the runway -bool OnRunway(Point3D pt, FGRunway* rwy) { +bool OnRunway(Point3D pt, const FGRunway& rwy) { FGATCAlignedProjection ortho; - Point3D centre(rwy->lon, rwy->lat, 0.0); // We don't need the elev - ortho.Init(centre, rwy->heading); + Point3D centre(rwy.lon, rwy.lat, 0.0); // We don't need the elev + ortho.Init(centre, rwy.heading); Point3D xyc = ortho.ConvertToLocal(centre); Point3D xyp = ortho.ConvertToLocal(pt); @@ -295,8 +295,8 @@ bool OnRunway(Point3D pt, FGRunway* rwy) { //cout << "Length offset = " << fabs(xyp.y() - xyc.y()) << '\n'; //cout << "Width offset = " << fabs(xyp.x() - xyc.x()) << '\n'; - if((fabs(xyp.y() - xyc.y()) < ((rwy->length/2.0) + 5.0)) - && (fabs(xyp.x() - xyc.x()) < (rwy->width/2.0))) { + if((fabs(xyp.y() - xyc.y()) < ((rwy.length/2.0) + 5.0)) + && (fabs(xyp.x() - xyc.x()) < (rwy.width/2.0))) { return(true); } diff --git a/src/ATC/ATCutils.hxx b/src/ATC/ATCutils.hxx index 360ecd837..b48739047 100644 --- a/src/ATC/ATCutils.hxx +++ b/src/ATC/ATCutils.hxx @@ -100,5 +100,5 @@ double dclGetAirportElev( const string& id ); ****************/ // Given a Point3D (lon/lat/elev) and an FGRunway struct, determine if the point lies on the runway -bool OnRunway(Point3D pt, FGRunway* rwy); +bool OnRunway(Point3D pt, const FGRunway& rwy); -- 2.39.5