diff --git a/C++/include/LatLonAlt.h b/C++/include/LatLonAlt.h index 0b2b0587..e09680c3 100644 --- a/C++/include/LatLonAlt.h +++ b/C++/include/LatLonAlt.h @@ -88,7 +88,7 @@ class LatLonAlt { /** Return altitude in [ft] * @return altitude in feet * */ - double altitude() const; + double altitude_ft() const; /** Return latitude in internal units * @return latitude value diff --git a/C++/include/NavPoint.h b/C++/include/NavPoint.h index d62bc297..3dfb52f7 100644 --- a/C++/include/NavPoint.h +++ b/C++/include/NavPoint.h @@ -178,13 +178,13 @@ class NavPoint { /** Return the longitude in degrees east */ double longitude() const; /** Return the altitude in [ft] */ - double altitude() const; + double altitude_ft() const; /** Return the x coordinate in [nmi] */ - double xCoordinate() const; + double xCoordinate_nmi() const; /** Return the y coordinate in [nmi] */ - double yCoordinate() const; + double yCoordinate_nmi() const; /** Return the z coordinate in [ft] */ - double zCoordinate() const; + double zCoordinate_ft() const; /** Return the time [s] * @return time in [s] * */ diff --git a/C++/include/Position.h b/C++/include/Position.h index 31b1bb94..56e6dc4c 100644 --- a/C++/include/Position.h +++ b/C++/include/Position.h @@ -227,19 +227,19 @@ class Position { /** Return the altitude in feet * @return altitude [ft] * */ - double altitude() const; + double altitude_ft() const; /** Return the x coordinate in [NM] * @return x coordinate [NM] * */ - double xCoordinate() const; + double xCoordinate_nmi() const; /** Return the y coordinate in [NM] * @return y coordinate [NM] * */ - double yCoordinate() const; + double yCoordinate_nmi() const; /** Return the z coordinate in [ft] * @return z coordinate [ft] * */ - double zCoordinate() const; + double zCoordinate_ft() const; /** Return if this Position is a latitude or longitude * @return true if latitude/longitude diff --git a/C++/src/LatLonAlt.cpp b/C++/src/LatLonAlt.cpp index 7a5c6751..3925dccb 100644 --- a/C++/src/LatLonAlt.cpp +++ b/C++/src/LatLonAlt.cpp @@ -67,7 +67,7 @@ double LatLonAlt::longitude() const { return to_180(Units::to("deg", longi)); } -double LatLonAlt::altitude() const { +double LatLonAlt::altitude_ft() const { return Units::to("ft", alti); } diff --git a/C++/src/NavPoint.cpp b/C++/src/NavPoint.cpp index 3656c027..978d93a8 100644 --- a/C++/src/NavPoint.cpp +++ b/C++/src/NavPoint.cpp @@ -176,21 +176,21 @@ double NavPoint::longitude() const { return p.longitude(); } -double NavPoint::altitude() const { - return p.altitude(); +double NavPoint::altitude_ft() const { + return p.altitude_ft(); } -double NavPoint::xCoordinate() const { - return p.xCoordinate(); +double NavPoint::xCoordinate_nmi() const { + return p.xCoordinate_nmi(); } -double NavPoint::yCoordinate() const { - return p.yCoordinate(); +double NavPoint::yCoordinate_nmi() const { + return p.yCoordinate_nmi(); } -double NavPoint::zCoordinate() const { - return p.zCoordinate(); +double NavPoint::zCoordinate_ft() const { + return p.zCoordinate_ft(); } double NavPoint::time() const { diff --git a/C++/src/Position.cpp b/C++/src/Position.cpp index 9b126c5a..ac85b335 100644 --- a/C++/src/Position.cpp +++ b/C++/src/Position.cpp @@ -172,23 +172,22 @@ double Position::longitude() const { return ll.longitude(); } -double Position::altitude() const { - return ll.altitude(); +double Position::altitude_ft() const { + return ll.altitude_ft(); } -double Position::xCoordinate() const { +double Position::xCoordinate_nmi() const { return Units::to("nm", s3.x()); } -double Position::yCoordinate() const { +double Position::yCoordinate_nmi() const { return Units::to("nm", s3.y()); } -double Position::zCoordinate() const { +double Position::zCoordinate_ft() const { return Units::to("ft", s3.z()); } - bool Position::isLatLon() const { return latlon; } @@ -545,7 +544,7 @@ std::vector Position::toStringList() const { } else if (latlon) { ret.push_back(Fm12(ll.latitude())); ret.push_back(Fm12(ll.longitude())); - ret.push_back(Fm12(ll.altitude())); + ret.push_back(Fm12(ll.altitude_ft())); } else { ret.push_back(Fm12(Units::to("NM",s3.x()))); ret.push_back(Fm12(Units::to("NM",s3.y()))); @@ -573,7 +572,7 @@ std::vector Position::toStringList(int precision, int latLonExtraPr } else { ret.push_back(FmPrecision(ll.latitude(),precision+extra)); ret.push_back(FmPrecision(ll.longitude(),precision+extra)); - ret.push_back(FmPrecision(ll.altitude(),precision)); + ret.push_back(FmPrecision(ll.altitude_ft(),precision)); } } else { if (internalUnits) { diff --git a/Java/src/DAAGenerator.java b/Java/src/DAAGenerator.java index 3b3340d1..31c0983a 100644 --- a/Java/src/DAAGenerator.java +++ b/Java/src/DAAGenerator.java @@ -74,47 +74,69 @@ public static void main(String[] args) { int backward = 0; int forward = 0; double time = 0.0; - double reftime = -1; + double from = 0.0; + String output = ""; + String options = "DAAGenerator"; + boolean wind_enabled = false; // Is wind enabled in command line? for (int a=0;a < args.length; ++a) { String arga = args[a]; + if (arga.startsWith("-")) { + options += " "+arga; + } if (arga.startsWith("--prec") || arga.startsWith("-prec")) { ++a; precision = Integer.parseInt(args[a]); + options += " "+args[a]; } else if (arga.startsWith("-") && arga.contains("=")) { - String keyval = arga.substring(arga.lastIndexOf('-')+1); + String keyval = arga.substring(arga.startsWith("--")?2:1); params.set(keyval); } else if ((args[a].startsWith("--own") || args[a].startsWith("-own")) && a+1 < args.length) { ++a; ownship_id = args[a]; + options += " "+args[a]; } else if ((args[a].startsWith("--traf") || args[a].startsWith("-traf")) && a+1 < args.length) { ++a; traffic_ids.addAll(Arrays.asList(args[a].split(","))); + options += " "+args[a]; + } else if ((args[a].startsWith("--out") || args[a].startsWith("-out")) && a+1 < args.length) { + ++a; + output = args[a]; + options += " "+args[a]; } else if (arga.startsWith("--t") || arga.startsWith("-t")) { ++a; time = Math.abs(Double.parseDouble(args[a])); + options += " "+args[a]; } else if (arga.startsWith("--b") || arga.startsWith("-b")) { ++a; backward = Math.abs(Integer.parseInt(args[a])); + options += " "+args[a]; } else if (arga.startsWith("--f") || arga.startsWith("-f")) { ++a; forward = Math.abs(Integer.parseInt(args[a])); - } else if (arga.startsWith("--r") || arga.startsWith("-r")) { + options += " "+args[a]; + } else if (arga.startsWith("--i") || arga.startsWith("-i")) { ++a; - reftime = Math.abs(Integer.parseInt(args[a])); + from = Math.abs(Integer.parseInt(args[a])); + options += " "+args[a]; } else if (arga.startsWith("--h") || arga.startsWith("-h")) { System.err.println("Usage:"); System.err.println(" DAAGenerator [