Then that really does raise some questions as to what 100 million lines are for. What operations exactly does an airplane need to execute that require that much code?
So this lines of code estimate are spread across all the systems on the aircraft. One reason for all of the lines is that everything is done in C.
Then really the more exact reason is that every command on an aircraft is monitored. You have complex control laws to control a surface and then probably 4 or 5 different monitors that make sure the surface isn't oscillating or the actuators are not fighting each other and all kinds of stuff. It is because the mentality that not only do you design something to not go wrong, you monitor for failures when it does and handles them accordingly.
Finally you have maintenance where an technician can run a test to determine any issue on the aircraft. So there has to be tests and monitors built into the software to determine root cause of an issue down to a single box/actuator/sensor/or wiring problem.
Modern avionics is insanely complex. This isn't something you throw 1-year self taught JS devs on.
When I worked on next-gen turbofans, we had multiple dozen engineers working on managing the requirements of the software, much less the software itself.
You have the main avionics software managing the flight itself, the engine software managing fuel consumption, and the 3x safety factor required to be certified.
"Everything" isn't telling much. I'd love to, out of curiosity, browse through a codebase of an avionics system. Is anything like this publicly available?
Most likely there is not much that you can look at but this overview of the space shuttle can give you a lot of insight into how software and hardware are designed for flight critical applications. I believe this was posted a while ago here.
One take away is that software and hardware are nearly impossible to separate in a flight critical application.
Also one note, the space shuttle was incredibly complex for its day. So I would say the complexity of the space shuttle would give you a decent idea of what commercial aviation does now.
> Also one note, the space shuttle was incredibly complex for its day. So I would say the complexity of the space shuttle would give you a decent idea of what commercial aviation does now.
I definitely missed this if it was posted here. Thanks!
I was kind of hoping that some legacy avionics system somewhere would have sources available on-line, but I guess companies writing this code don't open-source projects just because they get old.
In addition to every component that has some kind of data bus you also have the fly by wire system which includes all of Airbus’ ‘laws’ for the different flight envelopes. You also have modern navigation gear and the displays and interfaces that come with that. Just look at the cockpit and realize everything in there is software and it becomes clearer.
Think about it as a 1000 independent sometimes redundant embedded systems. 10000 lines of code you can write alone in 2 years for middle complexity project. It’s not single data bank application.