Rise
The Vieneo Province
Toggle main menu visibility
Loading...
Searching...
No Matches
LandingGearStatus.h
Go to the documentation of this file.
1
#pragma once
2
3
namespace
LandingGearStatus
{
4
// Vehicle component status: -1 means not installed, 0..63 cannot confirm
5
// position, and 64..127 is serviceable. Keep the CAS condition independent
6
// of gear command/animation and of whether its message has been acknowledged.
7
constexpr
bool
StrutDisagrees
(
int
health) {
return
health >= 0 && health < 64; }
8
constexpr
bool
Disagrees
(
int
left,
int
right,
int
nose)
9
{
10
return
StrutDisagrees
(left) ||
StrutDisagrees
(right) ||
StrutDisagrees
(nose);
11
}
12
constexpr
bool
StrutKnown
(
int
health) {
return
health == -1 || (health >= 64 && health <= 127); }
13
inline
double
ConfirmedExtent
(
double
extent,
int
left,
int
right,
int
nose)
14
{
15
// Existing DOR configuration/audio checks treat negative extent as unknown.
16
// Preserve the measured extent for healthy or absent struts, including
17
// non-finite extent so those checks continue to reject invalid readings.
18
return
StrutKnown
(left) &&
StrutKnown
(right) &&
StrutKnown
(nose) ? extent : -1.0;
19
}
20
}
LandingGearStatus
Definition
LandingGearStatus.h:3
LandingGearStatus::Disagrees
constexpr bool Disagrees(int left, int right, int nose)
Definition
LandingGearStatus.h:8
LandingGearStatus::StrutDisagrees
constexpr bool StrutDisagrees(int health)
Definition
LandingGearStatus.h:7
LandingGearStatus::ConfirmedExtent
double ConfirmedExtent(double extent, int left, int right, int nose)
Definition
LandingGearStatus.h:13
LandingGearStatus::StrutKnown
constexpr bool StrutKnown(int health)
Definition
LandingGearStatus.h:12
Modules
LandingGearStatus.h
Generated on
for Rise by
1.18.0