heclak Posted July 2, 2019 Share Posted July 2, 2019 There is a bug in the value returned by get_base_data().getBarometricAltitude() which is provided by the sim to obtain the aircraft's barometric altitude via Lua devices. This function should correctly return the current barometric altitude of the aircraft but it is currently broken in DCS 2.5.5.32533 Open Beta. It is uncertain how many versions back did this function break. The function has been tested on Caucasus, Nevada, and the Persian Gulf with the same error. Steps to reproduce the behaviour: 1) Create an aircraft on any map with the QNH set at 2992. Use a Lua device to return altitude information. Relevant functions are listed below. local sensor_data = get_base_data() print_message_to_user(sensor_data.getBarometricAltitude()) 2) Check the correct altitude print out against the value provided in the status bar (Ctrl + Y). Altitude does not match. Expected behaviour Barometric altitude output should match the value in the status bar. It is understood that the function returns barometric altitude in metres. The necessary conversions have been done for comparison. Screenshots This screenshot shows the raw output of the getBarometricAltitude() function with the value converted to feet. The discrepancy can be observed between the status bar and barometric altitude value. Twitch | Viggen ELINT App | Community A-4E-C Module | Community A4-E Guide | Throttle detents for Hornet/Viggen/F-15C and other 3D printed parts Link to comment Share on other sites More sharing options...
Magic Zach Posted July 2, 2019 Share Posted July 2, 2019 Interesting Hardware: T-50 Mongoose, VKB STECS, Saitek 3 Throttle Quadrant, Homemade 32-function Leo Bodnar Button Box, MFG Crosswind Pedals Oculus Rift S System Specs: MSI MPG X570 GAMING PLUS, RTX 3090, Ryzen 7 5800X3D, 32GB DDR4-3200, Samsung 860 EVO, Samsung 970 EVO 250GB Modules: AH-64D, Ka-50, Mi-8MTV2, F-16C, F-15E, F/A-18C, F-14B, F-5E, P-51D, Spitfire Mk LF Mk. IXc, Bf-109K-4, Fw-190A-8 Maps: Normandy, Nevada, Persian Gulf, Syria Link to comment Share on other sites More sharing options...
LCO489 Posted January 3, 2020 Share Posted January 3, 2020 Wasn't this issue checked yet? Link to comment Share on other sites More sharing options...
ED Team BIGNEWY Posted January 6, 2020 ED Team Share Posted January 6, 2020 Wasn't this issue checked yet? No looks like this one has been overlooked. If you add a short track replay showing the behaviour I will take a look at tit. thanks Forum rules - DCS Crashing? Try this first - Cleanup and Repair - Discord BIGNEWY#8703 - Youtube - Patch Status Windows 11, NVIDIA MSI RTX 3090, Intel® i9-10900K 3.70GHz, 5.30GHz Turbo, Corsair Hydro Series H150i Pro, 64GB DDR @3200, ASUS ROG Strix Z490-F Gaming, HP Reverb G2 Link to comment Share on other sites More sharing options...
heclak Posted January 12, 2020 Author Share Posted January 12, 2020 (edited) If you add a short track replay showing the behaviour I will take a look at tit. Hi Bignewy, I've made a video explaining the bug instead as I'm not sure how a mission track would help troubleshoot a bug with the output of a Lua function. I've included the mission track file from the video in case it really is useful. Mission Track File Mission File The relevant Lua code is here: local sensor_data = get_base_data() -- round altitude to two decimal places baroAltitude_meter = math.floor(sensor_data.getBarometricAltitude()*100) / 100 baroAltitude_feet = math.floor(sensor_data.getBarometricAltitude()*3.28084*100) / 100 print_message_to_user("Output of getBarometricAltitude() " ..baroAltitude_meter.." meters " ..baroAltitude_feet.." feet" ) I've included a modified Lua file with the above function for the A-4E if it makes things more convenient for your programmers. Replacing this file in the A-4E would output the function values. Or the code above could be paste into the update() loop of a Lua device. Modified avionics.lua file for A-4E-C (Cockpit/Scripts/Systems/avionics.lua Edited January 12, 2020 by heclak Added mission file. Fix youtube embed. Twitch | Viggen ELINT App | Community A-4E-C Module | Community A4-E Guide | Throttle detents for Hornet/Viggen/F-15C and other 3D printed parts Link to comment Share on other sites More sharing options...
ED Team BIGNEWY Posted January 15, 2020 ED Team Share Posted January 15, 2020 Thanks the team will look into it. Forum rules - DCS Crashing? Try this first - Cleanup and Repair - Discord BIGNEWY#8703 - Youtube - Patch Status Windows 11, NVIDIA MSI RTX 3090, Intel® i9-10900K 3.70GHz, 5.30GHz Turbo, Corsair Hydro Series H150i Pro, 64GB DDR @3200, ASUS ROG Strix Z490-F Gaming, HP Reverb G2 Link to comment Share on other sites More sharing options...
Recommended Posts