Board index FlightGear Development Aircraft Autopilot and route manager

C172p autopilot - altitute oscillates when sped up

Designing a stable autopilot is one of the hardest things. Need help?

C172p autopilot - altitute oscillates when sped up

Postby aplund » Thu Sep 10, 2015 11:25 pm

Came across this the other day. I'm not sure if this is a 3.6.0rc issue, or not (don't have time to check older versions just yet).

I've also only tested this on the C172p, not sure about other aircraft.

The bug is large oscillations in altitude when running on the autopilot and the simulation is sped up.

To recreate:

1) Start in the air (or get in the air somehow), and set the autopilot to maintain altitude and heading (heading probably not important, again, haven't tested).

2) Press 'a' to speed up the simulation.

For each press of 'a' the oscillations in altitude increase in amplitude.

It may just be my background in scientific computing, but this seems like some kind of residual error that at normal speeds doesn't matter but diverges when the time steps get too big. But again, haven't had time to look at code or anything. (I'm time poor. Time donations gratefully received).

Does anyone else get this? Perhaps it is just some odd setting on my part. But I've tried to test on as clean an installation as possible.
Posts: 45
Joined: Sun Mar 01, 2015 12:17 pm

Re: C172p autopilot - altitute oscillates when sped up

Postby Thorsten » Fri Sep 11, 2015 5:18 am

A properly written AP is supposed to run at FDM rate so it should be somewhat more resilient than Nasal-based solutions, and so ideally a perfectly tuned AP shouldn't do that kind of thing.

In reality, I doubt AP-stability under accelerated time is regularly tested by too many people. Maybe the airliner creators do that since they expect 8-12 hour long-haul flights and want to be able to test fuel consumption, but for a GA aircraft?

Since accelerated time is fundamentally not realistic, I would file this under 'unsupported feature' rather than 'bug'. The reason is probably what you describe.
Posts: 11720
Joined: Mon Nov 02, 2009 8:33 am

Re: C172p autopilot - altitute oscillates when sped up

Postby St.Michel » Fri Sep 11, 2015 6:59 am

The problem is at least an older one... met it also at previous versions.
Posts: 87
Joined: Tue Apr 15, 2014 8:20 am

Return to Autopilot and route manager

Who is online

Users browsing this forum: No registered users and 0 guests