Bacab Posted May 26, 2024 Posted May 26, 2024 (edited) Hello Several weeks ago I began designing my own flight instrument panel, expecting to use it with several modules. It is now nearly complete : To drive the compass I would have liked to use the magnetic heading. However some modules, for instance the F-16, do not appear to export this parameter. Am I missing something ? Is there a way around to otherwise export the magnetic heading ? (I thought about using the true heading, exported through the common data set, with the mag var. to retrieve the magnetic heading but the mag var seems to not be exported either). Thank you in advance for your answers. Edited May 26, 2024 by Bacab 1
No1sonuk Posted May 26, 2024 Posted May 26, 2024 Maybe use the true heading and add the variation manually? Not sure, but I think it's available from the briefing screen.
Bacab Posted May 26, 2024 Author Posted May 26, 2024 Thank you for your answer. I would prefer an automatic way to do it. Otherwise it is very cumbersome.
mkel2010 Posted May 27, 2024 Posted May 27, 2024 Magnetic compasses don't account for magnetic variation - you do that in flight planning, adjusting the course to take the magnetic variation into account. That said, I use Matric represent some of the instruments and switches for the P-51 on an iPad. The instrument data is exported from DCS BIOS to DCS Matric to Matric. I had to come up with (I believe) Javascript formulas to take the raw data and convert it into a digital readout. For the magnetic compass I used this formula: return Math.round(value/182.041667,3). Value is the raw DNS BIOS reading, 182.041667 is the number of times 360 goes into the maximum DCS BIOS value for the compass and the three represent the number of digits. Round just rounds up to the next whole number.
Bacab Posted May 28, 2024 Author Posted May 28, 2024 Thank you for your answer but I am not sure you understand what I am trying to do. Since DCS Bios export the true heading for all aircrafts but not the magnetic heading (for instance for the F-16, yes for the P-51 you have access to the magnetic heading), I was trying to find a way to convert this true heading to a magnetic heading (the link between the two being the magnetic variation). However since the magnetic variation is not exported as it seems, this solution can't be done. So the question is : is there a way to get the heading value from the F-16, F-18 and AV-8BNA ? Or to otherwise retrieve the actual magnetic variation.
Vinc_Vega Posted May 28, 2024 Posted May 28, 2024 Hi Bacab If you have a look into the DcsBios export tools like Bort or so, there are no outputs of the F-16 HSI. The standby compass is not even a part of those tools. So at the time there seems to be no possibility for direct export. You have to do math to get the mag heading or wait until the respective DcsBios F-16 lua files are expanded accordingly. Regards, Vinc Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC]
Bacab Posted May 28, 2024 Author Posted May 28, 2024 Thank you for your answer. If they are no solution, I'll wait.
Vinc_Vega Posted May 28, 2024 Posted May 28, 2024 (edited) @Bacab For the math you may use the values from the ...\DCS World OpenBeta\Mods\aircraft\F-16C\Cockpit\Scripts\Instruments\StandbyCompass.lua file. The deviation is layed down in radians, so I think it would be possible to calculate something usefull. Regards, Vinc Edited May 28, 2024 by Vinc_Vega Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC]
No1sonuk Posted May 28, 2024 Posted May 28, 2024 Usually, if there's a gauge on the panel, the data is available in DCS-BIOS. I just submitted an "issue" on the DCS-BIOS Github. https://github.com/DCS-Skunkworks/dcs-bios/issues/671 2
No1sonuk Posted May 28, 2024 Posted May 28, 2024 (edited) I've got a test output of the F-16 Standby compass heading working. I'm not sure how it will get into the main DCS-BIOS, though. One thing to note is that it's the actual "floating ball" data, so it lags and wobbles about a bit. I'm not sure if that's what you want, but I think it's all there is available. Edited May 29, 2024 by No1sonuk Typo
Bacab Posted May 29, 2024 Author Posted May 29, 2024 (edited) Thank you very much for the help. I would have preferred the heading from the EHSI but i understand from what I read it currently behaves like a screen and it can't be exported as a gauge. I will test the whole thing today and keep you updated. PS: I have seen your talk on git hub. I can tell you the F-5 compass is also reversed. However it is very easy to solve, so not a big deal. Edited May 29, 2024 by Bacab
No1sonuk Posted May 29, 2024 Posted May 29, 2024 TBF, I didn't go looking for any other parameters. The physical gauges use those "argument numbers" as part of the cockpit animation. DCS giving the heading argument a value from 0 to 1 sets the rotation angle of the compass ball. DCS-BIOS translates 0 to 1 into 0 to 65535 to make small steps easier. Something that might be worth considering is to get the true heading from the common data and compare it to the standby compass at the beginning to get the variation, then apply that to the true data from there to get a stable reading.
Bacab Posted May 30, 2024 Author Posted May 30, 2024 On 5/29/2024 at 11:12 AM, No1sonuk said: TBF, I didn't go looking for any other parameters. The physical gauges use those "argument numbers" as part of the cockpit animation. DCS giving the heading argument a value from 0 to 1 sets the rotation angle of the compass ball. DCS-BIOS translates 0 to 1 into 0 to 65535 to make small steps easier. Something that might be worth considering is to get the true heading from the common data and compare it to the standby compass at the beginning to get the variation, then apply that to the true data from there to get a stable reading. This is a good solution that I will try on the F-16, F-18 and AV-8. I will try it as soon as my build is finish : I have just eradicated the last bug from the software and I am in the process of finalising the box that contains all my flight instruments. Once that is done I will try the solution you offer. On a side note, just in case someone is interested in building a compass for DCS Bios : - A-10C: export the HSI heading, values are reversed so 360° to 180° is 0 to 32 768. Displays the magnetic heading - AJS-37: export the CI heading, the exported values are in degrees. Displays the true heading - F-86: export the heading value, the exported values are in degrees. Displays the magnetic heading -L-39: export the HSI heading, values are NOT reversed so 360° to 180° is 65535 to 32 768. Displays the true heading -M2000C: export the HSI heading, values are NOT reversed so 360° to 180° is 65535 to 32 768. Displays the magnetic heading -MiG-21: export the HSI heading, values are reversed so 360° to 180° is 0 to 32 768. Displays the true heading -All WWII aircrafts: export the DI GAUGE (directional gyro) instead of the compass. Their compass are too wobbly (and not accurate at start so you can't rely on them to deduce the magnetic variation) so it will lead to erratic, very fast movements, of the stepper motor which the stepper does not like at all ! Though it is not a direct reading of the magnetic heading it is generally synced to the magnetic heading at start and before all navigation and their output is a lot more stable. All values are between 0 and 65535 but I have not played enough with them to sort if they are reversed or not (they don't seem to be reversed though). -UH-1H: export the GMC heading, values are NOT reversed so 360° to 180° is 0 to 32 768. Displays the magnetic heading (if manually sync) Thank you for your help. 1
No1sonuk Posted June 3, 2024 Posted June 3, 2024 OK guys, the DCS-BIOS coders have solved the stability problem. The latest nightly build of DCS-BIOS (DCS-BIOS Nightly 2024-06-02) has the magnetic heading available in the CommonData section. https://github.com/DCS-Skunkworks/dcs-bios/releases It's an integer in degrees (0-359) which means no leading zeros. Because it's in the CommonData, it's available with all modules. 2
Recommended Posts