Profile image

Fully Functional Cockpit Screens + Much More! - SWL-120 Progress Update 8

49.5k PlaneFlightX  1.3 years ago

< Part 9 | Part 7 >

Welcome back to the eighth main progress update for the SWL-120. This is quite a large progress update, with many minor and major updates. In fact, this is probably the largest progress update ever!



After the last main update, I put SWL-120 development on absolute overdrive. I'm not sure why I felt like doing this, but I did. I have made many, many changes, some minor and some major.

You can also view this progress update in video form.
Cockpit Screens + Many Bugfixes
Complex Aircraft Systems

Minor Updates

A lot of these updates required me to first make the changes, and then add them to the SWL-120 Parts mod. Having to add them to the mod is part of the reason I've been putting them off, as there was quite a long process to get a new change on the no mods version reflected in the mods version. I have now organized my files in the Unity project, so making a "patch" is a little easier. All the small changes requiring a mod patch are listed below.

  • Nudged a single part up in the interior file so it doesn't clip through the cargo bay ceiling
  • Slightly decreased the length of a part on the wing base so it doesn't clip through the back of the front cargo bay
  • Recessed wing root landing lights into wing, covered by glass, just like the outboard lights
  • Redesigned engine pylon to look more realistic
  • Slight change to engine decals to remove some decals that were partially occluded by the wing
  • Made inboard wall "capping" off the wing from the spoilers and flaps cream colored instead of white, to match the outboard ones
  • Modified engine reverse thrust behavior, where engines now wait for N1 to spool down before retracting the cowling
  • Finally made trim actually do something

If you would like more information on what I mean by "mods" and "no mods", please read the fifth progress update.





Flight Controls

I have added many flight controls, one of the first being a yoke. It works as you would expect, and also has a list of checklist items on the front. Additionally, it works perfectly in virtual reality, because of how control bases work.

Another flight control group is the tiller and rudder pedals. These are so intertwined, I'll talk about them together.

For almost every plane in SimplePlanes, controlling the landing gear steering and/or the rudder is pretty simple: Yaw. Some planes may have some funky trees to inhibit nose gear steering or rudder steering based on airspeed or altitude, but there's usually not much else. On the SWL-120, however, you get real-life-level realism. In real life, planes have a tiller and rudder pedals. The tiller, also called a steering wheel, steers the nose gear, and the rudder pedals, well, control the rudder. The rudder pedals can also steer the nose gear, up to a maximum of 8 degrees, for slight corrections when on the runway.

I've coded this behavior into SimplePlanes, where you can grab the tiller in VR and steer the plane on the ground, and use your USB rudder pedals to control the rudder and some nose gear movement.

This only accommodates one type of player, however: the player who plays SPVR on a NASA computer, and has a set of USB rudder pedals. To increase accessibility, I've added what I call the tiller mode. This is not a real system; it allows you to change between three different modes of tiller/yaw operation. To change the mode, you can click the button hidden inside the circular fuselage attached to the control base.

Tiller Modes

  • Mode 1: Tiller and yaw are separate. Yaw controls the rudder pedals, the rudder, and some nose gear movement, and the tiller controls the full range of motion of the nose gear.
  • Mode 2: Tiller and yaw are combined. This has the same behavior as most planes in SP. Yaw controls both the rudder pedals and full nose gear steering, as well as moving the physical tiller device. This goes both ways, with the tiller also controlling the rudder pedals.
  • Mode 3: Tiller basically functions as an input for yaw.

Mode Uses

While you can use any mode whenever you'd like, below are the uses I imagined when designing each mode.

  • Mode 1: When you are playing in VR with a physical set of rudder pedals.
  • Mode 2: When you are not in VR and cannot grab the tiller, or when you just want a simplified input.
  • Mode 3: When you are in VR without rudder pedals and want to control yaw only.

To further improve accessibility, yaw control reverts to normal (yaw controls everything) whenever you aren't in one of the two pilot views.

SnakePad

Right behind the tiller, you can see what appears to be an iPad on a stand. I call this a SnakePad, since this plane is from a fictional universe. SWL is short for Snake Wonder Land, so I might as well call the iPad a SnakePad.

Right now it's just 3 parts, but eventually it will be a full checklist! The text on the yoke lists all the different checklists, and the SnakePad will display all of this.

In typical PlaneFlightX fashion, the SnakePad doesn't just sit on the stand. It actually has FIVE position modes!

Position Modes

  • Mode 1: Sits on the captain's stand
  • Mode 2: Locks to the captain's yoke and moves with the yoke
  • Mode 3: Locks to the first officer's yoke and moves with the yoke
  • Mode 4: Sits on the first officer's stand
  • Mode 5: Unlocks movement

The yoke behavior took me a quite a while to code. I used PlanariaLab's 6DoFControlBase as the core for the movement, and because of this, you can actually pick up the SnakePad in VR and move it wherever you want. To prevent accidental movement, I made it snap back to place when you aren't in Mode 5. In Mode 5, it functions as a pickup object (just without gravity effects, it just stays where you put it). Truly a step up from the boring piston-rotator checklist on the SWL-10.


Center Panel

While the center panel was essentially complete a few months ago, I've added two things to it: EICAS screen buttons and a parking brake. I'll talk about EICAS later in this update. The parking brake is self-explanatory: you pull it, and you are stopped. Until we get brake inputs that allow code, I've made it function by cutting off thrust from the physics engines, so the normal brakes are more than enough to hold the plane at a complete stop (in fact, you don't need any brakes if you are stopped on a flat surface).

Overhead Panel

The last progress update was literally titled "The Overhead Panel", but now I've properly finished it. It has many modules, and every button works. Every. Single. Button. You can even test, start, and stop the flight recorders (this doesn't do anything but you can still click the buttons which is cool). In the last update, three modules were incomplete. These are now completed, and are listed below.

  • Miscellaneous 1
  • Miscellaneous 1
  • Cabin Power


Miscellaneous 1

This module has controls for the INS (Inertial Navigation System), GPS connectivity, and control surface damper.

Miscellaneous 2

This module has controls for the flight recorders (nonfunctional), passenger oxygen, and cargo fire.

Cabin Power

This module has controls for power to various systems in the cabin, and displays the status of each light bar in the cabin.

I've also changed the height of the cockpit ceiling so you no longer feel squashed by the roof in VR.

Cockpit Screens



As you can see in the above images, the cockpit screens on the SWL-120 are extremely detailed and realistic. There are three core types of screens:

  • Primary Flight Display (PFD)
  • Navigation Display (ND)
  • Engine Information and Crew Alerting System (EICAS)

There is also a tall and thin screen to the left of the EICAS display, which is not yet functional. I'll talk about this screen in a future progress update when I eventually code it.

Primary Flight Display

The core of the PFD comes from SARACONIKaviationIndustry's 1 Part PFD, and has undergone extensive modifications to suit my needs. Some of the modifications are listed below.

  • Removed bank angle indicator
  • Removed heading indicator
  • Heavily modified and in some cases improved the TAS, GS, AltitudeAgl, vertical speed, speed, and altitude indicators
  • Made altitude and speed tapes gray and opaque so the text on the artificial horizon doesn't clip through them
  • Added ILS markers (taken from zwen's ILS)
  • Added back bank angle indicator, but it was taken from one of these HUDs
  • Added target altitude/speed text above tapes
  • Added a triangle that shows your target altitude/speed on the relevant tape
  • Added bar at the top to display what components of the autopilot are active
  • Added AOA/AOS indicator, taken from the HUD
  • Fixed weird glitches when you are perfectly still on the ground
  • Added overspeed/stall text
  • Improved and simplified original code a lot

Everything you see in the square with the PFD is a single label. I had to make it one label because of a weird bug with labels and clipping. There is also a mini navigation display below the PFD. It's a direct clone of the main navigation display, just without the circle. There are also the "random numbers" (GS, TAS, AltitudeAgl) located in the mini nav display square, which is a separate label from the main PFD square.

Navigation Display

The navigation display is what a heading indicator/compass looks like in modern airliners. It can display your heading, the autopilot target heading, waypoints, flight plans, weather, and much more. On the SWL-120, I've had to simplify it a bit from real life, so no weather and no full-color adjustable minimap, unfortunately.
You do, however, get heading, target heading, waypoints, hopefully basic terrain, and hopefully a purple "waypoint-to-waypoint" line.

It's all one label right now; the semicircle you can see is made up of many tiny dashes.

EICAS

The EICAS, or Engine Information and Crew Alerting System, is a screen that can display all kinds of information about the plane. Mine has eight screens, of which two are currently mostly complete. The two screens are the main engine display and the electrical system overview (I'm not quite sure what the proper names for these are).

The engine information display, well, displays information about the engines. There are currently four dials per engine, however I have plans to add more engine info in the future. Just like the semicircle on the nav display, the engine dial semicircles are made up of many dashes. Each dial provides accurate and useful information. The TPR is basically the actual thrust provided by the engine, from 0 to 1, N1 and N2 are the core engine turbine speeds which I coded in this video, and EGT is a dead-end (exists exclusively for the EGT dial) variable, which is as realistic as possible.

There is also a flaps indicator, which does what it says on the tin.

The electrics display is quite complicated. I explain the electrical system later in this progress update, so I'll just explain what the display does here.

There are several components to the electrics diagram:

  • Main bus
  • Load bar and supply/demand values
  • Source available text/square
  • Source active square

The main electrical bus is represented graphically by the large rectangle with text inside it. Sources "feed" into it, represented with some squares and lines. The white squares closer to the bus represent whether the source is providing power or not. The green squares (and their own white counterparts) represent whether the source is available for use or not.

The bar and text in the middle of the rectangle tells you the total load, total supply, and visually represents this information.

You can find more information about the electrical system further down in this update.

HUD

The HUD, or Heads Up Display, is a transparent screen which can be rotated out of view when it isn't required. It can be used in all phases of flight, and is intended to help keep the pilot's focus on the horizon instead of down at the flight displays. All core information displayed on the PFD is also duplicated to the HUD, in green text with a transparent background.

The core of the HUD comes from PlanariaLab's 1 Part HUD, and has undergone extensive modifications to suit my needs. Some of the modifications are listed below.

  • Removed some information not relevant to airliners
  • Removed enemy aircraft indicators and associated variables
  • Moved heading to the bottom
  • Added autopilot target heading indicator
  • Updated altitude to be like the new PFD, with increments of 20.
  • Added autopilot target altitude/speed arrows and text
  • Added ILS markers (credit to zwen for doing this)
  • Added indicator at top to tell you what autopilot parts are active
  • Clamped AOA/AOS indicator so it stays on-screen
  • Updated and formatted code a bit
  • Replaced HudDistance variable with a static number inside the label
  • Added overspeed/stall warnings

This label is mounted on a piece of glass attached to a fuselage brace. There is a control grip inside the top of the glass so you can drag the HUD down or up, which works on all platforms including VR. To aid with moving the HUD, the control base automatically snaps to be extended/retracted when you release the grip.

The HUDs for the captain and the first officer are 100% separate.

Fuel Dumping

One of the advanced systems on the SWL-120 is the fuel system. It's gone through several revisions, and is currently a "very basic" three tank system with "basic" fuel draw from each tank. There's currently no crossfeed or balance.

There is, however, a fuel dumping system. It's not connected to the tanks (it was in some older versions), but the visual effects are actually working! This is exclusive to the mods version, and uses smoke trails to simulate fuel coming out of the wings. The smoke trails mod doesn't actually support funky trees inputs, so I couldn't use that, but I luckily found the ancient air pollution mod and discovered it supported rudimentary FT commands in the activator.

When I was making all the minor changes to the SWL-120 Parts mod, I wanted to try and make my own smoke emitter. To do this, I watched some tutorials and managed to replicate the original Smoke Trails mod inside my SWL-120 Parts Unity project. I then figured out how to add an input controller instead of an activation group to control the trail. Some other changes needed to be made to make it similar to the trails made by the air pollution mod, such as the texture of the particles.

I figured the community could use this mod by itself as it is useful for more things than a fuel dumping trail, so I duplicated it into a separate mod. You can find this mod, called Smoke Trails 2, here.

Electrical System

Just like every other system on this plane, the electrical system is realistic and highly complex . Every system can draw varying amounts of electricity from the main electrical bus, which is powered by numerous generators. Each generator has a varying output based on its source function (for example the engine N2 stage, from 70% to 100%). If the electrical draw is higher than the available power, load shedding occurs. In newer aircraft, load shedding is where the plane's computers automatically cut power to nonessential systems, such as all cabin power.

This electrical system is heavily based off the 787, resulting in a lot of values such as generator capacities being similar to the 787.

You can view all information about the electrical system in the image below (yes, I planned this out in a neatly organized and formatted Excel spreadsheet).

Hydraulics System

Just like every other system on this plane, the hydraulic system is realistic and highly complex (yes I copied that from above pls don't cancel me). Every system can draw varying amounts of pressure from what I call the main distribution block (it's not entirely real life but I can't be bothered coding 3 different systems). The main distribution block is pressurized equally by all the hydraulic generators on the plane (literally the same as the electrical system just for hydraulics). I've tried my best to understand the exact behaviors and values of the 787, however some information continues to elude me so I'm making some things up.

Each generator, unlike the electrical system, provides a constant rate of pressure. In my research, I learned the more pumps you add to this system, the faster the pressurization occurs. This means a very small pump would eventually pressurize the system, albeit very slowly. I've made each hydraulic generator provide half the full speed of the system (that is, the speed of all the stuff running off hydraulics, such as control surfaces), mainly because I have no clue what I'm doing here. I need hydraulics information for EICAS and have to make something.

You can view all information about the hydraulic system in the image below (yes, I planned this out in a neatly organized and formatted Excel spreadsheet, and yes, this is the same file as the electrical system).

Performance

My original goal was to run the SWL-120 at 60FPS or higher. Unfortunately, recent test assemblies have produced as little as 25 FPS. I started looking into major sources of lag, and discovered that my cockpit screens, the FMC/RMC, and the overhead panel in general had quite a significant impact. The overhead panel can't really be simplified, so I'll leave it, at least for now, but the FMC and screens can.

Screens

Since everything is displayed using labels, I had to write code to move all the text and lines perfectly. Since both navigation screens are effectively a rotating circle (with some other stuff), I needed to use trigonometry to calculate precise horizontal and vertical offset values, sin and cos. I've since learned, however, that calculating at least 500 instances of sin and cos every single physics frame is quite detrimental to the framerate. I have somewhat fixed this using two core methods, which are moving reused code to variables, and rotating the entire label.

On the main PFD, I can't really remove all the sin and cos instances because each one is different and highly important, but I did move repeated calculations such as IAS / 34.7222 to variables. I don't think this has any noticeable performance benefit, but at least it makes the code simpler.

The secondary navigation display underneath the PFD is basically a rotating image with a static line and a moving target heading line. I updated this so most of the label is static, and only the two heading lines move. The label itself is rotated by a rotator.

The main navigation display is different. While it is essentially a scaled-up version of the secondary navigation display, there's less of the label in view at any time, and additionally, this will eventually display waypoints. I opted to write some code to "reuse" the few dashes visible on the display at any given time, so instead of hiding themselves and following their neighbors around the rotation of the circle, they loop over to the opposite side as soon as they are out of view, drastically simplifying the code and improving performance.

The EICAS display is also a contributor to lag. Even though there are little calculations, having to display at least 500 dashes for the circles and other drawings is probably not the most efficient. There's actually nothing I can do about this, unfortunately, aside from using mods (teaser for a future progress update). I did add some code to completely hide line drawings when you aren't on the respective page, however.

FMC/RMC

The FMC and RMC are the two advanced computers on the SWL-120. As mentioned above, the lag decreased by about 10FPS (40 to 50) when I removed the FMC and RMC entirely. I can't really completely remove these, as they are a key part of the aircraft's advanced systems, but I can simplify them and improve the variables.

I did some tests in a blank file, and gathered the following information:

  • The complexity of the code affects the performance impact of a variable
  • The more variables/code you add, the greater the performance impact
  • If you add a simple tertiary selector at the beginning of the code to evaluate either "0" or a long line of spaghetti, when it evaluates 0 the lag decreases

What this means is I can make the FMC variables "hibernate" most of the time, as the core storage variables only need to evaluate when a button is pressed. By adding a simple selector of (if the FMC buttons are not pressed, do nothing, else, run this line of spaghetti), I should be able to decrease the lag.

The RMC can also be improved and simplified, but I left that for the future as it's quite a large project.

Cockpit Seats

For a long time, I was using the seats on the SWL-10 as my cockpit seats. There was nothing wrong with this, however I felt they weren't very detailed. I of course fixed this, and have built some reasonably detailed cockpit seats. They aren't that complex, but they look better than the default seats, in my opinion.

Each armrest can rotated individually.

Different Versions

As I've explained in the past, the SWL-120 will feature several different versions. The current planned versions as of writing this post are below. There will be three public versions and a few unlisted versions.

Please note all versions will feature an "autostart" similar to the SWL-10's easy mode.

  • Main Version | Full thing. It uses mods to reduce the technical part count of over 24000 to just 2000.
  • No Mods | Full plane, but no mods. It's a cargo version, with no windows or doors, and the engines are slightly simpler, with the N2 and N1 components (aside from the front fan) being removed. Most minor details like rivets and possibly the livery will likely also be removed.
  • VR Edition (Flying Cockpit) | Just the cockpit and essential "physics parts". Meant to be used in VR where you spend the entire flight in the cockpit. I had plans for this to be curated, however the cockpit is like 90% of the performance cost, so I think this will simply be a version for potatoes.

Release Dates

Not sure yet. I'm really hoping for Christmas, and all these little patches and bug fixes together with the huge increase in production seems to point to this as being the actual release date. I'm not promising anything though.

FAQ

Q: How many parts does this have?
A: The parts are spread out across several files, but when I assemble a "test fit", it's just 2000! (that does use mods though, so estimate 3000+ for the no mods cargo version)
Q: How many FPS can I get?
A: It depends on what computer you have, but as of this update I get 25FPS on an overclocked i9-11900K and RTX 3060. It's all about single-core performance and some GPU, so if you can get a better single-core performance than me, you might get a better framerate than I do. I get 90FPS without the cockpit, and 50FPS with the cockpit by itself.
Q: gib releas date when
A: Not sure yet, as I've said above I only want to provide the highest quality parts, so I'm taking my time. I'm really hoping for Christmas this year.
Q: Mods? What about no mods?
A: I'm making two versions. One uses a custom mod to reduce the part count from over 24000 to about 2000, and the other has no interior and is a cargo version. You can read more about this in the fifth progress update.
Q: How do I fly this?
A: I am making a technical manual and a checklist. The manual explains every single control with labelled diagrams, and the checklist essentially tells you what to do with those controls. There will also be an autostart feature if you really hate procedures.

Video Links

  • Log in to leave a comment
  • Profile image

    TTTTTTTTTTTTTT

    7 months ago
  • Profile image
    49.5k PlaneFlightX

    @MobileBuilder21 Thanks!

    8 months ago
  • Profile image

    Looks extraordinary so far.

    +1 8 months ago
  • Profile image

    @CaptainNoble That's what Big Mathis is for. lol

    8 months ago
  • Profile image
    6,419 Sense2

    i wanna try out the no mod version on my 15 pro...

    +3 one year ago
  • Profile image
    49.5k PlaneFlightX

    @Thesaftyguy I am making a no mods version. Did you even read the FAQ at the end?

    +1 one year ago
  • Profile image

    Please finish this I want to download it oh and make a mod free version

    +1 one year ago
  • Profile image
    49.5k PlaneFlightX

    @NAFASIRO No, that is not possible in SP, or honestly most quality flight simulators. Flight simulation is about simulating the flight, not a crash.

    +1 1.2 years ago
  • Profile image
    34.8k Dissent3R

    hey, does this have realistic crash physics?

    1.2 years ago
  • Profile image
    6,419 Sense2

    @PlaneFlightX how- nevermind

    1.2 years ago
  • Profile image
    49.5k PlaneFlightX

    @Sense2 My PFD has the exact same problem, I just recessed it into the panel so the excess orange blocks are behind the panel.

    1.2 years ago
  • Profile image
    6,419 Sense2

    @PlaneFlightX Yeah, outside the black border, but i dont want that thick border around my screen.

    1.2 years ago
  • Profile image
    49.5k PlaneFlightX

    @Sense2 I'm not quite sure what you mean, do you mean there is an orange part showing outside the black border at a certain angle, or something else happens inside the black border?

    1.2 years ago
  • Profile image
    6,419 Sense2

    @PlaneFlightX the PFD, when rotated somewhere at a 15 or 25 angle, it causes that to be clipping through the screen.

    1.2 years ago
  • Profile image
    49.5k PlaneFlightX

    @Sense2 What thing?

    1.2 years ago
  • Profile image
    6,419 Sense2

    @PlaneFlightX i dont want that thing clipping through the screen…

    1.2 years ago
  • Profile image
    49.5k PlaneFlightX

    @Sense2 Why can't you use the original one?

    1.2 years ago
  • Profile image
    6,419 Sense2

    @PlaneFlightX aw man, but can you try to remove the autopilot and ILS?

    1.2 years ago
  • Profile image
    49.5k PlaneFlightX

    @Sense2 You'll need a lot of variables, such as autopilot and ILS information, which in turn depends on other code, which in turn requires the entire plane...

    1.2 years ago
  • Profile image
    6,419 Sense2

    Can i borrow that PFD you modified for my RA-670?

    1.2 years ago
  • Profile image

    @PlaneFlightX thanks!

    1.2 years ago
  • Profile image
    49.5k PlaneFlightX

    @EasternCopperhead I used a control base and cylinder grip.

    You need a special control base to make it like a pickup object like I did.

    1.2 years ago
  • Profile image

    How did you make the checklist pad grabble

    1.2 years ago
  • Profile image

    Holy heck, this will be an amazing plane to fly once its released! Hopefully doesn’t kill my quest in the process hehe!

    +1 1.2 years ago
  • Profile image

    Jeez man. SIMPLE planes, not HYPER-REALISTICPLANES(Good tho)

    +2 1.2 years ago
  • Log in to see more comments