15 sprintf_s(fileName, 99,
"%i-%02i-%02i.fdr", st.wYear, st.wMonth, st.wDay);
16 _sopen_s(&
fdrfile, fileName, _O_RDWR | _O_CREAT | _O_TEXT | _O_APPEND | _O_SEQUENTIAL, SH_DENYWR, S_IWRITE);
19 DXUT_ERR_MSGBOX(L
"Could not open fdrfile for writing!", errno);
23 sprintf_s(msg, 99,
"FDR::ctor Opened fdrfile \"%s\"", fileName);
41 sprintf_s(timemsg, 999,
"%02i:%02i:%02i-%6s,", st.wHour, st.wMinute, st.wSecond,
bus->
receiptNumber.c_str());
42 _write(
fdrfile, timemsg, static_cast<unsigned int>(strlen(timemsg)));
45 _write(
fdrfile, timemsg, static_cast<unsigned int>(strlen(timemsg)));
48 _write(
fdrfile, timemsg, static_cast<unsigned int>(strlen(timemsg)));
51 _write(
fdrfile, timemsg, static_cast<unsigned int>(strlen(timemsg)));
54 _write(
fdrfile, timemsg, static_cast<unsigned int>(strlen(timemsg)));
57 _write(
fdrfile, timemsg, static_cast<unsigned int>(strlen(timemsg)));
60 _write(
fdrfile, timemsg, static_cast<unsigned int>(strlen(timemsg)));
65 if (i>0) strcat_s(timemsg, 999,
"/");
67 strcat_s(timemsg, 999,
"1");
69 strcat_s(timemsg, 999,
"0");
71 strcat_s(timemsg, 999,
",");
72 _write(
fdrfile, timemsg, static_cast<unsigned int>(strlen(timemsg)));
77 if (i>0) strcat_s(timemsg, 999,
"/");
80 strcat_s(timemsg, 999, engine);
82 strcat_s(timemsg, 999,
",");
83 _write(
fdrfile, timemsg, static_cast<unsigned int>(strlen(timemsg)));
86 _write(
fdrfile, timemsg, static_cast<unsigned int>(strlen(timemsg)));
89 _write(
fdrfile, timemsg, static_cast<unsigned int>(strlen(timemsg)));
92 _write(
fdrfile, timemsg, static_cast<unsigned int>(strlen(timemsg)));
95 _write(
fdrfile, timemsg, static_cast<unsigned int>(strlen(timemsg)));
98 _write(
fdrfile, timemsg, static_cast<unsigned int>(strlen(timemsg)));
101 for (
int i = 0; i < 4; i++)
103 if (i>0) strcat_s(timemsg, 999,
"/");
106 strcat_s(timemsg, 999, discreet);
108 strcat_s(timemsg, 999,
",");
109 _write(
fdrfile, timemsg, static_cast<unsigned int>(strlen(timemsg)));
112 _write(
fdrfile, timemsg, static_cast<unsigned int>(strlen(timemsg)));
115 _write(
fdrfile, timemsg, static_cast<unsigned int>(strlen(timemsg)));
118 _write(
fdrfile, timemsg, static_cast<unsigned int>(strlen(timemsg)));
121 _write(
fdrfile, timemsg, static_cast<unsigned int>(strlen(timemsg)));
124 _write(
fdrfile, timemsg, static_cast<unsigned int>(strlen(timemsg)));
127 _write(
fdrfile, timemsg, static_cast<unsigned int>(strlen(timemsg)));
130 strcpy_s(timemsg, 999,
"\n");
131 _write(
fdrfile, timemsg, static_cast<unsigned int>(strlen(timemsg)));
137 logger->
Log(
"FDR::dtor Closing fdrfile...");
float LeadingEdgeFlapsPosition
(21) Leading edge flap or cockpit flap control selection (except when parameters of paragraph (a)(86)...
float EngineThrustOutput[enginesC]
(9) Thrust/power of each engine—primary flight crew reference;
float RollControlSurfacePosition
float IndicatedAirspeed
(3) Indicated Airspeed in km per second?
float PitchAttitude
(6) Pitch attitude;
float HeadingTrue
(4) Heading–primary flight crew reference (if selectable, record discrete, true or magnetic); ...
std::vector< bool > Transmitting
(8) Manual radio transmitter keying, or CVR/DFDR synchronization reference;
D3DXVECTOR3 NormalAcceleration
(5) vertical (11) longitudinal (18) lateral
float PitchTrimSurfacePosition
(19) Pitch trim surface position or parameters of paragraph (a)(82) of this section if currently reco...
float RollAttitude
(7) Roll attitude;
float DiscreetSurfacePostion[4]
#define enginesC
Data Bus.
Abstract base class for modules By definition, instruments don't do any of the work (they don't modif...
void FrameMove(float fElapsedTime) override
Fdr(Bus *prmBus, Logger *prmLogger)
float TrailingEdgeFlapsPosition
(20) Trailing edge flap or cockpit flap control selection (except when parameters of paragraph (a)(85...
void Log(const char *msg, Level level=Info, int errorCode=0)
These have to be in this order.
std::string receiptNumber
float YawControlSurfacePosition
_SYSTEMTIME Time
this section is required flight data (FDR)