ICAROUS
|
#include <CDII.h>
Public Member Functions | |
CDII () | |
CDIICore const & | getCore () const |
double | getDistance (const std::string &units) const |
double | getHeight (const std::string &units) const |
void | setDistance (double distance, const std::string &units) |
void | setHeight (double height, const std::string &units) |
double | getFilterTime () |
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 | conflictBetween (double start, double end) const |
bool | detection (const Plan &ownship, const Plan &traffic, double startT, double endT, bool interpolateVirtuals) |
bool | detection (const Plan &ownship, const Plan &traffic, double startT, double endT) |
bool | detectionExtended (const Plan &ownship, const Plan &traffic, double startT, double endT, bool interpolateVirtuals) |
bool | detectionExtended (const Plan &ownship, const Plan &traffic, double startT, double endT) |
void | setCoreDetectionPtr (const Detection3D *c) |
void | setCoreDetectionRef (const Detection3D &c) |
Detection3D * | getCoreDetectionPtr () const |
Detection3D & | getCoreDetectionRef () const |
bool | hasError () const |
bool | hasMessage () const |
std::string | getMessage () |
std::string | getMessageNoClear () const |
Static Public Member Functions | |
static CDII | make (double distance, const std::string &dUnits, double height, const std::string &hUnits) |
static CDII | mk (double distance, double height) |
Private Member Functions | |
CDII (double distance, double height) | |
double | getDistance () const |
double | getHeight () const |
void | setDistance (double distance) |
void | setHeight (double height) |
Private Attributes | |
CDIICore | cdii_core |
ErrorLog | error |
This class implements the algorithm for conflict detection between an ownship and a traffic aircraft, where the trajectories of both aircraft are 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.
When using the object method, all method getTimeIn(), etc, assume that the detection() method has been called first.
Usage: CDII.detection(ownship,traffic,B,T)
If there are long legs in the ownship Plan, then it is prudent to call
PlanUtil.interpolateVirtuals(ownship, Units.from("NM",0.1) ,0 , Tinfinity);
before the detection call.
|
private |
Create a new conflict detection (intent information for both the ownship and traffic) object.
distance | the minimum horizontal separation distance [m] |
height | the minimum vertical separation height [m]. |
larcfm::CDII::CDII | ( | ) |
Create a new conflict detection (intent information for both the ownship and traffic) object.
bool larcfm::CDII::conflict | ( | ) | const |
Returns if there were any conflicts
bool larcfm::CDII::conflictBetween | ( | double | start, |
double | end | ||
) | const |
Is there a conflict at any time in the interval from start to end (inclusive). This method assumes that the detection() method has been called first.
start | the time to begin looking for conflicts [s] |
end | the time to end looking for conflicts [s] |
bool larcfm::CDII::detection | ( | const Plan & | ownship, |
const Plan & | traffic, | ||
double | startT, | ||
double | endT, | ||
bool | interpolateVirtuals | ||
) |
Returns if there is a conflict between two aircraft: the ownship and the traffic aircraft.
ownship | the trajectory intent of the ownship |
traffic | the trajectory intent of the traffic |
startT | the time, in [s], to start looking for conflicts. This can be 0.0. |
endT | the time, in [s], to end looking for conflicts (absolute time) |
Note: If the aircraft are in loss of separation at time startT, the time in reported for that conflict will be startT.
bool larcfm::CDII::detectionExtended | ( | const Plan & | ownship, |
const Plan & | traffic, | ||
double | startT, | ||
double | endT, | ||
bool | interpolateVirtuals | ||
) |
Returns if there is a conflict between two aircraft: the ownship and the traffic aircraft. This version can be less efficient than the normal detection() call, but all reported conflict time in and time out values will not be constrained to be within the lookahead times used.
ownship | the trajectory intent of the ownship |
traffic | the trajectory intent of the traffic |
startT | the time, in [s], to start looking for conflicts. This can be 0.0. |
endT | the time, in [s], to end looking for conflicts (absolute time) |
Note: All time in and time out data reported will be accurate within the length of the given plans.
|
virtual |
Return a pointer to this object's Detection3D instance.
Implements larcfm::Detection3DAcceptor.
|
virtual |
Return a reference to this object's Detection3D instance.
Implements larcfm::Detection3DAcceptor.
|
private |
Returns the minimum horizontal separation distance in [m]
double larcfm::CDII::getDistance | ( | const std::string & | units | ) | const |
Returns the minimum horizontal separation distance in the given units
double larcfm::CDII::getFilterTime | ( | ) |
Returns the conflict detection filter time.
|
private |
Returns the minimum vertical separation distance in [m]
double larcfm::CDII::getHeight | ( | const std::string & | units | ) | const |
Returns the minimum vertical separation distance in the given units
|
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.
Implements larcfm::ErrorReporter.
|
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.)
Implements larcfm::ErrorReporter.
int larcfm::CDII::getSegmentIn | ( | int | i | ) | const |
Returns the segment number of the entry into a conflict from the ownship aircraft's flight plan. If there was not a conflict, then this value is meaningless.
i | the i-th conflict, must be between 0..size()-1 |
int larcfm::CDII::getSegmentOut | ( | int | i | ) | const |
Returns the segment number of the exit from a conflict from the ownship aircraft's flight plan. If there was not a conflict, then this value is meaningless.
i | the i-th conflict, must be between 0..size()-1 |
double larcfm::CDII::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.
i | the i-th conflict, must be between 0..size()-1 |
double larcfm::CDII::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.
i | the i-th conflict, must be between 0..size()-1 |
|
inlinevirtual |
|
inlinevirtual |
Does this object have an error or a warning?
Implements larcfm::ErrorReporter.
|
static |
Factory method for cylindrical detection
distance | |
dUnits | |
height | |
hUnits |
|
static |
Factory method for cylindrical detection
distance | |
dUnits | |
height | |
hUnits |
|
virtual |
Experimental. You are responsible for deleting c after this call.
Implements larcfm::Detection3DAcceptor.
|
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.
|
private |
Sets the minimum horizontal separation distance in [m]
void larcfm::CDII::setDistance | ( | double | distance, |
const std::string & | units | ||
) |
Sets the minimum horizontal separation distance in the specified units
void larcfm::CDII::setFilterTime | ( | double | cdfilter | ) |
Sets the conflict detection filter time.
cdfilter | the conflict detection filter time in seconds. |
|
private |
Sets the minimum vertical separation distance in [m]
void larcfm::CDII::setHeight | ( | double | height, |
const std::string & | units | ||
) |
Sets the minimum vertical separation distance in the specified units
int larcfm::CDII::size | ( | ) | const |
Returns the number of conflicts