static data load(): PATH limited to resource folder ONLY?

Help creating logic scripts for Air Manager Instruments

Moderators: russ, Ralph

Message
Author
User avatar
Keith Baxter
Posts: 4671
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: static data load(): PATH limited to resource folder ONLY?

#11 Post by Keith Baxter »

Corjan,

Peeps are moving to the better modeled AirFrames that provide added features like memory storing to text files, synthetic vision and other custom instruments that the sim does not cater for.

I would not expect AM to have a library for each and every variant.

I will think about all the sim options that are not avaible and revert for you to look at.

Lets start with these two.

https://developer.x-plane.com/2021/04/t ... er-report/

https://developer.x-plane.com/article/w ... adar-data/

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Keith Baxter
Posts: 4671
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: static data load(): PATH limited to resource folder ONLY?

#12 Post by Keith Baxter »

@Corjan

To be honest, I do not think perusing weather data at this stage regarding Xplane is a wise decision. XP12 weather we believe, is going to be enhanced to align with FS2020 so perhaps look at it when XP12 comes out.

Along with lightning strikes so that storm scope instruments can be made.

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Corjan
Posts: 2933
Joined: Thu Nov 19, 2015 9:04 am

Re: static data load(): PATH limited to resource folder ONLY?

#13 Post by Corjan »

JackZ wrote: Mon Jul 26, 2021 4:12 pm In my particular problem, there is an XPlane addon (as Keith said, most of the current development is done for specific addons, the stock planes are already covered.
This addon has a Radio Management Unit which allows to use frequencies stored into memory from 1 to 20 for UHF, VHF and NAv radios.
The addon uses for this three text files in the XPlane Aircraft folder that can be modified by the user to offer for each memory slot the desired frequency. The stored frequencies are nowhere available in the sim from any dataref.
So the only way for me to access these user frequencies is to actually READ these three text files.

But now I have to ask the user to CLONE the files from their XPlane folder into the AM resource folder
Hi,


If one application should have to write configuration of another program, that is quite sketchy to begin with. And not very future proof.

The clean way to do it would be for those guys to expose the settings through the system X-plane has made for this very purpose, the datarefs/commands.
Not sure if they would be willing to cooperate, but I would try to go that route.


Corjan

User avatar
Keith Baxter
Posts: 4671
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: static data load(): PATH limited to resource folder ONLY?

#14 Post by Keith Baxter »

Hi,

When I talk about synthetic vision I am referring to this.

https://www.thresholdx.net/news/tqssyv

Would SI try and do custom synthetic vision or tap into AirFrame data?


Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Corjan
Posts: 2933
Joined: Thu Nov 19, 2015 9:04 am

Re: static data load(): PATH limited to resource folder ONLY?

#15 Post by Corjan »

Keith Baxter wrote: Tue Jul 27, 2021 5:50 am Hi,

When I talk about synthetic vision I am referring to this.

https://www.thresholdx.net/news/tqssyv

Would SI try and do custom synthetic vision or tap into AirFrame data?


Keith
Try to stay on topic, this is about the paths stuff.

Always free to start a new topic off course,
Corjan

User avatar
Keith Baxter
Posts: 4671
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: static data load(): PATH limited to resource folder ONLY?

#16 Post by Keith Baxter »

Sorry Corjan I did not mean to go OT

I thought it was on topic.
When you said access file paths. Is Synthetic vision within an AirFrame not done that way? Where is the data retrieved from? It would seem Xplane. I don't know.

Access to this database would be nice.

"Here you can see a reproduction of the Garmin TAWS-B (Terrain Awareness and Warning System - B). This system works in a rather simple manner. It contains a stored database of world-wide terrain, reads GPS inputs and projects the aircraft's flight path with turn, climb and descend trends to some future point (typically approximately one minute ahead). If it detects a potential terrain conflict, it will begin issuing aural cautions ("TERRAIN AHEAD"). If the pilot doesn't respond, the system will increase speaker volume and issue a hard warning ("TERRAIN AHEAD, PULL UP!"). In the following image you can see the path-prediction function. The aircraft is currently not headed in the direction of terrain, but it is turning towards it. The TAWS-B system detects this and shows the predicted impact point:"


I will revive the synthetic vision discussion in another thread.

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Keith Baxter
Posts: 4671
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: static data load(): PATH limited to resource folder ONLY?

#17 Post by Keith Baxter »

@Corjan

I am going to drop of some files for you to look at. You can see that access to these files would facilitate GPWS, WXR,TCAS and other airport data. These files reside in the AirFrame

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

JackZ
Posts: 2262
Joined: Mon Feb 22, 2016 1:02 pm

Re: static data load(): PATH limited to resource folder ONLY?

#18 Post by JackZ »

Corjan wrote: Tue Jul 27, 2021 5:37 am
JackZ wrote: Mon Jul 26, 2021 4:12 pm In my particular problem, there is an XPlane addon (as Keith said, most of the current development is done for specific addons, the stock planes are already covered.
This addon has a Radio Management Unit which allows to use frequencies stored into memory from 1 to 20 for UHF, VHF and NAv radios.
The addon uses for this three text files in the XPlane Aircraft folder that can be modified by the user to offer for each memory slot the desired frequency. The stored frequencies are nowhere available in the sim from any dataref.
So the only way for me to access these user frequencies is to actually READ these three text files.

But now I have to ask the user to CLONE the files from their XPlane folder into the AM resource folder
Hi,


If one application should have to write configuration of another program, that is quite sketchy to begin with. And not very future proof.

The clean way to do it would be for those guys to expose the settings through the system X-plane has made for this very purpose, the datarefs/commands.
Not sure if they would be willing to cooperate, but I would try to go that route.


Corjan
Actually no, they are not writing config for another program, but for their own purpose!

The developers of the addon have used their own way to allow the user to customize their own list of memory frequencies available through a simple text file located into the addon, quite a simple idea. They of course had no way to figure out that AM might need to access to this data one day.

Granted, the good thing would be for them to read the file then expose the actual frequency for each memory slot in an array dataref of some sort, but this is not the case.

One could reply that due to the inability of AM to create a Dataref (like FlywithLua does) for other addon to gain access to some data created by a gauge (for example the results of additional functions that I implemented), the same reply should apply to Air Manager developers :D (pun intended)

Anyways, I will not kill myself trying to overcome the current (and future) AM limitation. Lesson learned.

It will stay like this, if the user of my gauge wants access to the frequency memories, he will have to copy the text file into the resource folder, otherwise an error message will be displayed saying «read the installation manual »

My only regret is that the standard Lua OS.file functionalities have been disabled starting from AM 2.x, on the promise that an intern AM function would allow that in the future.
Static_data_load() seemed promising for that aspect with some advanced features such as CSV and JSON compatibility, but no XML for that (???). And quite a limited scope of intervention I just figured.

Thanks.
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

User avatar
Corjan
Posts: 2933
Joined: Thu Nov 19, 2015 9:04 am

Re: static data load(): PATH limited to resource folder ONLY?

#19 Post by Corjan »

Hi,


The promise that static data would replace the lua os functions was never made.
When it comes to software design, there are multiple angles to look at, not just developer friendlyness.

I tried adding XML to static_data, but XML is a very weird beast when you get to the details. Hard and bit unclear if you try to convert that to lua objects.

Adding a function to create datarefs from AM might be quite usefull, will look into that. Might take a while though.


Corjan

User avatar
Keith Baxter
Posts: 4671
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: static data load(): PATH limited to resource folder ONLY?

#20 Post by Keith Baxter »

Corjan wrote: Wed Jul 28, 2021 6:38 am Adding a function to create datarefs from AM might be quite usefull, will look into that. Might take a while though.
Corjan
Serious, create custom datarefs.

Wake me up before my dream spoils my bed.
happy2.gif
happy2.gif (52.41 KiB) Viewed 2942 times
This would be a game changer for us. Encourage you to look into it Corjan.
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

Post Reply