Community A-4E Update, January 2017
Hi everyone, and welcome to our January 2017 Community A-4E update. This month’s theme is "You’re in Control of the System."
Before mentioning any of our content however, we just want to toot our own horn and say Happy Birthday to Us! As of the first week of January, we’ve now been working on the A-4 for a year. We’ve had a few bumpy moments along the way, but every time we think something isn’t possible, one of us pulls a rabbit out of a hat and here we are… Tempus fugit, just like our A-4E.
And now to our new content...
Automatic Flight Control System (AFCS)
The first new feature for this month’s update is our implementation of the realistic Automatic Flight Control System (AFCS), otherwise known as the autopilot. We didn’t use any of the built-in SFM functionality for this, instead implementing our own custom PID controllers from scratch (had to brush up a bit on control systems theory, and aircraft control systems in particular). The autopilot has 3 primary modes of operation while engaged:
Attitude hold mode: if absolute bank is between 5 and 70 degrees, and pitch less than 60 degrees nose up/down, it keeps pitch and bank angle constant. Above these limits, AFCS will disengage or refuse to engage.
Heading hold mode: Similar to attitude hold, but levels out the plane if bank angle is less than 5 degrees.
Control Stick Steering mode: when force is applied to the stick, AFCS temporarily stops controlling until the stick is released. When the stick is released, control reverts back to attitude or heading hold modes above (depending on final bank angle when stick is released). This effectively means you can point the aircraft to a new pitch and bank angle while AFCS is engaged, and it will remain in that attitude when you release the stick. If you exceed certain limits while controlling the plane manually, AFCS disengages completely.
In addition to the above primary modes, the following can be enabled while in attitude or heading hold modes:
Altitude hold: instead of controlling pitch angle, the aircraft now controls the elevators to maintain the barometric altitude captured at the moment when this switch is flicked on (climb/dive rate must be less than 4000ft/min when activating this mode). This switch disables automatically when entering Control Stick Steering mode (i.e. moving the stick).
Pre-select Heading control: A heading (0 to 359 degrees) can be selected with a knob, and enabling this switch causes the aircraft to fly the selected heading (choosing the shortest direction around the compass) at a maximum bank angle of 27 degrees, and roll out smoothly at the target heading. The heading knob can also be adjusted while in this mode, causing the aircraft to again turn appropriately. This switch disables automatically when entering Control Stick Steering mode (i.e. moving the stick).
The AFCS also disables automatically when certain G-limits or control surface deflections or attitudes are exceeded (e.g. if moving stick beyond a certain amount in control stick steering mode). All of the switches are moved to disabled positions (with audible clicks) when this occurs. There is also an AFCS emergency override button on the stick, which immediately disengages all AFCS functions when pressed.
In addition to all the above, there is a stability augmentation control which provides yaw dampening. This can be activated manually when the AFCS system is in standby (no other AFCS control taking place) or is implicitly enabled when AFCS is engaged. (Note that this yaw dampening has not been implemented yet.)
AFCS Demonstration:
gb98vEcUaOA
Approach Power Compensator (APC)
The second new feature is the Approach Power Compensator (APC), sometimes referred to as an autothrottle. The purpose of the APC is to hold the proper angle of attack during the landing approach, which in turn results in the proper approach speed. By using AoA as the input instead of airspeed, the APC automatically adjusts to differences in the weight of the airplane when it returns from a mission, stabilizing on faster approaches when the plane is heavier. In fact, the control system we implemented is able to hold AoA within a degree, and thus airspeed to within about 1 knot of the optimal approach speeds at all weights listed in the manual, from 12,000 lb to 16,000 lb, which is pretty exciting.
Note that this does NOT guarantee you’re on the correct glide slope (glide slope and AoA aren’t the same thing) so you still need to fly the approach. You simply don’t have to worry about your airspeed on the way down, and the system automatically shuts off when the main landing gear is compressed.
A-4E "First" APC Demo:
8RB0ThUuccU
A-4E Carrier Circuit with APC:
y5Fx0j4GuDI
SFM Improvements
Of course, trying to stabilize on an AoA wouldn’t make sense without a large improvement in the accuracy of our flight model. We had mentioned in the past that there were a number of errors in our SFM table, with 10-15% excess lift at all AoA, that at this point we believe are corrected. This was possible based on uncovering some aerodynamic measurement data of similar wing geometries, and we’ve even been able to implement the increased AoA capability and increased lift produced by deployed slats. With the aerodynamic updates, suddenly all our AoA numbers matched the manual at all airspeeds and gross weights, so we’re pretty confident we have those elements correct.
What remains in the SFM aerodynamics is two things: First, we need a little bit more tuning of the horizontal drag component as we become transonic (we haven’t yet found supersonic data on the A-4’s wing), and second, some tuning of the stall AoA at low speed. Right now our max AoA is slightly low at low speeds, and that’s something we do have some data on. While it’ll damage the airframe, aerodynamically it should be possible, versus the elevator stall that occurs today resulting in a significant max-G limitation below 300 KIAS.
Engine Modeling and Instrumentation
To go along with the aerodynamic improvements, we’ve added more accurate engine modeling. It’s still an SFM engine, but the reporting of current pressure ratio and temperature seems pretty accurate, and we’ve even started to track damage caused by too much time spent at MIL power. We still have to reverse engineer the thrust being produced as that’s not available from the SFM, but now things like fuel flow rates relative to engine RPM relative to throttle position are very close to the real numbers. We did some long-range test missions using known mission altitude and thrust profiles and payloads, and the missions were all finished with 1000-1200 lb of fuel remaining (on a mission that started with 10,500 lbs to a target 450nm away), so this would indicate we’re within 5% of expected fuel consumption across the entire flight envelope.
Custom Brake Controller
Another thing people may notice is that the wheel brakes in the SFM are like carbon fiber brakes in a formula one car. They’ll stop a 20,000 lb plane from 150 knots in under 1000 feet. This is nothing like how the real brakes on the A-4 worked, which from all accounts were terrible and prone to locking up, so we implemented a variable PWM on the brake indicator. This limits the brake force applied to the SFM and converts the normal 12,500 lb landing distance from the SFM’s normal 1000’ to about 4000’ at sea level, and the 18,000 pound landing distance at altitude or when hot is closer to 7000’. If you have a tailwind, you should really consider landing in the opposite direction, or picking a long runway like Minvody or Nellis. Good luck landing an A-4 at Echo Bay.
And for the final control system...
AIM-9 integration
... we now support seek and lock tones for the AIM-9B sidewinder! Just like all other aircraft in DCS, you’ll hear the familiar warble when the missile is seeking, and when the missile’s seeker identifies a target and locks on, the tone will change to the higher pitched tone. If it loses lock, the tone reverts to seek tone. Like some gun camera footage we found online, the tone is slightly higher when within optimal launch parameters, so make sure you wait for the proper sound if you want the missile to hit. (The AIM-9B is not all-aspect, so you really need to maneuver to get a kill). The lock quality tone pitch variation algorithm needs some work, but as a proof of concept it works well.
A-4E Sidewinder Demo:
f2qqm7KfGT0
And finally, we've got a few other minor things to mention:
We've added spatially-oriented sounds when moving cockpit switches.
We fixed the gunsight circuit to match a more realistic brightness behavior.
The comms menu (backslash) now works with dummy intercom and radio devices, which allows the A-4E to interact with custom tasking via the F10 menu. (Note you still cannot talk to anything requiring a radio) This also means that refuel and rearm via ground crew are functional now as well.
We got the kneeboard working on the A-4E, which supports dynamically added kneeboard contents and map marking.
We implemented the clock/stopwatch realistically, which required us to discard the built-in clock device code.
Thanks again everyone for your encouragement!
The Community A-4E team