![concordia-memories.org Forum Index](templates/subSilver/images/logo_phpBB.gif) |
concordia-memories.org Recalling Concordia's Past
|
View previous topic :: View next topic |
Author |
Message |
roger.pape Site Admin
Joined: 17 Mar 2009 Posts: 414 Location: Liverpool, NY
|
Posted: Tue Feb 16, 2010 7:21 pm Post subject: Debugging Software |
|
|
We all complain about buggy software. However, as software systems and applications become increasingly large and complex, it is more and more difficult to create error-free software. This is particularly true for real-time systems that must respond to timed events. Various multi-billion dollar space programs have been doomed to failure because of coding and sign errors. The following incident illustrates how unconventional techniques may sometimes be needed to resolve problems.
Our company designed and built tracking equipment for air traffic control. One of these is a multilateration system that utilizes a number of distributed ground stations to detect the time difference of arrival of signals transmitted by an aircraft and determine its location. The key to good accuracy is the ability to maintain precise synchronization of the timing in these ground stations. (Each nanosecond of difference results in one foot of error.) One or more fixed ground-based reference transmitters with accurately surveyed locations provided this synchronization. But, as the coverage area was expanded, distance and terrain made this approach more difficult to implement. So it was decided to use the timing signals from GPS satellites as a timing source instead.
Of course, this modification required a redesign of the equipment and the software that controlled it. So the process of modifying the software began. As deadlines approached, one young programmer bemoaned the fact that her software which provided the timing signals for the equipment was not working. In spite of several code reviews, no one could figure out why the system would not maintain synchronism. So we went into the lab to take a look. After a bit of head scratching, we hooked up an oscilloscope to a cable in the equipment cabinet to see what was happening. After watching the operation for a while, it became clear and I exclaimed “There’s your problem, Lynn. One of the messages is missing one of its sync bits. This is probably the first and maybe the last time you will use a scope to debug your code.”
A change to one line of code in the program and the system worked fine. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
roger.pape Site Admin
Joined: 17 Mar 2009 Posts: 414 Location: Liverpool, NY
|
Posted: Tue Feb 16, 2010 8:31 pm Post subject: Sign errors |
|
|
Which direction is plus and which is minus? A simple thing like the sign convention used for data is one of the most frequent causes of software errors. A classic case was that of a Mars Orbiter that crashed because different parts of the system used the opposite sign convention. Our company ran into this problem when we upgraded an air traffic system we had installed on some oil platforms in the Gulf of Mexico.
The standard convention for longitude is as follows. East is positive and West is negative. However, one designer ignored this convention and used positive values for longitudes in the U. S. (which is west of the Prime Meridian). When some GPS equipment was added to the system, it automatically located the stations with a negative (West) longitude value. As the modification was being tested, I received a frantic call from a field engineer saying that the system was not working. The data being generated was completely wrong. By pure happenstance, I thought about the sign convention problem and told him to try overriding the system settings by manually entering the longitudes as East instead of West. After making these changes, the system was back up and working.
Moral. Watch your signs. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|