From: <bi...@ho...> - 2015-10-10 01:27:34
|
More data: If I run JSBSim and specify the script on the command line, it trims okay. If I run JSBSim and specify the aircraft and initfile, it does NOT trim correctly. I only mention this because of what I call the "Star Trek Anomalies". I think that half the Star Trek episodes (all series) revolve around two or three people seeing something odd but don't mention it. It's not until a couple Red Shirts die and people start talking about the odd things they have seen, that the science officer recalibrates the sensors and they find the problem. LET THE RED SHIRTS LIVE!!! Bill > -----Original Message----- > From: bi...@ho... [mailto:bi...@ho...] > Sent: Friday, October 09, 2015 8:36 PM > To: 'JSBSim user questions' > Subject: Re: [Jsbsim-users] Trimming without scripts > > Well, I've looked at this problem closer, and I think I'm seeing a different > problem. > > What I did: I've set up a manual test that is the same conditions as a scripted > test that I have. (The 'manual' test are those same conditions being set in the > program, setting what I think are the necessary properties to duplicate the > scripted trim test). The scripted test is trimmed beautifully, no deviation when > allowed to run for 30 seconds. > > What I'm seeing: In the scripted test, it is trimming at -2 deg pitch, -2 deg AOA, > (as reported in the JSBSim window and in the recorded data). > Trimmed results and those value remain constant when the aircraft is allow to > respond freely. > > However, in the manual test, I'm not seeing the same AOA and pitch angle in > the recorded data, and I'm not even seeing the same AOA in the JSBSim > Trimmed Results output (AOA = -1.83 deg) and the recorded data (at t=0.0, > AOA = 0.0, pitch = 1.27e-15 deg). The elevator is at a different location, and > the engines are also running at a different speed, which leads me to believe > that the aircraft is not trimming correctly when I do it manually. > > So, let's look at how I am trying to get it to trim manually: > > FDMExec->SetPropertyValue("ic/h-sl-ft", 5000.0); > FDMExec->SetPropertyValue("ic/vc-kts", 300.0); > > FDMExec->SetPropertyValue("propulsion/set-running", -1); > FDMExec->SetPropertyValue("simulation/do_simple_trim", 1); > > These are the same properties that I set in my script. The first two commands > are being acted upon correct, as we are trimming to 5000 ft, 300 knots. The > engines are running, so that only leaves the command "do_simple_trim". This > is the same property that I set in my script. > > So, I'm now officially confused. Probably can't work on this until Sunday, so > maybe someone can point out the error of my way, or at least suggest > something else that I can try. I'm really not excited about trying to decipher > the trim code. It's a work of art, which means it's going to be difficult for me to > comprehend. > > Thanks, > Bill > > > > > > -----Original Message----- > > From: Dave Culp [mailto:dav...@co...] > > Sent: Friday, October 09, 2015 10:36 AM > > To: jsb...@li... > > Subject: Re: [Jsbsim-users] Trimming without scripts > > > > > > I think the difference is that when using scripts the results of > > trimming > are > > preserved within the control system because the link between control > > commands and control output is severed. The link is only opened for a > > particular control when the script calls for a new control input. > > > > In QtJSBSim the control hardware is always in the loop, so the results > > of trimming are overwritten at the next QtJSBSim -> JSBSim > > communication. I could stop the QtJSBSim -> JSBSim communication, but > > then the termination signal can't be sent to the JSBSim process. > > (Hmmm, I could use the TCP channel for the termination signal, or > > maybe open another UDP channel) > > > > If you use a software autopilot you'll need to copy the results of > trimming back > > into the autopilot right away for a true "hands off" run. > > > > > > Dave > > > > > > > > On Wed, 7 Oct 2015 22:57:41 -0400 > > Bill Galbraith <bi...@ho...> wrote: > > > > > I guess I have to ask. Why is this a different path that using a > > > script > to trim it, > > and how do I take that path? > > > > > > Bill > > > > > > Sent from my iPad thingy. Please ignore any typos. > > > > > > > On Oct 7, 2015, at 7:05 PM, Dave Culp <dav...@co...> wrote: > > > > > > > > I don't have an app set up to test in-flight trims, but I did look > through the > > code, and I think there may be an error at line 575 of FGTurbine.cpp > (should > > be = rather than == in the return from InitRunning() ). > > > > > > > > It will take me a few days to build a test for this though. > > > > > > > > Dave > > > > > > > > > > > > > > > > > > > > On Wed, 7 Oct 2015 16:30:55 -0400 > > > > <bi...@ho...> wrote: > > > > > > > >> I am attempting to trim an aircraft without the use of any > > > >> scripts, only by setting the parameters manually. Here's a > > > >> snippet of what I have (some irrelevant code removed): > > > >> > > > >> FDMExec->LoadModel( "aircraft", "engine", "systems", > > > >> AircraftName)) ; > > > >> > > > >> FDMExec->SetPropertyValue("ic/h-sl-ft", 5000.0); > > > >> FDMExec->SetPropertyValue("ic/vc-kts", 300.0); > > > >> > > > >> FDMExec->SetPropertyValue("propulsion/set-running", -1); > > > >> FDMExec->SetPropertyValue("simulation/do_simple_trim", 1); > > > >> > > > >> JSBSim::FGInitialCondition *IC = FDMExec->GetIC(); > > > >> FDMExec->RunIC(); > > > >> > > > >> > > > >> When it runs, JSBSim reports that the full trim was completed. > > > >> However, the second time step shows that the engine thrust has > > > >> immediately fallen from the trim value to 0.0, although engine > > > >> speed stays up, and the throttle position is unchanged. Fuel is > > > >> present. Aircraft response is normal considering that the engine > > > >> thrust drops to 0.0 (aircraft is A-=10 with high mounted engines, > > > >> so aircraft pitches up, slows and climbs, but doesn't go crazy). > > > >> > > > >> What am I missing? > > > >> > > > >> Thanks, > > > >> Bill > > > >> > > > >> > > > >> > > > >> > > > >> ----------------------------------------------------------------- > > > >> -- > > > >> ----------- Full-scale, agent-less Infrastructure Monitoring from > > > >> a single dashboard Integrate with 40+ ManageEngine ITSM Solutions > > > >> for complete visibility Physical-Virtual-Cloud Infrastructure > > > >> monitoring from one console Real user monitoring with APM > > > >> Insights and performance trend reports Learn More > > > >> http://pubads.g.doubleclick.net/gampad/clk?id=247754911&iu=/4140 > > > >> _______________________________________________ > > > >> Jsbsim-users mailing list > > > >> Jsb...@li... > > > >> https://lists.sourceforge.net/lists/listinfo/jsbsim-users > > > > > > > > > > > > -- > > > > Dave Culp <dav...@co...> > > > > > > > > ------------------------------------------------------------------ > > > > -- > > > > ---------- Full-scale, agent-less Infrastructure Monitoring from a > > > > single dashboard Integrate with 40+ ManageEngine ITSM Solutions > > > > for complete visibility Physical-Virtual-Cloud Infrastructure > > > > monitoring from one console Real user monitoring with APM Insights > > > > and performance trend reports Learn More > > > > http://pubads.g.doubleclick.net/gampad/clk?id=247754911&iu=/4140 > > > > _______________________________________________ > > > > Jsbsim-users mailing list > > > > Jsb...@li... > > > > https://lists.sourceforge.net/lists/listinfo/jsbsim-users > > > > > > -- > > Dave Culp <dav...@co...> > > > > > ---------------------------------------------------------------------------- > -- > > _______________________________________________ > > Jsbsim-users mailing list > > Jsb...@li... > > https://lists.sourceforge.net/lists/listinfo/jsbsim-users > > > ---------------------------------------------------------------------------- -- > _______________________________________________ > Jsbsim-users mailing list > Jsb...@li... > https://lists.sourceforge.net/lists/listinfo/jsbsim-users |