ICAROUS
All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Modules Pages
Public Member Functions | List of all members
larcfm::KinematicBands Class Reference

#include <KinematicBands.h>

Inheritance diagram for larcfm::KinematicBands:
larcfm::KinematicMultiBands larcfm::ErrorReporter larcfm::GenericStateBands larcfm::GenericBands

Public Member Functions

 KinematicBands (const Detection3D *detector)
 
 KinematicBands ()
 
 KinematicBands (const KinematicBands &b)
 
virtual void setLookaheadTime (double t)
 
double getAlertingTime () const
 
void setAlertingTime (double t)
 
void setCoreDetection (const Detection3D *detector)
 
- Public Member Functions inherited from larcfm::KinematicMultiBands
 KinematicMultiBands (const KinematicBandsParameters &parameters)
 
 KinematicMultiBands ()
 
 KinematicMultiBands (const KinematicMultiBands &b)
 
KinematicMultiBandsoperator= (const KinematicMultiBands &b)
 
TrafficState const & getOwnship () const
 
void setOwnship (const TrafficState &own)
 
void setOwnship (const std::string &id, const Position &p, const Velocity &v)
 
void setOwnship (const std::string &id, const Position &p, const Velocity &v, double time)
 
void setOwnship (const Position &p, const Velocity &v)
 
void setTraffic (const std::vector< TrafficState > &traffic)
 
std::vector< TrafficState > const & getTraffic () const
 
bool hasOwnship () const
 
bool hasTraffic () const
 
void addTraffic (const TrafficState &ac)
 
void addTraffic (const std::string &id, const Position &pi, const Velocity &vi)
 
void addTraffic (const Position &pi, const Velocity &vi)
 
void setAlertor (const AlertLevels &alertor)
 
void setKinematicBandsParameters (const KinematicBandsParameters &parameters)
 
double getRecoveryStabilityTime () const
 
double getRecoveryStabilityTime (const std::string &u) const
 
void setRecoveryStabilityTime (double t)
 
void setRecoveryStabilityTime (double t, const std::string &u)
 
double getMinHorizontalRecovery () const
 
double getMinHorizontalRecovery (const std::string &u) const
 
void setMinHorizontalRecovery (double val)
 
void setMinHorizontalRecovery (double val, const std::string &u)
 
double getMinVerticalRecovery () const
 
double getMinVerticalRecovery (const std::string &u) const
 
void setMinVerticalRecovery (double val)
 
void setMinVerticalRecovery (double val, const std::string &u)
 
bool isEnabledCollisionAvoidanceBands () const
 
void setCollisionAvoidanceBands (bool flag)
 
void enableCollisionAvoidanceBands ()
 
void disableCollisionAvoidanceBands ()
 
double getCollisionAvoidanceBandsFactor ()
 
void setCollisionAvoidanceBandsFactor (double val)
 
const TrafficStategetMostUrgentAircraft () const
 
void setMostUrgentAircraft (const TrafficState &ac)
 
void setMostUrgentAircraft (const std::string &id)
 
bool isEnabledConflictCriteria () const
 
void setConflictCriteria (bool flag)
 
void enableConflictCriteria ()
 
void disableConflictCriteria ()
 
bool isEnabledRecoveryCriteria () const
 
void setRecoveryCriteria (bool flag)
 
void enableRecoveryCriteria ()
 
void disableRecoveryCriteria ()
 
void setRepulsiveCriteria (bool flag)
 
void enableRepulsiveCriteria ()
 
void disableRepulsiveCriteria ()
 
void setRecoveryBands (bool flag)
 
void enableRecoveryBands ()
 
void disableRecoveryBands ()
 
double getLeftTrack ()
 
double getLeftTrack (const std::string &u)
 
double getRightTrack ()
 
double getRightTrack (const std::string &u)
 
void setLeftTrack (double val)
 
void setLeftTrack (double val, const std::string &u)
 
void setRightTrack (double val)
 
void setRightTrack (double val, const std::string &u)
 
void setMinMaxTrack (double min, double max)
 
void setMinMaxTrack (double min, double max, const std::string &u)
 
double getTrackStep () const
 
double getTrackStep (const std::string &u) const
 
void setTrackStep (double val)
 
void setTrackStep (double val, const std::string &u)
 
double getBankAngle () const
 
double getBankAngle (const std::string &u) const
 
void setBankAngle (double val)
 
void setBankAngle (double val, const std::string &u)
 
double getTurnRate () const
 
double getTurnRate (const std::string &u) const
 
void setTurnRate (double val)
 
void setTurnRate (double val, const std::string &u)
 
bool isEnabledRecoveryTrackBands () const
 
void setRecoveryTrackBands (bool flag)
 
double getMinGroundSpeed ()
 
double getMinGroundSpeed (const std::string &u)
 
void setMinGroundSpeed (double val)
 
void setMinGroundSpeed (double val, const std::string &u)
 
double getMaxGroundSpeed ()
 
double getMaxGroundSpeed (const std::string &u)
 
void setMaxGroundSpeed (double val)
 
void setMaxGroundSpeed (double val, const std::string &u)
 
void setBelowAboveGroundSpeed (double below, double above)
 
void setBelowAboveGroundSpeed (double below, double above, const std::string &u)
 
double getGroundSpeedStep () const
 
double getGroundSpeedStep (const std::string &u) const
 
void setGroundSpeedStep (double val)
 
void setGroundSpeedStep (double val, const std::string &u)
 
double getHorizontalAcceleration () const
 
double getHorizontalAcceleration (const std::string &u) const
 
void setHorizontalAcceleration (double val)
 
void setHorizontalAcceleration (double val, const std::string &u)
 
bool isEnabledRecoveryGroundSpeedBands ()
 
void setRecoveryGroundSpeedBands (bool flag)
 
double getMinVerticalSpeed ()
 
double getMinVerticalSpeed (const std::string &u)
 
void setMinVerticalSpeed (double val)
 
void setMinVerticalSpeed (double val, const std::string &u)
 
double getMaxVerticalSpeed ()
 
double getMaxVerticalSpeed (const std::string &u)
 
void setMaxVerticalSpeed (double val)
 
void setMaxVerticalSpeed (double val, const std::string &u)
 
void setBelowAboveVerticalSpeed (double below, double above)
 
void setBelowAboveVerticalSpeed (double below, double above, const std::string &u)
 
double getVerticalSpeedStep () const
 
double getVerticalSpeedStep (const std::string &u) const
 
void setVerticalSpeedStep (double val)
 
void setVerticalSpeedStep (double val, const std::string &u)
 
double getVerticalAcceleration () const
 
double getVerticalAcceleration (const std::string &u) const
 
void setVerticalAcceleration (double val)
 
void setVerticalAcceleration (double val, const std::string &u)
 
bool isEnabledRecoveryVerticalSpeedBands ()
 
void setRecoveryVerticalSpeedBands (bool flag)
 
double getMinAltitude ()
 
double getMinAltitude (const std::string &u)
 
void setMinAltitude (double val)
 
void setMinAltitude (double val, const std::string &u)
 
double getMaxAltitude ()
 
double getMaxAltitude (const std::string &u)
 
void setMaxAltitude (double val)
 
void setMaxAltitude (double val, const std::string &u)
 
void setBelowAboveAltitude (double below, double above)
 
void setBelowAboveAltitude (double below, double above, const std::string &u)
 
double getAltitudeStep () const
 
double getAltitudeStep (const std::string &u) const
 
void setAltitudeStep (double val)
 
void setAltitudeStep (double val, const std::string &u)
 
double getVerticalRate () const
 
double getVerticalRate (const std::string &u) const
 
void setVerticalRate (double val)
 
void setVerticalRate (double val, const std::string &u)
 
double getHorizontalNMAC () const
 
double getHorizontalNMAC (const std::string &u) const
 
double getVerticalNMAC () const
 
double getVerticalNMAC (const std::string &u) const
 
void setHorizontalNMAC (double val)
 
void setHorizontalNMAC (double val, const std::string &u)
 
void setVerticalNMAC (double val)
 
void setVerticalNMAC (double val, const std::string &u)
 
bool isEnabledRecoveryAltitudeBands ()
 
void setRecoveryAltitudeBands (bool flag)
 
void clear ()
 
std::vector< TrafficState > const & conflictAircraft (int alert_level)
 
Interval const & timeIntervalOfViolation (int alert_level)
 
int trackLength ()
 
void forceTrackBandsComputation ()
 
Interval track (int i)
 
Interval track (int i, const std::string &u)
 
BandsRegion::Region trackRegion (int i)
 
int trackRangeOf (double trk)
 
int trackRangeOf (double trk, const std::string &u)
 
BandsRegion::Region regionOfTrack (double trk)
 
BandsRegion::Region regionOfTrack (double trk, const std::string &u)
 
double lastTimeToTrackManeuver (const TrafficState &ac)
 
double timeToTrackRecovery ()
 
std::vector< TrafficState > const & peripheralTrackAircraft (int alert_level)
 
double trackResolution (bool dir, int alert_level)
 
double trackResolution (bool dir, int alert_level, const std::string &u)
 
double trackResolution (bool dir)
 
double trackResolution (bool dir, const std::string &u)
 
bool preferredTrackDirection (int alert_level)
 
bool preferredTrackDirection ()
 
int groundSpeedLength ()
 
void forceGroundSpeedBandsComputation ()
 
Interval groundSpeed (int i)
 
Interval groundSpeed (int i, const std::string &u)
 
BandsRegion::Region groundSpeedRegion (int i)
 
int groundSpeedRangeOf (double gs)
 
int groundSpeedRangeOf (double gs, const std::string &u)
 
BandsRegion::Region regionOfGroundSpeed (double gs)
 
BandsRegion::Region regionOfGroundSpeed (double gs, const std::string &u)
 
double lastTimeToGroundSpeedManeuver (const TrafficState &ac)
 
double timeToGroundSpeedRecovery ()
 
std::vector< TrafficState > const & peripheralGroundSpeedAircraft (int alert_level)
 
double groundSpeedResolution (bool dir, int alert_level)
 
double groundSpeedResolution (bool dir, int alert_level, const std::string &u)
 
double groundSpeedResolution (bool dir)
 
double groundSpeedResolution (bool dir, const std::string &u)
 
bool preferredGroundSpeedDirection (int alert_level)
 
bool preferredGroundSpeedDirection ()
 
int verticalSpeedLength ()
 
void forceVerticalSpeedBandsComputation ()
 
Interval verticalSpeed (int i)
 
Interval verticalSpeed (int i, const std::string &u)
 
BandsRegion::Region verticalSpeedRegion (int i)
 
int verticalSpeedRangeOf (double vs)
 
int verticalSpeedRangeOf (double vs, const std::string &u)
 
BandsRegion::Region regionOfVerticalSpeed (double vs)
 
BandsRegion::Region regionOfVerticalSpeed (double vs, const std::string &u)
 
double lastTimeToVerticalSpeedManeuver (const TrafficState &ac)
 
double timeToVerticalSpeedRecovery ()
 
std::vector< TrafficState > const & peripheralVerticalSpeedAircraft (int alert_level)
 
double verticalSpeedResolution (bool dir, int alert_level)
 
double verticalSpeedResolution (bool dir, int alert_level, const std::string &u)
 
double verticalSpeedResolution (bool dir)
 
double verticalSpeedResolution (bool dir, const std::string &u)
 
bool preferredVerticalSpeedDirection (int alert_level)
 
bool preferredVerticalSpeedDirection ()
 
int altitudeLength ()
 
void forceAltitudeBandsComputation ()
 
Interval altitude (int i)
 
Interval altitude (int i, const std::string &u)
 
BandsRegion::Region altitudeRegion (int i)
 
int altitudeRangeOf (double alt)
 
int altitudeRangeOf (double alt, const std::string &u)
 
BandsRegion::Region regionOfAltitude (double alt)
 
BandsRegion::Region regionOfAltitude (double alt, const std::string &u)
 
double lastTimeToAltitudeManeuver (const TrafficState &ac)
 
double timeToAltitudeRecovery ()
 
std::vector< TrafficState > const & peripheralAltitudeAircraft (int alert_level)
 
double altitudeResolution (bool dir, int alert_level)
 
double altitudeResolution (bool dir, int alert_level, const std::string &u)
 
double altitudeResolution (bool dir)
 
double altitudeResolution (bool dir, const std::string &u)
 
bool preferredAltitudeDirection (int alert_level)
 
bool preferredAltitudeDirection ()
 
int alerting (const TrafficState &ac, int turning, int accelerating, int climbing)
 
std::string toString () const
 
std::string outputStringInfo ()
 
std::string outputStringAlerting ()
 
std::string outputStringTrackBands ()
 
std::string outputStringGroundSpeedBands ()
 
std::string outputStringVerticalSpeedBands ()
 
std::string outputStringAltitudeBands ()
 
std::string outputStringLastTimeToManeuver ()
 
std::string outputString ()
 
std::string toPVS (int precision)
 
void linearProjection (double offset)
 
bool hasError () const
 
bool hasMessage () const
 
std::string getMessage ()
 
std::string getMessageNoClear () const
 
double getLookaheadTime () const
 
double getLookaheadTime (const std::string &u) const
 
void setLookaheadTime (double t, const std::string &u)
 
bool isLatLon () const
 
- Public Member Functions inherited from larcfm::GenericBands
virtual double getMaxGroundSpeed (const std::string &unit) const =0
 
virtual double getMaxVerticalSpeed (const std::string &unit) const =0
 

Additional Inherited Members

- Public Attributes inherited from larcfm::KinematicMultiBands
KinematicBandsCore core_
 
KinematicTrkBands trk_band_
 
KinematicGsBands gs_band_
 
KinematicVsBands vs_band_
 
KinematicAltBands alt_band_
 
- Protected Member Functions inherited from larcfm::KinematicMultiBands
void reset ()
 
- Protected Attributes inherited from larcfm::KinematicMultiBands
ErrorLog error
 

Detailed Description

Objects of class "KinematicMultiBands" compute the conflict bands using kinematic single-maneuver projections of the ownship and linear preditions of (multiple) traffic aircraft positions. The bands consist of ranges of guidance maneuvers: track angles, ground speeds, vertical speeds, and altitude.

An assumption of the bands information is that the traffic aircraft do not maneuver. If the ownship immediately executes a NONE guidance maneuver, then the new path is conflict free (within a lookahead time of the parameter). If the ownship immediately executes a NEAR guidance maneuver and no traffic aircraft maneuvers, then there will be a loss of separation within the lookahead time.

If recovery bands are set via setRecoveryBands() and the ownship is in a violation path, loss of separation recovery bands and recovery times are computed for each type of maneuver. If the ownship immediately executes a RECOVERY guidance maneuver, then the new path is conflict-free after the recovery time. Furthermore, the recovery time is the minimum time for which there exists a kinematic conflict-free maneuver in the future.

Note that in the case of geodetic coordinates this version of bands performs an internal projection of the coordinates and velocities into the Euclidean frame (see Util/Projection). Accuracy may be reduced if the traffic plans involve any segments longer than Util.Projection.projectionConflictRange(lat,acc), and an error will be logged if the distance between traffic and ownship exceeds Util.Projection.projectionMaxRange() at any point in the lookahead range.

Disclaimers: The formal proofs of the core algorithms use real numbers, however these implementations use floating point numbers, so numerical differences could result. In addition, the geodetic computations include certain inaccuracies, especially near the poles.

The basic usage is

KinematicBands b(..with configuration parameters..);
b.clear();
b.setOwnship(position of ownship, velocity of ownship);
b.addTraffic(position of (one) traffic aircraft, velocity of traffic);
b.addTraffic(position of (another) traffic aircraft, velocity of traffic);
...add other traffic aircraft...

for (int i = 0; i < b.trackLength(); i++ ) {  
   intrval = b.track(i);
   lower_ang = intrval.low;
   upper_ang = intrval.up;
   regionType = b.trackRegion(i);
   ..do something with this information..
} 

...similar for ground speed and vertical speed...

When any "parameter" to this class is set (separation distance, lookahead time, positions in latitude/longitude, etc.), all previous bands information is cleared, though unlike instantaneous-maneuver bands, ownship and traffic state data is preserved in KineamaticBands unless explicitly cleared.
For more complete example usage see the file Batch.java.

Kinematic bands also have a set of "step size" parameters that determine the granularity of the search. TrackStep indicates the maximum track resolution, GroundSpeedStep for ground speed, and VerticalSpeedStep for vertical speed. These determine the output granularity, for example, if TrackStep is set to 1 degree, bands will be in 1 degree increments.

If the detection calculations discover a maneuver will cause the ownship to enter an intruder's protected zone (e.g. a loss of separation, RA), then all further maneuvers in that direction will be marked with a "near" band. An example of this is if the ownship is moving with a track of 20 deg, and a turn to the right would cause a loss of separation at the 50 deg point, then the "near" bands for track will at least contain the range of approximately 50-200 degrees (current track +180 deg, +/- the trackStep).

Note that Bands outputs hold within a given (constant) frame of reference, with the default being against a stationary Earth (i.e. GPS coordinates and velocities). This means that if bands are instead given wind-oriented input data (airspeed and yaw-heading) for all aircraft, then the output maneuvers will be in the same frame of reference: "groundSpeed" bands should then be read as "airSpeed" bands, and "track" should be read as "heading".

Altitude bands assume assume an immediate maneuver to a given vertical speed, with a level off maneuver to various altitudes (based on altitudeStep, for example, every 500 ft). "NONE" bands here indicate no conflict during or immediately following such a maneuver, assuming all traffic aircraft continue at a constant velocity. "NEAR" bands indicate either a loss of separation during the climb/descent or a conflict after leveling off to that altitude.

Constructor & Destructor Documentation

◆ KinematicBands() [1/3]

larcfm::KinematicBands::KinematicBands ( const Detection3D detector)

Construct a KinematicBands with default parameters. The initial state detector is specified by the parameters.

Parameters
detectorState detector

◆ KinematicBands() [2/3]

larcfm::KinematicBands::KinematicBands ( )

Construct a KinematicBands object with default values for configuration parameters. The default state detector is cylinder.

◆ KinematicBands() [3/3]

larcfm::KinematicBands::KinematicBands ( const KinematicBands b)

Construct a KinematicBands object from an existing KinematicBands object. This copies all traffic data.

Member Function Documentation

◆ getAlertingTime()

double larcfm::KinematicBands::getAlertingTime ( ) const
Returns
alerting time in seconds. This is the first time prior to a violation when bands are computed.

◆ setAlertingTime()

void larcfm::KinematicBands::setAlertingTime ( double  t)

Sets alerting time in seconds. This is the first time prior to a violation when bands are computed.

◆ setCoreDetection()

void larcfm::KinematicBands::setCoreDetection ( const Detection3D detector)

Experimental. Set the underlying Detection3D object that will be used to determine conflicts. This will also clear any results (but not traffic info).

◆ setLookaheadTime()

virtual void larcfm::KinematicBands::setLookaheadTime ( double  t)
virtual

Sets lookahead time in seconds. This is the time horizon used to compute bands.

Reimplemented from larcfm::KinematicMultiBands.


The documentation for this class was generated from the following file: