forgot to add length extend calculation to the new gen_wgs84_area
function. Also fixed the runway area functions accordingly.
This commit is contained in:
parent
f7ca9005ce
commit
f77da29398
2 changed files with 4 additions and 4 deletions
|
@ -118,7 +118,7 @@ TGPolygon gen_wgs84_area( Point3D end1, Point3D end2,
|
||||||
Point3D ref = end2;
|
Point3D ref = end2;
|
||||||
double lon = 0, lat = 0, r = 0;
|
double lon = 0, lat = 0, r = 0;
|
||||||
geo_direct_wgs_84 ( alt_m, ref.lat(), ref.lon(), heading_deg,
|
geo_direct_wgs_84 ( alt_m, ref.lat(), ref.lon(), heading_deg,
|
||||||
-displ2, &lat, &lon, &r );
|
length_m / 2.0 - displ2, &lat, &lon, &r );
|
||||||
ref = Point3D( lon, lat, 0.0 );
|
ref = Point3D( lon, lat, 0.0 );
|
||||||
|
|
||||||
// move to the l,-w corner (then we add points in a clockwise direction)
|
// move to the l,-w corner (then we add points in a clockwise direction)
|
||||||
|
@ -146,7 +146,7 @@ TGPolygon gen_wgs84_area( Point3D end1, Point3D end2,
|
||||||
// move to the end1 center to the displ. threshold
|
// move to the end1 center to the displ. threshold
|
||||||
ref = end1;
|
ref = end1;
|
||||||
geo_direct_wgs_84 ( alt_m, ref.lat(), ref.lon(), heading_deg,
|
geo_direct_wgs_84 ( alt_m, ref.lat(), ref.lon(), heading_deg,
|
||||||
displ1, &lat, &lon, &r );
|
displ1 - length_m / 2.0, &lat, &lon, &r );
|
||||||
ref = Point3D( lon, lat, 0.0 );
|
ref = Point3D( lon, lat, 0.0 );
|
||||||
|
|
||||||
// move to the -l,w corner (then we add points in a clockwise direction)
|
// move to the -l,w corner (then we add points in a clockwise direction)
|
||||||
|
|
|
@ -85,14 +85,14 @@ private:
|
||||||
// generate an area for a runway and include midpoints
|
// generate an area for a runway and include midpoints
|
||||||
TGPolygon gen_runway_w_mid( double alt_m, double length_extend_m, double width_extend_m )
|
TGPolygon gen_runway_w_mid( double alt_m, double length_extend_m, double width_extend_m )
|
||||||
{
|
{
|
||||||
return ( gen_wgs84_area( Point3D(GetStart()), Point3D(GetEnd()), rwy.length + 2.0*length_extend_m, 0.0, 0.0, rwy.width + 2.0 * width_extend_m, rwy.heading, alt_m, true) );
|
return ( gen_wgs84_area( Point3D(GetStart()), Point3D(GetEnd()), 2.0*length_extend_m, 0.0, 0.0, rwy.width + 2.0 * width_extend_m, rwy.heading, alt_m, true) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// generate an area for a runway with expansion specified in meters
|
// generate an area for a runway with expansion specified in meters
|
||||||
// (return result points in degrees)
|
// (return result points in degrees)
|
||||||
TGPolygon gen_runway_area_w_extend( double alt_m, double length_extend, double displ1, double displ2, double width_extend )
|
TGPolygon gen_runway_area_w_extend( double alt_m, double length_extend, double displ1, double displ2, double width_extend )
|
||||||
{
|
{
|
||||||
return ( gen_wgs84_area( Point3D(GetStart()), Point3D(GetEnd()), rwy.length + 2.0*length_extend, displ1, displ2, rwy.width + 2.0*width_extend, rwy.heading, alt_m, false) );
|
return ( gen_wgs84_area( Point3D(GetStart()), Point3D(GetEnd()), 2.0*length_extend, displ1, displ2, rwy.width + 2.0*width_extend, rwy.heading, alt_m, false) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void gen_rw_designation( const std::string& material,
|
void gen_rw_designation( const std::string& material,
|
||||||
|
|
Loading…
Reference in a new issue