0.5: finally got around to add a basic 3D outside view. Caveat: 3D only does pitch and yaw. Roll does not work yet, any help is greatly appreciated!
This is a tiny flight simulator based on a Cessna-172R with a G1000 glass cockpit. (This is the plane I fly in real life, so I thought it would be a challenge to see if it can be done with Pico-8.)
The flight model is not based on theory but on my observations as a pilot. I have to say that it's quite good ;-) Within the limits of Pico-8 it quite feels like the real thing.
Starting the program, you can choose between different scenarios (visual approach, final approach, full approach, engine failure and unusual attitudes; more scenarios to come). Here is what you need to know:
- Tab toggles between flying mode and map/pause mode. Your flight path is shown in yellow.
- Arrow keys control pitch and roll
- X/Z control throttle. RPM are displayed on the lower left corner. Normal continuous operation is below 2400. Cruise flight at approx. 2200, approach at 1700-2000, final approach at 1250
- On the left side of the display is the airspeed indicator, showing the indicated airspeed (IAS). Never exceed speed is 163 Knots IAS. Stall speed is around 40 Knots IAS.
- To the right of the AI are the altimeter (feet) and vertical speed indicator (VSI, 100s of feet per minute).
- On the bottom left is a small inset map, showing the airplane symbol as well as navigation aids (blue dots) and airports (pink dots).
- In the lower half of the display is the horizontal situation indicator (HSI), which shows the current heading (on top), instrument landing system localizer (green arrow), the bearing to a navigation aid (blue arrow) as well as the distance to it in nautical miles (lower right)
- The small arrow left of the HSI shows where the wind is coming from
- There is a timer (minutes:seconds)
- On the left side of the screen you can see the throttle (lever position and RPM) as well as the flaps indicator (press Q to toggle, lower flaps below 110 Knots IAS).
- At the very top of the screen you can see the distance to your selected GPS waypoint and your ground speed (GS).
- Note that the colors on the navigation instruments corresponds to the map symbols (green, blue, pink).
- To successfully land, touch down with runway heading +/- 5 degrees, below 65 knots, wings level, positive pitch (i.e. nose slightly up) and a vertical speed of not more than -300 feet/min.
Here is the real display on a flight in the Swiss alps to compare:
The full approach is probably worth explaining in more detail. You are inbound to Pico VOR (a navigation beacon - blue dot on map display) at 3000 feet. You will now continue to fly your inbound course of 313 degrees while remaining at 3000 feet. The blue arrow on the HSI (horizontal situation indicator - round instrument in the middle) always points towards Pico VOR and the number at the bottom left shows the distance to it in nautical miles. As you pass over Pico VOR, you will observe that the bearing pointer changes direction and now points directly behind you and the distance to the VOR will start increasing. Continue to fly a heading of 313 degrees at 3000 feet while observing the distance from the VOR.
Pay close attention to the green arrow on the HSI once you are at 6 miles. The middle part of the arrow will start moving towards the airplane symbol, which means that you approach the runway centerline. Once you are almost on the centerline, start turning to a heading of 265 degrees - AWAY from the airport! This is now the moment to reduce power (to around 2000 RPM) and descend to 2000 feet (at around 1000 feet per minute).
Level off at 2000 feet and slowly turn right 45 degrees to a heading of 310. Fly for one minute and turn left 180 degrees to a heading of 130. Now you are at a 45 degree intercept angle for the final approach towards the airport. Once again, closely observe the middle part of the green arrow on the HSI. As it starts moving towards the airplane symbol slowly turn left the final approach heading of 85 degrees.
Try to keep the moving part of the green arrow in the middle (this means that you are on the extended runway centerline). If it is to the left of the airplane symbol this means that you are to the right of the runway centerline. Turn left a couple of degrees to re-intercept the centerline and turn back to the final approach heading 85. Keep the line centered! Now things start getting busier.
At around 6 miles from the airport (pink number on top right), the green dot next to the altimeter will start moving. This is the glide slope indicator and it will tell you how much you need to descend to end up at the beginning of the runway. Once it starts reaching the center, you will start a gentle descent towards the airport: deploy flaps (Q), reduce power to around 1700 RPM and lower the nose a bit, such that you get an indicated airspeed of around 90 knots and a descent rate of around -500 feet per minute. This will keep the glide slope centered. If the green dot is above the center, this means that you are below the glide slope and you need to pitch up and add a little bit of power to re-intercept the glide slope. Try to keep the glide slope and the green arrow centered.
At around 3 miles from the airport, you will see it appear as a green dot on the map display. Keep everything centered! At around 200 feet, reduce power to around 1200 RPM to slow down the airplane to 65 knots while still keeping the green arrow and glide slope centered. At around 50 feet, slowly reduce power to idle and start gently raising the nose. Your goal is to be in a slightly nose high attitude, at 50 knots by the time the altimeter and the distance to the airport both read zero.
Congratulations, you have successfully shot an instrument approach and landed the airplane - welcome to Tiny Municipal Airport!
This description is valid with no wind. If you fly with wind, it will push you away from where you want to fly, so you need to correct your heading a couple of degrees into the wind. Check the wind arrow to see where it is blowing from. Example: if you are on final approach (heading 085) and the wind is blowing from the left (060), it will push you to the right. The localizer will start moving to the left, so you will need to correct into the wind and towards the localizer to a heading of let's say 078 to recenter the localizer.
If this is confusing for you, here is what the entire will more or less look like in the map screen.
I am really impressed by this project, a lot less by the code structure and how you do 3d!!
I have a solid framework to do 3d flightsims (draft below) - happy to colaborate if you want.
@freds72 Thanks for your comment regarding code structure and 3d. These are literally my first lines of code and I'm afraid that this is about as good as it gets ;-) This being said, I am seriously impressed by your projects! If you have some time to spare, I would be more than happy to collaborate and improve this cart.
[Please log in to post a comment]