|
From: Ron J. <wi...@je...> - 2019-08-05 23:32:57
|
Caveat: I have never used the library, only standalone and flightgear
On Monday 05 August 2019 02:29:29 pm Martin Hoffmann wrote:
> - ...
> - FCS->SetDfCmd(10.0d); // set flaps to 10 percent
> - ...
Should this be in the range [0-1] with 1 being 100%?
in my tree:
src/models/FGFCS.h: double GetDfCmd(void) const { return DfCmd; }
src/models/FGFCS.h: void SetDfCmd(double cmd) { DfCmd = cmd; }
src/models/FGFCS.cpp: PropertyManager->Tie("fcs/flap-cmd-norm", this,
&FGFCS::GetDfCmd, &FGFCS::SetDfCmd);
> - aircraftStatus.FlapsPos = FCS->GetDfPos();
This call seems to take an argument from src/models/FGFCS.h
typedef enum { ofRad=0, ofDeg, ofNorm, ofMag , NForms} OutputForm;
try FCS->GetDfPos(ofNorm); ?
> I'm using the C172p model for a first test
Is that the JSBSim model or the FlightGear model? Make sure there is xml in
the flightcontrol tag that creates fcs/flap-pos-deg and doesn't do any
failure modes on you. I notice the latest c172p from FlightGear includes some
electrical system logic...
<channel name="Flaps">
<kinematic name="Flaps Control">
<input>fcs/flap-cmd-norm</input>
<traverse>
<setting>
<position>0</position>
<time>0</time>
</setting>
<setting>
<position>10</position>
<time>2</time>
</setting>
<setting>
<position>20</position>
<time>1</time>
</setting>
<setting>
<position>30</position>
<time>1</time>
</setting>
</traverse>
<output>fcs/flap-pos-deg</output>
</kinematic>
</channel>
And note the time in the xml is in seconds, so it takes 4 seconds to apply
full flaps.
|