Probably You heard before about the famous American Army surface-to-air missile (SAM) system called Patriot. But did You also hear about software bug/ using it contrary to the manufacturer's recommendations case that as a result, it cost the lives of 28 people?
How Patriots should work?
The Patriot was created in the 1970s to counter Soviet missiles that flight at an average speed of about Mach 2. The idea when they were designed should be as mobile as it is possible. For that reason, the time of continuous operation was therefore planned for no more than 8 hours. After this period, it was to be deactivated, transported, and restarted in a new location.
February 25 1991
Patriots, was used during the Persian Gulf War. On 25thFebruary 1991 year Iraqi Scud missile hit the American barracks in Dhahran, killing 28 people and injuring over 100. The tragedy occurred, despite the fact that the security of the base was guarded by 6 Patriot anti-missile batteries! Like always in such a question is: why? What went wrong?
Decimal Values problem
Of course, after that accident, US Army starts to investigate that issue. What was surprised - investigators found that fault was an already known bug:
On February 11, 1991, Israeli forces found an issue with storing decimal values. Values for a time were stored as an integer number - which means it is a 24-bit size. It assures accuracy of 1/10 of a second. The result of that was in some portion of the time stored value being lost as it incremented every 0.1 seconds. To calculate enemy rocket location, data had to be cast to real numbers. Those 'lost' portion of second on the system running for consecutive 8 hours resulted in a 20% targeting precision loss, and after the continuous operation, for 20 hours the inaccuracy would grow so big that the Patriot system wouldn't be able to track, and shot down enemy missiles.
The issue was reported by them to US Army, but they underrated the importance of the discovery. They assumed that according to requirements, Patriot should be a mobile system to be used for short-time defense operations and would never be used for over 8 hours. After each system restart, the time counter was also restarted, so then the bug wasn't to be a problem.
Anyway, on February 16 a discovered bug was fixed. A patch was released, but in the ongoing war, applying it to every unit requires some time.
Nobody likes waiting
So the patch wasn't installed on that Patriots in Dhahran on time. But anyway, it shouldn't be a problem if the system still will be restarted after every 8 hours -right? Well, that is true. But do You like to wait? Probably no one like it - even soldiers.
As it turned out, due to the long process of activating the system (60-90 seconds), so to avoid that activating system time some Patriot operators don't restart it at all. Some American batteries in Iraq worked continuously for over 100 hours. And in that case difference between real-time and that calculated by Patriot system was 0,34 seconds.
This mistake turned out to be enough to allow the Iraqi Scud rocket, which was flying at as much as Mach 5, to slip away, despite being caught in the sky and then locked on in the first phase of targeting. Using an inaccurate clock, the system incorrectly calculated the window in which the enemy missile should appear in the second phase of targeting. Having not found the object in it, the Patriot took no action, considering it to be a false alarm. As a result, there was a tragedy described at beginning of the article.