Rise
The Vieneo Province
Loading...
Searching...
No Matches
propulsion Class Reference

#include <propulsion.h>

Collaboration diagram for propulsion:
[legend]

Public Member Functions

 propulsion (Viewscreen *ptr)
void Update (float fElapsedTime)
void Reset ()
float GetTotalThrust () const
RiseMath::Vector3 AirflowBodyKms () const
void SendTelemetryUpstream (float fElapsedTime)
void ResetControlLoops ()

Static Public Member Functions

static float CalculateLiftCoefficient (AirfoilType type, float aoaRad, float ClDelta)
static float CalculateDragCoefficient (AirfoilType type, float aoaRad, float CdDelta)

Public Attributes

Swaypoint currentWaypoint
bool initFromDeflect = false
float totalWeightLbs = 0.0f
float speedOfSoundKms = SeaLevelSpeedOfSoundKms
float staticBuildup = 0.0f
float airframeTempCelsius = -ZeroCelsiusToKelvin
float airIceAccumulationMm = 0
float groundIceAccumulationMm = 0
float mach = 0.0f
float tatCelsius = 0.0f
float qz_lbsPerSqFt = 0.0f
float ias = 0.0f
float convectionRate = 0.0f
float tat_mod_qz_x = 0.0f
float pitchAccelerationSnapshot = 0.0f
float yawAccelerationSnapshot = 0.0f
float rollAccelerationSnapshot = 0.0f
float staticDensity = 1.0f
float dynamicDensityScalar = 1.0f
float holdOverTime = 0.0f
float levelerpitch = 0.0f
float levelerroll = 0.0f
RiseMath::Vector3 localWindVector = {}
RiseMath::Vector3 groundvec = centerC

Static Private Member Functions

static void GetTerrainRollingCoefficients (unsigned char type, float *rollingResistanceCrr, float *terrainRoughnessJitterCoef)
static float CalculateClMax (AirfoilType type, float CdDelta)
static float CalculateAoaMax (AirfoilType type, float CdDelta)

Private Attributes

Viewscreen * viewscreen = nullptr
Logger * logger = nullptr
float gndcontactG = 0.0f
float halfsec = 0.0f
float oldmsl = 0.0f
RiseMath::Vector3 actual = centerC
RiseMath::Vector3 windgust = centerC
float olddesiredvsi = 0.0f
float apPitchLastInput = 0.0f
float apPitchLastAttitude = 0.0f
float apTrimTimer = 0.0f
float terrainRoughnessFrictionJitter = 0.0f
float corneringTireSkidDemandSeconds = 0.0f
bool corneringTireSkidActive = false
bool tireSkidSoundWasActive = false
double nextGroundTireDiagnosticTime = 0.0
Telemetry::PeriodicGate telemetryUploadGate { Telemetry::ClientUploadIntervalSeconds }
Telemetry::PeriodicGate discordPresenceGate { Telemetry::DiscordPresenceIntervalSeconds }
float ThrustReverserOutput [MAX_ENGINES] {}
float EngineThrustOutput [MAX_ENGINES] {}
RiseMath::Vector3 oldOdoPosition = centerC
char oldOdoReference = -127
char msg [512] {}
RiseMath::Vector3 tvmRelativeVelocity = centerC
RiseMath::Vector3 dorRelativeVelocity = centerC
RiseMath::Vector3 windVectorTrueKms = centerC
RiseMath::Vector3 relativeWindTrueKms = centerC
float groundSpeedKms = 0.0f
RiseMath::Vector3 oldvelocity = centerC
float grounditerate = 0.0f
float aoaRad = 0.0f
float f_augment = 0.0f
RiseMath::Vector3 localVelocity = centerC

Detailed Description

Definition at line 28 of file propulsion.h.

Constructor & Destructor Documentation

◆ propulsion()

propulsion::propulsion ( Viewscreen * ptr)

Definition at line 29 of file propulsion.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ AirflowBodyKms()

RiseMath::Vector3 propulsion::AirflowBodyKms ( ) const
inline

Definition at line 108 of file propulsion.h.

Here is the caller graph for this function:

◆ CalculateAoaMax()

float propulsion::CalculateAoaMax ( AirfoilType type,
float CdDelta )
staticprivate

Definition at line 168 of file propulsion.cpp.

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

◆ CalculateClMax()

float propulsion::CalculateClMax ( AirfoilType type,
float CdDelta )
staticprivate

Definition at line 140 of file propulsion.cpp.

Here is the caller graph for this function:

◆ CalculateDragCoefficient()

float propulsion::CalculateDragCoefficient ( AirfoilType type,
float aoaRad,
float CdDelta )
static

Definition at line 104 of file propulsion.cpp.

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

◆ CalculateLiftCoefficient()

float propulsion::CalculateLiftCoefficient ( AirfoilType type,
float aoaRad,
float ClDelta )
static

Definition at line 63 of file propulsion.cpp.

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

◆ GetTerrainRollingCoefficients()

void propulsion::GetTerrainRollingCoefficients ( unsigned char type,
float * rollingResistanceCrr,
float * terrainRoughnessJitterCoef )
staticprivate

Definition at line 196 of file propulsion.cpp.

Here is the caller graph for this function:

◆ GetTotalThrust()

float propulsion::GetTotalThrust ( ) const

Definition at line 5198 of file propulsion.cpp.

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

◆ Reset()

void propulsion::Reset ( )

Definition at line 5191 of file propulsion.cpp.

Here is the caller graph for this function:

◆ ResetControlLoops()

void propulsion::ResetControlLoops ( )

Definition at line 316 of file propulsion.cpp.

Here is the caller graph for this function:

◆ SendTelemetryUpstream()

void propulsion::SendTelemetryUpstream ( float fElapsedTime)

Definition at line 241 of file propulsion.cpp.

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

◆ Update()

void propulsion::Update ( float fElapsedTime)
Bug
https://jira.risetvp.com/view.php?id=1267

https://www.omnicalculator.com/physics/acceleration#acceleration-formula-three-acceleration-equations

Todo
would love to add reverser sound and reverse effect sound!
Todo
we could jack with this number based on a bad sensor but it is the combined density and relative wind from above (ram air)
Todo
FLOW CALCULATION AGAINST TOP, BOTTOM, SIDE, FRONT, BACK ... right now we aggregate qxyz ... we already have qz ... so just one more calculation to split into qx and qy is needed

http://hyperphysics.phy-astr.gsu.edu/hbase/thermo/stefan.html

Todo
we are using exteriorInsulationHeatTransferCoefficient for emissivity ... not sure that is accurate https://www.engineeringtoolbox.com/emissivity-coefficients-d_447.html
Todo
could evaluate each direction with different insulating values front back top bottom left/right
Todo
not sure but I think we should use the wing PLAN area here not frontal drag profile for conduction
Todo
so there is a difference between the aileron snapping off and not having a sensor for that vs. a feedback loop that says we can't talk to it
Todo
so there is a difference between the aileron snapping off and not having a sensor for that vs. a feedback loop that says we can't talk to it

https://aircrafticing.grc.nasa.gov/1_1_5_2.html

https://gizmodo.com/scientists-make-coldest-liquid-water-ever-and-its-weir-1821874001

https://docs.google.com/spreadsheets/d/1gtlbIwcJKqFnqDA7UKDkdBQlpO8IErs1ZPj3eD4o4qQ/edit?usp=sharing

Todo
here we could mess with the probe ... false positives ... false negatives
Todo
this is based on failure which is based on a minimum N1 no?
Bug
https://jira.risetvp.com/view.php?id=1645 disconnect if they have it engaged above the ground-data ceiling

END OF CHAT GPT ----------------------------------------------—

Todo
I think this only takes into account split flap TE ... not LE adjustment to hold laminar flow?

https://jira.risetvp.com/view.php?id=1271

Todo
technically as we pitch or roll away from plumb line the radio altitude would increase to infinity

@warn tried 0.00025 but it is not enough clearance for the precision!! Strange results!!

Todo
technically need to check sec and ter but would be nice if we could use transition maps to figure where we are?

Definition at line 322 of file propulsion.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ actual

RiseMath::Vector3 propulsion::actual = centerC
private

Definition at line 35 of file propulsion.h.

◆ airframeTempCelsius

float propulsion::airframeTempCelsius = -ZeroCelsiusToKelvin

Definition at line 84 of file propulsion.h.

◆ airIceAccumulationMm

float propulsion::airIceAccumulationMm = 0

Definition at line 85 of file propulsion.h.

◆ aoaRad

float propulsion::aoaRad = 0.0f
private

Definition at line 65 of file propulsion.h.

◆ apPitchLastAttitude

float propulsion::apPitchLastAttitude = 0.0f
private

Definition at line 39 of file propulsion.h.

◆ apPitchLastInput

float propulsion::apPitchLastInput = 0.0f
private

Definition at line 38 of file propulsion.h.

◆ apTrimTimer

float propulsion::apTrimTimer = 0.0f
private

Definition at line 40 of file propulsion.h.

◆ convectionRate

float propulsion::convectionRate = 0.0f

Definition at line 91 of file propulsion.h.

◆ corneringTireSkidActive

bool propulsion::corneringTireSkidActive = false
private

Definition at line 43 of file propulsion.h.

◆ corneringTireSkidDemandSeconds

float propulsion::corneringTireSkidDemandSeconds = 0.0f
private

Definition at line 42 of file propulsion.h.

◆ currentWaypoint

Swaypoint propulsion::currentWaypoint

Definition at line 79 of file propulsion.h.

◆ discordPresenceGate

Telemetry::PeriodicGate propulsion::discordPresenceGate { Telemetry::DiscordPresenceIntervalSeconds }
private

Definition at line 47 of file propulsion.h.

◆ dorRelativeVelocity

RiseMath::Vector3 propulsion::dorRelativeVelocity = centerC
private

Definition at line 59 of file propulsion.h.

◆ dynamicDensityScalar

float propulsion::dynamicDensityScalar = 1.0f

Definition at line 95 of file propulsion.h.

◆ EngineThrustOutput

float propulsion::EngineThrustOutput[MAX_ENGINES] {}
private

Definition at line 50 of file propulsion.h.

◆ f_augment

float propulsion::f_augment = 0.0f
private

Definition at line 66 of file propulsion.h.

◆ gndcontactG

float propulsion::gndcontactG = 0.0f
private

Definition at line 33 of file propulsion.h.

◆ groundIceAccumulationMm

float propulsion::groundIceAccumulationMm = 0

Definition at line 86 of file propulsion.h.

◆ grounditerate

float propulsion::grounditerate = 0.0f
private

Definition at line 64 of file propulsion.h.

◆ groundSpeedKms

float propulsion::groundSpeedKms = 0.0f
private

Definition at line 62 of file propulsion.h.

◆ groundvec

RiseMath::Vector3 propulsion::groundvec = centerC

Definition at line 100 of file propulsion.h.

◆ halfsec

float propulsion::halfsec = 0.0f
private

Definition at line 33 of file propulsion.h.

◆ holdOverTime

float propulsion::holdOverTime = 0.0f

Definition at line 96 of file propulsion.h.

◆ ias

float propulsion::ias = 0.0f

Definition at line 90 of file propulsion.h.

◆ initFromDeflect

bool propulsion::initFromDeflect = false

Definition at line 80 of file propulsion.h.

◆ levelerpitch

float propulsion::levelerpitch = 0.0f

Definition at line 97 of file propulsion.h.

◆ levelerroll

float propulsion::levelerroll = 0.0f

Definition at line 98 of file propulsion.h.

◆ localVelocity

RiseMath::Vector3 propulsion::localVelocity = centerC
private

Definition at line 67 of file propulsion.h.

◆ localWindVector

RiseMath::Vector3 propulsion::localWindVector = {}

Definition at line 99 of file propulsion.h.

◆ logger

Logger* propulsion::logger = nullptr
private

Definition at line 31 of file propulsion.h.

◆ mach

float propulsion::mach = 0.0f

Definition at line 87 of file propulsion.h.

◆ msg

char propulsion::msg[512] {}
private

Definition at line 56 of file propulsion.h.

◆ nextGroundTireDiagnosticTime

double propulsion::nextGroundTireDiagnosticTime = 0.0
private

Definition at line 45 of file propulsion.h.

◆ olddesiredvsi

float propulsion::olddesiredvsi = 0.0f
private

Definition at line 37 of file propulsion.h.

◆ oldmsl

float propulsion::oldmsl = 0.0f
private

Definition at line 34 of file propulsion.h.

◆ oldOdoPosition

RiseMath::Vector3 propulsion::oldOdoPosition = centerC
private

Definition at line 53 of file propulsion.h.

◆ oldOdoReference

char propulsion::oldOdoReference = -127
private

Definition at line 54 of file propulsion.h.

◆ oldvelocity

RiseMath::Vector3 propulsion::oldvelocity = centerC
private

Definition at line 63 of file propulsion.h.

◆ pitchAccelerationSnapshot

float propulsion::pitchAccelerationSnapshot = 0.0f

Definition at line 93 of file propulsion.h.

◆ qz_lbsPerSqFt

float propulsion::qz_lbsPerSqFt = 0.0f

Definition at line 89 of file propulsion.h.

◆ relativeWindTrueKms

RiseMath::Vector3 propulsion::relativeWindTrueKms = centerC
private

Definition at line 61 of file propulsion.h.

◆ rollAccelerationSnapshot

float propulsion::rollAccelerationSnapshot = 0.0f

Definition at line 93 of file propulsion.h.

◆ speedOfSoundKms

float propulsion::speedOfSoundKms = SeaLevelSpeedOfSoundKms

Definition at line 82 of file propulsion.h.

◆ staticBuildup

float propulsion::staticBuildup = 0.0f

Definition at line 83 of file propulsion.h.

◆ staticDensity

float propulsion::staticDensity = 1.0f

Definition at line 94 of file propulsion.h.

◆ tat_mod_qz_x

float propulsion::tat_mod_qz_x = 0.0f

Definition at line 92 of file propulsion.h.

◆ tatCelsius

float propulsion::tatCelsius = 0.0f

Definition at line 88 of file propulsion.h.

◆ telemetryUploadGate

Telemetry::PeriodicGate propulsion::telemetryUploadGate { Telemetry::ClientUploadIntervalSeconds }
private

Definition at line 46 of file propulsion.h.

◆ terrainRoughnessFrictionJitter

float propulsion::terrainRoughnessFrictionJitter = 0.0f
private

Definition at line 41 of file propulsion.h.

◆ ThrustReverserOutput

float propulsion::ThrustReverserOutput[MAX_ENGINES] {}
private

Definition at line 49 of file propulsion.h.

◆ tireSkidSoundWasActive

bool propulsion::tireSkidSoundWasActive = false
private

Definition at line 44 of file propulsion.h.

◆ totalWeightLbs

float propulsion::totalWeightLbs = 0.0f

Definition at line 81 of file propulsion.h.

◆ tvmRelativeVelocity

RiseMath::Vector3 propulsion::tvmRelativeVelocity = centerC
private

Definition at line 58 of file propulsion.h.

◆ viewscreen

Viewscreen* propulsion::viewscreen = nullptr
private

Definition at line 30 of file propulsion.h.

◆ windgust

RiseMath::Vector3 propulsion::windgust = centerC
private

Definition at line 36 of file propulsion.h.

◆ windVectorTrueKms

RiseMath::Vector3 propulsion::windVectorTrueKms = centerC
private

Definition at line 60 of file propulsion.h.

◆ yawAccelerationSnapshot

float propulsion::yawAccelerationSnapshot = 0.0f

Definition at line 93 of file propulsion.h.


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