RigsofRods
Soft-body Physics Simulation
Public Types | Public Member Functions | Data Fields | Private Attributes
RoR::Autopilot Class Reference

#include <AutoPilot.h>

+ Collaboration diagram for RoR::Autopilot:

Public Types

enum  { HEADING_NONE, HEADING_FIXED, HEADING_WLV, HEADING_NAV }
 
enum  { ALT_NONE, ALT_FIXED, ALT_VS }
 

Public Member Functions

 Autopilot (int actor_id)
 
void reset ()
 
void disconnect ()
 
void setInertialReferences (node_t *refl, node_t *refr, node_t *refb, node_t *refc)
 
int toggleHeading (int mode)
 
int toggleAlt (int mode)
 
bool toggleIAS ()
 
bool toggleGPWS ()
 
int adjHDG (int d)
 
int adjALT (int d)
 
int adjVS (int d)
 
int adjIAS (int d)
 
float getAilerons ()
 
float getElevator ()
 
float getRudder ()
 
float getThrottle (float thrtl, float dt)
 
void gpws_update (float spawnheight)
 
void UpdateIls (std::vector< RoR::TerrainObjectManager::localizer_t > localizers)
 
float GetVerticalApproachDeviation ()
 
float GetHorizontalApproachDeviation ()
 
bool IsIlsAvailable ()
 
int GetHeadingMode () const
 
int GetAltMode () const
 
int GetAltValue () const
 
bool GetIasMode () const
 
int GetIasValue () const
 
bool GetGpwsMode () const
 
int GetVsValue () const
 

Data Fields

int heading
 
bool wantsdisconnect
 

Private Attributes

int mode_heading
 
int mode_alt
 
bool mode_ias
 
bool mode_gpws
 
int alt
 
int vs
 
int ias
 
node_tref_l
 
node_tref_r
 
node_tref_b
 
node_tref_c
 
float ref_span
 
float last_elevator
 
float last_aileron
 
float last_rudder
 
float last_gpws_height
 
float last_pullup_height
 
bool m_vertical_locator_available
 
bool m_horizontal_locator_available
 
float m_ils_angle_vdev
 
float m_ils_angle_hdev
 
float m_ils_runway_heading
 
float m_ils_runway_distance
 
float last_closest_hdist
 
int m_actor_id
 

Detailed Description

Definition at line 34 of file AutoPilot.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
HEADING_NONE 
HEADING_FIXED 
HEADING_WLV 
HEADING_NAV 

Definition at line 38 of file AutoPilot.h.

◆ anonymous enum

anonymous enum
Enumerator
ALT_NONE 
ALT_FIXED 
ALT_VS 

Definition at line 46 of file AutoPilot.h.

Constructor & Destructor Documentation

◆ Autopilot()

Autopilot::Autopilot ( int  actor_id)

Definition at line 33 of file AutoPilot.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ adjALT()

int Autopilot::adjALT ( int  d)

Definition at line 296 of file AutoPilot.cpp.

+ Here is the caller graph for this function:

◆ adjHDG()

int Autopilot::adjHDG ( int  d)

Definition at line 286 of file AutoPilot.cpp.

+ Here is the caller graph for this function:

◆ adjIAS()

int Autopilot::adjIAS ( int  d)

Definition at line 312 of file AutoPilot.cpp.

+ Here is the caller graph for this function:

◆ adjVS()

int Autopilot::adjVS ( int  d)

Definition at line 302 of file AutoPilot.cpp.

+ Here is the caller graph for this function:

◆ disconnect()

void Autopilot::disconnect ( )

Definition at line 70 of file AutoPilot.cpp.

+ Here is the caller graph for this function:

◆ getAilerons()

float Autopilot::getAilerons ( )

Definition at line 91 of file AutoPilot.cpp.

◆ GetAltMode()

int RoR::Autopilot::GetAltMode ( ) const
inline

Definition at line 81 of file AutoPilot.h.

◆ GetAltValue()

int RoR::Autopilot::GetAltValue ( ) const
inline

Definition at line 82 of file AutoPilot.h.

◆ getElevator()

float Autopilot::getElevator ( )

Definition at line 163 of file AutoPilot.cpp.

◆ GetGpwsMode()

bool RoR::Autopilot::GetGpwsMode ( ) const
inline

Definition at line 85 of file AutoPilot.h.

◆ GetHeadingMode()

int RoR::Autopilot::GetHeadingMode ( ) const
inline

Definition at line 80 of file AutoPilot.h.

◆ GetHorizontalApproachDeviation()

float RoR::Autopilot::GetHorizontalApproachDeviation ( )
inline

Definition at line 78 of file AutoPilot.h.

◆ GetIasMode()

bool RoR::Autopilot::GetIasMode ( ) const
inline

Definition at line 83 of file AutoPilot.h.

◆ GetIasValue()

int RoR::Autopilot::GetIasValue ( ) const
inline

Definition at line 84 of file AutoPilot.h.

◆ getRudder()

float Autopilot::getRudder ( )

Definition at line 220 of file AutoPilot.cpp.

◆ getThrottle()

float Autopilot::getThrottle ( float  thrtl,
float  dt 
)

Definition at line 225 of file AutoPilot.cpp.

+ Here is the caller graph for this function:

◆ GetVerticalApproachDeviation()

float RoR::Autopilot::GetVerticalApproachDeviation ( )
inline

Definition at line 77 of file AutoPilot.h.

◆ GetVsValue()

int RoR::Autopilot::GetVsValue ( ) const
inline

Definition at line 86 of file AutoPilot.h.

◆ gpws_update()

void Autopilot::gpws_update ( float  spawnheight)

Definition at line 322 of file AutoPilot.cpp.

+ Here is the call graph for this function:

◆ IsIlsAvailable()

bool RoR::Autopilot::IsIlsAvailable ( )
inline

Definition at line 79 of file AutoPilot.h.

+ Here is the caller graph for this function:

◆ reset()

void Autopilot::reset ( )

Definition at line 44 of file AutoPilot.cpp.

+ Here is the caller graph for this function:

◆ setInertialReferences()

void Autopilot::setInertialReferences ( node_t refl,
node_t refr,
node_t refb,
node_t refc 
)

Definition at line 82 of file AutoPilot.cpp.

+ Here is the caller graph for this function:

◆ toggleAlt()

int Autopilot::toggleAlt ( int  mode)

Definition at line 265 of file AutoPilot.cpp.

+ Here is the caller graph for this function:

◆ toggleGPWS()

bool Autopilot::toggleGPWS ( )

Definition at line 280 of file AutoPilot.cpp.

+ Here is the caller graph for this function:

◆ toggleHeading()

int Autopilot::toggleHeading ( int  mode)

Definition at line 256 of file AutoPilot.cpp.

+ Here is the caller graph for this function:

◆ toggleIAS()

bool Autopilot::toggleIAS ( )

Definition at line 274 of file AutoPilot.cpp.

+ Here is the caller graph for this function:

◆ UpdateIls()

void Autopilot::UpdateIls ( std::vector< RoR::TerrainObjectManager::localizer_t localizers)

Definition at line 363 of file AutoPilot.cpp.

+ Here is the call graph for this function:

Field Documentation

◆ alt

int RoR::Autopilot::alt
private

Definition at line 93 of file AutoPilot.h.

◆ heading

int RoR::Autopilot::heading

Definition at line 53 of file AutoPilot.h.

◆ ias

int RoR::Autopilot::ias
private

Definition at line 95 of file AutoPilot.h.

◆ last_aileron

float RoR::Autopilot::last_aileron
private

Definition at line 102 of file AutoPilot.h.

◆ last_closest_hdist

float RoR::Autopilot::last_closest_hdist
private

Definition at line 113 of file AutoPilot.h.

◆ last_elevator

float RoR::Autopilot::last_elevator
private

Definition at line 101 of file AutoPilot.h.

◆ last_gpws_height

float RoR::Autopilot::last_gpws_height
private

Definition at line 104 of file AutoPilot.h.

◆ last_pullup_height

float RoR::Autopilot::last_pullup_height
private

Definition at line 105 of file AutoPilot.h.

◆ last_rudder

float RoR::Autopilot::last_rudder
private

Definition at line 103 of file AutoPilot.h.

◆ m_actor_id

int RoR::Autopilot::m_actor_id
private

Definition at line 115 of file AutoPilot.h.

◆ m_horizontal_locator_available

bool RoR::Autopilot::m_horizontal_locator_available
private

Definition at line 108 of file AutoPilot.h.

◆ m_ils_angle_hdev

float RoR::Autopilot::m_ils_angle_hdev
private

Definition at line 110 of file AutoPilot.h.

◆ m_ils_angle_vdev

float RoR::Autopilot::m_ils_angle_vdev
private

Definition at line 109 of file AutoPilot.h.

◆ m_ils_runway_distance

float RoR::Autopilot::m_ils_runway_distance
private

Definition at line 112 of file AutoPilot.h.

◆ m_ils_runway_heading

float RoR::Autopilot::m_ils_runway_heading
private

Definition at line 111 of file AutoPilot.h.

◆ m_vertical_locator_available

bool RoR::Autopilot::m_vertical_locator_available
private

Definition at line 107 of file AutoPilot.h.

◆ mode_alt

int RoR::Autopilot::mode_alt
private

Definition at line 90 of file AutoPilot.h.

◆ mode_gpws

bool RoR::Autopilot::mode_gpws
private

Definition at line 92 of file AutoPilot.h.

◆ mode_heading

int RoR::Autopilot::mode_heading
private

Definition at line 89 of file AutoPilot.h.

◆ mode_ias

bool RoR::Autopilot::mode_ias
private

Definition at line 91 of file AutoPilot.h.

◆ ref_b

node_t* RoR::Autopilot::ref_b
private

Definition at line 98 of file AutoPilot.h.

◆ ref_c

node_t* RoR::Autopilot::ref_c
private

Definition at line 99 of file AutoPilot.h.

◆ ref_l

node_t* RoR::Autopilot::ref_l
private

Definition at line 96 of file AutoPilot.h.

◆ ref_r

node_t* RoR::Autopilot::ref_r
private

Definition at line 97 of file AutoPilot.h.

◆ ref_span

float RoR::Autopilot::ref_span
private

Definition at line 100 of file AutoPilot.h.

◆ vs

int RoR::Autopilot::vs
private

Definition at line 94 of file AutoPilot.h.

◆ wantsdisconnect

bool RoR::Autopilot::wantsdisconnect

Definition at line 54 of file AutoPilot.h.


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