Professional Online Portfolio
443-852-4675

MATLAB F-14D HUD
I created a replica of the F-14D Tomcat Heads-Up-Display (HUD). The F-14 Tomcat was the U.S Navy’s main multi role fighter from 1973 until it was replaced by the F-18 Hornet in 2006. My project focuses on the D model of the F-14, the A and B model’s HUD has a more analog set up which is significantly different from the D model and harder to code.
A HUD is the screen that a pilot sees through the cockpit when he is flying. It provides the pilot vital information about the aircraft instantly without having to look away from the cockpit. If you have seen any footage of a Navy pilot from the cockpit, you’ve most likely seen what a HUD looks like.
F-14D HUD Demonstration
Research



F-14D Tomcat on aircraft carrier catapult
F-16 HUD
Footage from F-14 HUD shooting down Libyan MiG 1989
During some research to find what the real F-14D model HUD looks like, I found a diagram of the HUD on a website where ex-F-14D pilots/engineers post in depth unclassified information of the F-14D and its systems. I modeled my HUD after this diagram.

My program will display all of the flight information that is seen above in a GUI that shows an image of the cockpit and HUD. The user can click a button on the GUI to see the flight information change. All of this will be coded in MATLAB using the App Designer function. Because I do not know enough about coding to show the tick marks continuously shifting with the numbers for any of the heading, airspeed, and altitude indicators like in real life, I decided that the GUI in this project would basically be a snapshot of what the HUD would look like in certain flight conditions.
To run the program, press the HUD button to show the data. If you want to show another set of a data, press reset, then press the HUD button again.
Program Explanation

First the app has to be created and then its contents have to be placed into the app. I have images layered on top of each other to show the inside of the cockpit with the HUD and various pitch scales preset at certain angles. I made these images by hand drawing them on a photoshop software (Paint.net) and imported them into MATLAB. There are labels for Angle of Attack, Mach, and g forces. Two buttons are being used to reset and display the GUI. The rest of the components are NumericEditFields that will display all numbers.

Then I have to code what happens when the display button, named HUD, is pressed. This is where I will put the main code. The random flight data will now be generated and organized into cell arrays

Then angle of attack, Mach number, and current G’s will be calculated and organized into column 2 from that data. Roll, heading, airspeed, and altitude are randomly selected from the values above here.

Now I have to assign each NumericEditField a cell to display the data accordingly. For the airspeed and altitude indicator, there are numbers on every major tick mark above and below the main indicator which show where on the scale the main indicator is displaying. The main indicator displays the actual value. The numbers around the altitude main indicator are per 100 feet according to the real-life diagram. The heading scale works in the same way as described above except that the scale only moves left to right, so the main indicator is in the middle (where triangle is pointing to) and the values to the left and right of the main indicator just show where on the scale the main indicator is. For these reasons, I had to add, subtract, or divide the value of the main indicator cell to properly display the values around the main indicators according to the real-life diagram.

To show the roll of the aircraft on the HUD, I had to draw the Pitch and Bank Scale separately from the main HUD image and layer the Pitch/Bank Scale image on top of the main HUD image. After spending hours finding out that MATLAB App Designer cannot rotate images, I had to draw each scenario representing the degree of the Pitch/Bank Scale image. This resulted in 9 different images of the Pitch/Bank Scale to account for all angles, all layered on top of each other with their visibility off by default so the user would not see 9 Pitch/Bank Scales colliding with each other. This part of the code activates a specific Pitch/Bank Scale image by making the image visible if it matches a certain value.

After realizing that the user would only be able to run this code once and would have to keep exiting out and running the program again when the HUD button was pressed, I decided it would be more efficient to create a reset button that would just clear all the values so the user could just keep displaying the generated data without having to exit out of the GUI and restarting the program manually.

This part of the code is a sample of how each component of the GUI was created, from here I could control each component’s properties: position, background color, text color, size, text etc. in the GUI.

Finally, the program can be wrapped up with ending GUI statements that officially shows all the components and deletes them once the GUI is exited and the program is terminated.
Problems Experienced
There were several of problems I ran into when creating this project. Initially, I wanted to make a fully functional HUD where I could show all of the scales moving freely and values changing with the scales like in real life. But I quickly realized after looking at example code from the Altimeter, Artificial Horizon, and Airspeed indicator from the Aerospace toolbox (which a HUD performs the exact same functions but digitally) that the code was too advanced for me to comprehend and I would need to dedicate months to learn how it functions 100%. The code alone for the Artificial Horizon was over 1000 lines, so if I wanted to make a HUD that incorporated all of these indicators, it would be around 5000+ lines and probably take me months to develop just like it did for the engineers at MATLAB to create them. So, I had to settle for displaying a snapshot in time of what a HUD would look like in the following flight conditions.
This reason, among many, forced me to not code a working Pitch Scale. I thought about making a working Pitch Scale if I employed the same concept to the Altimeter and Airspeed Scale of multiple NumericEditFields showing where on the scale the main indicator was; however, this would clutter up the screen and maybe confuse the user if they never used a HUD before. Also, since the Pitch Scale “rolls” with the Bank Scale, MATLAB App Designer does not allow me to rotate a NumericEditField with an image, much so less even rotate anything in the GUI (you can rotate images with the guide function but you’d still run into the same problem described previously). It came down to choosing if I wanted to display only the Roll or only the Pitch. I figured that displaying the Roll over the Pitch would be better because we could just assume that the pilot is just turning the plane at level flight. Also, I was having tons of trouble trying to calculate the Angle of Attack (AOA) because it’s dependent on wind direction, Pitch, and current angle of the wings (aircraft airfoils aren’t always aligned straight with the rest of the plane). I couldn’t find data on the angle of the airfoil when the plane was at rest, or the AOA when pitch = 0. Since Pitch is always going to be 0 anyway, it is very reasonable to assume AOA would just be 0 the whole time as well (if at rest the angle of the airfoil is 0 degrees) and if the wind is blowing at the plane at 0 degrees from the x axis.
These reasons played into choosing to display Roll over Pitch since Pitch was going to complicate tons of things and changing the project to just display a snapshot in time would literally solve all of these at once. I wanted to make a working Vertical Speed Indicator as shown in the real-life diagram (not labeled), but since Pitch would be 0 the whole time, there would not be any vertical speed in the positive or negative direction. I still drew this indicator in along with the values of the Pitch Scale into the image just for show and all the data is still accurate in the end anyway.
I thought I was going to code this whole project by using the “guide” command in MATLAB and create a GUI from scratch; however, I ran into even more problems because MATLAB doesn’t know how to create transparent backgrounds in this mode. I needed pictures to have transparent backgrounds so I could layer parts of the HUD on top of each other without ruining the whole image. MATLAB is also phasing out the “guide” command and replacing it with App Designer, so I figured that it would be better to learn how to use App Designer for the future anyway.
In general, this project was challenging because I had to spend lots of time learning how to create a GUI with the guide function and in App Designer because I didn’t know how to before or which one to choose. The HUD is kind of small and the numbers may be hard to read, but in real life they are actually small. I did my best to balance the fonts and images for the user to read. I really wish that I could code the HUD to change fluidly like in real life if I had more time.
Conclusion
I developed a realistic F-14D Tomcat HUD that displays the correct information (as a snapshot in time) from the randomly generated flight data. The program generates the flight data, calculates missing variables, and organizes it into cell arrays, which are then are displayed on a GUI that shows the HUD for the pilot to interpret. There was an incredible amount of problems that I ran into but were solved by keeping the pitch at 0 degrees and choosing App Designer as my tool to code this project. From this project I learned an incredible number of things like how to code GUI’s in MATLAB, the physics behind Angle of Attack, physics behind calculating G forces experienced, the limitations of MATLAB GUI’s, and the power of the Aerospace toolbox. I had a really fun time utilizing the skills I learned in class and applying it to my field of study.