Wondering/Request: Custom HUD

pete.dakota

Donator
Donator
Joined
Mar 23, 2008
Messages
621
Reaction score
2
Points
0
Location
Surrey, UK
I was pottering around KSC earlier in a DGIV practising approaches and landings and the like. For aesthetic purposes only I closed both the MFDs and switched to the HUD view (not the DGIV's custom panel) for some scenic flying. As altitude and ground speed are show at the top of the HUD, I was still able to fly realistic and planned patterns and approaches, but I also got to thinking how helpful it would be to have some other values right there on the HUD. Mainly I was thinking about having a G readout, or ApA. Values that you can't see with only the HUD up and can't be accurately measured simply by 'look and feel' out the front.

I'm aware that some other addons do have this ability, and I've always found them to be useful. Is there a way in Orbiter currently to modify the HUD to show custom values regardless of vessel, or does the code have to written in to a specific craft?
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
36,356
Reaction score
919
Points
203
Location
Langendernbach
The code has to be included in a vessel DLL, but it is no problem to write a library of functions for creating custom HUDs quickly.
 

pete.dakota

Donator
Donator
Joined
Mar 23, 2008
Messages
621
Reaction score
2
Points
0
Location
Surrey, UK
The code has to be included in a vessel DLL, but it is no problem to write a library of functions for creating custom HUDs quickly.

Considering I have no experience in creating or modifying addons, could this be something that I could do?
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
36,356
Reaction score
919
Points
203
Location
Langendernbach
Unlikely. If you can do C++, this is not enough for developing a useful library on the first try (you need experience for doing that well, and experience comes from writing a library, do it wrong and start again).

I would try making a simple vessel first, if you like to start making add-ons. Or a MFD. The idea is the biggest problem then.
 

pete.dakota

Donator
Donator
Joined
Mar 23, 2008
Messages
621
Reaction score
2
Points
0
Location
Surrey, UK
Unlikely. If you can do C++, this is not enough for developing a useful library on the first try (you need experience for doing that well, and experience comes from writing a library, do it wrong and start again).

I would try making a simple vessel first, if you like to start making add-ons. Or a MFD. The idea is the biggest problem then.

I really hadn't given any thought to creating addons, and I have no experience with C++. The idea does seem inviting, but right now I don't have the time to be starting any new projects as such.

I'll post this over on Dansteph's forum and make it specific to the DGIV.
 

agentgonzo

Grounded since '09
Addon Developer
Joined
Feb 8, 2008
Messages
1,649
Reaction score
4
Points
0
Location
Hampshire, UK
Website
orbiter.quorg.org
As Urwumpe said, to draw to the HUD 'properly', you have to put the code in the vessel DLL (part of the VESSEL2 class), so you can't do a custom one via an MFD for any vessel.

You can get a handle to the main window and draw your HUD on there via a timer, but unfortunately this ends up with flicker, which can be irritating or even nauseating if there is too much on the HUD.
 

computerex

Addon Developer
Addon Developer
Joined
Oct 16, 2007
Messages
1,282
Reaction score
17
Points
0
Location
Florida
How exactly do you calculate APA and PEA? :sorry:
I asked this question at m6, but obviously I can't go there to find out...
 

SiameseCat

Addon Developer
Addon Developer
Joined
Feb 9, 2008
Messages
1,699
Reaction score
1
Points
0
Location
Ontario
How exactly do you calculate APA and PEA? :sorry:
I asked this question at m6, but obviously I can't go there to find out...

There's a GetElements() function. You pass it a pointer to an ORBITPARAM struct, among other things, and the PeA and ApA will be entered into the struct.
 

mikey451

Addon Developer
Addon Developer
Joined
Mar 20, 2008
Messages
38
Reaction score
1
Points
0
As a side comment, IMHO this is one of the few major drawbacks to the Orbiter SDK - the difficulty in drawing to the VC HUD. It can be done with textures, but trust me, particularly in a multi-stage vehicle, it's not easy, and takes far too much tricking of the system to implement. Martin, if you're listening, it would sure be nice to be able to interface the HUD directly. As a fighter pilot who's used HUDs in the real world, a lot, I'm a big proponent of them, and it would be nice to use them more here...
 

computerex

Addon Developer
Addon Developer
Joined
Oct 16, 2007
Messages
1,282
Reaction score
17
Points
0
Location
Florida
There's a GetElements() function. You pass it a pointer to an ORBITPARAM struct, among other things, and the PeA and ApA will be entered into the struct.

I don't think PeA and ApA are part of the ORBITPARAM structure. I think you get the Apt distance and divide that by the radius?

EDIT:
Unpack in Orbiter's directory keeping the directory structure in tact. Activate the plug-in under orbiter's launchpad. Edit root/modules/plugin/ehud.cfg file to configure how you want the text on the screen to look.
 

Attachments

  • ehud.zip
    89.4 KB · Views: 18

SiameseCat

Addon Developer
Addon Developer
Joined
Feb 9, 2008
Messages
1,699
Reaction score
1
Points
0
Location
Ontario
I don't think PeA and ApA are part of the ORBITPARAM structure. I think you get the Apt distance and divide that by the radius?
Get the radius of the planet and subtract that from the ApD/PeD values.
 

computerex

Addon Developer
Addon Developer
Joined
Oct 16, 2007
Messages
1,282
Reaction score
17
Points
0
Location
Florida
Get the radius of the planet and subtract that from the ApD/PeD values.

I already figured it out, thanks. :) I uploaded the package above, it shows on the screen what pete requested.
 

pete.dakota

Donator
Donator
Joined
Mar 23, 2008
Messages
621
Reaction score
2
Points
0
Location
Surrey, UK
EDIT:
Unpack in Orbiter's directory keeping the directory structure in tact. Activate the plug-in under orbiter's launchpad. Edit root/modules/plugin/ehud.cfg file to configure how you want the text on the screen to look.

This is perfect, computerex. Thank You!
 
Top