Thranda HDC-2 Beaver Instruments for Xplane

Questions about deployment and use of Air Manager Instruments

Moderators: russ, Ralph

Message
Author
wrschultz
Posts: 40
Joined: Wed Jan 01, 2020 6:06 pm
Location: KLNS Pennsylvania

Re: Thranda HDC-2 Beaver Instruments for Xplane

#11 Post by wrschultz »

thanks for this clarification. I am trying to get the fuel quantity instrument to work. I have the datarefs identified for fuel and bus_volts. However, the fuel dataref is a 4-element array and and the bus_volts is a 6-element array. I need just the first three fuel elements and the first bus_element. I setup the subscribe as follows:P

xpl_dataref_subscribe("thranda/electrical/Fuel", "FLOAT[4]",
"sim/cockpit2/electrical/bus_volts", "FLOAT[6]", new_data_xpl)

then tried to print as follows (the function is before the subscribe):

function new_data_xpl(tank, bus_volt)
print( tank, bus_volt)
end
The output in the Console show the 4 fuel elements on one line for "tank", 6 elements for bus_volts on second line. I assigned front=tank[1], mid=tank[2], rear=tank[3]. I have the right data elements but cannot integrate into the script correctly. I am missing something here. The training videos have been helpful but does not provide sufficient clarity on subscribing to N-dimension arrays datarefs.

Still trying to learn how to cut and paste stuff in the SI environment. Appreciate another "nudge" to move forward. Bill

wrschultz
Posts: 40
Joined: Wed Jan 01, 2020 6:06 pm
Location: KLNS Pennsylvania

Re: Thranda HDC-2 Beaver Instruments for Xplane

#12 Post by wrschultz »

I was able to implement the fuel quantity gauge. I am including the SI panel with instruments on the left. I will note that the fuel dataref has four elements the last being the belly tank that can be removed or installed. i have it off now. Some pilots may want that installed but do not see an instrument to display the belly tank. Bill
DHC SI Panel.PNG

wrschultz
Posts: 40
Joined: Wed Jan 01, 2020 6:06 pm
Location: KLNS Pennsylvania

Re: Thranda DHC-2 Beaver Instruments for Xplane

#13 Post by wrschultz »

You were very helpful this last fall to fix the Fuel Quantity instrument Lua scripts for the XP11 Thranda DHC-2 Beaver SI panel. This past week I started to work with the Beaver aircraft once again. Something did not seem right with the fuel quantity readings on the instrument. I looked closer at the Lua script and believe that the conversion from the XP11 dataref to the SI instrument reading was not correct. I believe the dataref is quoted in KGs (full tank is 95.15 kgs) and the SI fuel quantity instrument reading in US gallons (full tank is 35 US gal). Such as such the conversion should be the dataref tank(KG) * 2.2(lbs per KG) / 6.0(lbs per AvGas Gal). Use this conversion the fuel quantity levels seem to be correct and match those in the XP 11 Thranda Beaver panel across different quantity levels. Please let me know if this new conversion looks reasonable.

I have made this adjustment for the panel that I downloaded. I see when I am in the air manager app under "create/edit" that it indicates I am using an online version of the instrument and should clone a copy to avoid risking the loss of my version. I do not fully understand this but I think that it is possible that an automatic update from your system could override my version. Is this correct? I see where I can submit an instrument for your review and perhaps inclusion in the instruments offering that others could use. Is this the best way to have my proposed updates incorporated if it is correct.

I am including my revised Lua script. I am not sure if this is the best way to show the Lua script file. Your file inclusions were great to review. Bill
DHC-2 Beaver Fuel quantity.txt
(4.14 KiB) Downloaded 54 times

SimPassion
Posts: 5336
Joined: Thu Jul 27, 2017 12:22 am

Re: Thranda DHC-2 Beaver Instruments for Xplane

#14 Post by SimPassion »

wrschultz wrote: Wed Jan 04, 2023 4:49 pm You were very helpful this last fall to fix the Fuel Quantity instrument Lua scripts for the XP11 Thranda DHC-2 Beaver SI panel. This past week I started to work with the Beaver aircraft once again. Something did not seem right with the fuel quantity readings on the instrument. I looked closer at the Lua script and believe that the conversion from the XP11 dataref to the SI instrument reading was not correct. I believe the dataref is quoted in KGs (full tank is 95.15 kgs) and the SI fuel quantity instrument reading in US gallons (full tank is 35 US gal). Such as such the conversion should be the dataref tank(KG) * 2.2(lbs per KG) / 6.0(lbs per AvGas Gal). Use this conversion the fuel quantity levels seem to be correct and match those in the XP 11 Thranda Beaver panel across different quantity levels. Please let me know if this new conversion looks reasonable.

I have made this adjustment for the panel that I downloaded. I see when I am in the air manager app under "create/edit" that it indicates I am using an online version of the instrument and should clone a copy to avoid risking the loss of my version. I do not fully understand this but I think that it is possible that an automatic update from your system could override my version. Is this correct? I see where I can submit an instrument for your review and perhaps inclusion in the instruments offering that others could use. Is this the best way to have my proposed updates incorporated if it is correct.

I am including my revised Lua script. I am not sure if this is the best way to show the Lua script file. Your file inclusions were great to review. Bill

DHC-2 Beaver Fuel quantity.txt
Hi Bill, this seems correct

image.png
 

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Thranda HDC-2 Beaver Instruments for Xplane

#15 Post by Sling »

Hi Bill,

You are correct in your understanding of the reason to clone. What’s often not understood is the reason to not clone. If you want to submit an update to an existing store instrument please submit the original one with an updated version number and your changes incorporated along with a brief description of what you changed in the submit description box. Doing this ensures we don’t end up with multiple cloned variants of the same instrument. If you are unsure on any of this just let me know and I’ll try to elaborate more.

wrschultz
Posts: 40
Joined: Wed Jan 01, 2020 6:06 pm
Location: KLNS Pennsylvania

Re: Thranda HDC-2 Beaver Instruments for Xplane

#16 Post by wrschultz »

Sling wrote: Thu Jan 05, 2023 12:33 am Hi Bill,

You are correct in your understanding of the reason to clone. What’s often not understood is the reason to not clone. If you want to submit an update to an existing store instrument please submit the original one with an updated version number and your changes incorporated along with a brief description of what you changed in the submit description box. Doing this ensures we don’t end up with multiple cloned variants of the same instrument. If you are unsure on any of this just let me know and I’ll try to elaborate more.
Thanks for the clarification. I want to offer an update to a calculation for the DHC-2 Beaver Fuel Quantity instrument. I have not cloned the instrument. I will submit. I do not see yet where I update the version number but see it referenced in the "xml" file as "102".

I am also concluding that my online edited lua script for an instrument could be overwritten by another submitted version. I should submit or clone the instrument. I think I am starting to get with the program. Bill

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Thranda HDC-2 Beaver Instruments for Xplane

#17 Post by Sling »

You change the version number amongst other things in the info tab window. If your version is newer than what’s online it should not get overwritten. There is also an Am setting that disables auto downloads if you want that.

SimPassion
Posts: 5336
Joined: Thu Jul 27, 2017 12:22 am

Re: Thranda HDC-2 Beaver Instruments for Xplane

#18 Post by SimPassion »

Sling wrote: Fri Jan 06, 2023 3:59 pm .../... There is also an Am setting that disables auto downloads if you want that.
Just wondering if two simmers are working at the same time on the same instrument, with in mind to enhance on their own POV, so don't want to get the update of the neighbor, what will occurs when they will submit the same instrument with their own different updates and each one with the release number increased in a proper way, without any duplicated release number ... ??? :geek:

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Thranda HDC-2 Beaver Instruments for Xplane

#19 Post by Sling »

I don’t think I’ve ever seen that scenario but if it were to happen I’d probably merge them together if they were both acceptable mods and did not conflict. Failing that we would obviously need some discussion as to the best way forward.
Last edited by Sling on Sat Jan 07, 2023 1:00 pm, edited 1 time in total.

SimPassion
Posts: 5336
Joined: Thu Jul 27, 2017 12:22 am

Re: Thranda HDC-2 Beaver Instruments for Xplane

#20 Post by SimPassion »

Sling wrote: Sat Jan 07, 2023 6:55 am I don’t think I’ve ever seen that scenario but if it were to happen I’d probably merge them together if they were both acceptable mods and did not conflict. Failing that we would obviously need some discussion as to the best way forward.
Indeed there was already reasonable time period between some very few similar work on same instrument for enhancement in the past, so not came to any issue, I was just wondering if there was any automated release checker or anything else. Thanks for the answer Tony

Post Reply