Rise
The Vieneo Province
Loading...
Searching...
No Matches
OrbitEntryAudio.h
Go to the documentation of this file.
1#pragma once
2#include "OrbitState.h"
3#include "../Command.h"
4
5namespace Orbital {
6inline bool EntryGearRefusal(const BusState& data)
7{
8 return data.guidance.phase==Phase::Abort&&data.guidance.status==L"DOR: CONFIG LANDING GEAR";
9}
10inline void ClearResolvedEntryConfigRefusal(BusState& data,bool clean)
11{
12 // A corrected configuration must not leave a red gear/flap/bay message
13 // underneath ENTRY READY. This clears annunciation only, never arms DOR.
14 if(clean&&data.guidance.phase==Phase::Abort&&data.guidance.status.rfind(L"DOR: CONFIG ",0)==0)
15 data.guidance={};
16}
17inline Command EntryGearCallout(const BusState& data,int vehicle)
18{
19 Command c;c.name="DORConfigLandingGear";c.sValue="DOR_ENTRY";
20 c.ivalues[0]=vehicle;c.ivalues[1]=int(data.request.revision);
21 c.priority=120;c.delay=2;c.ttl=6; // allow the disconnect chime; never overlap VMU speech
22 return c;
23}
24inline bool EntryGearCalloutValid(const Command& c,const BusState& data,int vehicle,bool powered,double gear)
25{
26 return powered&&!(gear>=0&&gear<.01)&&c.sValue=="DOR_ENTRY"&&
27 c.ivalues[0]==vehicle&&c.ivalues[1]==int(data.request.revision)&&
29}
30}
SCRIPT_CONTROL SCRIPT_STATE const void int
bool EntryGearCalloutValid(const Command &c, const BusState &data, int vehicle, bool powered, double gear)
Mode Objective(const Request &r, TargetKind target)
Definition OrbitState.h:368
bool EntryGearRefusal(const BusState &data)
Command EntryGearCallout(const BusState &data, int vehicle)
void ClearResolvedEntryConfigRefusal(BusState &data, bool clean)
std::string sValue
Definition Command.h:20
unsigned char priority
Definition Command.h:28
int ivalues[2]
Definition Command.h:21
std::string name
Definition Command.h:11
float delay
Definition Command.h:8
float ttl
Definition Command.h:17
bool active
Definition OrbitState.h:194
std::wstring status
Definition OrbitState.h:315
EntryEstimate entry
Definition OrbitState.h:233
std::uint64_t revision
Definition OrbitState.h:75
TargetKind targetKind
Definition OrbitState.h:255