X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Fdclgps.hxx;h=435f7899a25e51f53e5ca4ed2a229a8eee3bcfac;hb=73fbc05a6b6af52825c792902d7738f9cad7ec2f;hp=3766e6932d831c35d651538b45420662327b3783;hpb=289f2f5f0d36cfb0e89aeb12ad07feb544ddb089;p=flightgear.git diff --git a/src/Instrumentation/dclgps.hxx b/src/Instrumentation/dclgps.hxx index 3766e6932..435f7899a 100644 --- a/src/Instrumentation/dclgps.hxx +++ b/src/Instrumentation/dclgps.hxx @@ -32,15 +32,16 @@ #include #include -#include -#include -#include -#include #include - -using namespace std; +#include class SGTime; +class FGPositioned; + +// XXX fix me +class FGNavRecord; +class FGAirport; +class FGFix; enum GPSDistanceUnits { GPS_DIST_UNITS_NM = 0, @@ -94,9 +95,7 @@ struct GPSWaypoint { GPSWaypoint(const std::string& aIdent, float lat, float lon, GPSWpType aType); - static GPSWaypoint* createFromFix(const FGFix* aFix); - static GPSWaypoint* createFromNav(const FGNavRecord* aNav); - static GPSWaypoint* createFromAirport(const FGAirport* aApt); + static GPSWaypoint* createFromPositioned(const FGPositioned* aFix); ~GPSWaypoint(); string GetAprId(); // Returns the id with i, f, m or h added if appropriate. (Initial approach fix, final approach fix, etc) @@ -428,6 +427,9 @@ protected: // Find the closest VOR to a position in RADIANS. FGNavRecord* FindClosestVor(double lat_rad, double lon_rad); + // helper to implement the above FindFirstXXX methods + FGPositioned* FindTypedFirstById(const std::string& id, FGPositioned::Type ty, bool &multi, bool exact); + // Position, orientation and velocity. // These should be read from FG's built-in GPS logic if possible. // Use the property node pointers below to do this.