legoboyvdlp / A320-family

A high-quality Airbus A320 simulation for the open source simulator, FlightGear
GNU General Public License v2.0
150 stars 44 forks source link

Feature Request - realistic behaviour of ADIRS alignment process #182

Closed MiSKLaCH closed 4 years ago

MiSKLaCH commented 4 years ago

Is your feature request related to a problem or missing feature? Please describe. Even though this aircraft is pretty well modeled and it is almost payware quality, there are some things which are yet to be fixed or implemented from scratch. I hope the following in particular will not be too hard to make. ;)

The ADIRU splits in two separate units which are respectively:

So, when the IRS isn't aligned the ND cannot display informations like the map (both NAV / ARC modes) because it relies on the IRS unit datas but it can still show informations in modes where datas are provided by radio navigation systems, like VOR and ILS modes. It can provide datas in the PLAN mode too because such informations come from the MCDU flight plan, if any.

In the A320-family aircrafts, as soon as the systems are powered up and the displays become available, the ND is almost instantly displaying the map (even with ADIRS switches in the OFF position) while the PFD has to wait for the whole IRS alignment process to finish to display informations, and this is not what is happening with the real aircraft.

Describe the solution you'd like After the aircraft is powered on by APU or GPU and the displays perform their self test, the PFDs and NDs show no informations (red screens).

image

Once the ADIRS alignment process is started (ADIRS 1, 2 and 3 switches to NAV in the overhead panel / IRS INIT in MCDU INIT-A page) the PFD shows informations well before the ND, which will display red HDG / MAP NOT AVAIL / GPS PRIMARY LOST messages until the IRS will be eventually aligned.

image

Additional context More detailed informations are available on YouTube and other media, such as the following:

legoboyvdlp commented 4 years ago

Thanks,

This is already simulated internally - however, the ND doesn't yet have the drawings. Actually, if you'd like to help out on this, drawing the red "map not AVAIL" would help! :)

I wasn't aware of the difference between the PFD and ND - I suppose attitude is available sooner than the position?

MiSKLaCH commented 4 years ago

I'm not used to SVG drawing but I'll give it a try for sure :) I guess you already know this site: http://www.a320dp.com/A320_DP/menu.html

Just in case you don't, It's an overwhelming source of informations about A320 systems. Here is the section about the panels: http://www.a320dp.com/A320_DP/panels.html

You guys are doing a GREAT job, hope I can help somehow.

merspieler commented 4 years ago

Think, I've seen that. These sites are not guaranteed to be 100% accurate so we usually use only pictures of real aircraft and the FCOM (Flight Crew Operational Manual) as reference.

At one point, any one of us had any lack of experience for what we wanted to do... creating an aircraft always involves learning.

If you need any help or guidance, let us know.

MiSKLaCH commented 4 years ago

Here it is. I don't even know if I placed the objects correctly. What I've done is to create a new layer called UNAVAIL with the graphics of NAV and ARC modes in "unavailable state". Let me know in case I screwed everything up, that's my first time with SVGs.

airbusND.zip

merspieler commented 4 years ago

Looks good...

You had a few twists...

Apart from that, the only thing I had to change, was to rename the GPS PRIMARY LOST as there are more possible message (which are as well not yet implemented)... tho that you probably didn't have on your radar yet.

Loading it in flightgear gives me an error tho:

   12.28 [ALRT]:nasal      parsesvg: parse XML failed [path='/games/.fgfs/Aircraft/A320-family/Models/Instruments/ND/canvas/res/airbusND.svg']
   12.28 [INFO]:nasal      cannot change immutable string:
 at /games/fgdata/Nasal/canvas/svg.nas, line 428
   12.28 [INFO]:nasal        called from: /games/fgdata/Nasal/canvas/svg.nas, line 748
MiSKLaCH commented 4 years ago

There is a new version in my previous comment, I noticed I forgot the outer arc (and added it). I'll try to look into such error and will let you know (hopefully).

MiSKLaCH commented 4 years ago

Oopsie... wrong button, my bad (reopened).

merspieler commented 4 years ago

The error seems to come from a rectangle object, you've added...

MiSKLaCH commented 4 years ago

Strange thing there is only one error! :) The rectangle could be the one surrounding the GPS PRIMARY LOST, it's the only rectangle added.

merspieler commented 4 years ago

remove it and see if it works ;-)

MiSKLaCH commented 4 years ago

Removed but no luck... trying to solve the issue. :( I'm doing some tests, will let you know asap.

MiSKLaCH commented 4 years ago

Managed to fix it, it seems it was a damn font issue. Let me know in case something is broken.

airbusND.zip

merspieler commented 4 years ago

Looks good.

Next would be the logic... do you want to give it a try with our help?

MiSKLaCH commented 4 years ago

Why not, I'm glad to help this project :)

merspieler commented 4 years ago

Great.

I've never touched the ND Code my self so it might take me some time, to point you in the right direction or @legoboyvdlp might help out with that.

If you like to contribute more, I'd highly recommend, that you take a look at git (install it on your PC) so you can commit your changes and then create a pull request, when you think, your changes are ready for being merged.
If you need any assistance, let me know.

legoboyvdlp commented 4 years ago

The ND is ... complicated... I guess it would mean adding code to Instruments/ND/canvas/ND.nas.

Line 182 and 202, there are two objects, each with getKeys() and update().

Inside update() it should work to update the hiding / showing of the error message.

essentially, you want a condition similar to this:

if (systems.ADIRS.ADIRunits[0].aligned == 1 or (systems.ADIRS.ADIRunits[2].aligned == 1 and att_switch.getValue() == -1)) {

That means: unit 1 is aligned (zero-based index) or unit 3 is aligned and attitude switching is on CAPT.

The R/HS would have unit[1] aligned or unit 3 aligned and attitude switching on FO i.e. +1.

MiSKLaCH commented 4 years ago

@merspieler I already have git on my Linux PC but I guess I should learn other arguments apart from "clone", "pull" and "whatchanged" :smile: I'll give it a look, and thank you @legoboyvdlp for the hints! :wink:

merspieler commented 4 years ago

Then you've got the basics already.

For git pull there's the --rebase argument which you should use, if you pulling on a branch where you have some work committed but not yet pushed (to avoid unnecessary merges).

git branch and git remote are worth a look when you start handling multiple branches and repos, both are quite stright forward tho.

git stash is another thing that I use frequently.

Then you obviously need git add, git commit and git push.

... I've never heard of whatchanged... it's new to me :D

These are the best practice, I try to follow... if you need a lecture to read in the evening ;-)

MiSKLaCH commented 4 years ago

Ok, I gave it a good look and ... gave up! :disappointed: It's just waaay too complex for my poor skills. I hope some day the drawings I made will be somewhat useful to you.

merspieler commented 4 years ago

There for, that you've got no clue, you've asked very little questions... :P

That's fine....

@legoboyvdlp do you mind, adding it?

legoboyvdlp commented 4 years ago

Implemented this. The IR part will be redone later with the rest of the ADIRS. Thanks!