Vars for the DH and MDA values?
-
Hi,
Does anyone happen to know which vars store the DH and MDA values for the Starship?
I don't think it's using the defaults like (A:DECISION HEIGHT, Feet), which would make sense as Starship has both Pilot and Copilot AAPs allowing each person to set separate values for DH and MDA.
I'm working on a Streamdeck+ profile that's going really well. I think the only thing I'm missing (until I invent another page of "definitely-useful-things-I'll-need-all-the-time") is these two values.
I'm successfully using the relevant HVARs to manipulate the DH and MDA knob (H:PFD_DecisionHeightKnob_Dec_1 and the like), but I just can't seem to get the Behaviours window or AAO to spill the beans on the values.Thanks!
-
One for @Black-Square directly then perhaps - sorry Nick!
-
Unfortunately, those variables are only stored internally, but I can offer you a custom code solution if you would like to get it working immediately for yourself.
If you search for PFD.js in the Starship community folder, then search for the following line...
SimVar.SetSimVarValue("L:var_MdaAlertSound"...Directly after this line, you can add these two, which will create L:Vars for you to monitor:
SimVar.SetSimVarValue("L:var_StarshipDh_L", "feet", this.decisionHeight_L); SimVar.SetSimVarValue("L:var_StarshipMda_L", "feet", this.alertAltitude_L);If you want to also monitor the DH and MDA on the copilot's side, then you can just replace the
_L's in those lines with_R's.I hope that is what you're looking for! Sorry that it requires a little work. I always like to offer immediate solutions for anything I can solve, because there is no sense waiting months for an update in the age of the internet

-
@Black-Square Thanks Nick, that was super helpful!
Doing what you said set up the LVars and gave me reading of 500 DH and 1000 MDA which was a great start, but the LVar values didn't change when using the in game knobs to alter the values on the PFD. I think because that part of the code is only run once maybe?
Anyway, in the end I've added 4 setters to the real-time part of the update() function (currently around line 800).
In context here if anyone (including future me!) is interested in implementing the same change:Update() { super.Update(); // Slow SimVar Updates this.simVarUpdateTimer += this.deltaTime; if (this.simVarUpdateTimer >= this.simVarUpdateInterval) { this.simVarUpdateTimer = 0; this.simVarUpdate(); } // Real Time Updates // Attempting to add LVars for DH and MDA: SimVar.SetSimVarValue("L:var_StarshipDh_L", "feet", this.decisionHeight_L); SimVar.SetSimVarValue("L:var_StarshipMda_L", "feet", this.alertAltitude_L); SimVar.SetSimVarValue("L:var_StarshipDh_R", "feet", this.decisionHeight_R); SimVar.SetSimVarValue("L:var_StarshipMda_R", "feet", this.alertAltitude_R); // ---------------------------- this.heading = SimVar.GetSimVarValue( "PLANE HEADING DEGREES MAGNETIC", "degree", );All seems to be working when powered up on the ground. I haven't taken it out for a flight to see if I've some how caused it to do cartwheels when twisting those knobs, but fingers crossed!
Thanks again!
I think the SD+ profile is... complete!