From 8896dbcba813ae09c33b5cd2efbdbe54127b8ba5 Mon Sep 17 00:00:00 2001 From: Christian Schmitt Date: Thu, 25 Oct 2012 14:18:44 +0200 Subject: [PATCH] Implement omnidirectional REIL --- src/Airports/GenAirports850/lights.cxx | 13 ++++++++++--- src/Airports/GenAirports850/runway.hxx | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/Airports/GenAirports850/lights.cxx b/src/Airports/GenAirports850/lights.cxx index efec77bb..e86d711c 100644 --- a/src/Airports/GenAirports850/lights.cxx +++ b/src/Airports/GenAirports850/lights.cxx @@ -553,13 +553,20 @@ TGSuperPoly Runway::gen_touchdown_zone_lights( bool recip ) // generate REIL lights -TGSuperPoly Runway::gen_reil( bool recip ) +TGSuperPoly Runway::gen_reil( const int kind, bool recip ) { point_list lights; lights.clear(); point_list normals; normals.clear(); string flag = rwy.rwnum[get_thresh0(recip)]; + Point3D normal; - Point3D normal = gen_runway_light_vector( 10, recip ); + if (kind == 1) { + // omnidirectional lights + normal = Point3D::fromSGVec3( normalize(SGVec3d::fromGeod(GetStart())) ); + } else { + // unidirectional lights + normal = gen_runway_light_vector( 10, recip ); + } // determine the start point. SGGeod ref; @@ -1597,7 +1604,7 @@ void Runway::gen_runway_lights( superpoly_list *lights ) { // REIL lighting if ( rwy.reil[side] ) { - TGSuperPoly s = gen_reil( recip ); + TGSuperPoly s = gen_reil( rwy.reil[side], recip ); lights->push_back( s ); } diff --git a/src/Airports/GenAirports850/runway.hxx b/src/Airports/GenAirports850/runway.hxx index a40dfc6c..064184a3 100644 --- a/src/Airports/GenAirports850/runway.hxx +++ b/src/Airports/GenAirports850/runway.hxx @@ -161,7 +161,7 @@ private: superpoly_list gen_runway_threshold_lights( const int kind, bool recip ); superpoly_list gen_runway_center_line_lights( bool recip ); TGSuperPoly gen_touchdown_zone_lights( bool recip ); - TGSuperPoly gen_reil( bool recip ); + TGSuperPoly gen_reil( const int kind, bool recip ); superpoly_list gen_calvert( const string &kind, bool recip ); superpoly_list gen_alsf( const string &kind, bool recip ); TGSuperPoly gen_odals( bool recip );