X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FATCDCL%2Fground.cxx;h=8f309e370264fa1c15c6595c3c4dc0f51b7ced70;hb=1df8130bddbbc3bc590c37c31f5256470f839cfb;hp=2a6643e00565a415427b3429249555dfeb380390;hpb=301054204e0412eb31f06477e32cfe6f1fcb0792;p=flightgear.git diff --git a/src/ATCDCL/ground.cxx b/src/ATCDCL/ground.cxx index 2a6643e00..8f309e370 100644 --- a/src/ATCDCL/ground.cxx +++ b/src/ATCDCL/ground.cxx @@ -363,27 +363,27 @@ void FGGround::DoRwyDetails() { const FGAirport* apt = fgFindAirportID(ident); assert(apt); - FGRunway runway = apt->getActiveRunwayForUsage(); + FGRunway* runway = apt->getActiveRunwayForUsage(); - activeRwy = runway._rwy_no; - rwy.rwyID = runway._rwy_no; + activeRwy = runway->ident(); + rwy.rwyID = runway->ident(); SG_LOG(SG_ATC, SG_INFO, "In FGGround, active runway for airport " << ident << " is " << activeRwy); // Get the threshold position - double other_way = runway._heading - 180.0; + double other_way = runway->headingDeg() - 180.0; while(other_way <= 0.0) { other_way += 360.0; } // move to the +l end/center of the runway //cout << "Runway center is at " << runway._lon << ", " << runway._lat << '\n'; - Point3D origin = Point3D(runway._lon, runway._lat, aptElev); + Point3D origin = Point3D(runway->longitude(), runway->latitude(), aptElev); Point3D ref = origin; double tshlon, tshlat, tshr; double tolon, tolat, tor; - rwy.length = runway._length * SG_FEET_TO_METER; + rwy.length = runway->lengthM(); geo_direct_wgs_84 ( aptElev, ref.lat(), ref.lon(), other_way, rwy.length / 2.0 - 25.0, &tshlat, &tshlon, &tshr ); - geo_direct_wgs_84 ( aptElev, ref.lat(), ref.lon(), runway._heading, + geo_direct_wgs_84 ( aptElev, ref.lat(), ref.lon(), runway->headingDeg(), rwy.length / 2.0 - 25.0, &tolat, &tolon, &tor ); // Note - 25 meters in from the runway end is a bit of a hack to put the plane ahead of the user. // now copy what we need out of runway into rwy @@ -391,7 +391,7 @@ void FGGround::DoRwyDetails() { Point3D takeoff_end = Point3D(tolon, tolat, aptElev); //cout << "Threshold position = " << tshlon << ", " << tshlat << ", " << aptElev << '\n'; //cout << "Takeoff position = " << tolon << ", " << tolat << ", " << aptElev << '\n'; - rwy.hdg = runway._heading; + rwy.hdg = runway->headingDeg(); // Set the projection for the local area based on this active runway ortho.Init(rwy.threshold_pos, rwy.hdg); rwy.end1ortho = ortho.ConvertToLocal(rwy.threshold_pos); // should come out as zero