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

Traffic conflict handler (for daidalus guidance)

#include <Handlers.hpp>

Inheritance diagram for TrafficConflictHandler:
EventHandler< CognitionState_t >

Public Member Functions

retVal_e Initialize (CognitionState_t *state)
 perform all initialization activities for a specific task More...
 
retVal_e Execute (CognitionState_t *state)
 perform the core activity More...
 
retVal_e Terminate (CognitionState_t *state)
 perform termination activities More...
 
- Public Member Functions inherited from EventHandler< CognitionState_t >
bool RunEvent (CognitionState_t *state)
 Run this event. More...
 
void ExecuteHandler (std::shared_ptr< EventHandler< CognitionState_t > > hdl, std::string eventName, float priorityNew=0)
 Spawn another handler. More...
 

Public Attributes

double startTime
 
- Public Attributes inherited from EventHandler< CognitionState_t >
std::string eventName
 event name
 
execState_e execState
 current execution state for this handler
 
std::list< std::shared_ptr< EventHandler< CognitionState_t > > > children
 list of child handlers
 
float priority
 current execution priority
 
float defaultPriority
 user defined priority for this handler
 

Additional Inherited Members

- Public Types inherited from EventHandler< CognitionState_t >
enum  execState_e
 enumerations for the execution state More...
 
enum  retVal_e
 enumerations for the return state
 

Member Function Documentation

◆ Execute()

retVal_e TrafficConflictHandler::Execute ( CognitionState_t state)
inlinevirtual
Parameters
state
Returns
retVal_e

If track, gs and vs are in recovery, don't allow combined resolution

Extract next waypoint we are flying to

Execute the specified resolution. Note that all resolution are constantly check if it safe to return to target position

  • Send speed command

Implement an altitude resolution with the following criteria: Check if the previous target altitude has already been reached before implementing a new updated resolution.

  • Send altitude command

Send velocity command for track resolution

  • Use heading provided by daidalus.
  • Maintain same speed at beginning of encounter
  • No climb rate

For track resolutions, also check if is safe to return to closest point if that is requested

Combined resolution. TODO: This is the least used resolution. Needs more testing

Conflict is resolved only when there are no more conflicts and it is safe to return to target

Reimplemented from EventHandler< CognitionState_t >.

◆ Initialize()

retVal_e TrafficConflictHandler::Initialize ( CognitionState_t state)
inlinevirtual
Parameters
state
Returns
retVal_e

Initialize required variables

Determine the resolution type

Check if we have a valid resolution

Shutdown handler if no valid resolution

Shutdown handler if cognition is required to remain passive

Reimplemented from EventHandler< CognitionState_t >.

◆ Terminate()

retVal_e TrafficConflictHandler::Terminate ( CognitionState_t state)
inlinevirtual
Parameters
state
Returns
retVal_e

Do not terminate until the persistence time has elapsed. TODO: Not sure if this is required.

For speed resolutions, just activate the nominal path Note that we first send the nominal speed for current leg before activating the nominal path

For altitude resolutions, just activate the nominal path. First, send the nominal altitude for current leg

For all other resolutions, Use the ReturnToMission or Vector2Mission handlers as requested by user

Reimplemented from EventHandler< CognitionState_t >.


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