- Messages
- 14
- Country

Has anyone figured out how to make custom avionics UI? I know that the code for the default ones in-game is hidden, but I'm just curious to know if anyone has any ideas.
Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.
By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.



Hi Bill, as an interim workaround, you might try black polygons that appear in front of the gauges when the battery is switched off. I am using a similar technique with some success in other areas. Just a thought. Regards, TJActually its not hidden, and they welcome us using theirs. I am using their avionics stack.
UI for Asobo software (gauges) is all in the Behaviors files. Learning that however and incorporating it into your plane is the hard part. A new way, a new language. Much to learn.
As for FS9 XML, the 'mouse rects' are broken. Also, FS9 GPS (the map engine gauge) does not work in MSFS.
But... FS9 and FSX XML do work in MSFS, but as you said, UI (clickables) do not, on 2D gauges. Object clickability via ModelDef coding in models 'does' work. FSX ModelDef coding.
Hope that helps.
My Trinidad is using the Asobo Avionics systems. Getting the KT76C working didnt happen, but RonH found a way to show the GTX330 window to show in it, (Transponder).
Now to figure out how to turn off the lights on the gauges when the switches are off... :SView attachment 67908

I guess I maybe wasnt clear enough with my question, I've been messing around with getting gauges to work and all, but I want to know how you could program your own avionics if you need something that looks or performs differently than the base game ones. For example the displays in a fighter jet.Actually its not hidden, and they welcome us using theirs. I am using their avionics stack.
UI for Asobo software (gauges) is all in the Behaviors files. Learning that however and incorporating it into your plane is the hard part. A new way, a new language. Much to learn.
As for FS9 XML, the 'mouse rects' are broken. Also, FS9 GPS (the map engine gauge) does not work in MSFS.
But... FS9 and FSX XML do work in MSFS, but as you said, UI (clickables) do not, on 2D gauges. Object clickability via ModelDef coding in models 'does' work. FSX ModelDef coding.
Hope that helps.
My Trinidad is using the Asobo Avionics systems. Getting the KT76C working didnt happen, but RonH found a way to show the GTX330 window to show in it, (Transponder).
Now to figure out how to turn off the lights on the gauges when the switches are off... :SView attachment 67908



I found the html instrument code but I don't really understand it, Im trying to make a hud currently and there is one in the 787.Of course. You can figure out the HTML/Java that Asobo use, you can use FSX XML, and you can use FS9 XML, like this one has. Also there are I think 2 or 3 more langauges (computer code) that Asobo also uses.
So many ways.... Dean and Dino are both using their codes in their jets for their own instrumentation.
updateProjection(_deltaTime) {
if (!this.mainFrame)
return;
if (!isFinite(this.mainFrameHeight)) {
let clientRect = this.mainFrame.getBoundingClientRect();
if (clientRect.width > 0) {
this.mainFrameHeight = clientRect.height;
}
}
else {
let horizonOffset = 0;
{
let planeAltitude = Simplane.getAltitude() / 3281;
let horizonDistance = Math.sqrt(planeAltitude * (12742 + planeAltitude));
let correction = planeAltitude / horizonDistance;
horizonOffset += (7.0 * correction);
}
{
let cameraHeight = SimVar.GetGameVarValue("CAMERA HEIGHT IN PLANE", "feet");
let deltaFeet = cameraHeight - 5.21;
horizonOffset += (-1.85 * deltaFeet);
}
{
let xyz = Simplane.getOrientationAxis();
horizonOffset += (-1.55 * xyz.pitch);
}
horizonOffset *= this.mainFrameHeight;
this.projectionOffset = Utils.SmoothSin(this.projectionOffset, horizonOffset, 0.0075, _deltaTime);
for (let i = 0; i < this.slidingSystems.length; i++) {
this.slidingSystems[i].slide(this.projectionOffset);
}
}
}

panel/panel.cfg. If you want a 3D bezel around with knobs you have to model that also. At this point you haven't done any html/css/js programming but you've seen how you get the gauge working in your panel. 'Flat panel' gauges (e..g GPS) are great for html/js because (a) that's great for display/interacting UI-style info (b) those gauges are typically a shed-load of html/js and very little modelling.Update() method which will get called by the sim for each update of your gauge.model/<aircraft>.xmlSimVar.GetSimVarValue() and SimVar.SetSimVarValue() so you gauge can display something useful. Look at the 'Simplane' methods in Asobo gauge code in case that is actually preferred.SetStoredData(), GetStoredData() calls that allow you to save information between sim launches (this is a killer feature).onInteractionEvent() callback)Official/asobo-vcockpits-instruments and Official/asobo-vcockpits-instruments-navsystems packages. At some point you'll need to study the fs-base-ui package which is where the Asobo lowest level NetBingMap.js resides.