Programming Question HUD Modification

mercsim

Donator
Donator
Joined
Jul 13, 2016
Messages
16
Reaction score
0
Points
16
I hate to ask for help but I'm almost desperate. I'm a pilot and really enjoy playing in the atmosphere with various Spaceplanes and such. I've test flown 13 new 'Real' airplanes and enjoy the testing part of airplane performance. In Orbiter, I enjoy changing Aero properties in Spacecraft4 and seeing how different the airplanes fly. I mostly play in 2010.

Anyways, I recently loaded up Sputnik's Spiral and noticed the HUD had Feet, Knots, and G's. This is AWESOME! There has been casual conversation around Units thru the years but the answer is basically that Martin programmed it this way so we live with it. What would it take to add this to the normal Orbiter HUD? Could it be a simple Module add-on? I found related math and reference to drawing in the HUD in the Spiral.h file Sputnik included with the Add-on. I'm not much of a programmer but have dabbled thru the years. I'm afraid this is beyond my capabilities. I wouldn't even know where to start to use the code in anything. I sent him a message but don't know if he is still very active or gets messages.

Here is a HUD shot of what I'm talking about. Also shown is my version of the ShuttlePB. Its a bash of MANY different contributors. Maybe you can see some familiar components. Clearly I enjoy Pablo's Mesh Editor and hacking at Mesh text files :) If I ever shared it, I would attempt to credit them.

If someone could point me to where the Orbiter HUD code is, perhaps I (or a smart person) could just modify it with a few simple equations to convert the speed and altitude before its printed to the screen. All the rest of the MFD's,Docking HUD, etc could stay in Metric. Hmmm....


Scott
 

Attachments

  • HUD.PNG
    HUD.PNG
    217.7 KB · Views: 15
  • ShuttlePB.PNG
    ShuttlePB.PNG
    224.3 KB · Views: 15
Last edited:

mercsim

Donator
Donator
Joined
Jul 13, 2016
Messages
16
Reaction score
0
Points
16
I see in a Doc for Sputnik add on called Ascender that he thanked Urwumpe fr the HD code. Hes a regular poster. Maybe he can help. Hmmm...The plot thickens
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,656
Reaction score
2,378
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
You can modify the HUD of the vessel by overwriting the clbkDrawHUD callback function. Thats pretty much all the magic.
 

mercsim

Donator
Donator
Joined
Jul 13, 2016
Messages
16
Reaction score
0
Points
16
Is it possible to do that in base Orbiter or only in a .h file for a dll? I haven't got into coding that far and have only really played with Vinka stuff to modify models. I found reference to that function in the API Reference Guide.

I found a nice addon for a HUD that is customizable to display the units I want but its for 2006. It occasionally runs but it usually crashes and the log shows the Warning :Obsolete API function... message. V8li made the addon but hasnt been seen in a few years and he didn't post the code. It would be a pretty deep dive to re-write it from scratch with my VERY limited programming experience. It would also be nice to just print the data to the screen without a custom MFD to free it up since Vinka stuff only allows 2.


Thank you for the responce
 
Last edited:

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,656
Reaction score
2,378
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Is it possible to do that in base Orbiter or only in a .h file for a dll? I haven't got into coding that far and have only really played with Vinka stuff to modify models. I found reference to that function in the API Reference Guide.

I found a nice addon for a HUD that is customizable to display the units I want but its for 2006. It occasionally runs but it usually crashes and the log shows the Warning :Obsolete API function... message. V8li made the addon but hasnt been seen in a few years and he didn't post the code. It would be a pretty deep dive to re-write it from scratch with my VERY limited programming experience. It would also be nice to just print the data to the screen without a custom MFD to free it up since Vinka stuff only allows 2.


Thank you for the responce

No, but it would be possible, in theory, to include such capability in a generic vessel module, like VesselBuilder or Spacecraft4.
 

mercsim

Donator
Donator
Joined
Jul 13, 2016
Messages
16
Reaction score
0
Points
16
I figured as much. I've spent years playing with Spacecraft4, 3, 2, so maybe its time I dig a little deeper. I'm just not a fan of programming and it takes me forever to do stuff. Too bad v8li didn't post his MFD code. It would have been pretty easy to update it to 2010 or 2016. Maybe I'll ask over in MFD forum and see if anyone is interested in helping. Thanks for the quick replies :)

Scott
 
Top