Board index FlightGear Development Aircraft

An-24 Autopilot

Questions and discussion about creating aircraft. Flight dynamics, 3d models, cockpits, systems, animation, textures.

An-24 Autopilot

Postby Ivan-Pekar » Fri May 04, 2018 7:49 pm

As soon as I take off, and engage the autopilot at a steady climb, the aircraft banks steeply, descends sharply, and falls. I enter all the correct information into the autopilot, but it the An-24 doesn't seem to follow it.
Could anyone suggest what is happening and what I should do?

Thank you very much,
Ivan Pekar
Ivan-Pekar
 
Posts: 122
Joined: Thu Feb 15, 2018 4:57 pm

Re: An-24 Autopilot

Postby Thorsten » Sat May 05, 2018 5:26 am

Does the plane have its own autopilot code coming with it? If you're trying to use the default autopilot, that might simply not be tuned to the flight dynamics - often it doesn't work properly because the gains are wrong.

Writing good controllers for automated flight is an art - expect to take weeks to months of experimentation to come to the point that you get good results, it requires math knowledge (damped harmonic oscillator) as well as flight experience and sometimes a good quantum of ingenuity. A really capable AP can be a thousand line of code or more easily.
Thorsten
 
Posts: 10594
Joined: Mon Nov 02, 2009 8:33 am

Re: An-24 Autopilot

Postby Maerchenprinz » Tue May 08, 2018 12:56 am

Hi Ivan!

Thorsten is right, the An-24 has its own autopilot code, for the AP-28L1 autopilot, the default one does not work.
What you can do is to download the newest version from here:

https://github.com/maerchenprinz/an24b

It's much better than the one in FGAddon. And, most important, the bug in the own autopilot code isn't there anymore...
(That was my fault :oops: )
With the new version, there is an "extended" README.md now; It has a short description of the AP-28L1 in it. If you have some more question,
just ask!

Ciao,

Adrian

EDIT: Use 's' key for autostart, that's much more comfortable than following the README.md start-up procedure
User avatar
Maerchenprinz
 
Posts: 159
Joined: Thu Mar 15, 2007 5:24 pm
Location: Bochum, it's better, much better than you think!
Callsign: Adrian

Re: An-24 Autopilot

Postby Ivan-Pekar » Sat Jun 02, 2018 7:33 pm

Thank you Thorsten and Adrian! I appreciate your help. I will download the better An-24 from GitHub. I hope it will work better.
Thank you
Ivan
Ivan-Pekar
 
Posts: 122
Joined: Thu Feb 15, 2018 4:57 pm

Re: An-24 Autopilot

Postby Maerchenprinz » Sun Jun 03, 2018 8:34 am

Hi Ivan!

You know what? Between my last post and this post, I broke the AP code again! :oops: That was due to a change to the artificial horizon.
Good news : Meanwhile, it's been fixed again! :D
A complete rework of the canopy, cockpit cell and fuselage is on it's way, but this will take a while (many days, probably weeks...).
When I will have finished that, I will then begin to work on the final textures - It doesn't make sense to produce elaborate textures for an indefinite model.
Anyway, hope you enjoy it despite some imperfections!

Ciao,

Adrian

EDIT: AP fixes were committed on 31st May and 1st June, so everything after that should work again
User avatar
Maerchenprinz
 
Posts: 159
Joined: Thu Mar 15, 2007 5:24 pm
Location: Bochum, it's better, much better than you think!
Callsign: Adrian

Re: An-24 Autopilot

Postby Ivan-Pekar » Wed Jun 06, 2018 5:15 pm

Hello Adrian!
That's absolutely fine. However, when I re-installed the aircraft, the autopilot improved but still had some issues. What I enter values into the Autopilot --> Autopilot Settings (F11), it is not what the aircraft does. They don't seem to correspond with each other. I have to press the 'A/P' and 'Horizon' buttons to control the aircraft, but this doesn't seem to work well either and isn't efficient. Maybe you made a mistake? Or did I download something incorrectly?

Thanks
Ivan
Ivan-Pekar
 
Posts: 122
Joined: Thu Feb 15, 2018 4:57 pm

Re: An-24 Autopilot

Postby Maerchenprinz » Wed Jun 06, 2018 10:46 pm

Hi Ivan!

The Autopilot-Settings dialog is completely unfunctional for this airplane! You have to use the AP on the middle console! There is a small explanation of the AP in the README.md (really, really small, I have to admit...).
So,
- after pressing "d" once (or pressing the 'A/P' button), the AP is connected and keeps current pitch and levels wings first.

Pitch/Alt:
- You can then adjust Pitch by pushing up or pulling down one of the switches which are left and right from the "Roll" knob
(they have small effect, so push/pull a little longer)
- At desired Altitude, push button "KB" (bottom right); you're now in "Altitude Hold" mode; pushing or pulling one of the "pitch switches"*
gets you back to "Pitch" mode
- 4th switch (of the ones which are in line with the "A/P" button) enables/disables pitch/alt channel

"Heading", "Course" and "Roll":
- You can set these modes by using the 3rd switch (of the ones which are in line with the "A/P" button):
- Down ("ZK"): You can set desired Heading on the "ZK"-instrument - use Ctrl-C to find it
- middle: Roll mode, use Roll knob
- Up (GIK): Use Gyro Induction Kompass to follow current Course (not yet 100% correctly implemented)

"Horizon":
- Push that one to get back anytime to wings level and pitch 0

After all, all you need is the AP-console and the ZK-instrument... Keep away from F11! 8)
You should have the correct version when you have downloaded from here (after 1st June):
https://github.com/maerchenprinz/an24b

So far,

Adrian

*Try to say "pitch-switches" fast and ten times in a row! :D
User avatar
Maerchenprinz
 
Posts: 159
Joined: Thu Mar 15, 2007 5:24 pm
Location: Bochum, it's better, much better than you think!
Callsign: Adrian

Re: An-24 Autopilot

Postby Ivan-Pekar » Thu Jun 07, 2018 2:06 pm

Adrian, I appreciate your help and information. So, thank you very much, this has been very useful!
The aircraft systems and controls are now much more clearer. Though there is one more question I want to ask: How do I carry out an instrument landing (ILS or something similar)?
Regards
Ivan
Ivan-Pekar
 
Posts: 122
Joined: Thu Feb 15, 2018 4:57 pm

Re: An-24 Autopilot

Postby wkitty42 » Thu Jun 07, 2018 4:13 pm

Maerchenprinz wrote in Wed Jun 06, 2018 10:46 pm:The Autopilot-Settings dialog is completely unfunctional for this airplane! You have to use the AP on the middle console!

the same is true with the AP in the c172p... you might want to look at it to see how the c172p team has disabled the F10->Autopilot menu option so it can't be brought up and lead to confusion about whether the system default AP is hooked up to the craft or not ;)
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 5327
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: An-24 Autopilot

Postby bugman » Thu Jun 07, 2018 4:23 pm

Michael Soitanen isn't syncing with FGAddon any more, I guess he's been too busy lately. Adrian, would you like to take over that job? The wiki article could also do with some polish ;) Note that I've updated the aircraft infobox to point to your git development repository.

Regards,
Edward
bugman
Moderator
 
Posts: 1631
Joined: Thu Mar 19, 2015 9:01 am
Version: next

Re: An-24 Autopilot

Postby Soitanen » Thu Jun 07, 2018 5:46 pm

bugman wrote in Thu Jun 07, 2018 4:23 pm:Michael Soitanen isn't syncing with FGAddon any more, I guess he's been too busy lately. Adrian, would you like to take over that job? The wiki article could also do with some polish ;) Note that I've updated the aircraft infobox to point to your git development repository.

Regards,
Edward

You are right, no free time at all. I'm just looking at commits, but even don't run FG. Adrian is doing great job.
Boeing 737-300. Reworked cockpit, FDM, autopilot and much more. WIP.
Boeing 737-800. WIP. Canvas PFD and ND.
Antonov An-24B. Made from scratch. Very good FDM. 3D model by Adrian. WIP.
Project Russia (some cities, based on OSM with custom objects).
Soitanen
 
Posts: 489
Joined: Sat Jun 16, 2012 6:50 am
Location: Saint-Petersburg, Russia
Version: git
OS: Linux Mint 17

Re: An-24 Autopilot

Postby Maerchenprinz » Thu Jun 07, 2018 7:59 pm

Hi!

Soitanen wrote in Thu Jun 07, 2018 5:46 pm:but even don't run FG. Adrian is doing great job.

Liar! How could you know if you don't even run FG? Caught!

bugman wrote in Thu Jun 07, 2018 4:23 pm:Adrian, would you like to take over that job?

Why not, I have time, though I'll be on holidays this month, but back to Michael: Time! Holidays! Remember these words? :P

I think I even have an account for FG-wiki, so I can do that too.

@Ivan:
So far, we only have a rudimentary version of an "eastern ILS", called "SP-50"; the remote console (M-50) of it is at the very back of the overhead panel and has two knobs: with the visible one, you can choose between 5 different frequencies (that's how SP-50 works!), and with the hidden one (use Ctrl-C to see it), you can cheat and set other frequencies. This is very fiddly and not yet very well implemented, so:
You are now officially allowed to use the menu from FG! But only to set freqs! No Autopilot-menu! Don't touch! :wink:
You should then see the deviation from glidepath/slope on the KPPM; As there's no "Auto"-mode on this plane, one has to fly manually, which doesn't make my landings better... :roll:
Enjoy!

Ciao,

Adrian
User avatar
Maerchenprinz
 
Posts: 159
Joined: Thu Mar 15, 2007 5:24 pm
Location: Bochum, it's better, much better than you think!
Callsign: Adrian

Re: An-24 Autopilot

Postby bugman » Fri Jun 08, 2018 11:09 am

Maerchenprinz wrote in Thu Jun 07, 2018 7:59 pm:
bugman wrote in Thu Jun 07, 2018 4:23 pm:Adrian, would you like to take over that job?

Why not, I have time, though I'll be on holidays this month...


Do you have a SourceForge account? If so, I can ask on the mailing list for you to be granted commit access to FGAddon for updating the An-24 as the lead developer (or you can if you like). See the FGAddon wiki article for instructions. Though Michael might be able to tell you what he previously did. Note that for modifying any other aircraft, you would have to ask the lead developers of those aircraft first.

Regards,

Edward
bugman
Moderator
 
Posts: 1631
Joined: Thu Mar 19, 2015 9:01 am
Version: next

Re: An-24 Autopilot

Postby Soitanen » Fri Jun 08, 2018 4:14 pm

I have uploaded latest version from Adrian to FGAddon. Only 2 changes from me - propeller file, Adrian was using old one and added Autostart as menu entry, sometimes it is more intuitive for people, than 's' button.
Last edited by Soitanen on Fri Jun 08, 2018 7:50 pm, edited 1 time in total.
Boeing 737-300. Reworked cockpit, FDM, autopilot and much more. WIP.
Boeing 737-800. WIP. Canvas PFD and ND.
Antonov An-24B. Made from scratch. Very good FDM. 3D model by Adrian. WIP.
Project Russia (some cities, based on OSM with custom objects).
Soitanen
 
Posts: 489
Joined: Sat Jun 16, 2012 6:50 am
Location: Saint-Petersburg, Russia
Version: git
OS: Linux Mint 17

Re: An-24 Autopilot

Postby Ivan-Pekar » Fri Jun 08, 2018 7:40 pm

Thank you very much Adrian and all that have helped!
Ivan-Pekar
 
Posts: 122
Joined: Thu Feb 15, 2018 4:57 pm

Next

Return to Aircraft

Who is online

Users browsing this forum: No registered users and 3 guests