ICAROUS
|
#include <IntentBandsCore.h>
Public Member Functions | |
IntentBandsCore (double D, double H, double B, double T, double max_gs, double max_vs) | |
IntentBandsCore () | |
void | setTime (double t) |
double | getTime () const |
double | getStartTime () const |
void | setTimeRange (double b, double t) |
void | setDiameter (double d) |
double | getDiameter () const |
void | setHeight (double h) |
double | getHeight () const |
void | setMaxGroundSpeed (double gs) |
double | getMaxGroundSpeed () const |
void | setMaxVerticalSpeed (double vs) |
double | getMaxVerticalSpeed () const |
virtual void | setTrackTolerance (double trk) |
virtual double | getTrackTolerance () const |
virtual void | setGroundSpeedTolerance (double gs) |
virtual double | getGroundSpeedTolerance () const |
virtual void | setVerticalSpeedTolerance (double vs) |
virtual double | getVerticalSpeedTolerance () const |
void | addTraffic (const Vect3 &so3, const Velocity &vo3, double to, const Plan &fp) |
void | addTrafficLL (double lat, double lon, double alt, const Velocity &vo, double to, const Plan &fp) |
void | clear () |
const IntervalSet & | trackBands () const |
const IntervalSet & | groundSpeedBands () const |
const IntervalSet & | verticalSpeedBands () const |
IntervalSet | calcTrkBands (const Vect3 &so3, const Velocity &vo3, double to, const Plan &fp) const |
IntervalSet | calcTrkBandsLL (double lat, double lon, double alt, const Velocity &vo, double to, const Plan &fp) const |
IntervalSet | calcGsBands (const Vect3 &so3, const Velocity &vo3, double to, const Plan &fp) const |
IntervalSet | calcGsBandsLL (double lat, double lon, double alt, const Velocity &vo, double to, const Plan &fp) const |
IntervalSet | calcVsBands (const Vect3 &so3, const Velocity &vo3, double to, const Plan &fp) const |
IntervalSet | calcVsBandsLL (double lat, double lon, double alt, const Velocity &vo, double to, const Plan &fp) const |
void | clearNarrowBands () |
void | clearBreaks () |
std::string | toString () const |
Private Member Functions | |
void | init (double D, double H, double B, double T, double max_gs, double max_vs) |
void | pln (std::string str) const |
void | p (std::string str) const |
Private Attributes | |
IntervalSet | trk_regions |
IntervalSet | gs_regions |
IntervalSet | vs_regions |
double | D |
double | H |
double | B |
double | T |
double | max_gs |
double | max_vs |
double | trkTol |
double | gsTol |
double | vsTol |
Static Private Attributes | |
static bool | allowVariableProtectionZones = true |
Objects of class "IntentBandsCore" compute the conflict prevention bands using linear state-based predictions of ownship and (multiple) traffic aircraft positions. This class is closely related to "Bands;" however, this class presumes the use of "internal" units and Cartesian coordinates, therefore it is most appropriate for building algorithms that include prevention band information. For a more "user-friendly" version, try the TripleBands class.
The bands consist of ranges of guidance maneuvers: track angles, ground speeds, and vertical speeds. If a path is (immediately) taken that is within one these bands and no traffic aircraft maneuvers, then a loss of separation will occur within the specified lookahead time. Implicitly, any path that is not in a band does not have a loss of separation within the lookahead time.
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. The output velocity values have NOT had the inverse projection performed on them!
Disclaimers: Only parts of these algorithms have been formally verified. We plan to advance the formal verification, but it is currently not complete. Even with a 'complete' verification, there will still be certain assumptions. For instance, the formal proofs use real numbers while these implementations use floating point numbers, so numerical differences could result. In addition, the geodesic computations include certain inaccuracies, especially near the poles.
The basic usages is
Bands b(..with configuration parameters..); b.clear(); b.addTraffic(relative position of ownship and traffic, velocity of ownship, velocity of one traffic aircraft); b.addTraffic(relative position of ownship and traffic, velocity of ownship, velocity of one traffic aircraft); ...add other traffic aircraft... IntervalSet track_bands = b.trackBands(trk); IntervalSet ground_speed_bands = b.groundSpeedBands(gs); IntervalSet vertical_speed_bands = b.verticalSpeedBands(vs);
When any "parameter" to this class is set (lookahead time, etc.), any previous bands information is cleared; therefore, all traffic aircraft must be added after the parameters are configured.
IntentBandsCore::IntentBandsCore | ( | double | D, |
double | H, | ||
double | B, | ||
double | T, | ||
double | max_gs, | ||
double | max_vs | ||
) |
Construct an IntentBandsCore object with the given configuration parameters. The bands always begin as "empty" bands: green track bands from 0 to 2pi, green ground speed bands from 0 to max_gs, and green vertical speed bands from -max_vs to max_vs.
D | the minimum horizontal separation distance |
H | the minimum vertical separation distance |
B | the lookahead range start |
T | the lookahead range end |
max_gs | the maximum ground speed that is output by IntentBandsCore, the minimum is 0. |
max_vs | the range of vertical speeds is -max_vs to max_vs [feet/min] |
IntentBandsCore::IntentBandsCore | ( | ) |
Construct a IntentBandsCore object with default values for configuration parameters.
void IntentBandsCore::addTraffic | ( | const Vect3 & | so3, |
const Velocity & | vo3, | ||
double | to, | ||
const Plan & | fp | ||
) |
Compute the conflict prevention band information for one ownship/traffic aircraft pair and add this information to any existing band information. For a collection of "band" information to make sense, all ownship aircraft must be the same. All parameters are in cartesian coordinates in "internal" units.
so | the position of the ownship aircraft at time to |
vo | the velocity of the ownship at time to |
to | (absolute) time of ownship |
fp | intruder flight plan (in XYZ coords) |
void IntentBandsCore::addTrafficLL | ( | double | lat, |
double | lon, | ||
double | alt, | ||
const Velocity & | vo, | ||
double | to, | ||
const Plan & | fp | ||
) |
Compute the conflict prevention band information for one ownship/traffic aircraft pair and add this information to any existing band information. For a collection of "band" information to make sense, all ownship aircraft must be the same. All parameters are in latlon coordinates in "internal" units.
lat | latitude of the ownship aircraft at time to |
lon | longitude of the ownship aircraft at time to |
alt | altitude of the ownship aircraft at time to |
vo | the velocity of the ownship at time to |
to | (absolute) time of ownship |
fp | intruder flight plan (in XYZ coords) |
IntervalSet IntentBandsCore::calcGsBands | ( | const Vect3 & | so3, |
const Velocity & | vo3, | ||
double | to, | ||
const Plan & | fp | ||
) | const |
This method computes the conflict bands for ground speed for the given aircraft pair. This method is nearly static, it only relies on the configuration parameters for the class (diameter, time, maximum gs, etc.)
IntervalSet IntentBandsCore::calcGsBandsLL | ( | double | lat, |
double | lon, | ||
double | alt, | ||
const Velocity & | vo, | ||
double | to, | ||
const Plan & | fp | ||
) | const |
This method computes the conflict bands for ground speed for the given aircraft pair. This method is nearly static, it only relies on the configuration parameters for the class (diameter, time, maximum gs, etc.)
IntervalSet IntentBandsCore::calcTrkBands | ( | const Vect3 & | so3, |
const Velocity & | vo3, | ||
double | to, | ||
const Plan & | fp | ||
) | const |
This method computes the conflict bands for track angles for the given aircraft pair. This method is nearly static, it only relies on the configuration parameters for the class (diameter, time, maximum gs, etc.)
IntervalSet IntentBandsCore::calcTrkBandsLL | ( | double | lat, |
double | lon, | ||
double | alt, | ||
const Velocity & | vo, | ||
double | to, | ||
const Plan & | fp | ||
) | const |
This method computes the conflict bands for track angles for the given aircraft pair. This method is nearly static, it only relies on the configuration parameters for the class (diameter, time, maximum gs, etc.)
IntervalSet IntentBandsCore::calcVsBands | ( | const Vect3 & | so3, |
const Velocity & | vo3, | ||
double | to, | ||
const Plan & | fp | ||
) | const |
This method computes the conflict bands for vertical speed for the given aircraft pair. This method is nearly static, it only relies on the configuration parameters for the class (diameter, time, maximum gs, etc.)
IntervalSet IntentBandsCore::calcVsBandsLL | ( | double | lat, |
double | lon, | ||
double | alt, | ||
const Velocity & | vo, | ||
double | to, | ||
const Plan & | fp | ||
) | const |
This method computes the conflict bands for vertical speed for the given aircraft pair. This method is nearly static, it only relies on the configuration parameters for the class (diameter, time, maximum gs, etc.)
void IntentBandsCore::clear | ( | ) |
Clear all bands to "empty" bands.
void IntentBandsCore::clearBreaks | ( | ) |
Internally modify the bands to remove narrow gaps (XXXX-XXXX becomes XXXXXXXXX). This should be run after the bands have been populated (if at all). This should be used on "red" bands. Tolerances define the filter sizes. trkTol in [rad], gsTol in [m/s], vsTol in [m/s]
void IntentBandsCore::clearNarrowBands | ( | ) |
Internally modify the bands to remove narrow bands (-—X-— becomes ------—). This should be run after the bands have been populated (if at all). This should be used on "green" bands. Tolerances define the filter sizes. trkTol in [rad], gsTol in [m/s], vsTol in [m/s]
double IntentBandsCore::getDiameter | ( | ) | const |
Returns the minimum horizontal separation distance in internal units
|
virtual |
Returns minimum acceptable ground speed
double IntentBandsCore::getHeight | ( | ) | const |
Returns the minimum vertical separation distance in internal units.
double IntentBandsCore::getMaxGroundSpeed | ( | ) | const |
Returns the maximum ground speed in internal units.
double IntentBandsCore::getMaxVerticalSpeed | ( | ) | const |
Returns the range of vertical speed in internal units.
double IntentBandsCore::getStartTime | ( | ) | const |
Returns the lookahead start time in internal units.
double IntentBandsCore::getTime | ( | ) | const |
Returns the end lookahead time in internal units.
|
virtual |
Returns minimum acceptable track angle
|
virtual |
Returns minimum acceptable ground speed
const IntervalSet & IntentBandsCore::groundSpeedBands | ( | ) | const |
The ground speed bands in internal units. The range of ground speed bands is from 0 to max_gs.
void IntentBandsCore::setDiameter | ( | double | d | ) |
Sets the minimum horizontal separation distance in internal units. Any existing bands information is cleared.
|
virtual |
Sets a minimum size for green/no conflict bands to be allowed, to avoid "eye of the needle" situations. Any green bands smaller than this will not be reported.
gs | minimum acceptable ground speed |
void IntentBandsCore::setHeight | ( | double | h | ) |
Sets the minimum vertical separation distance in internal units. Any existing bands information is cleared.
void IntentBandsCore::setMaxGroundSpeed | ( | double | gs | ) |
Sets the maximum ground speed in internal units, the minimum is 0. Any existing bands information is cleared.
void IntentBandsCore::setMaxVerticalSpeed | ( | double | vs | ) |
Sets the range of vertical speeds in internal units, -max_vs to max_vs. Any existing bands information is cleared.
void IntentBandsCore::setTime | ( | double | t | ) |
Set the end lookahead time in internal units. Any existing bands information is cleared. The lookahead range start is set to 0.
void IntentBandsCore::setTimeRange | ( | double | b, |
double | t | ||
) |
Set the lookahead time range in internal units with start and end times. Any existing bands information is cleared.
|
virtual |
Sets a minimum size for green/no conflict bands to be allowed, to avoid "eye of the needle" situations. Any green bands smaller than this will not be reported.
trk | minimum acceptable track angle |
|
virtual |
Sets a minimum size for green/no conflict bands to be allowed, to avoid "eye of the needle" situations. Any green bands smaller than this will not be reported.
vs | minimum acceptable vertical speed |
std::string IntentBandsCore::toString | ( | ) | const |
Return a string representation of this object
const IntervalSet & IntentBandsCore::trackBands | ( | ) | const |
The track angle bands. The angles are in 'compass' angles in internal units, counter-clockwise from true north.
const IntervalSet & IntentBandsCore::verticalSpeedBands | ( | ) | const |
The vertical speed bands in internal units. The range of vertical speeds is -max_vs to max_vs.