From 741c4ca15a7f61304388e6b25aca3898de0ee9ce Mon Sep 17 00:00:00 2001 From: mfranz Date: Fri, 29 Jun 2007 22:45:37 +0000 Subject: [PATCH] back out last changes (radar patch) --- simgear/environment/visual_enviro.cxx | 11 ++++------- simgear/environment/visual_enviro.hxx | 21 +++++---------------- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/simgear/environment/visual_enviro.cxx b/simgear/environment/visual_enviro.cxx index b879d025..8142b3e5 100644 --- a/simgear/environment/visual_enviro.cxx +++ b/simgear/environment/visual_enviro.cxx @@ -1,9 +1,6 @@ // Visual environment helper class // // Written by Harald JOHNSEN, started April 2005. -// Minor changes/additions by Vivian Meazza Apr- May 2007 -// -// Ported to OSG by Tim Moore Jun 2007 // // Copyright (C) 2005 Harald JOHNSEN - hjohnsen@evc.net // @@ -334,7 +331,7 @@ void SGEnviro::setLight(sgVec4 adj_fog_color) { } } -void SGEnviro::callback_cloud(float bearing, float alt, float radius, int family, float dist, int cloudId) { +void SGEnviro::callback_cloud(float heading, float alt, float radius, int family, float dist, int cloudId) { // send data to wx radar // compute turbulence // draw precipitation @@ -409,7 +406,7 @@ void SGEnviro::callback_cloud(float bearing, float alt, float radius, int family // add to the list for the wxRadar instrument if( LWC > 0.0 ) - radarEcho.push_back( SGWxRadarEcho ( bearing, alt, radius, dist, 0.0 , LWC, false, cloudId, false ) ); + radarEcho.push_back( SGWxRadarEcho ( heading, alt, radius, dist, LWC, false, cloudId ) ); // NB:data valid only from cockpit view @@ -422,7 +419,7 @@ void SGEnviro::callback_cloud(float bearing, float alt, float radius, int family orig.setlon(last_lon * SG_DEGREES_TO_RADIANS ); orig.setelev(0.0); dist = sgSqrt(dist); - dest = calc_gc_lon_lat(orig, bearing, dist); + dest = calc_gc_lon_lat(orig, heading, dist); lon = dest.lon() * SG_RADIANS_TO_DEGREES; lat = dest.lat() * SG_RADIANS_TO_DEGREES; addLightning( lon, lat, alt ); @@ -714,7 +711,7 @@ void SGLightning::lt_Render(void) { glTranslatef( ax, ay, -sgEnviro.last_alt ); - sgEnviro.radarEcho.push_back( SGWxRadarEcho ( course, 0.0, 0.0, dist, 0.0, age, true, 0, false ) ); + sgEnviro.radarEcho.push_back( SGWxRadarEcho ( course, 0.0, 0.0, dist, age, true, 0 ) ); for( int n = 0 ; n < nb_tree ; n++ ) { if( lt_tree[n].prev < 0 ) diff --git a/simgear/environment/visual_enviro.hxx b/simgear/environment/visual_enviro.hxx index 8eb8b3e9..4ee2d7f3 100644 --- a/simgear/environment/visual_enviro.hxx +++ b/simgear/environment/visual_enviro.hxx @@ -1,9 +1,6 @@ // Visual environment helper class // // Written by Harald JOHNSEN, started April 2005. -// Minor changes/additions by Vivian Meazza Apr- May 2007 -// -// Ported to OSG by Tim Moore Jun 2007 // // Copyright (C) 2005 Harald JOHNSEN - hjohnsen@evc.net // @@ -43,32 +40,24 @@ class SGSoundMgr; */ class SGWxRadarEcho { public: - SGWxRadarEcho(float _bearing, float _alt, float _radius, float _dist, float _heading, - double _LWC, bool _lightning, int _cloudId, bool _aircraft) : - bearing (_bearing), + SGWxRadarEcho(float _heading, float _alt, float _radius, float _dist, + double _LWC, bool _lightning, int _cloudId ) : heading( _heading ), alt ( _alt ), radius ( _radius ), dist ( _dist ), LWC ( _LWC ), lightning ( _lightning ), - aircraft ( _aircraft ), cloudId ( _cloudId ) {} - /** the heading and bearing in radian are versus north */ - float bearing, heading; + /** the heading in radian is versus north */ + float heading; float alt, radius, dist; - /** reflectivity converted to liquid water content. */ double LWC; - /** if true then this data is for a lightning else it is for water echo. */ - bool lightning; - - /** if true then this data is for an aircraft */ - bool aircraft; - + bool lightning; /** Unique identifier of cloud */ int cloudId; }; -- 2.39.5