"It is estimated that the Airbus A380, comparable in complexity to the Dreamliner, has more than 100 million lines of code."
"It is estimated that the Airbus A380, comparable in complexity to the Dreamliner, has more than 100 million lines of code."
Also source lines of code are usually calculated as lines of code that need to be verified. So if a line of code is in the software, it needs to have a test that covers that line of code.
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.
https://spaceflight.nasa.gov/shuttle/reference/shutref/orbit...
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.
And yet it has less than a million lines of code.
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.
Why?
And those libraries aren't written with the mindset of "when this code runs on an A380".
Even most non-certified projects will grow their own standard library once they get past a certain size, and this is merely for convenience, consistency, and features.
*This is in reference to DAL A software. DAL D might be able to run linux.
Here is a the wiki for the standard that software has to meet for commercial aircraft. It explain the DAL (Design Assurance Level) levels and what goes into them. https://en.wikipedia.org/wiki/DO-178C