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

#include <CDSI.h>

Inheritance diagram for larcfm::CDSI:
larcfm::ErrorReporter larcfm::Detection3DAcceptor

Public Member Functions

double getFilterTime () const
 
void setFilterTime (double cdfilter)
 
int size () const
 
bool conflict () const
 
double getTimeIn (int i) const
 
double getTimeOut (int i) const
 
int getSegmentIn (int i) const
 
int getSegmentOut (int i) const
 
double getCriticalTime (int i) const
 
double getDistanceAtCriticalTime (int i) const
 
bool detectionXYZ (double sx, double sy, double sz, double vx, double vy, double vz, double t0, double horizon, const Plan &intent, double startT, double endT)
 
bool detectionLL (double lat, double lon, double alt, double trk, double gs, double vs, double t0, double horizon, const Plan &intent, double startT, double endT)
 
void setCoreDetectionPtr (const Detection3D *c)
 
void setCoreDetectionRef (const Detection3D &c)
 
Detection3DgetCoreDetectionPtr () const
 
Detection3DgetCoreDetectionRef () const
 
bool hasError () const
 
bool hasMessage () const
 
std::string getMessage ()
 
std::string getMessageNoClear () const
 

Static Public Member Functions

static CDSI make (double distance, const std::string &dStr, double height, const std::string &hStr)
 
static CDSI make (Detection3D *cd)
 
static CDSI mk (double distance, double height)
 

Private Member Functions

 CDSI (double distance, double height)
 
 CDSI (Detection3D *cd)
 
double getDistance () const
 
double getHeight () const
 
void setDistance (double distance)
 
void setHeight (double height)
 

Private Attributes

CDSICore core
 
ErrorLog error
 

Detailed Description

This class implements the algorithm for conflict detection between an ownship (modeled with a state vector) and a traffic aircraft trajectory (modeled with intent information).

This class can be used two ways: through an object or through a static method. The static method approach has the advantage that an object does not need to be created. The object approach has the advantage that more information is available. Specifically, the start and end times for every conflict are available in the object approach.

In addition, for each of these types of use, the aircraft can be specified in two different coordinate systems: a Euclidean space and a latitude and longitude reference frame.

Constructor & Destructor Documentation

◆ CDSI() [1/2]

larcfm::CDSI::CDSI ( double  distance,
double  height 
)
private

Create a new conflict detection (state information for the ownship and intent information for the traffic) object.

Parameters
distancethe minimum horizontal separation distance [nmi]
heightthe minimum vertical separation height [ft].

◆ CDSI() [2/2]

larcfm::CDSI::CDSI ( Detection3D cd)
explicitprivate

Create a new conflict detection (state information for the ownship and intent information for the traffic) object.

Parameters
distancethe minimum horizontal separation distance [nmi]
heightthe minimum vertical separation height [ft].

Member Function Documentation

◆ conflict()

bool larcfm::CDSI::conflict ( ) const

Returns if there were any conflicts

◆ detectionLL()

bool larcfm::CDSI::detectionLL ( double  lat,
double  lon,
double  alt,
double  trk,
double  gs,
double  vs,
double  t0,
double  horizon,
const Plan intent,
double  startT,
double  endT 
)

Returns if there is a conflict between two aircraft: the state aircraft and the intent aircraft. The state aircraft is assumed to move linearly from it position. The intent aircraft is assumed to move according to the given flight plan. Both aircraft are assumed to be represented in a latitude/longitude reference frame.

Parameters
latthe latitude of the state aircraft in [deg]
lonthe longitude of the state aircraft in [deg]
altthe altitude of the state aircraft in [feet]
trkthe track angle of the velocity of the state aircraft in [deg from true north]
gsthe ground speed of velocity of the state aircraft in [knot]
vsthe vertical speed of velocity of the state aircraft in [ft/min]
t0the time, in [s], of the state aircraft when located at (lat, lon, alt). This can be 0.0 to represent "now"
horizonthe maximum amount of time after t0 that the position of the state aircraft's position can be predicted
intentthe flight plan of the intent aircraft
startTthe time, in [s], to start looking for conflicts relative to t0. This can be 0.0.
endTthe time, in [s], to end looking for conflicts relative to t0
Returns
true if there is a conflict

◆ detectionXYZ()

bool larcfm::CDSI::detectionXYZ ( double  sx,
double  sy,
double  sz,
double  vx,
double  vy,
double  vz,
double  t0,
double  horizon,
const Plan intent,
double  startT,
double  endT 
)

Returns if there is a conflict between two aircraft: the state aircraft and the intent aircraft. The state aircraft is assumed to move linearly from it position. The intent aircraft is assumed to move according to the given flight plan. Both aircraft are assumed to be represented in a cartesian reference frame.

Parameters
sxthe x position of the state aircraft in [nmi]
sythe y position of the state aircraft in [nmi]
szthe z position of the state aircraft in [feet]
vxthe x component of velocity of the state aircraft in [knot]
vythe y component of velocity of the state aircraft in [knot]
vzthe z component of velocity of the state aircraft in [ft/min]
t0the time, in [s], of the state aircraft when located at (sx,sy,sz). This can be 0.0 to represent "now"
horizonthe maximum amount of time after t0 that the position of the state aircraft's position can be predicted
intentthe flight plan of the intent aircraft
startTthe time, in [s], to start looking for conflicts relative to t0. This can be 0.0.
endTthe time, in [s], to end looking for conflicts relative to t0
Returns
true if there is a conflict

◆ getCoreDetectionPtr()

Detection3D * larcfm::CDSI::getCoreDetectionPtr ( ) const
virtual

Return a pointer to this object's Detection3D instance.

Implements larcfm::Detection3DAcceptor.

◆ getCoreDetectionRef()

Detection3D & larcfm::CDSI::getCoreDetectionRef ( ) const
virtual

Return a reference to this object's Detection3D instance.

Implements larcfm::Detection3DAcceptor.

◆ getDistance()

double larcfm::CDSI::getDistance ( ) const
private

Returns the minimum horizontal separation distance in [m]

◆ getFilterTime()

double larcfm::CDSI::getFilterTime ( ) const

Returns the conflict detection filter time.

Returns
the conflict detection filter time seconds

◆ getHeight()

double larcfm::CDSI::getHeight ( ) const
private

Returns the minimum vertical separation distance in [m]

◆ getMessage()

std::string larcfm::CDSI::getMessage ( )
inlinevirtual

Return a string representation of any errors or warnings. Calling this method will clear any messages and reset both the error and warning status to none.

Returns
error and warning messages. If there are no messages, an empty string is returned.

Implements larcfm::ErrorReporter.

◆ getMessageNoClear()

std::string larcfm::CDSI::getMessageNoClear ( ) const
inlinevirtual

Return a string representation of any errors or warnings. Calling this method will not clear the error or warning status (i.e., hasError() will return the same value before and after this call.)

Returns
error and warning messages. If there are no messages, an empty string is returned.

Implements larcfm::ErrorReporter.

◆ getSegmentIn()

int larcfm::CDSI::getSegmentIn ( int  i) const

Returns the segment number of the entry into a conflict from the traffic aircraft's flight plan. If there was not a conflict, then this value is meaningless.

Parameters
ithe i-th conflict, must be between 0..size()-1

◆ getSegmentOut()

int larcfm::CDSI::getSegmentOut ( int  i) const

Returns the segment number of the exit from a conflict from the traffic aircraft's flight plan. If there was not a conflict, then this value is meaningless.

Parameters
ithe i-th conflict, must be between 0..size()-1

◆ getTimeIn()

double larcfm::CDSI::getTimeIn ( int  i) const

Returns the start time of the conflict in [s]. This value is in absolute time. If there was not a conflict, then this value is meaningless.

Parameters
ithe i-th conflict, must be between 0..size()-1

◆ getTimeOut()

double larcfm::CDSI::getTimeOut ( int  i) const

Returns the end time of the conflict in [s]. This value is in absolute time. If there was not a conflict, then this value is meaningless.

Parameters
ithe i-th conflict, must be between 0..size()-1

◆ hasError()

bool larcfm::CDSI::hasError ( ) const
inlinevirtual

Does this object have an error?

Returns
true if there is an error.

Implements larcfm::ErrorReporter.

◆ hasMessage()

bool larcfm::CDSI::hasMessage ( ) const
inlinevirtual

Does this object have an error or a warning?

Returns
true if there is an error or warning.

Implements larcfm::ErrorReporter.

◆ make()

CDSI larcfm::CDSI::make ( double  distance,
const std::string &  dUnits,
double  height,
const std::string &  hUnits 
)
static

Create a new CDSI conflict detection object using specified units.

Parameters
distancethe minimum horizontal separation distance [dStr]
heightthe minimum vertical separation height [hStr].

Create a new state-based conflict detection object using specified units.

Parameters
distancethe minimum horizontal separation distance [hStr]
heightthe minimum vertical separation height [dStr].

◆ mk()

CDSI larcfm::CDSI::mk ( double  distance,
double  height 
)
static

Create a new CDSI conflict detection object using internal units.

Parameters
distancethe minimum horizontal separation distance [m]
heightthe minimum vertical separation height [m].

Create a new state-based conflict detection object using internal units.

Parameters
distancethe minimum horizontal separation distance [m]
heightthe minimum vertical separation height [m].

◆ setCoreDetectionPtr()

void larcfm::CDSI::setCoreDetectionPtr ( const Detection3D c)
virtual

Experimental. You are responsible for deleting c after this call.

Implements larcfm::Detection3DAcceptor.

◆ setCoreDetectionRef()

void larcfm::CDSI::setCoreDetectionRef ( const Detection3D cd)
virtual

Apply a deep copy of the referenced Detection3D object to this object at the lowest level. The user is responsible for cleaning up the original instance.

Implements larcfm::Detection3DAcceptor.

◆ setDistance()

void larcfm::CDSI::setDistance ( double  distance)
private

Sets the minimum horizontal separation distance in [m]

◆ setFilterTime()

void larcfm::CDSI::setFilterTime ( double  cdfilter)

Sets the conflict detection filter time.

Parameters
cdfilterthe conflict detection filter time in seconds.

◆ setHeight()

void larcfm::CDSI::setHeight ( double  height)
private

Sets the minimum vertical separation distance in [m]

◆ size()

int larcfm::CDSI::size ( ) const

Returns the number of conflicts


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