ATR 72

Working on a instrument project or just finished a project? Show it to others!

Moderators: russ, Ralph

Message
Author
litinoveweedle
Posts: 32
Joined: Thu Nov 09, 2017 12:26 am

Re: ATR 72

#51 Post by litinoveweedle »

Hello Jean-Luc,
I downloaded AM3b and opened your panel and I have to say it is amazing scripting work behind. You are actually simulating aircraft systems there. I read about status of the Aerosoft ATR in forums - abandon and not done in details, but at least with Xplane, there is a way how to interface model - much more better than Flight1 ATR in FSX, which is abandon as well, but you cannot interface it. My original plan was to use FlyWithLua to do exactly what you already did AM - create logic for missing aircraft systems. FlyWithLua allows to create own datarefs for communicating with other plugins/software, so you are not limited to what exists in Xplane. But it doesn't matter where the lua logic resides. :-) My GNSS has possibility to communicate via TK interface or via IO libraries, so I am currently writing library to support native Xplane UDP interface. Then I will define set of private datarefs for input (buttons) and output (screen lines) For each line, there are three text positions, left, center, right, each could contains different color. So I will be able to code it as something like:

FlyWithLua/litinovewedle/gnss/line1L_text
FlyWithLua/litinovewedle/gnss/line1L_color
FlyWithLua/litinovewedle/gnss/line1C_text
FlyWithLua/litinovewedle/gnss/line1C_color
FlyWithLua/litinovewedle/gnss/line1R_text
FlyWithLua/litinovewedle/gnss/line1R_color
FlyWithLua/litinovewedle/gnss/line2L_text
FlyWithLua/litinovewedle/gnss/line2L_color
....
FlyWithLua/litinovewedle/gnss/line6R_color

where text is string to display (I have created own font for that), color could be enumerated INT or whatever to set proper text color in AM.

What do you think about such approach?

GNSS output is simply bank guidance for AP, which I could write directly into existing AP dataref, at least for now (I have custom AFCS as well) The only missing thing is to how to include generated RTE map into EHSI in AM. I checked AM API integration with OSM, but this is not usable. I do not know, it this is limitation of how AM is coded, but missing this feature is bad. :-o RTE map is generated at 2Hz as it is changing when being flown and therefore constant update of the image in EHSI is required. So honestly I do not know how to overcome this. Do you have any idea? Thank you.

Kind regards
Dominik

docjl
Posts: 129
Joined: Tue Mar 01, 2016 4:24 pm
Location: Besançon

Re: ATR 72

#52 Post by docjl »

litinoveweedle wrote: Sat Nov 11, 2017 12:34 am Hello Jean-Luc,
I downloaded AM3b and opened your panel and I have to say it is amazing scripting work behind. You are actually simulating aircraft systems there.
Thank you very much for your compliment.
What do you think about such approach?
Good idea to use FlightWithLua, but I don't see how to interfacing with AM (plugin of FWL ?)
GNSS output is simply bank guidance for AP, which I could write directly into existing AP dataref, at least for now (I have custom AFCS as well) The only missing thing is to how to include generated RTE map into EHSI in AM. I checked AM API integration with OSM, but this is not usable. I do not know, it this is limitation of how AM is coded, but missing this feature is bad. :-o RTE map is generated at 2Hz as it is changing when being flown and therefore constant update of the image in EHSI is required. So honestly I do not know how to overcome this. Do you have any idea? Thank you.
Difficult... with a waiting loop ?

Best regards.
Jean-Luc

litinoveweedle
Posts: 32
Joined: Thu Nov 09, 2017 12:26 am

Re: ATR 72

#53 Post by litinoveweedle »

docjl wrote: Mon Nov 13, 2017 11:29 am
litinoveweedle wrote: Sat Nov 11, 2017 12:34 am Hello Jean-Luc,
I downloaded AM3b and opened your panel and I have to say it is amazing scripting work behind. You are actually simulating aircraft systems there.
Thank you very much for your compliment.
What do you think about such approach?
Good idea to use FlightWithLua, but I don't see how to interfacing with AM (plugin of FWL ?)
FlightWithLua has possibility to create own datarefs inside Xplane, and sure, you can write/read into these from FlightWithLua. Then I AM will be able to normally see these datarefs as native Xplane ones.
GNSS output is simply bank guidance for AP, which I could write directly into existing AP dataref, at least for now (I have custom AFCS as well) The only missing thing is to how to include generated RTE map into EHSI in AM. I checked AM API integration with OSM, but this is not usable. I do not know, it this is limitation of how AM is coded, but missing this feature is bad. :-o RTE map is generated at 2Hz as it is changing when being flown and therefore constant update of the image in EHSI is required. So honestly I do not know how to overcome this. Do you have any idea? Thank you.
Difficult... with a waiting loop ?
I do not understand.... My problem is that AM is not able to take new version of image from the disk (which I am generating/updating by external application) and display it. It load picture only once on start. I tried at least to add new image on dataref change but at least in AM3b you cannot call img_add inside of dataref function - you will get some error message about img_add being valid only in definition part of your lua script. If you have anything else on you mind, could you please try to write given lua snippet?

Best regards.
Dominik

User avatar
Ralph
Posts: 7924
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: ATR 72

#54 Post by Ralph »

You can not add images on the fly. They have to be added when the instrument starts.

docjl
Posts: 129
Joined: Tue Mar 01, 2016 4:24 pm
Location: Besançon

Re: ATR 72

#55 Post by docjl »

As Ralph said, you can't use image for the EHSI, you must draw it, and honestly, I don't know how to make that... Jacques (JackZ) worked on a similar thing, but I don't know if he had finished it.
I'm not good advice on this... :roll:
Jean-Luc

litinoveweedle
Posts: 32
Joined: Thu Nov 09, 2017 12:26 am

Re: ATR 72

#56 Post by litinoveweedle »

Ralph wrote: Mon Nov 13, 2017 6:09 pm You can not add images on the fly. They have to be added when the instrument starts.
Well Ralph I realized it. But I feel so bad about this limitation of AM that I wen into discussion with Corjan about such possibility in this thread:

viewtopic.php?f=9&t=626&p=5815#p5815

It would be so great and so flexible to have possibility to let AM periodically reload/redraw image from disk. It will not be complicated either, neither performance degrading as it could be done in independent thread from the main one. Also additional check could be inherited to validate that picture exists, has same size like previous one etc. could be easily implemented to not harm AM stability. (please see link above for my proposal)

Kind regards
Dominik

litinoveweedle
Posts: 32
Joined: Thu Nov 09, 2017 12:26 am

Re: ATR 72

#57 Post by litinoveweedle »

docjl wrote: Mon Nov 13, 2017 6:33 pm As Ralph said, you can't use image for the EHSI, you must draw it, and honestly, I don't know how to make that... Jacques (JackZ) worked on a similar thing, but I don't know if he had finished it.
I'm not good advice on this... :roll:
With all regards to JackZ work I will not draw EHSI map it pixel by pixel for each LUA iteration, this will kill AM. :-o Just look at the pictures I am generating right now. Hope that we can get image reload feature from developers. :-)

Kind regards
Dominik
Attachments
egpws_standard.png
egpws_standard.png (3.14 KiB) Viewed 3629 times
egpws_peak.png
egpws_peak.png (4.16 KiB) Viewed 3629 times
2_ehsi.png
2_ehsi.png (4.26 KiB) Viewed 3629 times

User avatar
Ralph
Posts: 7924
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: ATR 72

#58 Post by Ralph »

Now you're talking about shapes, not images. I don't see any problem in loading the images before the instrument starts, in fact, I only see advantages. With shapes that's something totally different.

User avatar
Ralph
Posts: 7924
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: ATR 72

#59 Post by Ralph »

Except for a weather radar perhaps. But that too would be much better if you could create the imagery yourself.

litinoveweedle
Posts: 32
Joined: Thu Nov 09, 2017 12:26 am

Re: ATR 72

#60 Post by litinoveweedle »

Ralph,

These images changes a lot during flight. RTE is changes after each update, it is changed dynamically by plane position towards the rte etc. And I am not speaking about radar/egpws overlays. So no sorry, I can not load such image once. And there are no advantages.

I am generating these images by myself. Anyone can. And yes I can probably produce whole EHSI by myself. But what is the point? Redevelop wheel all the time, because we are not able to to be flexible enough? I use image as output because it is versatile format. The same way, why AM use bitmap image as input. It is versatile solution for exchanging graphical data. You are not able without significant overhead to pass such data through XPL datarefs and you are not able to draw them in AM. Simple.

What seems to be strange because for example freeware GaugeComposer for FSX has ability to reload image on offset change. And it works without any performance glitch on my old development machine. I just would love to see such function in AM. Thats all. I hope many users will find this usable feature.

edit: just realize that you are Ralph from Simm Inovations, so some of my comments are not valid as you are in charge here. :-) I am sorry and I edited post removing irrelevant parts.

Best regards
Dominik
Last edited by litinoveweedle on Mon Nov 13, 2017 9:50 pm, edited 1 time in total.

Post Reply