Convert gen_alsf light function to SGGeod
This commit is contained in:
parent
f86782119c
commit
4dd1d5c2b1
1 changed files with 117 additions and 244 deletions
|
@ -968,87 +968,63 @@ superpoly_list Runway::gen_alsf( const string &kind, 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();
|
||||||
point_list s_normals; s_normals.clear();
|
point_list s_normals; s_normals.clear();
|
||||||
int i, j;
|
int i;
|
||||||
string flag;
|
string flag;
|
||||||
|
|
||||||
SG_LOG(SG_GENERAL, SG_DEBUG, "gen ALSF/SALS lights " << rwy.rwnum[0] );
|
|
||||||
|
|
||||||
Point3D normal1 = gen_runway_light_vector( 3.0, recip );
|
Point3D normal1 = gen_runway_light_vector( 3.0, recip );
|
||||||
point_list corner = gen_corners( 2.0, rwy.threshold[0], rwy.threshold[1], 2.0 );
|
|
||||||
Point3D pt;
|
|
||||||
|
|
||||||
// Generate long center bar of lights
|
// Generate long center bar of lights
|
||||||
// determine the start point.
|
// determine the start point.
|
||||||
Point3D ref_save;
|
SGGeod ref_save, pt;
|
||||||
double length_hdg, left_hdg;
|
double length_hdg, left_hdg;
|
||||||
double lon, lat, r;
|
|
||||||
if ( recip ) {
|
if ( recip ) {
|
||||||
ref_save = (corner[0] + corner[1]) / 2;
|
length_hdg = SGMiscd::normalizePeriodic(0, 360, rwy.heading + 180);
|
||||||
length_hdg = rwy.heading + 180.0;
|
ref_save = SGGeodesy::direct( GetEnd(), length_hdg, rwy.threshold[get_thresh0(recip)]);
|
||||||
if ( length_hdg > 360.0 ) { length_hdg -= 360.0; }
|
|
||||||
} else {
|
} else {
|
||||||
ref_save = (corner[2] + corner[3]) / 2;
|
|
||||||
length_hdg = rwy.heading;
|
length_hdg = rwy.heading;
|
||||||
|
ref_save = SGGeodesy::direct( GetStart(), length_hdg, rwy.threshold[get_thresh0(recip)]);
|
||||||
}
|
}
|
||||||
left_hdg = length_hdg - 90.0;
|
left_hdg = SGMiscd::normalizePeriodic(0, 360, length_hdg - 90.0);
|
||||||
if ( left_hdg < 0 ) {
|
|
||||||
left_hdg += 360.0;
|
|
||||||
}
|
|
||||||
SG_LOG(SG_GENERAL, SG_DEBUG, "length hdg = " << length_hdg << " left heading = " << left_hdg );
|
|
||||||
|
|
||||||
Point3D ref = ref_save;
|
SGGeod ref = ref_save;
|
||||||
|
|
||||||
int count;
|
int count;
|
||||||
if ( kind == "1" || kind == "2" ) {
|
if ( kind == "1" || kind == "2" ) {
|
||||||
// ALSF-I or ALSF-II
|
// ALSF-I or ALSF-II
|
||||||
geo_direct_wgs_84 ( ref.lat(), ref.lon(), length_hdg,
|
ref = SGGeodesy::direct(ref, length_hdg, -30);
|
||||||
-100 * SG_FEET_TO_METER, &lat, &lon, &r );
|
|
||||||
ref = Point3D( lon, lat, 0.0 );
|
|
||||||
count = 30;
|
count = 30;
|
||||||
} else {
|
} else {
|
||||||
// SALS/SALSF
|
// SALS/SALSF
|
||||||
geo_direct_wgs_84 ( ref.lat(), ref.lon(), length_hdg,
|
ref = SGGeodesy::direct(ref, length_hdg, -90);
|
||||||
-300 * SG_FEET_TO_METER, &lat, &lon, &r );
|
|
||||||
ref = Point3D( lon, lat, 0.0 );
|
|
||||||
count = 13;
|
count = 13;
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( i = 0; i < count; ++i ) {
|
for ( i = 0; i < count; ++i ) {
|
||||||
pt = ref;
|
pt = ref;
|
||||||
w_lights.push_back( pt );
|
w_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
w_normals.push_back( normal1 );
|
w_normals.push_back( normal1 );
|
||||||
|
|
||||||
// left 2 side lights
|
// left 2 side lights
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
pt = SGGeodesy::direct(pt, left_hdg, 1);
|
||||||
3.5 * SG_FEET_TO_METER, &lat, &lon, &r );
|
w_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
w_lights.push_back( pt );
|
|
||||||
w_normals.push_back( normal1 );
|
w_normals.push_back( normal1 );
|
||||||
|
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
pt = SGGeodesy::direct(pt, left_hdg, 1);
|
||||||
3.5 * SG_FEET_TO_METER, &lat, &lon, &r );
|
w_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
w_lights.push_back( pt );
|
|
||||||
w_normals.push_back( normal1 );
|
w_normals.push_back( normal1 );
|
||||||
|
|
||||||
pt = ref;
|
pt = ref;
|
||||||
|
|
||||||
// right 2 side lights
|
// right 2 side lights
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
pt = SGGeodesy::direct(pt, left_hdg, -1);
|
||||||
-3.5 * SG_FEET_TO_METER, &lat, &lon, &r );
|
w_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
w_lights.push_back( pt );
|
|
||||||
w_normals.push_back( normal1 );
|
|
||||||
|
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
|
||||||
-3.5 * SG_FEET_TO_METER, &lat, &lon, &r );
|
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
w_lights.push_back( pt );
|
|
||||||
w_normals.push_back( normal1 );
|
w_normals.push_back( normal1 );
|
||||||
|
|
||||||
geo_direct_wgs_84 ( ref.lat(), ref.lon(), length_hdg,
|
pt = SGGeodesy::direct(pt, left_hdg, -1);
|
||||||
-100 * SG_FEET_TO_METER, &lat, &lon, &r );
|
w_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
ref = Point3D( lon, lat, 0.0 );
|
w_normals.push_back( normal1 );
|
||||||
|
|
||||||
|
ref = SGGeodesy::direct(ref, length_hdg, -30);
|
||||||
}
|
}
|
||||||
|
|
||||||
ref = ref_save;
|
ref = ref_save;
|
||||||
|
@ -1056,190 +1032,126 @@ superpoly_list Runway::gen_alsf( const string &kind, bool recip )
|
||||||
if ( kind == "1" || kind == "O" || kind == "P" ) {
|
if ( kind == "1" || kind == "O" || kind == "P" ) {
|
||||||
// Terminating bar
|
// Terminating bar
|
||||||
|
|
||||||
// offset 200' downwind
|
// offset 60m downwind
|
||||||
geo_direct_wgs_84 ( ref.lat(), ref.lon(), length_hdg,
|
ref = SGGeodesy::direct(ref, length_hdg, -60);
|
||||||
-200 * SG_FEET_TO_METER, &lat, &lon, &r );
|
|
||||||
ref = Point3D( lon, lat, 0.0 );
|
|
||||||
|
|
||||||
pt = ref;
|
pt = ref;
|
||||||
|
|
||||||
// left 3 side lights
|
// left 3 side lights
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
pt = SGGeodesy::direct(pt, left_hdg, 4.5);
|
||||||
15 * SG_FEET_TO_METER, &lat, &lon, &r );
|
r_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
r_lights.push_back( pt );
|
|
||||||
r_normals.push_back( normal1 );
|
r_normals.push_back( normal1 );
|
||||||
|
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
pt = SGGeodesy::direct(pt, left_hdg, 1.5);
|
||||||
5 * SG_FEET_TO_METER, &lat, &lon, &r );
|
r_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
r_lights.push_back( pt );
|
|
||||||
r_normals.push_back( normal1 );
|
r_normals.push_back( normal1 );
|
||||||
|
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
pt = SGGeodesy::direct(pt, left_hdg, 1.5);
|
||||||
5 * SG_FEET_TO_METER, &lat, &lon, &r );
|
r_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
r_lights.push_back( pt );
|
|
||||||
r_normals.push_back( normal1 );
|
r_normals.push_back( normal1 );
|
||||||
|
|
||||||
pt = ref;
|
pt = ref;
|
||||||
|
|
||||||
// right 3 side lights
|
// right 3 side lights
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
pt = SGGeodesy::direct(pt, left_hdg, -4.5);
|
||||||
-15 * SG_FEET_TO_METER, &lat, &lon, &r );
|
r_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
r_lights.push_back( pt );
|
|
||||||
r_normals.push_back( normal1 );
|
r_normals.push_back( normal1 );
|
||||||
|
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
pt = SGGeodesy::direct(pt, left_hdg, -1.5);
|
||||||
-5 * SG_FEET_TO_METER, &lat, &lon, &r );
|
r_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
r_lights.push_back( pt );
|
|
||||||
r_normals.push_back( normal1 );
|
r_normals.push_back( normal1 );
|
||||||
|
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
pt = SGGeodesy::direct(pt, left_hdg, -1.5);
|
||||||
-5 * SG_FEET_TO_METER, &lat, &lon, &r );
|
r_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
r_lights.push_back( pt );
|
|
||||||
r_normals.push_back( normal1 );
|
r_normals.push_back( normal1 );
|
||||||
} else if ( kind == "2" ) {
|
} else if ( kind == "2" ) {
|
||||||
// Generate red side row lights
|
// Generate red side row lights
|
||||||
|
|
||||||
for ( i = 0; i < 9; ++i ) {
|
for ( i = 0; i < 9; ++i ) {
|
||||||
// offset 100' downwind
|
// offset 30m downwind
|
||||||
geo_direct_wgs_84 ( ref.lat(), ref.lon(), length_hdg,
|
ref = SGGeodesy::direct(ref, length_hdg, -30);
|
||||||
-100 * SG_FEET_TO_METER, &lat, &lon, &r );
|
|
||||||
ref = Point3D( lon, lat, 0.0 );
|
|
||||||
|
|
||||||
pt = ref;
|
pt = ref;
|
||||||
|
|
||||||
// left 3 side lights
|
// left 3 side lights
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
pt = SGGeodesy::direct(pt, left_hdg, 11);
|
||||||
36 * SG_FEET_TO_METER, &lat, &lon, &r );
|
r_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
r_lights.push_back( pt );
|
|
||||||
r_normals.push_back( normal1 );
|
r_normals.push_back( normal1 );
|
||||||
|
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
pt = SGGeodesy::direct(pt, left_hdg, 1.5);
|
||||||
5 * SG_FEET_TO_METER, &lat, &lon, &r );
|
r_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
r_lights.push_back( pt );
|
|
||||||
r_normals.push_back( normal1 );
|
r_normals.push_back( normal1 );
|
||||||
|
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
pt = SGGeodesy::direct(pt, left_hdg, 1.5);
|
||||||
5 * SG_FEET_TO_METER, &lat, &lon, &r );
|
r_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
r_lights.push_back( pt );
|
|
||||||
r_normals.push_back( normal1 );
|
r_normals.push_back( normal1 );
|
||||||
|
|
||||||
pt = ref;
|
pt = ref;
|
||||||
|
|
||||||
// right 3 side lights
|
// right 3 side lights
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
pt = SGGeodesy::direct(pt, left_hdg, -11);
|
||||||
-36 * SG_FEET_TO_METER, &lat, &lon, &r );
|
r_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
r_lights.push_back( pt );
|
|
||||||
r_normals.push_back( normal1 );
|
r_normals.push_back( normal1 );
|
||||||
|
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
pt = SGGeodesy::direct(pt, left_hdg, -1.5);
|
||||||
-5 * SG_FEET_TO_METER, &lat, &lon, &r );
|
r_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
r_lights.push_back( pt );
|
|
||||||
r_normals.push_back( normal1 );
|
r_normals.push_back( normal1 );
|
||||||
|
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
pt = SGGeodesy::direct(pt, left_hdg, -1.5);
|
||||||
-5 * SG_FEET_TO_METER, &lat, &lon, &r );
|
r_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
r_lights.push_back( pt );
|
|
||||||
r_normals.push_back( normal1 );
|
r_normals.push_back( normal1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( kind == "1" || kind == "O" || kind == "P" ) {
|
if ( kind == "1" || kind == "O" || kind == "P" ) {
|
||||||
// Generate pre-threshold bar
|
// Generate pre-threshold bar
|
||||||
|
|
||||||
ref = ref_save;
|
ref = ref_save;
|
||||||
|
|
||||||
// offset 100' downwind
|
// offset 30m downwind
|
||||||
geo_direct_wgs_84 ( ref.lat(), ref.lon(), length_hdg,
|
ref = SGGeodesy::direct(ref, length_hdg, -30);
|
||||||
-100 * SG_FEET_TO_METER, &lat, &lon, &r );
|
|
||||||
ref = Point3D( lon, lat, 0.0 );
|
|
||||||
|
|
||||||
pt = ref;
|
pt = ref;
|
||||||
|
|
||||||
// left 5 side lights
|
// left 5 side lights
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
pt = SGGeodesy::direct(pt, left_hdg, 22.5);
|
||||||
75 * SG_FEET_TO_METER, &lat, &lon, &r );
|
for ( i = 0; i < 5; ++i ) {
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
r_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
r_lights.push_back( pt );
|
|
||||||
r_normals.push_back( normal1 );
|
|
||||||
|
|
||||||
for ( j = 0; j < 4; ++j ) {
|
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
|
||||||
3.5 * SG_FEET_TO_METER, &lat, &lon, &r );
|
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
r_lights.push_back( pt );
|
|
||||||
r_normals.push_back( normal1 );
|
r_normals.push_back( normal1 );
|
||||||
|
pt = SGGeodesy::direct(pt, left_hdg, 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
pt = ref;
|
pt = ref;
|
||||||
|
|
||||||
// rioght 5 side lights
|
// right 5 side lights
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
pt = SGGeodesy::direct(pt, left_hdg, -22.5);
|
||||||
-75 * SG_FEET_TO_METER, &lat, &lon, &r );
|
for ( i = 0; i < 5; ++i ) {
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
r_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
r_lights.push_back( pt );
|
|
||||||
r_normals.push_back( normal1 );
|
|
||||||
|
|
||||||
for ( j = 0; j < 4; ++j ) {
|
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
|
||||||
-3.5 * SG_FEET_TO_METER, &lat, &lon, &r );
|
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
r_lights.push_back( pt );
|
|
||||||
r_normals.push_back( normal1 );
|
r_normals.push_back( normal1 );
|
||||||
|
pt = SGGeodesy::direct(pt, left_hdg, -1.0);
|
||||||
}
|
}
|
||||||
} else if ( kind == "2" ) {
|
} else if ( kind == "2" ) {
|
||||||
// Generate -500 extra horizontal row of lights
|
// Generate -150m extra horizontal row of lights
|
||||||
|
|
||||||
ref = ref_save;
|
ref = ref_save;
|
||||||
|
|
||||||
// offset 500' downwind
|
// offset 150m downwind
|
||||||
geo_direct_wgs_84 ( ref.lat(), ref.lon(), length_hdg,
|
ref = SGGeodesy::direct(ref, length_hdg, -150);
|
||||||
-500 * SG_FEET_TO_METER, &lat, &lon, &r );
|
|
||||||
ref = Point3D( lon, lat, 0.0 );
|
|
||||||
|
|
||||||
pt = ref;
|
pt = ref;
|
||||||
|
|
||||||
// left 4 side lights
|
// left 4 side lights
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
pt = SGGeodesy::direct(pt, left_hdg, 4.25);
|
||||||
11.5 * SG_FEET_TO_METER, &lat, &lon, &r );
|
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
w_lights.push_back( pt );
|
|
||||||
w_normals.push_back( normal1 );
|
|
||||||
|
|
||||||
for ( j = 0; j < 3; ++j ) {
|
for ( i = 0; i < 4; ++i ) {
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
w_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
5 * SG_FEET_TO_METER, &lat, &lon, &r );
|
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
w_lights.push_back( pt );
|
|
||||||
w_normals.push_back( normal1 );
|
w_normals.push_back( normal1 );
|
||||||
|
pt = SGGeodesy::direct(pt, left_hdg, 1.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
pt = ref;
|
pt = ref;
|
||||||
|
|
||||||
// right 4 side lights
|
// right 4 side lights
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
pt = SGGeodesy::direct(pt, left_hdg, -4.25);
|
||||||
-11.5 * SG_FEET_TO_METER, &lat, &lon, &r );
|
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
w_lights.push_back( pt );
|
|
||||||
w_normals.push_back( normal1 );
|
|
||||||
|
|
||||||
for ( j = 0; j < 3; ++j ) {
|
for ( i = 0; i < 4; ++i ) {
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
w_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
-5 * SG_FEET_TO_METER, &lat, &lon, &r );
|
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
w_lights.push_back( pt );
|
|
||||||
w_normals.push_back( normal1 );
|
w_normals.push_back( normal1 );
|
||||||
|
pt = SGGeodesy::direct(pt, left_hdg, -1.5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1247,123 +1159,83 @@ superpoly_list Runway::gen_alsf( const string &kind, bool recip )
|
||||||
|
|
||||||
if ( kind == "O" || kind == "P" ) {
|
if ( kind == "O" || kind == "P" ) {
|
||||||
// generate SALS secondary threshold
|
// generate SALS secondary threshold
|
||||||
|
ref = SGGeodesy::direct(ref, length_hdg, -60);
|
||||||
geo_direct_wgs_84 ( ref.lat(), ref.lon(), length_hdg,
|
|
||||||
-200 * SG_FEET_TO_METER, &lat, &lon, &r );
|
|
||||||
ref = Point3D( lon, lat, 0.0 );
|
|
||||||
count = 30;
|
|
||||||
|
|
||||||
pt = ref;
|
pt = ref;
|
||||||
r_lights.push_back( pt );
|
r_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
r_normals.push_back( normal1 );
|
r_normals.push_back( normal1 );
|
||||||
|
|
||||||
// left 2 side lights
|
// left 2 side lights
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
pt = SGGeodesy::direct(pt, left_hdg, 1.0);
|
||||||
3.5 * SG_FEET_TO_METER, &lat, &lon, &r );
|
r_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
r_lights.push_back( pt );
|
|
||||||
r_normals.push_back( normal1 );
|
r_normals.push_back( normal1 );
|
||||||
|
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
pt = SGGeodesy::direct(pt, left_hdg, 1.0);
|
||||||
3.5 * SG_FEET_TO_METER, &lat, &lon, &r );
|
r_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
r_lights.push_back( pt );
|
|
||||||
r_normals.push_back( normal1 );
|
r_normals.push_back( normal1 );
|
||||||
|
|
||||||
pt = ref;
|
pt = ref;
|
||||||
|
|
||||||
// right 2 side lights
|
// right 2 side lights
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
pt = SGGeodesy::direct(pt, left_hdg, -1.0);
|
||||||
-3.5 * SG_FEET_TO_METER, &lat, &lon, &r );
|
r_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
r_lights.push_back( pt );
|
|
||||||
r_normals.push_back( normal1 );
|
r_normals.push_back( normal1 );
|
||||||
|
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
pt = SGGeodesy::direct(pt, left_hdg, -1.0);
|
||||||
-3.5 * SG_FEET_TO_METER, &lat, &lon, &r );
|
r_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
r_lights.push_back( pt );
|
|
||||||
r_normals.push_back( normal1 );
|
r_normals.push_back( normal1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate -1000' extra horizontal row of lights
|
// Generate -300m horizontal crossbar
|
||||||
|
|
||||||
ref = ref_save;
|
ref = ref_save;
|
||||||
|
|
||||||
// offset 1000' downwind
|
// offset 300m downwind
|
||||||
geo_direct_wgs_84 ( ref.lat(), ref.lon(), length_hdg,
|
ref = SGGeodesy::direct(ref, length_hdg, -300);
|
||||||
-1000 * SG_FEET_TO_METER, &lat, &lon, &r );
|
|
||||||
ref = Point3D( lon, lat, 0.0 );
|
|
||||||
|
|
||||||
pt = ref;
|
pt = ref;
|
||||||
|
|
||||||
// left 8 side lights
|
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
|
||||||
15 * SG_FEET_TO_METER, &lat, &lon, &r );
|
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
w_lights.push_back( pt );
|
|
||||||
w_normals.push_back( normal1 );
|
|
||||||
|
|
||||||
for ( j = 0; j < 7; ++j ) {
|
// left 8 side lights
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
pt = SGGeodesy::direct(pt, left_hdg, 4.5);
|
||||||
5 * SG_FEET_TO_METER, &lat, &lon, &r );
|
for ( i = 0; i < 8; ++i ) {
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
w_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
w_lights.push_back( pt );
|
|
||||||
w_normals.push_back( normal1 );
|
w_normals.push_back( normal1 );
|
||||||
|
pt = SGGeodesy::direct(pt, left_hdg, 1.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
pt = ref;
|
pt = ref;
|
||||||
|
|
||||||
// right 8 side lights
|
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
|
||||||
-15 * SG_FEET_TO_METER, &lat, &lon, &r );
|
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
|
||||||
w_lights.push_back( pt );
|
|
||||||
w_normals.push_back( normal1 );
|
|
||||||
|
|
||||||
for ( j = 0; j < 7; ++j ) {
|
// right 8 side lights
|
||||||
geo_direct_wgs_84 ( pt.lat(), pt.lon(), left_hdg,
|
pt = SGGeodesy::direct(pt, left_hdg, -4.5);
|
||||||
-5 * SG_FEET_TO_METER, &lat, &lon, &r );
|
for ( i = 0; i < 8; ++i ) {
|
||||||
pt = Point3D( lon, lat, 0.0 );
|
w_lights.push_back( Point3D::fromSGGeod(pt) );
|
||||||
w_lights.push_back( pt );
|
|
||||||
w_normals.push_back( normal1 );
|
w_normals.push_back( normal1 );
|
||||||
|
pt = SGGeodesy::direct(pt, left_hdg, -1.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
ref = ref_save;
|
ref = ref_save;
|
||||||
|
|
||||||
if ( kind == "1" || kind == "2" ) {
|
if ( kind == "1" || kind == "2" ) {
|
||||||
// generate rabbit lights
|
// generate rabbit lights
|
||||||
|
// start 300m downwind
|
||||||
// start 1000' downwind
|
ref = SGGeodesy::direct(ref, length_hdg, -300);
|
||||||
geo_direct_wgs_84 ( ref.lat(), ref.lon(), length_hdg,
|
|
||||||
-1000 * SG_FEET_TO_METER, &lat, &lon, &r );
|
|
||||||
ref = Point3D( lon, lat, 0.0 );
|
|
||||||
|
|
||||||
for ( i = 0; i < 21; ++i ) {
|
for ( i = 0; i < 21; ++i ) {
|
||||||
s_lights.push_back( ref );
|
s_lights.push_back( Point3D::fromSGGeod(ref) );
|
||||||
s_normals.push_back( normal1 );
|
s_normals.push_back( normal1 );
|
||||||
|
|
||||||
// offset 100' downwind
|
// offset 30m downwind
|
||||||
geo_direct_wgs_84 ( ref.lat(), ref.lon(), length_hdg,
|
ref = SGGeodesy::direct(ref, length_hdg, -30);
|
||||||
-100 * SG_FEET_TO_METER, &lat, &lon, &r );
|
|
||||||
ref = Point3D( lon, lat, 0.0 );
|
|
||||||
}
|
}
|
||||||
} else if ( kind == "P" ) {
|
} else if ( kind == "P" ) {
|
||||||
// generate 3 sequenced lights aligned with last 3 light bars
|
// generate 3 sequenced lights aligned with last 3 light bars
|
||||||
|
// start 390m downwind
|
||||||
// start 1300' downwind
|
ref = SGGeodesy::direct(ref, length_hdg, -390);
|
||||||
geo_direct_wgs_84 ( ref.lat(), ref.lon(), length_hdg,
|
|
||||||
-1300 * SG_FEET_TO_METER, &lat, &lon, &r );
|
|
||||||
ref = Point3D( lon, lat, 0.0 );
|
|
||||||
|
|
||||||
for ( i = 0; i < 3; ++i ) {
|
for ( i = 0; i < 3; ++i ) {
|
||||||
s_lights.push_back( ref );
|
s_lights.push_back( Point3D::fromSGGeod(ref) );
|
||||||
s_normals.push_back( normal1 );
|
s_normals.push_back( normal1 );
|
||||||
|
|
||||||
// offset 100' downwind
|
// offset 30m downwind
|
||||||
geo_direct_wgs_84 ( ref.lat(), ref.lon(), length_hdg,
|
ref = SGGeodesy::direct(ref, length_hdg, -30);
|
||||||
-100 * SG_FEET_TO_METER, &lat, &lon, &r );
|
|
||||||
ref = Point3D( lon, lat, 0.0 );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1420,7 +1292,7 @@ superpoly_list Runway::gen_alsf( const string &kind, bool recip )
|
||||||
|
|
||||||
result.push_back( sequenced );
|
result.push_back( sequenced );
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2124,6 +1996,7 @@ void Runway::gen_runway_lights( superpoly_list *lights ) {
|
||||||
lights->push_back( s );
|
lights->push_back( s );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// NOT IMPLIMENTED:
|
// NOT IMPLIMENTED:
|
||||||
//
|
//
|
||||||
|
@ -2131,7 +2004,6 @@ void Runway::gen_runway_lights( superpoly_list *lights ) {
|
||||||
//
|
//
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
if ( rwy.approach_lights[0] == -1 /* SALSF not supported by database */ ) {
|
if ( rwy.approach_lights[0] == -1 /* SALSF not supported by database */ ) {
|
||||||
superpoly_list s = gen_alsf( "P", false );
|
superpoly_list s = gen_alsf( "P", false );
|
||||||
for ( i = 0; i < s.size(); ++i ) {
|
for ( i = 0; i < s.size(); ++i ) {
|
||||||
|
@ -2157,6 +2029,7 @@ void Runway::gen_runway_lights( superpoly_list *lights ) {
|
||||||
lights->push_back( s[i] );
|
lights->push_back( s[i] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Approach light systems that have a threshold light bar
|
// Approach light systems that have a threshold light bar
|
||||||
// use a central routine for its creation
|
// use a central routine for its creation
|
||||||
|
|
Loading…
Add table
Reference in a new issue