Hold simulation at specific values #1041
Replies: 2 comments 1 reply
-
Hmm, best bet would potentially be to perform a reset with a set of initial conditions that match the 3D position you want, speed, heading etc. and then performs a trim operation. |
Beta Was this translation helpful? Give feedback.
-
Autopilot is tuned per aircraft and the PIDs can be turned to be more aggressive. And if you look at the auto pilot file of a specific aircraft you're using, you can see the properties being used. For example with the c172x, look at it's "ap" xml file, you can see the following properties: jsbsim/aircraft/c172x/c172ap.xml Lines 23 to 36 in 92daf89 You can see here "airspeed" is the property you are looking for. Unfortunately I'm not sure airspeed autopilot was ever actually implemented or finished being created in any of the aircraft available. Periodic resetting in the way Sean suggested might be the simplest solution. Or some combination of periodic resetting, manually setting speed, and using the functioning parts of autopilot in-between the resets. |
Beta Was this translation helpful? Give feedback.
-
Hello! I know this will be a pretty general question so I can provide any information needed to help explain this further if necessary. I am wanting to basically feed JSBSim specific values for the altitude, speed, and heading and keep them there while also keeping my pitch and roll steady. This could be done something that is done at any point while flying and isn't necessarily something that would be set at startup. For example, I could just start using JSBSim and be flying around, then decide that I want my speed, altitude, and heading to be kept steady at a point I just passed to check something out in my visualizer.
I have found some properties that I can try and set but they haven't worked in the way I was hoping:
SetPropertyValue("ap/heading_hold", 1);
SetPropertyValue("ap/heading_setpoint", myheading);
SetPropertyValue("ap/altitude_hold", 1);
SetPropertyValue("ap/altitude_setpoint", myalt);
SetPropertyValue("ap/speed_hold", 1); // I don't think this is the right property but I
SetPropertyValue("ap/speed_setpoint", myspeed); // don't know what is
When I set these though, it stabilizes me for the most part, but it takes a minute to adjust and so the heading goes way past the value given, the altitude keeps increasing due to the pitch being up at probably about 2 and the speed doesn't change at all (unsurprising considering the property that I am using).
I am not sure if what I want is possible and hope that I explained it well enough. I appreciate any help!
Beta Was this translation helpful? Give feedback.
All reactions