Skip to content

Commit

Permalink
2.0.2b-FormalATM-v2.7.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Cesar Munoz committed May 13, 2021
1 parent 6d6fd06 commit 6b9cc73
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 63 deletions.
2 changes: 1 addition & 1 deletion C++/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
DAIDALUS: Detect and Avoid Alerting Logic for Unmanned Systems
---------------------------------------------------------

Release: v2.0.2 (C++), March-23-2021
Release: v2.0.2b (C++), May-31-2021

Copyright: Copyright (c) 2021 United States Government as represented by
the National Aeronautics and Space Administration. No copyright
Expand Down
6 changes: 3 additions & 3 deletions C++/RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DAIDALUS: Detect and Avoid Alerting Logic for Unmanned Systems
-----------------------------------------------------
Release: v2.0.2-FormalATM-v2.7.5 (C++), April-23-2021
Release: v2.0.2b-FormalATM-v2.7.5 (C++), May-31-2021
Contact: Cesar A. Munoz (Cesar.A.Munoz@nasa.gov)

Copyright: Copyright (c) 2021 United States Government as represented by
Expand All @@ -10,8 +10,8 @@ Rights Reserved.

Release DAIDALUS-v2.0.2b:
------------------
* April 23, 2021
- Fixed error where dta_latitude and dta_longitude were exchanged when
* May-31-2021
- *IMPORTANT* Fixed error where dta_latitude and dta_longitude were exchanged when
provided in Eucliedean coordinates. Now, they corresponds to X
(dta_longitude) and Y (dta_latitude), as expected.
- Updated to -FormalATM-v2.7.5
Expand Down
2 changes: 1 addition & 1 deletion Java/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
DAIDALUS: Detect and Avoid Alerting Logic for Unmanned Systems
---------------------------------------------------------

Release: v2.0.2 (Java), March-23-2021
Release: v2.0.2b (Java), May-31-2021

Copyright: Copyright (c) 2021 United States Government as represented by
the National Aeronautics and Space Administration. No copyright
Expand Down
6 changes: 3 additions & 3 deletions Java/RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DAIDALUS: Detect and Avoid Alerting Logic for Unmanned Systems
-----------------------------------------------------
Release: v2.0.2-FormalATM-v2.7.5 (Java), April-23-2021
Release: v2.0.2b-FormalATM-v2.7.5 (Java), May-31-2021
Contact: Cesar A. Munoz (Cesar.A.Munoz@nasa.gov)

Copyright: Copyright (c) 2021 United States Government as represented by
Expand All @@ -10,8 +10,8 @@ Rights Reserved.

Release DAIDALUS-v2.0.2b:
------------------
* April 23, 2021
- Fixed error where dta_latitude and dta_longitude were exchanged when
* May-31-2021
- *IMPORTANT* Fixed error where dta_latitude and dta_longitude were exchanged when
provided in Eucliedean coordinates. Now, they corresponds to X
(dta_longitude) and Y (dta_latitude), as expected.
- Updated to -FormalATM-v2.7.5
Expand Down
8 changes: 4 additions & 4 deletions Java/src/gov/nasa/larcfm/IO/ConfigReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ public final class ConfigReader implements ParameterReader, ParameterProvider, E
private static final String INCLUDE_FILE = "importConfigFile";

private ErrorLog error;
private String param_var[];
private boolean param_isValue[];
private String[] param_var;
private boolean[] param_isValue;
private ArrayList<String[]> param_val;
private int count;
private int count_itr[];
private int[] count_itr;
private boolean hasRead;
private boolean caseSensitive;
private ParameterData pd;
Expand Down Expand Up @@ -112,7 +112,7 @@ public void open(String filename) {
open(fr, srcPath);
fr.close();
} catch (FileNotFoundException e) {
System.out.println(FileUtil.absolute_path("", filename));
// System.out.println(FileUtil.absolute_path("", filename));
error.addError("File "+filename+" read protected or not found");
if (param_var != null) {
param_var = new String[0];
Expand Down
27 changes: 10 additions & 17 deletions Java/src/gov/nasa/larcfm/Util/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@

package gov.nasa.larcfm.Util;

import gov.nasa.larcfm.Util.Units;
import java.util.jar.JarFile;

/** Key parameters for all of Util. Despite the name, not everything is a constant.
*
*/
public class Constants {

// Prohibt constructing this object
private Constants() { }

/**
* String indicating the FormalATM version
*/
Expand Down Expand Up @@ -70,10 +73,8 @@ public static String build_time() {
* @return type string
*/
public static String distribution_type() {
try {
JarFile formalATMJar = new JarFile("FormalATM.jar");
try (JarFile formalATMJar = new JarFile("FormalATM.jar")) {
String s = formalATMJar.getManifest().getMainAttributes().getValue("FormalATM-Build-Type");
formalATMJar.close();
if (s != null) return s;
return "";
} catch (Exception e) {
Expand All @@ -98,14 +99,6 @@ public static String distribution_type() {
*/
public static final String wsPatternBraces = "[,; \\t\\[\\]]+";

public static final String[] LAT_OR_LON_HEADINGS = {"lat", "lon", "long", "latitude"};
public static final String[] NAME_HEADINGS = {"name", "aircraft", "id"};
public static final String[] LATITUDE_HEADINGS = {"sx", "lat", "latitude"};
public static final String[] LONGITUDE_HEADINGS = {"sy", "lon", "long", "longitude"};
public static final String[] ALTITUDE_HEADINGS = {"sz", "alt", "altitude"};
public static final String[] TIME_HEADINGS = {"time", "tm", "st"};


/** WAAS specification requirements (25 ft) for horizontal
* accuracy, 95% of the time. In practice, the actual accuracy is
* much better. */
Expand All @@ -117,15 +110,15 @@ public static String distribution_type() {
public static final double TIME_LIMIT_EPSILON = Units.from(Units.s, 1.0);


private static double HORIZONTAL_ACCURACY = 1E-7; // GPS_LIMIT_HORIZONTAL;
private static double VERTICAL_ACCURACY = 1E-7; // GPS_LIMIT_VERTICAL;
private static double HORIZONTAL_ACCURACY = 1E-7;
private static double VERTICAL_ACCURACY = 1E-7;
private static double HORIZONTAL_ACCURACY_RAD = Units.to("nmi", HORIZONTAL_ACCURACY) * Math.PI / (180.0 * 60.0);
private static double TIME_ACCURACY = 1E-7; // TIME_LIMIT_EPSILON;
private static double TIME_ACCURACY = 1E-7;
private static int OUTPUT_PRECISION = 6;
private static boolean TRAILING_ZEROS = true;


public static double NO_TIME = -1;
public static final double NO_TIME = -1;
/**
* Set the time accuracy value. This value means any two times that
* are within this value of each other are considered the same [s].
Expand All @@ -146,7 +139,7 @@ public static void set_time_accuracy(double acc) {
public static void set_horizontal_accuracy(double acc) {
if (acc > 0.0) {
HORIZONTAL_ACCURACY = acc;
HORIZONTAL_ACCURACY_RAD = Units.to("nmi", acc) * Math.PI / (180.0 * 60.0); // = GreatCircle.angle_from_distance(acc);
HORIZONTAL_ACCURACY_RAD = Units.to("nmi", acc) * Math.PI / (180.0 * 60.0); // = GreatCircle.angle_from_distance(acc)
}
}

Expand Down
25 changes: 19 additions & 6 deletions Java/src/gov/nasa/larcfm/Util/Debug.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
*/
public class Debug {

private static final int INFO_LEVEL = 2;
private static final int INFO_LEVEL = 2; // DO NOT CHANGE. Should be 2, should never need to be public/protected/package scope
public static final boolean FAIL_FAST = false; //!!!!! set this to false for distribution; true for local debugging
private static ByteArrayOutputStream buffer = null;

Expand Down Expand Up @@ -134,7 +134,7 @@ private Debug() {

/**
* Sets the destination of where log information should go. This method should
* either never be called (that is, left as a default standard output), or it
* either never be called (that is, left as the default standard output), or it
* should be called very early after a program starts.
*
* <ul>
Expand Down Expand Up @@ -193,7 +193,7 @@ public static void setVerbose(int level) {
LOGGER.setLevel(Level.SEVERE);
} else if (level == 1) {
LOGGER.setLevel(Level.WARNING);
} else if (level == 2) {
} else if (level == 2) { // INFO_LEVEL
LOGGER.setLevel(Level.INFO);
} else if (level == 3) {
LOGGER.setLevel(Level.CONFIG);
Expand Down Expand Up @@ -420,10 +420,23 @@ public static void plnLazy(String tag, Supplier<String> f, boolean verbose) {
pln(l, formatTag(tag,f.get()));
}
}

/**
* Print out a status message <i>msg</i>.
* The output will only come out if Debug is in "verbose" mode.
* Print out a status message <tt>msg</tt>.
* The output will only come out if <tt>verbose</tt> is true and if
* the verbose level ({@link #setVerbose} must be 2 to larger.
*
* @param verbose if true, the display status message
* @param msg the status message
*/
public static void pln(boolean verbose, String msg) {
pln(msg, verbose);
}

/**
* Print out a status message <tt>msg</tt>.
* The output will only come out if <tt>verbose</tt> is true and if
* the verbose level ({@link #setVerbose} must be 2 to larger.
*
* @param msg the status message
* @param verbose if true, the display status message
Expand Down
Loading

0 comments on commit 6b9cc73

Please sign in to comment.