Sign in to follow this  
MusicMonkey5555

Fighter Jet HUD

Recommended Posts

I am hoping this is the correct place to post this, feel free to let me know if it isn't or move it if your a mod.

Anyway I want to create a HUD much like that found in a fighter jet that behaves the same way as well. I am using Torque3D although that is sort of irrelevant, but figured I would let you know just in case.
I am making it look sort of like this: [url="http://www.anft.net/f-14/f14-detail-cp-d-pilot-02.htm"]http://www.anft.net/...-d-pilot-02.htm[/url]

I have most of the elements done (Airspeed, altitude, heading...), except for heading line and that entire center part. This is the part I need help on.

First I am trying to figure out exactly how it behaves and then how to replicate that behavior in my game. I have been watching [media]http://www.youtube.com/watch?v=RjqrfChgijs[/media] to see how it works, and it appears as if that entire element of the gui stays with the horizon and is rotated with it as well. 0 is of course at the horizon itself and the flight path marker is according to the direction the nose is headed.

Please correct me though if you understand different behavior.

So how exactly would I go about writing this. I need to figure out where the horizon is relative to the screen position I guess? So I first need to calculate the position of the horizon and then transform that to screen space (I know how to do that second part). Any idea how to do the first?

Any help would be greatly appreciated, and if someone knows of a code example some place (open source flight sim or something with a working HUD), that would be even better.

Thanks for the help in advance.

PS: Here is a game example from F-22 Lightning II, although the behavior seems a little different I think it would suffice
[media]http://www.youtube.com/watch?v=_K7IPaJk3Vg[/media]

Share this post


Link to post
Share on other sites
speciesUnknown    527
Calculating the horizon: I think the best solution here would be the cross product of a world space Up vector and the facing vector of the craft.

As for the behaviour of the middle point, it seems to be always pointing towards the launch vector, relative to the craft, of the weapons. I.E. if the pilot fires the machineguns, the rounds will approximately end up in the circular area. When the craft is in an upward or downward loop, it makes sense that the target point would not be visible to the pilot, which is why it goes off display at this point. I imagine that the reticle can be set for different ranges, which will affect how far off display it will be for a given banking velocity.

Just remember, you should be implementing some middle point between what is realistic and what is most fun - to make sure you get the right balance beween flight simulator anoraks and frat boy 360 gamers :P If its not totally realistic, thats not a disaster.

Disclaimer: I don't know all the correct aviation terms. Don't laugh at me.

Share this post


Link to post
Share on other sites
CombatWombat    673
[quote name='MusicMonkey5555' timestamp='1313086256' post='4847804']
So how exactly would I go about writing this. I need to figure out where the horizon is relative to the screen position I guess? So I first need to calculate the position of the horizon and then transform that to screen space (I know how to do that second part). Any idea how to do the first?
[/quote]

The artificial horizon is just a matter of finding the "forward" and "up" vectors of your jet. You grok this from it's orientation matrix/quaternion. Then you just draw the correct rung of the ladder to the center of the screen/hud/whatever. So as an example, you find your forward vector is actually pointed straight along the Y axis (assuming Y is UP!), you would just draw the "+90" rung in the middle.

Then, for the flight path marker, just take your velocity vector and normalize it, then basically plot this against your artificial horizon.

Some HUDs I have seen do funny things with offsetting the artificial horizon with respect to yaw and side slip, so beware of that if you are going to a very realistic effect.

Share this post


Link to post
Share on other sites
Thank you both for such quick and good answers. This is going to help a ton.

Oh and just as a side note. This actually isn't for a game necessarily, so realism is actually key. It is for a serious game/simulation/visualization application we (ESAL) develop for Boeing. We are contracted by them and it is use with the swarm technology they are working on along with others. So it is all in house and doesn't need to be fun :) Although these screens are way out of date here's our site if your curious: [url="http://www.esalstudios.org/gallery/"]http://www.esalstudios.org/gallery/[/url]

Anyways again thanks a ton for the help.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this