HUDdataMFD

V8Li

Member
Joined
Apr 9, 2008
Messages
200
Reaction score
0
Points
16
Hi.

"HUDdataMFD allows the user to display available MFD data like the speed, ACC, VS, VACC, Altitude, gForce etc. on the screen, mainly during critical moments like landings, ascends, orbit insertions or reentries."

Something like this was requested a while ago and it was a nice project to learn some basic C++ and Orbitersim SDK. It's my first addon for orbitersim but I don't think there was a way to print the data on the actual HUD.
I use it mostly on critical moments since the rest of the time it just obstructs the view. By using it I get to enjoy the scenery while ascending and during reentries since I don't have to monitor the MFDs and I "stay" most of the time in the virtual cockpit.

The HUDdataMFD is available at orbithangar.com: [ame="http://www.orbithangar.com/searchid.php?ID=3349"]HUDdataMFD v1.2[/ame]

Enjoy!
 
Very cool MFD!
The XR Class has what I need but I'll use it in every other ship from now on.

Thanks!
 
I've activated the module in launchpad, however I cannot seem to activate the module on the MFDs themselves in Orbiter, they are not on the list. This occurs on a clean install, too.
 
Hi and thanks for the feedback.

I did use the windows.h header and yes, a VC++ runtime is needed. I'm not sure if the 2008 is a must but I did use the sprintf_s instead of sprinf, for example, just like the VC++ 2008 reported I should. I don't know if this is 2008 specific, so please report if you have any other VC++ runtime (like the 2003 or 2005) and the HUDdataMFD works with it so that I can add the info to the orbithangar.com add-on description.

pete.dakota, yes, you were the one that requested it and computerex's solution inspired me (the eHUD).

EDIT: Thanks for the tip computerex!
 
My thanks to you and computerex, then. :) The addon works fine for me now I've got the 2008 runtime components. I wasn't sure which I had before then, but it certainly didn't work until I downloaded the latest.

The HUD data not being able to update without the MFD active is the biggest issue right now, especially as the HUD overlay actually sits on top of the MFD itself by default. If you are able to have the HUD data refresh whilst the MFD is not active then this addon will be perfect. :)
 
It's my first addon for orbitersim but I don't think there was a way to print the data on the actual HUD.
Welcome to the world of developing!

Vessels can write to the HUD easy enough, see the OrbiterWiki article.

There is no method directly supported in the Orbiter API for an MFD to write to the HUD, however agentgonzo used hooking to accomplish this for LaunchMFD.
 
The HUD data not being able to update without the MFD active is the biggest issue right now, especially as the HUD overlay actually sits on top of the MFD itself by default. If you are able to have the HUD data refresh whilst the MFD is not active then this addon will be perfect. :)
This would be possible too, by removing the HUD display code from the MFD class and placing it in a global class with the display function called by opcPreStep.
 
This would be possible too, by removing the HUD display code from the MFD class and placing it in a global class with the display function called by opcPreStep.

That's what I've been testing but I have about no C++ experience at the moment. I want the user to be able to use the MFD for something else and somehow have another plugin update the HUD. And only change the data and turn in on/off with the HUDdataMFD MFD. opcPreStep is a good solution too, I guess that it runs even without the MFD being active but like I said I don't know much about C++. Classes in general are complicated to grasp, C++ (and others like Java) is even harder.

By creating another plugin I need to have the HUDdataMFD set some superglobals, like the slot data IDs (used to load the results like speed, VS etc in the HUD slots and display them). And I could use the same functions for the plugin to print data on the HUD and calculate it. But I have no idea either if superglobals are available.
 
If you make the code public, people might be able to offer suggestions. :speakcool:
 
Good point.
I've attached the .cpp and .h to this post.

I will make them public (ie included in the package) since I know it will help others understand the Orbiter API but it was not ready when I've released the HUDdataMFD.
 

Attachments

The HUDdataMFD HUD data is now (v1.1) refreshed even if the HUDdataMFD MFD is not active or you are in external view.

Took me about an hour to fix and test it and I had to make some functions global, I don't know if that is what you guys suggested but I'm happy with the result.

The new source code is attached; it's messy but has a logical structure and I think it's easy to follow if you are interested.
 

Attachments

HUDdataMFD v1.2 released:

v1.2 comes with a configuration file that allows You to decide the default HUD data to be loaded when Orbitersim first runs and the default location of the HUD on the screen. You can now have multiple configurations for different mission stages (ascends, reentries, flights etc) and vessels without setting the HUDdataMFD at the beginning of every mission yourself.
"Dynamic Pressure" is added as available data since it's an important parameter during ascends (especially with one of those sc/ramjet engine ships) and reentries.

I've also added 2 extra HUD slots (to a total of 8), doesn't worth mentioning about them on Orbithangar (in fact I forgot to add that to the manual :) ).

Thanks!
PS: see first post for OrbitHangar.com link.
 
I finally tried this out this evening. Excellent work! Eliminates the need for a Surface MFD taking up space on the screen.

Couple of suggestions:
-Perhaps a help page that describes the different data codes for quick reference
-Maybe a means of changing the text color so it stands out better against certain backgrounds

Overall great job. Yet another module that will forever be activated...

ETA: I have notived a bug, which is probably not your fault. While flying Sputnik's Dyna-Soar, I noticed that after every staging event you have to cycle the HUD data off and on again because it's gets all screwy.
 
Last edited:
Thanks for the feedback, guys!

Andy44, I don't understand what you ment by "Perhaps a help page that describes the different data codes for quick reference". Press PG and you will get a list of available data that can be loaded and displayed by HUDdataMFD. Also, when I'll get back to C++ I'll add that color option you've mentioned. Hopefully Dr. Martin will give us the option to add data directly on the Orbitersim HUD with the next version :) and the option will be irrelevant. Regarding the bug you've mentioned, it might just be the code, I haven't tested that much, the code just follows logic ( mine, lol ).

HUDdataMFD is in the 13th place at orbithangar.com top 25 . [ame="http://www.orbithangar.com/searchid.php?ID=3349"]Up, Up, Up...[/ame]
 
Last edited:
Back
Top