From: Martin H. <mar...@gm...> - 2019-08-06 22:25:28
|
Am Di., 6. Aug. 2019 um 01:33 Uhr schrieb Ron Jensen <wi...@je...>: > 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%? > API docs state that input is in percent, but no matter if I use [0-1] or [0-100], the result is the same. > > in my tree: > src/models/FGFCS.h: double GetDfCmd(void) const { return DfCmd; } > src/models/FGFCS.h: void SetDfCmd(double cmd) { DfCmd = cmd; } > These are exactly the functions my code is using. > > 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); ? > You can select multiple output formats, but it has no impact of my flaps not reacting at all. > > > 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. > I checked that the Flaps section is available in the XML. As I am using the JSBSim model, there should no electrical systems logic that has an influence. My loop runs for one simulated minute, so flaps should have plenty of time to reacht. I also tried to track down flaps management in the debugger, but I was unable to locate the place in code where flaps are managed. Maybe someone can point me at the right location? Thanks again! > > > _______________________________________________ > Jsbsim-devel mailing list > Jsb...@li... > https://lists.sourceforge.net/lists/listinfo/jsbsim-devel > _______________________________________________ > The JSBSim Flight Dynamics Model project > http://www.JSBSim.org > _______________________________________________ > > |