### Get Help for DAIDALUS Example Application Source: https://nasa.github.io/daidalus To view the available command-line options for the 'DaidalusExample' application, use the '--help' flag. This provides information on how to configure and run the example. ```bash $ /DaidalusExample --help ``` -------------------------------- ### Run DAIDALUS Example Application Source: https://nasa.github.io/daidalus Execute the compiled 'DaidalusExample' application to illustrate DAIDALUS functionalities. The '' placeholder should be replaced with the actual directory path. ```bash $ /DaidalusExample ``` -------------------------------- ### Checkout DAIDALUS Release Version Source: https://nasa.github.io/daidalus To switch to a specific release version of DAIDALUS, use the 'git checkout' command followed by the desired version tag. This example shows how to checkout version v2.0.1. ```bash $ git checkout v2.0.1 ``` -------------------------------- ### Compile DAIDALUS Java Code Source: https://nasa.github.io/daidalus The 'make' command compiles the Java code for DAIDALUS, producing a JAR file for the library and then compiling example applications. This process requires Java 8 or later. ```bash $ make ** Building library lib/DAIDALUSv2.X.x.jar javac src/gov/nasa/larcfm/IO/*.java src/gov/nasa/larcfm/Util/*.java src/gov/nasa/larcfm/ACCoRD/*.java ... ** Building example applications javac -cp lib/DAIDALUSv2.X.x.jar src/*.java ``` -------------------------------- ### Get Aircraft Contributing to Conflict Bands Source: https://nasa.github.io/daidalus Populates a list with the identifiers of aircraft that are contributing to conflict bands for a specified region. The list is passed by reference and modified in place. ```java List acs = new ArrayList(); daa.conflictBandsAircraft(acs,region); ``` -------------------------------- ### Get Recovery Information for Maneuver Guidance Source: https://nasa.github.io/daidalus Retrieves RecoveryInformation objects for horizontal direction, horizontal speed, vertical speed, and altitude. These objects contain data about recovery maneuvers when well-clear is lost. ```java RecoveryInformation recovery_hdir = daa.horizontalDirectionRecoveryInformation(); RecoveryInformation recovery_hs = daa.horizontalSpeedRecoveryInformation(); RecoveryInformation recovery_vs = daa.verticalSpeedRecoveryInformation(); RecoveryInformation recovery_alt = daa.altitudeRecoveryInformation(); ``` -------------------------------- ### Get Aircraft Contributing to Peripheral Bands Source: https://nasa.github.io/daidalus Populates lists with aircraft identifiers contributing to peripheral bands for different maneuver types (horizontal direction, horizontal speed, vertical speed, altitude) within a specified region. The lists are passed by reference. ```java List acs = new ArrayList(); daa.peripheralHorizontalDirectionBandsAircraft(acs,region); daa.peripheralHorizontalSpeedBandsAircraft(acs,region); daa.peripheralVerticalSpeedBandsAircraft(acs,region); daa.peripheralAltitudeBandsAircraft(acs,region); ``` -------------------------------- ### Get Alert Level Source: https://nasa.github.io/daidalus Retrieves the alert level between the ownship and a traffic aircraft. Returns a negative value for an invalid aircraft index, zero for no alert, and a positive integer for specific alert levels (e.g., 1 for Preventive, 2 for Corrective, 3 for Warning in DO-365A). ```java int alert_level = daa.alertLevel(ac_idx); ``` -------------------------------- ### Load Daidalus Configuration from File Source: https://nasa.github.io/daidalus Loads a Daidalus configuration from a specified file. Ensure the configuration file exists in the distribution. ```javascript daa.loadFromFile("DO_365A_SUM.conf"); ``` -------------------------------- ### Load Daidalus Configuration by Filename Source: https://nasa.github.io/daidalus Loads a Daidalus configuration from a file specified by its name. The file can contain partial or full configuration settings. ```javascript daa.loadFromFile(filename); ``` -------------------------------- ### Initialize Daidalus with Default Configuration Source: https://nasa.github.io/daidalus Instantiates a Daidalus object using the default configuration, which is WC_SC_228_std.txt. This configuration is suitable for reference to an ideal algorithm with perfect information. ```java Daidalus daa = new Daidalus(); ``` -------------------------------- ### Generate Graphical Bands with DrawMultiBands Source: https://nasa.github.io/daidalus The DrawMultiBands program produces guidance and alerting information in a graphical form, outputting a .draw file that can be processed further. ```bash /Java/DrawMultiBands --config Configurations/DO_365B_no_SUM.conf Scenarios/H1.daa Writing file H1.draw, which can be processed with the Python script drawmultibands.py ``` ```bash /Scripts/drawmultibands.py H1.draw Writing H1.pdf ``` -------------------------------- ### Configurable Parameters Source: https://nasa.github.io/daidalus DAIDALUS DAA capabilities can be configured programmatically using getter/setter methods or via a configuration file using `loadFromFile`. ```APIDOC ## Configurable Parameters DAIDALUS DAA capabilities can be configured either programmatically, i.e., using getter/setter methods in the class `Daidalus` or via a configuration file, using the method `loadFromFile` in the class `Daidalus`. ### Bands Parameters The following is a list of parameters that can be configured in DAIDALUS: | Configuration Parameter | Programatic Getter/Setter | Description (Type) | |---|---|---| | `lookahead_time` | `get/setLookaheadTime` | Time horizon of all DAIDALUS functions (Time) | | `left_trk` | `get/setLeftTrack` | Relative maximum horizontal direction maneuver to the left of current ownship direction (Angle) | | `right_trk` | `get/setRightTrack` | Relative maximum horizontal direction maneuver to the right of current ownship direction (Angle) | | `min_hs` | `get/setMinHorizontalSpeed` | Absolute minimum horizontal speed maneuver (Speed) | | `max_hs` | `get/setMaxHorizontalSpeed` | Absolute maximum horizontal speed maneuver (Speed) | | `min_vs` | `get/setMinVerticalSpeed` | Absolute minimum vertical speed maneuver (Speed) | | `max_vs` | `get/setMaxVerticalSpeed` | Absolute maximum vertical speed maneuver (Speed) | | `min_alt` | `get/setMinAltitude` | Absolute minimum altitude maneuver (Altitude) | | `max_alt` | `get/setMaxAltitude` | Absolute maximum altitude maneuver (Altitude) | | `trk_step` | `get/setTrackStep` | Granularity of horizontal direction maneuvers (Angle) | | `hs_step` | `get/setHorizontalSpeedStep` | Granularity of horizontal speed maneuvers (Speed) | | `vs_step` | `get/setVerticalSpeedStep` | Granularity of vertical speed maneuvers (Speed) | | `alt_step` | `get/setAltitudeStep` | Granularity of altitude maneuvers (Altitude) | ``` -------------------------------- ### Configure Daidalus for Nominal Aircraft (Low Turn Rate) Source: https://nasa.github.io/daidalus Sets up Daidalus for aircraft with a turn rate of 1.5 deg/s, using buffered definitions for alerting and maneuvering volumes to account for sensor uncertainty. Maneuver guidance is computed until NMAC. ```java Daidalus daa = new Daidalus(); daa.set_Buffered_WC_SC_228_MOPS(false); ``` -------------------------------- ### Wind Model Configuration Source: https://nasa.github.io/daidalus How to set a global wind vector that affects all aircraft states. ```APIDOC ## Winds DAIDALUS supports a global wind model applied as a velocity vector. When set, all computations and outputs become relative to this wind. The wind vector can be provided using either a "TO" (wind blowing direction) or "FROM" (direction wind source is from) convention. ``` -------------------------------- ### Generate DAA Encounters with DAAGenerator and Wind Source: https://nasa.github.io/daidalus Add wind conditions to generated DAA encounters using `DAAGenerator` by specifying wind speed and direction. Ensure correct units for wind parameters. ```bash $ /Java/DAAGenerator --backward 100 --forward 20 --lat 40.754377 --lon -74.007436 --wind_speed='40[kn]' --wind_from='170[deg]' --out C1_0_120_W.daa C1.txt ``` -------------------------------- ### Position Creation Methods Source: https://nasa.github.io/daidalus Methods for creating Position objects using geodesic or Cartesian coordinates. ```APIDOC ## Position Class ### Geodesic Coordinates `static Position makeLatLonAlt(double lat, String lat_unit, double lon, String lon_unit, double alt, String alt_unit)` Creates a position using latitude, longitude, and altitude. Northern latitudes and eastern longitudes are positive. Units for latitude, longitude, and altitude are specified by `lat_unit`, `lon_unit`, and `alt_unit` respectively. ``` ```APIDOC ### Cartesian Coordinates (ENU) `static Position makeXYZ(double x, String x_unit, double y, String y_unit, double z, String z_unit)` Creates a position using Euclidean coordinates (x, y, z) in the local East, North, Up (ENU) system. Units for x, y, and z are specified by `x_unit`, `y_unit`, and `z_unit` respectively. ``` -------------------------------- ### Generate DAA Files from DAIDALUS Log with daidalize Source: https://nasa.github.io/daidalus Use the `daidalize.pl` script to convert a DAIDALUS log file into DAA encounter and configuration files. Ensure aircraft states strictly increase in time; use `--fixtimes` if necessary. ```bash $ /Scripts/daidalize.pl name.log Processing name.log Writing traffic file: name.daa Writing configuration file: name.conf ``` -------------------------------- ### Compute Alerting Metrics with DaidalusAlerting Source: https://nasa.github.io/daidalus Use `DaidalusAlerting` to compute alerting and DAA metrics for a given encounter and configuration file, outputting results to a CSV file. This tool is available in Java and C++. ```bash $ /Java/DaidalusAlerting --config Configurations/DO_365B_no_SUM.conf Scenarios/H1.daa Generating CSV file H1.csv ``` -------------------------------- ### Configure Daidalus for Nominal Aircraft (High Turn Rate) Source: https://nasa.github.io/daidalus Sets up Daidalus for aircraft with a turn rate of 3.0 deg/s, using buffered definitions for alerting and maneuvering volumes to account for sensor uncertainty. Maneuver guidance is computed until NMAC. ```java Daidalus daa = new Daidalus(); daa.set_Buffered_WC_SC_228_MOPS(true); ``` -------------------------------- ### Run DAIDALUS in Batch Mode Source: https://nasa.github.io/daidalus Use DaidalusBatch to run DAIDALUS on a given encounter with a specified configuration. It prints time-step by time-step alerting and banding information. ```bash $ /Java/DaidalusBatch --config Configurations/DO_365B_no_SUM.conf Scenarios/H1.daa ``` -------------------------------- ### Set Max Ground Speed with Units Source: https://nasa.github.io/daidalus Configure the maximum ground speed with explicit units. If no units are provided, internal units are assumed. ```plaintext max_hs = 700.0 [knot] ``` -------------------------------- ### Configure Daidalus with Type and SUM Options Source: https://nasa.github.io/daidalus Configures the Daidalus object with DO 365A defaults, allowing customization of turn rate and Sensor Uncertainty Mitigation (SUM) via boolean parameters. ```javascript daa.set_DO_365A(type,sum); ``` -------------------------------- ### Units Conversion Methods Source: https://nasa.github.io/daidalus The Units class provides static methods for converting values between internal units (meters, seconds, radians) and specified external units, as well as converting between two different external units. ```APIDOC ## Units Class Methods ### Description Provides static methods for unit conversion. ### Methods #### `static double to(String unit, double value)` Converts `value` to the units indicated by the parameter `unit` from internal units. #### `static double from(String unit, double value)` Converts `value` from the units indicated by the parameter `unit` to internal units. #### `static double convert(String fromUnit, String toUnit, double value)` Converts `value` from the units indicated by the parameter `fromUnit` to the units indicated by the parameter `toUnit`. ``` -------------------------------- ### Set Daidalus to DO 365A Defaults Source: https://nasa.github.io/daidalus Use this method to set the Daidalus object to the DO 365A default configuration, enabling specific alerting and maneuver guidance logic. ```javascript daa.set_DO_365A(); ``` -------------------------------- ### Load Daidalus Configuration without SUM Source: https://nasa.github.io/daidalus Loads a Daidalus configuration file that specifically excludes SUM. This is useful for testing or specific operational scenarios. ```javascript daa.loadFromFile("DO_365A_no_SUM.conf"); ``` -------------------------------- ### DAA Performance Metrics Source: https://nasa.github.io/daidalus These methods compute DAA performance metrics between ownship and aircraft at index `ac_idx`. Units can be specified using `u`. ```APIDOC ## DAA Performance Metrics Assuming `daa` is an object of type `Daidalus`, the following methods compute DAA performance metrics between ownship and aircraft at index `ac_idx` in `u` units. These methods return the Not-A-Number (NaN) value if `ac_idx` is not a valid index. If the unit parameters are not provided the returned values are in internal units, i.e., meters, seconds, etc. ### `daa.currentHorizontalSeparation(ac_idx, u)` **Description**: Returns current horizontal separation. ### `daa.currentVerticalSeparation(ac_idx, u)` **Description**: Returns current vertical separation. ### `daa.horizontalClosureRate(ac_idx, u)` **Description**: Returns current horizontal closure rate. ### `daa.verticalClosureRate(ac_idx, u)` **Description**: Returns current vertical closure rate. ### `daa.predictedHorizontalMissDistance(ac_idx, u)` **Description**: Returns predicted horizontal miss distance, within lookahead time. ### `daa.predictedVerticalMissDistance(ac_idx, u)` **Description**: Returns predicted vertical miss distance, within lookahead time. ### `daa.timeToHorizontalClosestPointOfApproach(ac_idx, u)` **Description**: Returns time to horizontal closest point of approach, relative to ownship time. The returned time is 0 when aircraft are horizontally divergent or parallel. ### `daa.distanceAtHorizontalClosestPointOfApproach(ac_idx, u)` **Description**: Returns distance at horizontal closest point of approach. The returned value is current horizontal range when aircraft are diverging or parallel. ### `daa.timeToCoAltitude(ac_idx, u)` **Description**: Returns time to co-altitude. The returned time is negative if aircraft are diverging. Negative infinity is returned when vertical closure rate is zero. ### `daa.modifiedTau(ac_idx, DMOD, DMODu, u)` **Description**: Returns modified Tau with respect to a modified distance `DMOD` provided in `DMODu` units. ### `daa.lastTimeToHorizontalDirectionManeuver(ac_idx, u)` **Description**: Returns the last time to horizontal direction maneuver before a loss of corrective volume is unavoidable. ### `daa.lastTimeToHorizontalSpeedManeuver(ac_idx, u)` **Description**: Returns the last time to horizontal speed maneuver before a loss of corrective volume is unavoidable. ### `daa.lastTimeToVerticalSpeedManeuver(ac_idx, u)` **Description**: Returns the last time to vertical speed maneuver before a loss of corrective volume is unavoidable. ### `daa.lastTimeToAltitudeManeuver(ac_idx, u)` **Description**: Returns the last time to altitude maneuver before a loss of corrective volume is unavoidable. *Note*: For the `lastTimeTo...` methods, positive infinity is returned if the aircraft are not in conflict, and negative infinity if there is no time to maneuver. These methods return Not-A-Number (NaN) if `ac_idx` is not a valid index. ``` -------------------------------- ### Save Daidalus Configuration to File Source: https://nasa.github.io/daidalus Writes the current Daidalus object's configuration to a specified file. Returns false if an I/O error occurs. ```javascript daa.saveToFile(filename); ``` -------------------------------- ### Generate DAA Encounters with DAAGenerator (Forward and Backward Projection) Source: https://nasa.github.io/daidalus Use `DAAGenerator` to project aircraft states both backward and forward in time. The output format (geodesic or Euclidean) depends on the input and optional latitude/longitude parameters. ```bash $ /Java/DAAGenerator --backward 100 --forward 20 --out H0_0_120a.xyz H0.txt ``` ```bash $ /Java/DAAGenerator --backward 100 --forward 20 --lat 40.67233 --lon -74.04466 --out H0_0_120.daa H0.txt ``` -------------------------------- ### Generate DAA Encounters with DAAGenerator (Backward Projection) Source: https://nasa.github.io/daidalus Use `DAAGenerator` to project aircraft states backward in time from an initial encounter file. This is useful for creating scenarios like collision avoidance. ```bash $ /Java/DAAGenerator --backward 120 --out C0_0_120.daa C0.txt ``` -------------------------------- ### Clone DAIDALUS Development Version Source: https://nasa.github.io/daidalus Use this git command to retrieve the latest development version of DAIDALUS from GitHub. This command is executed in a Unix terminal. ```bash $ git clone https://github.com/nasa/daidalus.git ``` -------------------------------- ### ConflictData Methods Source: https://nasa.github.io/daidalus Provides methods to query information about a detected conflict interval. ```APIDOC ## ConflictData ### Description Provides information about a time interval of conflict between aircraft. ### Methods #### conflict() - **Description**: Returns `true` if the time interval is non-empty, `false` otherwise. - **Returns**: `boolean` #### getTimeIn() - **Description**: When the time interval is non-empty, returns time to first loss relative to ownship’s time. - **Returns**: `double` #### getTimeOut() - **Description**: When the time interval is non-empty, returns time to last loss relative to ownship’s time. - **Returns**: `double` ``` -------------------------------- ### RecoveryInformation Methods Source: https://nasa.github.io/daidalus These methods are available on the RecoveryInformation class and provide details about the computed recovery bands. Times and distances are returned in specified units or internal units (meters, seconds). ```APIDOC ## RecoveryInformation Class Methods ### `recoveryBandsComputed()` **Description**: Returns `true` if the recovery bands algorithm was used, as opposed to the well-clear bands algorithm. ### `recoveryBandsSaturated()` **Description**: Returns `true` if recovery bands saturate. This may occur if recovery bands are disabled or well-clear recovery is not possible based on configuration. ### `timeToToRecovery(String u)` **Description**: Returns the upper bound to the time required to recover from a violation of the corrective volume. **Parameters**: - **u** (String) - The unit for the returned time value (e.g., "s" for seconds, or internal units). ### `recoveryHorizontalDistance(String u)` **Description**: Returns the lower bound to the horizontal distance at the time of closest approach during a recovery maneuver. **Parameters**: - **u** (String) - The unit for the returned distance value (e.g., "m" for meters, or internal units). ### `recoveryVerticalDistance(String u)` **Description**: Returns the lower bound to the vertical distance at the time of closest approach during a recovery maneuver. **Parameters**: - **u** (String) - The unit for the returned distance value (e.g., "m" for meters, or internal units). ### `nFactor()` **Description**: Returns the number of times the configured recovery volume was reduced to compute recovery maneuvers. A higher number indicates a smaller separation can be maintained during recovery. **Returns**: - int - The number of reductions to the recovery volume. ``` -------------------------------- ### Iterate Vertical Speed Bands Source: https://nasa.github.io/daidalus Iterates through vertical speed bands to retrieve interval bounds and region types. Units are in fpm. ```java for (int i = 0; i < daa.verticalSpeedBandsLength(); i++ ) { Interval iv = daa.verticalSpeedIntervalAt(i,"fpm"); //i-th interval in fpm double lower_vs = iv.low; //[fpm] double upper_vs = iv.up; //[fpm] BandsRegion regionType = daa.verticalSpeedRegionAt(i); ... } ``` -------------------------------- ### Create Daidalus Object in Java Source: https://nasa.github.io/daidalus Instantiates a Daidalus object in Java. This object will manage DAA logic for the ownship. ```java Daidalus daa = new Daidalus(); ``` -------------------------------- ### Iterate Altitude Bands Source: https://nasa.github.io/daidalus Iterates through altitude bands to retrieve interval bounds and region types. Units are in feet. ```java for (int i = 0; i < daa.altitudeBandsLength(); i++ ) { Interval iv = daa.altitudeIntervalAt(i,"ft"); //i-th interval in ft double lower_alt = iv.low; //[ft] double upper_alt = iv.up; //[ft] BandsRegion regionType = daa.altitudeRegionAt(i); ... } ``` -------------------------------- ### Compute Preferred Resolution Maneuvers Source: https://nasa.github.io/daidalus Computes preferred resolution maneuvers for horizontal direction, horizontal speed, vertical speed, and altitude using specified units. Ensure the DAIDALUS instance is properly initialized. ```java double hdir_deg = daa.horizontalDirectionResolution(daa.preferredHorizontalDirectionRightOrLeft(),"deg"); double hs_knot = daa. horizontalSpeedResolution(daa.preferredHorizontalSpeedUpOrDown(),"knot"); double vs_fpm = daa. verticalSpeedResolution(daa.preferredVerticalSpeedUpOrDown(),"fpm"); double alt_ft = altitudeResolution(daa.preferredAltitudeUpOrDown(),"ft"); ``` -------------------------------- ### Set Daidalus to DO 365A with Specific Type and No SUM Source: https://nasa.github.io/daidalus Applies a DO 365A configuration with a specific turn rate (determined by 'type') and disables Sensor Uncertainty Mitigation (SUM). ```javascript daa. set_DO_365A(true,false); ``` -------------------------------- ### Synchronize Aircraft States for Time Step Source: https://nasa.github.io/daidalus In an asynchronous environment, use this pattern to add states received during a time step. Daidalus will project states to synchronize with the ownship's time. ```javascript daa.setOwnshipState(own,...,t_own); daa.addTrafficState(A,...,t_A); daa.addTrafficState(C,...,t_C); ``` ```javascript daa.addTrafficState(B,...,t_C); ``` -------------------------------- ### Create Daidalus Object in C++ Source: https://nasa.github.io/daidalus Instantiates a Daidalus object in C++ using stack memory. This object will manage DAA logic for the ownship. ```cpp Daidalus daa; ``` -------------------------------- ### Iterate Horizontal Speed Bands Source: https://nasa.github.io/daidalus Iterates through horizontal speed bands to retrieve interval bounds and region types. Units are in knots. ```java for (int i = 0; i < daa.horizontalSpeedBandsLength(); ++i ) { Interval iv = daa.horizontalSpeedIntervalAt(i,"knot"); //i-th interval in knots double lower_hs = iv.low; //[knot] double upper_hs = iv.up; //[knot] BandsRegion regionType = daa.horizontalSpeedRegionAt(i); ... } ``` -------------------------------- ### Set Vertical Speed Uncertainty Source: https://nasa.github.io/daidalus Set the vertical speed uncertainty for an aircraft using its index. Provide the vertical speed uncertainty and its units. ```javascript daa.setVerticalSpeedUncertainty(ac_idx, vz, vz_units); ``` -------------------------------- ### Set Max Ground Speed Programmatically Source: https://nasa.github.io/daidalus Programmatically set the maximum ground speed with specified units. This method allows for dynamic configuration of DAA parameters. ```java daa.setMaxGroundSpeed(700.0,"knot"); ``` -------------------------------- ### Velocity Creation Methods Source: https://nasa.github.io/daidalus Methods for creating Velocity objects using polar (track, ground speed, vertical speed) or Cartesian coordinates. ```APIDOC ## Velocity Class ### Polar Coordinates (Track, Ground Speed, Vertical Speed) `static Velocity makeTrkGsVs(double trk, String trk_unit, double gs, String gs_unit, double vs, String vs_unit)` Creates a velocity relative to the ground. Track (`trk`) is given in true north clockwise convention. Ground speed (`gs`) and vertical speed (`vs`) are also provided. Units for track, ground speed, and vertical speed are specified by `trk_unit`, `gs_unit`, and `vs_unit` respectively. ``` ```APIDOC ### Cartesian Coordinates (ENU) `static Velocity makeVxyz(double vx, double vy, String vxy_unit, double vz, String vz_unit)` Creates a velocity using Euclidean coordinates (vx, vy, vz) in the local East, North, Up (ENU) system. Units for vx, vy, and vz are specified by `vxy_unit` and `vz_unit` respectively. Note: `vxy_unit` applies to both vx and vy. ``` -------------------------------- ### verticalSpeedResolution Source: https://nasa.github.io/daidalus Returns vertical speed resolution maneuver for a given Boolean value `dir` and unit `u`. When `dir` is `true` (resp. `false`), resolution maneuver is up (resp. down) relative to ownship vertical speed. ```APIDOC ## verticalSpeedResolution ### Description Computes the vertical speed resolution maneuver. ### Method `double verticalSpeedResolution(boolean dir, String u)` ### Parameters #### Path Parameters - **dir** (boolean) - Required - `true` for up, `false` for down relative to ownship vertical speed. - **u** (String) - Required - The unit for the resolution maneuver (e.g., "fpm"). ### Returns - **double** - The vertical speed resolution maneuver. Returns NaN if ownship is not in conflict, or infinite if resolution is not available. ``` -------------------------------- ### Iterate Horizontal Direction Bands Source: https://nasa.github.io/daidalus Iterates through horizontal direction bands to retrieve interval bounds and region types. Units are in degrees. ```java for (int i = 0; i < daa.horizontalDirectionBandsLength(); ++i ) { Interval iv = daa.horizontalDirectionIntervalAt(i,"deg"); //i-th interval in degrees double lower_trk = iv.low; //[deg] double upper_trk = iv.up; //[deg] BandsRegion regionType = daa.horizontalDirectionRegionAt(i); ... } ``` -------------------------------- ### Setting Sensor Uncertainties Source: https://nasa.github.io/daidalus Allows setting sensor uncertainties for ownship or traffic aircraft if a SUM configuration is enabled. Uncertainties can be defined for horizontal and vertical position, as well as horizontal and vertical velocity. ```APIDOC ## Adding Sensor Uncertainty ### Description Sets sensor uncertainties for ownship or traffic aircraft. ### Method Signatures - `daa.setHorizontalPositionUncertainty(ac_idx, s_EW, s_NS, s_EN, xy_units)` - `daa.setVerticalPositionUncertainty(ac_idx, sz, z_units)` - `daa.setHorizontalVelocityUncertainty(ac_idx, v_EW, v_NS, v_EN, vxy_units)` - `daa.setVerticalSpeedUncertainty(ac_idx, vz, vz_units)` ### Parameters - **ac_idx** (number) - Index of the aircraft. `0` represents the ownship. - **s_EW**, **s_NS**, **s_EN** (number) - Standard deviations for East-West, North-South, and East-North horizontal position in `xy_units`. - **xy_units** (string) - Units for horizontal position uncertainties. - **sz** (number) - Altitude uncertainty in `z_units`. - **z_units** (string) - Units for vertical position uncertainty. - **v_EW**, **v_NS**, **v_EN** (number) - Standard deviations for East-West, North-South, and East-North horizontal velocity in `vxy_units`. - **vxy_units** (string) - Units for horizontal velocity uncertainties. - **vz** (number) - Vertical speed uncertainty in `vz_units`. - **vz_units** (string) - Units for vertical speed uncertainty. ``` -------------------------------- ### altitudeResolution Source: https://nasa.github.io/daidalus Returns altitude resolution maneuver for a given Boolean value `dir` and unit `u`. When `dir` is `true` (resp. `false`), resolution maneuver is up (resp. down) relative to ownship altitude. ```APIDOC ## altitudeResolution ### Description Computes the altitude resolution maneuver. ### Method `double altitudeResolution(boolean dir, String u)` ### Parameters #### Path Parameters - **dir** (boolean) - Required - `true` for up, `false` for down relative to ownship altitude. - **u** (String) - Required - The unit for the resolution maneuver (e.g., "ft"). ### Returns - **double** - The altitude resolution maneuver. Returns NaN if ownship is not in conflict, or infinite if resolution is not available. ``` -------------------------------- ### Iterate Through Traffic Aircraft and Log Alert Information Source: https://nasa.github.io/daidalus Iterates through all traffic aircraft, logs their alert levels, predicted time to corrective volume violation, and time to violation of specific alert thresholds. Requires a formatted output object 'f' and assumes 'daa' is a configured Daidalus object. ```java for (int ac_idx=1; ac_idx <= daa.lastTrafficIndex(); ++ac_idx) { TrafficState intruder = daa.getAircraftStateAt(ac_idx); int alert = daa.alertLevel(ac_idx); if (alert > 0) { System.out.println("Alert Level "+alert+" with "+intruder.getId()); } double t2los = daa.timeToCorrectiveVolume(ac_idx); if (Double.isFinite(t2los)) { System.out.println("Predicted Time to Violation of Corrective Volume with " +intruder.getId()+ ": "+f.Fm2(t2los)+" [s]"); } for (int alert_level=1;alert_level <= daa.mostSevereAlertLevel(ac_idx);++alert_level) { ConflictData det = daa.violationOfAlertThresholds(ac_idx, alert_level); if (det.conflict()) { System.out.println("Predicted Time to Violation of Alert Thresholds at Level " +alert_level+" with "+intruder.getId()+ ": "+f.Fm2(det.getTimeIn())+" [s]"); } } } ``` -------------------------------- ### Set Vertical Position Uncertainty Source: https://nasa.github.io/daidalus Set the vertical position uncertainty for an aircraft using its index. Provide the altitude uncertainty and its units. ```javascript daa.setVerticalPositionUncertainty(ac_idx, sz, z_units); ``` -------------------------------- ### horizontalDirectionResolution Source: https://nasa.github.io/daidalus Returns horizontal direction resolution maneuver for a given Boolean value `dir` and unit `u`. When `dir` is `true` (resp. `false`), resolution maneuver is right (resp. left) relative to ownship horizontal direction. When a wind vector is configured this method returns heading; otherwise, it returns track. ```APIDOC ## horizontalDirectionResolution ### Description Computes the horizontal direction resolution maneuver. ### Method `double horizontalDirectionResolution(boolean dir, String u)` ### Parameters #### Path Parameters - **dir** (boolean) - Required - `true` for right, `false` for left relative to ownship horizontal direction. - **u** (String) - Required - The unit for the resolution maneuver (e.g., "deg"). ### Returns - **double** - The horizontal direction resolution maneuver. Returns NaN if ownship is not in conflict, or infinite if resolution is not available. ``` -------------------------------- ### Compute Time to Corrective Volume Violation Source: https://nasa.github.io/daidalus Calculates the time in seconds until the corrective volume between the ownship and a traffic aircraft is violated. Returns positive infinity if no conflict is detected within the lookahead time, and NaN if the aircraft index is invalid. ```java double t2v = daa.timeToCorrectiveVolume(ac_idx); ``` -------------------------------- ### Set Horizontal Velocity Uncertainty Source: https://nasa.github.io/daidalus Set the horizontal velocity uncertainty for an aircraft using its index. Specify standard deviations for East-West, North-South, and East-North directions. ```javascript daa.setHorizontalVelocityUncertainty(ac_idx, v_EW, v_NS, v_EN, vxy_units); ``` -------------------------------- ### Set Wind Velocity (From Direction) Source: https://nasa.github.io/daidalus Provides wind information to the Daidalus object by specifying the direction the wind is coming from. This vector affects future aircraft states. ```javascript daa.setWindVelocityFrom(wind_from); ``` -------------------------------- ### horizontalSpeedResolution Source: https://nasa.github.io/daidalus Returns horizontal speed resolution maneuver for a given Boolean value `dir` and unit `u`. When `dir` is `true` (resp. `false`), resolution maneuver is up (resp. down) relative to ownship horizontal speed. When a wind vector is configured this method returns airspeed; otherwise, it returns ground speed. ```APIDOC ## horizontalSpeedResolution ### Description Computes the horizontal speed resolution maneuver. ### Method `double horizontalSpeedResolution(boolean dir, String u)` ### Parameters #### Path Parameters - **dir** (boolean) - Required - `true` for up, `false` for down relative to ownship horizontal speed. - **u** (String) - Required - The unit for the resolution maneuver (e.g., "knot"). ### Returns - **double** - The horizontal speed resolution maneuver. Returns NaN if ownship is not in conflict, or infinite if resolution is not available. ``` -------------------------------- ### Set Horizontal Position Uncertainty Source: https://nasa.github.io/daidalus Set the horizontal position uncertainty for an aircraft using its index. Specify standard deviations for East-West, North-South, and East-North directions. ```javascript daa.setHorizontalPositionUncertainty(ac_idx, s_EW, s_NS, s_EN, xy_units); ``` -------------------------------- ### Add Traffic State to Daidalus Source: https://nasa.github.io/daidalus Add traffic aircraft states to the Daidalus object. If a time stamp is provided, traffic states will be projected to synchronize with the ownship's time. ```javascript aci_idx = daa.addTrafficState(idi,si,vi); ``` ```javascript daa.addTrafficState(idi,si,vi,ti); ``` -------------------------------- ### Set Ownship State in Daidalus Source: https://nasa.github.io/daidalus Use this method to add the ownship's state. This action clears any previously set traffic aircraft states, so ensure ownship state is added first for a given time. ```javascript daa.setOwnshipState(ido,so,vo,to); ``` -------------------------------- ### Aircraft Contributing to Peripheral Bands Source: https://nasa.github.io/daidalus Retrieves lists of aircraft contributing to peripheral bands, which are not in the current path of the ownship. These are specific to different maneuver types. ```APIDOC ## Peripheral Bands Aircraft Retrieval ### `peripheralHorizontalDirectionBandsAircraft(List acs, BandsRegion region)` **Description**: Retrieves the list of aircraft contributing to peripheral horizontal direction bands. **Parameters**: - **acs** (List) - Output parameter: A list of strings to be populated with aircraft identifiers. Passed by reference. - **region** (BandsRegion) - The specific region to check for peripheral bands. ### `peripheralHorizontalSpeedBandsAircraft(List acs, BandsRegion region)` **Description**: Retrieves the list of aircraft contributing to peripheral horizontal speed bands. **Parameters**: - **acs** (List) - Output parameter: A list of strings to be populated with aircraft identifiers. Passed by reference. - **region** (BandsRegion) - The specific region to check for peripheral bands. ### `peripheralVerticalSpeedBandsAircraft(List acs, BandsRegion region)` **Description**: Retrieves the list of aircraft contributing to peripheral vertical speed bands. **Parameters**: - **acs** (List) - Output parameter: A list of strings to be populated with aircraft identifiers. Passed by reference. - **region** (BandsRegion) - The specific region to check for peripheral bands. ### `peripheralAltitudeBandsAircraft(List acs, BandsRegion region)` **Description**: Retrieves the list of aircraft contributing to peripheral altitude bands. **Parameters**: - **acs** (List) - Output parameter: A list of strings to be populated with aircraft identifiers. Passed by reference. - **region** (BandsRegion) - The specific region to check for peripheral bands. ``` -------------------------------- ### Set Wind Velocity (To Direction) Source: https://nasa.github.io/daidalus Provides wind information to the Daidalus object by specifying the direction the wind blows towards. This vector affects future aircraft states. ```javascript daa.setWindVelocityTo(wind_to); ``` -------------------------------- ### Adding Traffic State Source: https://nasa.github.io/daidalus Adds traffic states to the Daidalus object. Traffic states can be added with or without an explicit time stamp. If a time stamp is provided, the traffic aircraft's position is projected to synchronize with the ownship's time. ```APIDOC ## Adding Traffic State ### Description Adds traffic states to the `daa` object. ### Method Signatures 1. `aci_idx = daa.addTrafficState(idi, si, vi)` 2. `aci_idx = daa.addTrafficState(idi, si, vi, ti)` ### Parameters - **idi** - Traffic identifier. - **si** - Traffic position. - **vi** - Traffic velocity. - **ti** (optional, number) - Absolute time stamp in seconds for the traffic state. If provided, the position is projected to the ownship's time of applicability (`to`). ### Return Value - **aci_idx** (number) - The index of the aircraft after it has been added. ``` -------------------------------- ### Alert Level Source: https://nasa.github.io/daidalus Computes the alert level between the ownship and a traffic aircraft. Returns a negative value if the aircraft index is invalid. A positive value indicates the alert level (e.g., 1 for Preventive, 2 for Corrective, 3 for Warning in DO-365A). ```APIDOC ## alertLevel ### Description Computes the alert level between the ownship and a traffic aircraft. ### Method Signature ```java int alertLevel(int ac_idx) ``` ### Parameters #### Path Parameters - **ac_idx** (int) - Required - The index of the traffic aircraft. ### Returns - **int** - A negative value if `ac_idx` is invalid. A positive value indicating the alert level (e.g., 1, 2, or 3 for DO-365A). ``` -------------------------------- ### Aircraft Contributing to Conflict Bands Source: https://nasa.github.io/daidalus Retrieves the list of aircraft identifiers that are contributing to conflict bands for a specified region. ```APIDOC ## `conflictBandsAircraft(List acs, BandsRegion region)` ### Description Obtains the list of identifiers for aircraft contributing to conflict bands, which are bands in the current path of the ownship. Conflict bands appear simultaneously for all maneuver types. ### Parameters - **acs** (List) - Output parameter: A list of strings to be populated with aircraft identifiers. Passed by reference. - **region** (BandsRegion) - The specific region to check for conflict bands (e.g., `FAR`, `MID`, `NEAR`). ``` -------------------------------- ### Invalid Value Checks Source: https://nasa.github.io/daidalus Methods for checking the validity of values within DAIDALUS classes. ```APIDOC ## Invalid Values DAIDALUS methods may return invalid values when called with invalid parameters. The following methods can be used to check for validity: - `Position.isInvalid()` - `Velocity.isInvalid()` - `TrafficState.isValid()` For primitive `double` types, `Double.isFinite()` and `Double.isNaN()` can be used. For integer return types that normally return a natural number, a negative value (e.g., -1) indicates an invalid result. ``` -------------------------------- ### Time to Corrective Volume Source: https://nasa.github.io/daidalus Computes the time, in seconds, to violation of the corrective volume between the ownship and a traffic aircraft. Returns positive infinity if no conflict within lookahead time, and NaN if the aircraft index is invalid. ```APIDOC ## timeToCorrectiveVolume ### Description Computes the time to violation of the corrective volume between the ownship and a traffic aircraft. ### Method Signature ```java double timeToCorrectiveVolume(int ac_idx) ``` ### Parameters #### Path Parameters - **ac_idx** (int) - Required - The index of the traffic aircraft. ### Returns - **double** - Time in seconds to violation of the corrective volume. Positive infinity if no conflict within lookahead time. NaN if `ac_idx` is invalid. ``` -------------------------------- ### Violation of Alert Thresholds Source: https://nasa.github.io/daidalus Computes the time interval of violation with respect to a traffic aircraft and a specified alert level. Returns a `ConflictData` object containing information about the violation. ```APIDOC ## violationOfAlertThresholds ### Description Computes the time interval of violation, with respect to aircraft at index `ac_idx`, to the volume defined by `alert_level`. Returns a `ConflictData` object. ### Method Signature ```java ConflictData violationOfAlertThresholds(int ac_idx, int alert_level) ``` ### Parameters #### Path Parameters - **ac_idx** (int) - Required - The index of the traffic aircraft. - **alert_level** (int) - Required - The alert level to check violation against. ### Returns - **ConflictData** - An object containing violation data. Use its methods like `conflict()`, `getTimeIn()`, and `getTimeOut()`. ``` -------------------------------- ### Setting Ownship State Source: https://nasa.github.io/daidalus Adds the ownship state to a Daidalus object. This action clears any previously set traffic aircraft states. It's crucial to set the ownship state before adding any traffic aircraft states for a given time of applicability. ```APIDOC ## Setting Ownship State ### Description Adds the ownship state to a `Daidalus` object `daa`. ### Method Signature `daa.setOwnshipState(ido, so, vo, to)` ### Parameters - **ido** (string) - Ownship identifier. - **so** (`Position` object) - Ownship position. - **vo** (`Velocity` object) - Ownship velocity. - **to** (number) - Absolute time stamp in seconds of the ownship state (time of applicability). ### Notes Setting the ownship state clears the list of traffic aircraft states. Ensure this is called before adding traffic states for a given time. ``` -------------------------------- ### Disable Wind Computations Source: https://nasa.github.io/daidalus Disables wind calculations for both ownship and traffic aircraft states until a new wind vector is set. This is useful for scenarios where wind data is unavailable or not relevant. ```javascript daa.setNoWind(); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.