- Joined
- Mar 30, 2008
- Messages
- 450
- Reaction score
- 1
- Points
- 18
Yes, what you are seeing is normal. I'll try to explain exactly why here. Tuning an autopilot is a compromise between 1) Efficiency (how much RCS fuel does it burn?), 2) Stability (how stable and smooth is the ship under time acceleration [low effective frame rates]?), and 3) Tolerance (how tightly does it try to hold a given setting?). It is relatively simple to make an autopilot that is very good at any one of those three criteria. It is much more work, however, to build one that is pretty good at all three.
For example, it's easy to tune an autopilot for very tight tolerances (i.e., hold within 0.1 degree) if you crank up the RCS power it uses at every timestep. When you do that, however, two things happen: 1) efficiency goes way down because the autopilot is much more prone to "overshooting" and then correcting with almost the same force in the opposite direction due to the framerate varying and/or just being too low, and 2) stability would be terrible under time acceleration (i.e., low effective frame rates) because of the "overshooting" that would constantly occur as the hold targets/air density/framerate constantly varied. So the trick is to tweak the autopilot code to be efficient and stable even under low frame rates while still holding a good degree of accuracy. During testing and tuning I found that holding within 0.5 degree still allowed very good efficiency and stability, even under time acceleration. For example, if you're getting 40 fps or more you should be able to reenter using Attitude Hold even at 10x time acceleration, which is an effective framerate of only 4 frames per second. In other words, the XR's autopilot is only able to update thruster levels four times per second of simulation time while having to cope with constantly changing air resistance, hold targets, and framerate.
So it's really just a matter of design goals: in the XRs' case I wanted to be able to reenter at 10x time acceleration or more while Attitude Hold remained stable, so that's why I had to loosen the tolerance a little more than I would have liked. But the payoff was very good stability and efficiency.
Makes perfect sense, thanks for the explanation. I have noticed, reentering at 10x is not a problem. So is that why you made the descent hold autopilot so accurate, because nobody would be landing on the moon at 10x time acceleration?
What I am about to say, I am not trying at all to nitpick or nag you (you've done such a great job with this craft), but would it be difficult to incorporate a parameter in the config file, that allows the user to set the tolerance limit of the autopilot? If it would take much to long (such as rewriting the autopilot code), please don't worry about doing it, the Ravenstar is an amazing ship and this is one tiny detail that can easily be overlooked. I'm not a coder (MATLAB doesn't count :lol: ), so I wouldn't know how long something like this would take. Thanks for your feedback Doug.