ICAROUS
All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Modules Pages
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
larcfm::KinematicRealBands Class Referenceabstract
Inheritance diagram for larcfm::KinematicRealBands:
larcfm::KinematicIntegerBands larcfm::KinematicAltBands larcfm::KinematicGsBands larcfm::KinematicTrkBands larcfm::KinematicVsBands

Public Member Functions

 KinematicRealBands (double min, double max, bool rel, double mod, double step, bool recovery)
 
 KinematicRealBands (double min, double max, double step, bool recovery)
 
 KinematicRealBands (const KinematicRealBands &b)
 
virtual bool instantaneous_bands () const =0
 
virtual double own_val (const TrafficState &ownship) const =0
 
virtual double time_step (const TrafficState &ownship) const =0
 
double get_min () const
 
double get_max () const
 
bool get_rel () const
 
double get_mod () const
 
double get_step () const
 
bool get_recovery () const
 
void set_min (double val)
 
void set_max (double val)
 
void set_rel (bool val)
 
void set_mod (double val)
 
void set_step (double val)
 
void set_recovery (bool flag)
 
double min_val (const TrafficState &ownship) const
 
double min_rel (const TrafficState &ownship) const
 
double max_val (const TrafficState &ownship) const
 
double max_rel (const TrafficState &ownship) const
 
bool check_input (const KinematicBandsCore &core)
 
bool kinematic_conflict (KinematicBandsCore &core, const TrafficState &ac, Detection3D *detector, double alerting_time)
 
int length (KinematicBandsCore &core)
 
Interval interval (KinematicBandsCore &core, int i)
 
BandsRegion::Region region (KinematicBandsCore &core, int i)
 
int rangeOf (KinematicBandsCore &core, double val)
 
void reset ()
 
void force_compute (KinematicBandsCore &core)
 
std::vector< TrafficState > const & peripheralAircraft (KinematicBandsCore &core, int alert_level)
 
double timeToRecovery (KinematicBandsCore &core)
 
std::vector< BandsRange > const & ranges (KinematicBandsCore &core)
 
double compute_resolution (KinematicBandsCore &core, int alert_level, bool dir)
 
bool preferred_direction (KinematicBandsCore &core, int alert_level)
 
double last_time_to_maneuver (KinematicBandsCore &core, const TrafficState &ac)
 
void toIntervalSet (IntervalSet &noneset, const std::vector< Integerval > &l, double scal, double add, double min, double max)
 
virtual void none_bands (IntervalSet &noneset, Detection3D *conflict_det, Detection3D *recovery_det, const TrafficState &repac, int epsh, int epsv, double B, double T, const TrafficState &ownship, const std::vector< TrafficState > &traffic)
 
virtual bool any_red (Detection3D *conflict_det, Detection3D *recovery_det, const TrafficState &repac, int epsh, int epsv, double B, double T, const TrafficState &ownship, const std::vector< TrafficState > &traffic)
 
virtual bool all_red (Detection3D *conflict_det, Detection3D *recovery_det, const TrafficState &repac, int epsh, int epsv, double B, double T, const TrafficState &ownship, const std::vector< TrafficState > &traffic)
 
bool all_green (Detection3D *conflict_det, Detection3D *recovery_det, const TrafficState &repac, int epsh, int epsv, double B, double T, const TrafficState &ownship, const std::vector< TrafficState > &traffic)
 
bool any_green (Detection3D *conflict_det, Detection3D *recovery_det, const TrafficState &repac, int epsh, int epsv, double B, double T, const TrafficState &ownship, const std::vector< TrafficState > &traffic)
 
virtual double resolution (Detection3D *conflict_det, Detection3D *recovery_det, const TrafficState &repac, int epsh, int epsv, double B, double T, const TrafficState &ownship, const std::vector< TrafficState > &traffic, bool dir)
 
std::string toString () const
 
std::string toPVS (int prec) const
 
- Public Member Functions inherited from larcfm::KinematicIntegerBands
virtual std::pair< Vect3, Velocitytrajectory (const TrafficState &ownship, double time, bool dir) const =0
 
bool no_conflict (Detection3D *conflict_det, Detection3D *recovery_det, double B, double T, double B2, double T2, bool trajdir, double tsk, const TrafficState &ownship, const std::vector< TrafficState > &traffic) const
 
void kinematic_bands_combine (std::vector< Integerval > &l, Detection3D *conflict_det, Detection3D *recovery_det, double tstep, double B, double T, double B2, double T2, int maxl, int maxr, const TrafficState &ownship, const std::vector< TrafficState > &traffic, const TrafficState &repac, int epsh, int epsv) const
 
bool any_los_aircraft (Detection3D *det, bool trajdir, double tsk, const TrafficState &ownship, const std::vector< TrafficState > &traffic) const
 
int first_green (Detection3D *conflict_det, Detection3D *recovery_det, double tstep, double B, double T, double B2, double T2, bool trajdir, int max, const TrafficState &ownship, const std::vector< TrafficState > &traffic, const TrafficState &repac, int epsh, int epsv) const
 
bool all_int_red (Detection3D *conflict_det, Detection3D *recovery_det, double tstep, double B, double T, double B2, double T2, int maxl, int maxr, const TrafficState &ownship, const std::vector< TrafficState > &traffic, const TrafficState &repac, int epsh, int epsv, int dir) const
 
bool any_conflict_aircraft (Detection3D *det, double B, double T, bool trajdir, double tsk, const TrafficState &ownship, const std::vector< TrafficState > &traffic) const
 
void instantaneous_bands_combine (std::vector< Integerval > &l, Detection3D *conflict_det, Detection3D *recovery_det, double B, double T, double B2, double T2, int maxl, int maxr, const TrafficState &ownship, const std::vector< TrafficState > &traffic, const TrafficState &repac, int epsh, int epsv)
 
bool red_band_exist (Detection3D *conflict_det, Detection3D *recovery_det, double tstep, double B, double T, double B2, double T2, bool trajdir, int max, const TrafficState &ownship, const std::vector< TrafficState > &traffic, const TrafficState &repac, int epsh, int epsv) const
 
bool any_int_red (Detection3D *conflict_det, Detection3D *recovery_det, double tstep, double B, double T, double B2, double T2, int maxl, int maxr, const TrafficState &ownship, const std::vector< TrafficState > &traffic, const TrafficState &repac, int epsh, int epsv, int dir) const
 
bool all_instantaneous_red (Detection3D *conflict_det, Detection3D *recovery_det, double B, double T, double B2, double T2, int maxl, int maxr, const TrafficState &ownship, const std::vector< TrafficState > &traffic, const TrafficState &repac, int epsh, int epsv, int dir)
 
bool any_instantaneous_red (Detection3D *conflict_det, Detection3D *recovery_det, double B, double T, double B2, double T2, int maxl, int maxr, const TrafficState &ownship, const std::vector< TrafficState > &traffic, const TrafficState &repac, int epsh, int epsv, int dir)
 

Private Member Functions

bool rollover ()
 
double mod_val (double val) const
 
void update (KinematicBandsCore &core)
 
void peripheral_aircraft (KinematicBandsCore &core, int alert_level)
 
void color_bands (const std::vector< IntervalSet > &none_sets, const std::vector< BandsRegion::Region > &regions, KinematicBandsCore &core, bool recovery)
 
double compute_recovery_bands (IntervalSet &noneset, KinematicBandsCore &core, const std::vector< TrafficState > &alerting_set)
 
double compute_level (IntervalSet &noneset, KinematicBandsCore &core, int alert_level)
 
void compute (KinematicBandsCore &core)
 
Interval find_resolution (KinematicBandsCore &core, const IntervalSet &noneset)
 
int maxdown (const TrafficState &ownship) const
 
int maxup (const TrafficState &ownship) const
 
void compute_none_bands (IntervalSet &noneset, KinematicBandsCore &core, int alert_level, const TrafficState &repac)
 

Private Attributes

bool outdated_
 
int checked_
 
std::vector< std::vector< TrafficState > > peripheral_acs_
 
std::vector< BandsRangeranges_
 
double recovery_time_
 
std::vector< Intervalresolutions_
 
double min_
 
double max_
 
bool rel_
 
double mod_
 
bool circular_
 
double step_
 
bool recovery_
 

Static Private Attributes

static const INT64FM ALMOST_
 

Additional Inherited Members

- Static Public Member Functions inherited from larcfm::KinematicIntegerBands
static void append_intband (std::vector< Integerval > &l, std::vector< Integerval > &r)
 
static void neg (std::vector< Integerval > &l)
 
- Protected Attributes inherited from larcfm::KinematicIntegerBands
int j_step_
 

Member Function Documentation

◆ color_bands()

void larcfm::KinematicRealBands::color_bands ( const std::vector< IntervalSet > &  none_sets,
const std::vector< BandsRegion::Region > &  regions,
KinematicBandsCore core,
bool  recovery 
)
private

Ensure that the intervals are "complete", filling in missing intervals and ensuring the bands end at the proper bounds. Requires none_sets to be a non-empty list and size(none_sets) == size(regions)

◆ compute()

void larcfm::KinematicRealBands::compute ( KinematicBandsCore core)
private

Compute all bands.

◆ compute_level()

double larcfm::KinematicRealBands::compute_level ( IntervalSet noneset,
KinematicBandsCore core,
int  alert_level 
)
private

Compute bands for one level. Return recovery time (NaN if recover bands are not computed)

◆ compute_recovery_bands()

double larcfm::KinematicRealBands::compute_recovery_bands ( IntervalSet noneset,
KinematicBandsCore core,
const std::vector< TrafficState > &  alerting_set 
)
private

Compute recovery bands. Returns recovery time.

◆ compute_resolution()

double larcfm::KinematicRealBands::compute_resolution ( KinematicBandsCore core,
int  alert_level,
bool  dir 
)

Returns resolution maneuver for given alert level and direction. Return NaN if there is no conflict or if input is invalid. Return positive/negative infinity if there is no resolution to the right/up and negative infinity if there is no resolution to the left/down. Requires: 0 <= alert_level <= alertor.size(). If alert_level is 0, conflict_level is used. Region of alert_level should be a conflict band type, e.g., NEAR, MID, or FAR.

◆ force_compute()

void larcfm::KinematicRealBands::force_compute ( KinematicBandsCore core)

Force computation of kinematic bands

◆ last_time_to_maneuver()

double larcfm::KinematicRealBands::last_time_to_maneuver ( KinematicBandsCore core,
const TrafficState ac 
)

Return last time to maneuver, in seconds, for ownship with respect to traffic aircraft ac for conflict alert level. Return NaN if the ownship is not in conflict with aircraft ac within early alerting time. Return negative infinity if there is no time to maneuver. Note: 1 <= alert_level <= alertor.size()

◆ max_rel()

double larcfm::KinematicRealBands::max_rel ( const TrafficState ownship) const

Positive distance from current value to maximum value. When mod_ > 0, max_rel is a value in [0,mod_/2]

◆ max_val()

double larcfm::KinematicRealBands::max_val ( const TrafficState ownship) const

When mod_ == 0, min_val <= max_val. When mod_ > 0, max_val is a value in [0,mod_]. In this case, it is not always true that min_val <= max_val

◆ min_rel()

double larcfm::KinematicRealBands::min_rel ( const TrafficState ownship) const

Positive distance from current value to minimum value. When mod_ > 0, min_rel is a value in [0,mod_/2]

◆ min_val()

double larcfm::KinematicRealBands::min_val ( const TrafficState ownship) const

When mod_ == 0, min_val <= max_val. When mod_ > 0, min_val is a value is in [0,mod_]. In this case, it is not always true that min_val <= max_val

◆ mod_val()

double larcfm::KinematicRealBands::mod_val ( double  val) const
private

Return val modulo mod_, when mod_ > 0. Otherwise, returns val.

◆ peripheral_aircraft()

void larcfm::KinematicRealBands::peripheral_aircraft ( KinematicBandsCore core,
int  alert_level 
)
private

Put in peripheral_acs_ the list of aircraft predicted to be in conflict for the given alert level Requires: 1 <= alert_level <= alertor.mostSevereAlertLevel()

◆ peripheralAircraft()

std::vector< TrafficState > const & larcfm::KinematicRealBands::peripheralAircraft ( KinematicBandsCore core,
int  alert_level 
)

Return list of peripheral aircraft for a given alert level. Requires: 0 <= alert_level <= alertor.size(). If alert_level is 0, conflict_level is used.

◆ preferred_direction()

bool larcfm::KinematicRealBands::preferred_direction ( KinematicBandsCore core,
int  alert_level 
)

Compute preferred direction, for given alert level, based on resolution that is closer to current value.

◆ rangeOf()

int larcfm::KinematicRealBands::rangeOf ( KinematicBandsCore core,
double  val 
)

Return index where val is found, -1 if invalid input, >= length if not found

◆ ranges()

std::vector< BandsRange > const & larcfm::KinematicRealBands::ranges ( KinematicBandsCore core)

Return list of bands ranges

◆ reset()

void larcfm::KinematicRealBands::reset ( )

Reset cached values

◆ resolution()

virtual double larcfm::KinematicRealBands::resolution ( Detection3D conflict_det,
Detection3D recovery_det,
const TrafficState repac,
int  epsh,
int  epsv,
double  B,
double  T,
const TrafficState ownship,
const std::vector< TrafficState > &  traffic,
bool  dir 
)
virtual

This function returns a resolution maneuver that is valid from B to T. It returns NaN if there is no conflict and +/- infinity, depending on dir, if there are no resolutions. The value dir=false is down and dir=true is up.

Reimplemented in larcfm::KinematicAltBands.

◆ timeToRecovery()

double larcfm::KinematicRealBands::timeToRecovery ( KinematicBandsCore core)

Return time to recovery. Return NaN if bands are not saturated and negative infinity when bands are saturated but no recovery within early alerting time.

◆ toIntervalSet()

void larcfm::KinematicRealBands::toIntervalSet ( IntervalSet noneset,
const std::vector< Integerval > &  l,
double  scal,
double  add,
double  min,
double  max 
)

This function scales the interval, add a constant, and constraint the intervals to min and max. The function takes care of modulo logic, in the case of circular bands.

◆ update()

void larcfm::KinematicRealBands::update ( KinematicBandsCore core)
private

Update cached values


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