Avionics
Dropship Simulator
Bus Class Reference

#include <Bus.h>

Collaboration diagram for Bus:
[legend]

Classes

struct  Afcs
 (25) Automatic Flight Control System (AFCS) modes and engagement status, including autothrottle; More...
 

Public Types

enum  MarkerBeacons { None, Outer, Middle, Inner }
 (29) Marker beacon passage; More...
 
enum  GpwsEnum : char {
  NoAlert = 0, Mode1_Sink_Rate = 27, Mode1_Pull_Up = 1, Mode2a_Terrain_Terrain = 4,
  Mode2a_Pull_Up = 2, Mode2b_Terrain_Terrain = 5, Mode2b_Pull_Up = 3, Mode2_Terrain = 8,
  Mode3_Dont_Sink = 28, Mode4a_Too_Low_Terrain = 12, Mode4a_Too_Low_Gear = 25, Mode4b_Too_Low_Terrain = 13,
  Mode4b_Too_Low_Flaps = 26, Mode4c_Too_Low_Terrain = 14, Mode5a_Glideslope = 29, Mode5b_Glideslope = 30,
  Mode6_Minimums_Minimums = 9, Mode6_One_Thousand = 24, Mode6_Five_Hundred = 23, Mode6_Two_Hundred = 22,
  Mode6_One_Hundred = 21, Mode6_Fifty = 20, Mode6_Fourty = 19, Mode6_Thirty = 18,
  Mode6_Twenty = 17, Mode6_Ten = 16, Mode6_Retard = 15, Mode6_Bank_Angle = 31,
  Mode6_Caution_Terrain = 10, Mode6_Caution_Obstacle = 11, Reset = 127
}
 (35) Ground proximity warning system; More...
 
enum  TcasEnum {
  Clear_Of_Conflict, Traffic_Advisory, RA_Climb, RA_Descend,
  RA_Waiting_To_Clear
}
 (44) Traffic alert and collision avoidance system; More...
 

Public Member Functions

float GrossWeight () const
 pounds More...
 
bool IsDim (std::string elementName)
 
bool IsVisible (std::string elementName)
 
void AddHighlight (std::string elementName)
 
void RemoveHighlight (std::string elementName)
 
void ClearHelp ()
 
Systems::ComponentGetComponent (std::string guidStr)
 
float * GetComponentSetStatePtr (std::string guidStr)
 
Systems::FaultGetComponentFaultStatePtr (std::string guidStr)
 
void FrameMove (float fElapsed, double fTime)
 
void AppendCommands (std::vector< Command > *commands)
 
bool IsCommandOnStack (std::string commandName)
 
 Bus (Logger *prmLogger)
 

Public Attributes

bool isComparitor = false
 
std::vector< CommandcommandStream
 
std::vector< Messagemessages
 
D3DXVECTOR3 PlatformAcceleration = D3DXVECTOR3(-999, -999, -999)
 
double PlatformBackRightBellow = 0.0
 
double PlatformBackLeftBellow = 0.0
 
double PlatformFrontRightBellow = 0.0
 
double PlatformFrontLeftBellow = 0.0
 
int PlatformMotionSequencer = 0
 
float frameRate = 0.0f
 
_SYSTEMTIME Time
 this section is required flight data (FDR) More...
 
float PressureAltitude = 0.0f
 
float IndicatedAirspeed = 0.0f
 (3) Indicated Airspeed in km per second? More...
 
float HeadingTrue = D3DXToRadian(240.0f)
 (4) Heading–primary flight crew reference (if selectable, record discrete, true or magnetic); More...
 
float HeadingTrack = D3DXToRadian(240.0f)
 
D3DXVECTOR3 NormalAcceleration = D3DXVECTOR3(0, 0, 0)
 (5) vertical (11) longitudinal (18) lateral More...
 
float PitchAttitude = 0.0f
 (6) Pitch attitude; More...
 
float RollAttitude = 0.0f
 (7) Roll attitude; More...
 
std::vector< bool > Transmitting
 (8) Manual radio transmitter keying, or CVR/DFDR synchronization reference; More...
 
float EngineThrustOutput [enginesC]
 (9) Thrust/power of each engine—primary flight crew reference; More...
 
float PitchControl = 0.0f
 
float RollControl = 0.0f
 
float YawControl = 0.0f
 
float DiscreetSurfacePostion [4]
 
float RollControlSurfacePosition = 0.0f
 
float YawControlSurfacePosition = 0.0f
 
float PitchTrimSurfacePosition = 0.0f
 (19) Pitch trim surface position or parameters of paragraph (a)(82) of this section if currently recorded; More...
 
float TrailingEdgeFlapsPosition = 0.0f
 (20) Trailing edge flap or cockpit flap control selection (except when parameters of paragraph (a)(85) of this section apply); More...
 
float LeadingEdgeFlapsPosition = 0.0f
 (21) Leading edge flap or cockpit flap control selection (except when parameters of paragraph (a)(86) of this section apply); More...
 
bool ThrustReverser [enginesC]
 (22) Each Thrust reverser position More...
 
float SpoilerPosition = 0.0f
 NEEDS TO BE INITIALIZED HERE? More...
 
float OATorTAT = 2.0f
 (24) Outside or total air temperature; More...
 
struct Bus::Afcs AFCS
 
float RadioAltitude = 0.0f
 
float LocalizerDeviation = 0.0f
 
float GlideslopeDeviation = 0.0f
 
enum Bus::MarkerBeacons MarkerBeacon = MarkerBeacons::None
 
bool MasterWarning = false
 
bool OnGround = true
 
float AngleOfAttack = 0.0f
 
float GroundSpeed = 0.0f
 (33) hydraulic pressure LOW each loop More...
 
enum Bus::GpwsEnum GPWS = GpwsEnum::NoAlert
 
bool LandingGearExtended = true
 
float Latitude = 0.0f
 
float Longitude = 0.0f
 
enum Bus::TcasEnum TCAS = TcasEnum::Clear_Of_Conflict
 
float EngineThrustCommand [enginesC]
 (57) Thrust command (when an information source is installed); More...
 
float PitchTrim = 0.26f
 
float VerticalSpeed = 0.0f
 
float FlightPathAngle = 0.0f
 
float AirDensity = 0.002377f
 
float EmptyWeight = 40256.4f
 needs to be configurable XML More...
 
float FuelWeight = 10000.0f
 pounds, dynamic later based on module weight calculation (stuff can get blown off) More...
 
float PayloadWeight = 0.0f
 pounds, dynamic later as we burn fuel More...
 
double ProgramTime = 0.0
 Identified a need for these in modules. More...
 
bool FlightFreeze = true
 
float ScenarioTimer = 0.0f
 
std::string receiptNumber = "ABC123"
 
float ScenarioScore = 0.0f
 
float DisplayFps = 0.0f
 
float occupantPitchControlAuthority = 1.0f
 
float occupantRollControlAuthority = 1.0f
 
D3DXVECTOR3 Location = D3DXVECTOR3(-57.0f / 180.0f * 19012.290420994710720528225226931f, 7.5f / 90.0f * 9506.1452104973553602641126134654f + 0.015f, -35.0f - 0.028f)
 
float TerrainClosureRate = 0.0f
 so we can get data into GPWS? More...
 
float ObstacleClosureRate = 0.0f
 
std::vector< Vehiclevehicles
 for TCAS, GPWS, FMS More...
 
std::vector< Waypointwaypoints
 
std::vector< Systems::Component * > components
 SYSTEMS SUPPORT. More...
 

Private Attributes

Loggerlogger
 
std::vector< std::string > highlightElements
 

Detailed Description

Definition at line 12 of file Bus.h.

Member Enumeration Documentation

◆ GpwsEnum

enum Bus::GpwsEnum : char

(35) Ground proximity warning system;

Enumerator
NoAlert 
Mode1_Sink_Rate 

Excessive barometric descent rate.

Mode1_Pull_Up 
Mode2a_Terrain_Terrain 

Excessive terrain closure rate.

Mode2a_Pull_Up 
Mode2b_Terrain_Terrain 
Mode2b_Pull_Up 
Mode2_Terrain 
Mode3_Dont_Sink 

Altitude Loss After TakeOff.

Mode4a_Too_Low_Terrain 

Unsafe terrain clearance with gear not down AND DECENDING.

Mode4a_Too_Low_Gear 
Mode4b_Too_Low_Terrain 
Mode4b_Too_Low_Flaps 
Mode4c_Too_Low_Terrain 
Mode5a_Glideslope 

Excessive deviation below glideslope.

Mode5b_Glideslope 
Mode6_Minimums_Minimums 

Advisory callouts.

Mode6_One_Thousand 
Mode6_Five_Hundred 
Mode6_Two_Hundred 
Mode6_One_Hundred 
Mode6_Fifty 
Mode6_Fourty 
Mode6_Thirty 
Mode6_Twenty 
Mode6_Ten 
Mode6_Retard 
Mode6_Bank_Angle 
Mode6_Caution_Terrain 
Mode6_Caution_Obstacle 
Reset 

Definition at line 157 of file Bus.h.

◆ MarkerBeacons

(29) Marker beacon passage;

Enumerator
None 
Outer 
Middle 
Inner 

Definition at line 139 of file Bus.h.

◆ TcasEnum

(44) Traffic alert and collision avoidance system;

Enumerator
Clear_Of_Conflict 
Traffic_Advisory 
RA_Climb 
RA_Descend 
RA_Waiting_To_Clear 

Definition at line 210 of file Bus.h.

Constructor & Destructor Documentation

◆ Bus()

Bus::Bus ( Logger prmLogger)
explicit

Definition at line 35 of file Bus.cpp.

Member Function Documentation

◆ AddHighlight()

void Bus::AddHighlight ( std::string  elementName)
inline

Definition at line 332 of file Bus.h.

Here is the caller graph for this function:

◆ AppendCommands()

void Bus::AppendCommands ( std::vector< Command > *  commands)

Definition at line 41 of file Bus.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ClearHelp()

void Bus::ClearHelp ( )
inline

Definition at line 344 of file Bus.h.

Here is the caller graph for this function:

◆ FrameMove()

void Bus::FrameMove ( float  fElapsed,
double  fTime 
)

bus timestamp

Definition at line 3 of file Bus.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetComponent()

Systems::Component * Bus::GetComponent ( std::string  guidStr)

Definition at line 77 of file Bus.cpp.

Here is the caller graph for this function:

◆ GetComponentFaultStatePtr()

Systems::Fault * Bus::GetComponentFaultStatePtr ( std::string  guidStr)

Definition at line 141 of file Bus.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetComponentSetStatePtr()

float * Bus::GetComponentSetStatePtr ( std::string  guidStr)

Definition at line 109 of file Bus.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GrossWeight()

float Bus::GrossWeight ( ) const
inline

pounds

we could actually be below emptyweight if we lose parts ... empty weight will likely be a calculation based on modules

Definition at line 281 of file Bus.h.

Here is the caller graph for this function:

◆ IsCommandOnStack()

bool Bus::IsCommandOnStack ( std::string  commandName)

Definition at line 67 of file Bus.cpp.

Here is the caller graph for this function:

◆ IsDim()

bool Bus::IsDim ( std::string  elementName)
inline

Definition at line 300 of file Bus.h.

Here is the caller graph for this function:

◆ IsVisible()

bool Bus::IsVisible ( std::string  elementName)
inline

Definition at line 316 of file Bus.h.

Here is the caller graph for this function:

◆ RemoveHighlight()

void Bus::RemoveHighlight ( std::string  elementName)
inline

Definition at line 336 of file Bus.h.

Here is the caller graph for this function:

Member Data Documentation

◆ AFCS

struct Bus::Afcs Bus::AFCS

◆ AirDensity

float Bus::AirDensity = 0.002377f

Definition at line 276 of file Bus.h.

◆ AngleOfAttack

float Bus::AngleOfAttack = 0.0f

Definition at line 150 of file Bus.h.

◆ commandStream

std::vector<Command> Bus::commandStream

Definition at line 20 of file Bus.h.

◆ components

std::vector<Systems::Component*> Bus::components

SYSTEMS SUPPORT.

Definition at line 371 of file Bus.h.

◆ DiscreetSurfacePostion

float Bus::DiscreetSurfacePostion[4]

Definition at line 59 of file Bus.h.

◆ DisplayFps

float Bus::DisplayFps = 0.0f

Definition at line 296 of file Bus.h.

◆ EmptyWeight

float Bus::EmptyWeight = 40256.4f

needs to be configurable XML

Definition at line 278 of file Bus.h.

◆ EngineThrustCommand

float Bus::EngineThrustCommand[enginesC]

(57) Thrust command (when an information source is installed);

Definition at line 231 of file Bus.h.

◆ EngineThrustOutput

float Bus::EngineThrustOutput[enginesC]

(9) Thrust/power of each engine—primary flight crew reference;

Definition at line 55 of file Bus.h.

◆ FlightFreeze

bool Bus::FlightFreeze = true

Definition at line 290 of file Bus.h.

◆ FlightPathAngle

float Bus::FlightPathAngle = 0.0f

Definition at line 275 of file Bus.h.

◆ frameRate

float Bus::frameRate = 0.0f

Definition at line 35 of file Bus.h.

◆ FuelWeight

float Bus::FuelWeight = 10000.0f

pounds, dynamic later based on module weight calculation (stuff can get blown off)

Definition at line 279 of file Bus.h.

◆ GlideslopeDeviation

float Bus::GlideslopeDeviation = 0.0f

Definition at line 136 of file Bus.h.

◆ GPWS

enum Bus::GpwsEnum Bus::GPWS = GpwsEnum::NoAlert

◆ GroundSpeed

float Bus::GroundSpeed = 0.0f

(33) hydraulic pressure LOW each loop

Definition at line 154 of file Bus.h.

◆ HeadingTrack

float Bus::HeadingTrack = D3DXToRadian(240.0f)

Definition at line 45 of file Bus.h.

◆ HeadingTrue

float Bus::HeadingTrue = D3DXToRadian(240.0f)

(4) Heading–primary flight crew reference (if selectable, record discrete, true or magnetic);

Definition at line 44 of file Bus.h.

◆ highlightElements

std::vector<std::string> Bus::highlightElements
private

Definition at line 16 of file Bus.h.

◆ IndicatedAirspeed

float Bus::IndicatedAirspeed = 0.0f

(3) Indicated Airspeed in km per second?

Definition at line 42 of file Bus.h.

◆ isComparitor

bool Bus::isComparitor = false

Definition at line 19 of file Bus.h.

◆ LandingGearExtended

bool Bus::LandingGearExtended = true

Definition at line 199 of file Bus.h.

◆ Latitude

float Bus::Latitude = 0.0f

Definition at line 204 of file Bus.h.

◆ LeadingEdgeFlapsPosition

float Bus::LeadingEdgeFlapsPosition = 0.0f

(21) Leading edge flap or cockpit flap control selection (except when parameters of paragraph (a)(86) of this section apply);

Definition at line 67 of file Bus.h.

◆ LocalizerDeviation

float Bus::LocalizerDeviation = 0.0f

Definition at line 135 of file Bus.h.

◆ Location

D3DXVECTOR3 Bus::Location = D3DXVECTOR3(-57.0f / 180.0f * 19012.290420994710720528225226931f, 7.5f / 90.0f * 9506.1452104973553602641126134654f + 0.015f, -35.0f - 0.028f)

just brainstorming here... everything is moving in relation to the ground so waypoints need to be relative to objects so 8.7 kilometer G/S intercept looks like they put you 6NM further than that to join? so between 20km and 8.7km probably 10km should be a good target so we are done turning the G/S takes you to 1000 feet down the runway so .3km from edge

Definition at line 359 of file Bus.h.

◆ logger

Logger* Bus::logger
private

Definition at line 15 of file Bus.h.

◆ Longitude

float Bus::Longitude = 0.0f

Definition at line 204 of file Bus.h.

◆ MarkerBeacon

enum Bus::MarkerBeacons Bus::MarkerBeacon = MarkerBeacons::None

◆ MasterWarning

bool Bus::MasterWarning = false

Definition at line 148 of file Bus.h.

◆ messages

std::vector<Message> Bus::messages

Definition at line 23 of file Bus.h.

◆ NormalAcceleration

D3DXVECTOR3 Bus::NormalAcceleration = D3DXVECTOR3(0, 0, 0)

(5) vertical (11) longitudinal (18) lateral

Definition at line 47 of file Bus.h.

◆ OATorTAT

float Bus::OATorTAT = 2.0f

(24) Outside or total air temperature;

Definition at line 75 of file Bus.h.

◆ ObstacleClosureRate

float Bus::ObstacleClosureRate = 0.0f

Definition at line 363 of file Bus.h.

◆ occupantPitchControlAuthority

float Bus::occupantPitchControlAuthority = 1.0f

Definition at line 298 of file Bus.h.

◆ occupantRollControlAuthority

float Bus::occupantRollControlAuthority = 1.0f

Definition at line 299 of file Bus.h.

◆ OnGround

bool Bus::OnGround = true

Definition at line 149 of file Bus.h.

◆ PayloadWeight

float Bus::PayloadWeight = 0.0f

pounds, dynamic later as we burn fuel

Definition at line 280 of file Bus.h.

◆ PitchAttitude

float Bus::PitchAttitude = 0.0f

(6) Pitch attitude;

Definition at line 49 of file Bus.h.

◆ PitchControl

float Bus::PitchControl = 0.0f

Definition at line 57 of file Bus.h.

◆ PitchTrim

float Bus::PitchTrim = 0.26f

Definition at line 259 of file Bus.h.

◆ PitchTrimSurfacePosition

float Bus::PitchTrimSurfacePosition = 0.0f

(19) Pitch trim surface position or parameters of paragraph (a)(82) of this section if currently recorded;

Definition at line 63 of file Bus.h.

◆ PlatformAcceleration

D3DXVECTOR3 Bus::PlatformAcceleration = D3DXVECTOR3(-999, -999, -999)

this section is for internal and environmental this should be a fault if it was hooked up to a component, etc...

Definition at line 29 of file Bus.h.

◆ PlatformBackLeftBellow

double Bus::PlatformBackLeftBellow = 0.0

Definition at line 31 of file Bus.h.

◆ PlatformBackRightBellow

double Bus::PlatformBackRightBellow = 0.0

Definition at line 30 of file Bus.h.

◆ PlatformFrontLeftBellow

double Bus::PlatformFrontLeftBellow = 0.0

Definition at line 33 of file Bus.h.

◆ PlatformFrontRightBellow

double Bus::PlatformFrontRightBellow = 0.0

Definition at line 32 of file Bus.h.

◆ PlatformMotionSequencer

int Bus::PlatformMotionSequencer = 0

Definition at line 34 of file Bus.h.

◆ PressureAltitude

float Bus::PressureAltitude = 0.0f

Definition at line 40 of file Bus.h.

◆ ProgramTime

double Bus::ProgramTime = 0.0

Identified a need for these in modules.

Definition at line 289 of file Bus.h.

◆ RadioAltitude

float Bus::RadioAltitude = 0.0f

Definition at line 134 of file Bus.h.

◆ receiptNumber

std::string Bus::receiptNumber = "ABC123"

Definition at line 293 of file Bus.h.

◆ RollAttitude

float Bus::RollAttitude = 0.0f

(7) Roll attitude;

Definition at line 51 of file Bus.h.

◆ RollControl

float Bus::RollControl = 0.0f

Definition at line 57 of file Bus.h.

◆ RollControlSurfacePosition

float Bus::RollControlSurfacePosition = 0.0f

Definition at line 60 of file Bus.h.

◆ ScenarioScore

float Bus::ScenarioScore = 0.0f

Definition at line 294 of file Bus.h.

◆ ScenarioTimer

float Bus::ScenarioTimer = 0.0f

Definition at line 292 of file Bus.h.

◆ SpoilerPosition

float Bus::SpoilerPosition = 0.0f

NEEDS TO BE INITIALIZED HERE?

(23) Ground spoiler position or speed brake selection (except when parameters of paragraph (a)(87) of this section apply);

Definition at line 73 of file Bus.h.

◆ TCAS

enum Bus::TcasEnum Bus::TCAS = TcasEnum::Clear_Of_Conflict

◆ TerrainClosureRate

float Bus::TerrainClosureRate = 0.0f

so we can get data into GPWS?

Definition at line 362 of file Bus.h.

◆ ThrustReverser

bool Bus::ThrustReverser[enginesC]

(22) Each Thrust reverser position

Definition at line 70 of file Bus.h.

◆ Time

_SYSTEMTIME Bus::Time

this section is required flight data (FDR)

Definition at line 39 of file Bus.h.

◆ TrailingEdgeFlapsPosition

float Bus::TrailingEdgeFlapsPosition = 0.0f

(20) Trailing edge flap or cockpit flap control selection (except when parameters of paragraph (a)(85) of this section apply);

Definition at line 65 of file Bus.h.

◆ Transmitting

std::vector<bool> Bus::Transmitting

(8) Manual radio transmitter keying, or CVR/DFDR synchronization reference;

Definition at line 53 of file Bus.h.

◆ vehicles

std::vector<Vehicle> Bus::vehicles

for TCAS, GPWS, FMS

Definition at line 366 of file Bus.h.

◆ VerticalSpeed

float Bus::VerticalSpeed = 0.0f

Surprisingly, VSI wasn't in the list of FDR parameters, probably because it can be deduced from change in altitude over time more likely it is the vertical acceleration converted to fpm

Definition at line 274 of file Bus.h.

◆ waypoints

std::vector<Waypoint> Bus::waypoints

Definition at line 367 of file Bus.h.

◆ YawControl

float Bus::YawControl = 0.0f

Definition at line 57 of file Bus.h.

◆ YawControlSurfacePosition

float Bus::YawControlSurfacePosition = 0.0f

Definition at line 61 of file Bus.h.


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