1
0
Fork 0

Create centerlines lights over the reciprocal displaced thresholds, too

This commit is contained in:
Christian Schmitt 2012-08-30 13:09:11 +02:00
parent b0bb0ab9a0
commit 25d93d37eb

View file

@ -342,27 +342,34 @@ superpoly_list Runway::gen_runway_center_line_lights( bool recip )
point_list w_normals; w_normals.clear(); point_list w_normals; w_normals.clear();
point_list r_normals; r_normals.clear(); point_list r_normals; r_normals.clear();
double len = rwy.length; double dist = rwy.length;
int divs = (int)(len / 15.0) + 1; int divs = (int)(dist / 15.0) + 1;
Point3D normal = gen_runway_light_vector( 3.0, recip ); Point3D normal = gen_runway_light_vector( 3.0, recip );
point_list corner = gen_corners( 2.0, rwy.threshold[0], rwy.threshold[1], 2.0 );
Point3D inc; Point3D inc;
Point3D pt1, pt2; Point3D pt1, pt2;
double length_hdg;
double lon, lat, r;
if ( recip ) { if ( recip ) {
pt1 = (corner[0] + corner[1] ) / 2.0; length_hdg = rwy.heading + 180.0;
pt2 = (corner[2] + corner[3] ) / 2.0; if ( length_hdg > 360.0 ) { length_hdg -= 360.0; }
geo_direct_wgs_84 ( GetEnd().lat(), GetEnd().lon(), length_hdg,
rwy.threshold[get_thresh0(recip)], &lat, &lon, &r );
pt1 = Point3D( lon, lat, 0.0 );
pt2 = GetStart();
} else { } else {
pt1 = (corner[2] + corner[3] ) / 2.0; length_hdg = rwy.heading;
pt2 = (corner[0] + corner[1] ) / 2.0; geo_direct_wgs_84 ( GetStart().lat(), GetStart().lon(), length_hdg,
rwy.threshold[get_thresh0(recip)], &lat, &lon, &r );
pt1 = Point3D( lon, lat, 0.0 );
pt2 = GetEnd();
} }
inc = (pt2 - pt1) / divs; inc = (pt2 - pt1) / divs;
double dist = len; double step = dist / divs;
double step = len / divs; pt1 += inc;
pt1 += inc; // move 25' in
dist -= step; dist -= step;
bool use_white = true; bool use_white = true;
@ -383,9 +390,7 @@ superpoly_list Runway::gen_runway_center_line_lights( bool recip )
r_lights.push_back( pt1 ); r_lights.push_back( pt1 );
r_normals.push_back( normal ); r_normals.push_back( normal );
} }
pt1 += inc; pt1 += inc;
pt1 += inc;
dist -= step;
dist -= step; dist -= step;
} }