EGT & CHT values? (Baron and Duke)
-
Funny you should ask it in that specific way. Yes, those values are available in the Duke, but I recall having to add them, since they were not visible in the Baron/Bonanza. I just looked at the code quickly, and I think it should be easy to add this yourself if you want to take a shot at it.
In EDM760.js, search for "this.doTempCalculations();" and move that line up to right after "super.Update();". Then, add another line directly after it, "this.broadcastTemperatures();". Lastly, add the following block of code directly before "dotLabelBuilder(cylinderIndex){".
broadcastTemperatures(){ for(let engine=0; engine<this.cylinderEGTs.length; engine++){ for(let cylinder=0; cylinder<this.cylinderEGTs[0].length; cylinder++){ SimVar.SetSimVarValue(`L:BKSQ_EGT_${engine+1}_CYL${cylinder+1}`, "Fahrenheit", this.cylinderEGTs[engine][cylinder]); SimVar.SetSimVarValue(`L:BKSQ_CHT_${engine+1}_CYL${cylinder+1}`, "Fahrenheit", this.cylinderCHTs[engine][cylinder]); } } }
The variables for each individual cylinder will then be like...
L:BKSQ_EGT_1_CYL1 (EGT, left engine, cylinder 1)
L:BKSQ_CHT_2_CYL5 (CHT, right engine, cylinder 5)
-
Wow... Thank you very much!!!
I already was looking in the EDM760.js for clues, but what you just explained was beyond my knowledge.
Will do that... and just learned alot. πI am currently coding a garmin style twin engine EDM for the SPAD.neXt Logitech FIPs.
Looking good so far, but just as I wanted to get the cylinder data, I realized, they are not available.
The only plane that had these kind of vairiables was the A2A C250, which also comes with a detailed engine simulation like your Dukes, but I think you going to raise the bar a bit over that. Happy to read, these values will be available out of the box so I can provide my EDM for other without altering the 760s file.
I can't wait to get my hands on the piston Duke... I love complex twins and the Duke looks like the new crown taker for the GA aircrafts. -
Yay! Thank you for letting me know. I'm so glad I could do that for you today. Sometimes I wonder if anyone implements the features that I offer in code like this. I've rarely seen other developers just post blocks of code online for people to implement their own features, but I am always happy to do it. Unfortunately, sharing JavaScript files is difficult, because I can't upload arbitrary file types to the forums, and many modern platforms (and now ever browsers!) will prevent you from sharing js files for security reasons.
I'll make those changes on my end too, so they will be included in the next updates for the Baron and Bonanza. Thank you!
-
I love the amount of support and connection to the community you provide. There are not much out there on this level. It also makes your already very compelling products even more attractive, because it all adds up to the package of the user experience. And I did not even mentioned the excellent user manuals. Worth every penny and even moreβ¦
Thank you for your hard workβ¦ Our thousands of dollars home cockpits would be worthless without the proper planes to fly. π -
@Black-Square I am just going through the manual and there are plenty of useful output variables but I am missing the "Prop Amps", "Volts", and left and right "Generator Loads". Are these values available via the default variables?
Here it's in motion: https://imgur.com/a/ZnmvTBC
Now I need the aircraft to fill in the correct variables. π¬
-
Wow, look at that! Excellent work! This is why I love supporting my cockpit builders so much. Equipment like that deserves an airplane where everything is simulated. Those variables are not quite as accessible in my older aircraft as the new ones, but I can tell you exactly where to insert some code to create them. I will do the same thing on my end so that it will be there in the next update for you and everyone else. These are in AnalogBaron.xml, for anyone else reading.
Delete the <POWER_CODE> section and replace the <VALUE_CODE> section of "AltLoadNeedle_L" with...
(A:ELECTRICAL GENALT BUS AMPS:1, amps) (A:ELECTRICAL GENALT BUS VOLTAGE:1, volts) 28 / * 80 / (A:GENERAL ENG MASTER ALTERNATOR:1, Bool) (A:PROP RPM:1, RPM) 400 > and * d (>L:var_alternatorLoad_L, percent)
Delete the <POWER_CODE> section and replace the <VALUE_CODE> section of "AltLoadNeedle_R" with...
(A:ELECTRICAL GENALT BUS AMPS:2, amps) (A:ELECTRICAL GENALT BUS VOLTAGE:2, volts) 28 / * 80 / (A:GENERAL ENG MASTER ALTERNATOR:2, Bool) (A:PROP RPM:2, RPM) 400 > and * d (>L:var_alternatorLoad_R, percent)
Delete the <POWER_CODE> section and replace the <VALUE_CODE> section of "BusVoltsNeedle" with...
(A:ELECTRICAL MAIN BUS VOLTAGE:1, volts) 1 (A:ELECTRICAL BATTERY LOAD:1, amps) 0 max 600 / - * (A:ELECTRICAL MAIN BUS VOLTAGE:1, Volts) 12 > * d (>L:var_mainBusVolts, volts)
Add the following line ABOVE "#VARIABILITY_RANDOM# #VARIABILITY_RANDOM_MULTI# * +"
d (>L:var_propAmps, amps)
That should do the trick! Let me know how it goes!
-
@Black-Square Wow... thank you very much... I just coded in the TIT, CHT & EGT Variables and tested them with the Baron modification from before and it's looks so nice when they come to life.
Will try this tomorrow. The gauges on the FIP are currently built for the Duke.
I figured out the greens from screenshots in the manual. I think the Baron values are not very far from that.With your code I can now complete and test this gauge with the Baron and I only have to switch a few variables when the Dukes arrive and it's ready to go. Thank you very much for that. π
This gauge building is kind of therapeutical for me and eases the pain of waiting for the Dukes. π
I will also build a 4-Pack like this (This was for the A2A C250) when the Dukes arrive so I can get my hands on the ASI and VS textures. And I think I have to rebuild the Altimeter. π¬
I will add all these Duke gauges to the SPAD.neXt Discord for every one free to use.
-
It works π kind of...
The values are not updating properly. I can fiddle with the deicing stuff and despite the cockpit gen load needles are moving, the values are not updating every time. They updating a bit random.It would be cool if the propagated variables would simply reflect the needle position.
So a FIP analog gauge would get alle the smooth movement and stickiness like the real needle.
And even on the digital gauge, it would be cool to see the values rise and fall and not jump.