Gillham code: Difference between revisions

Content deleted Content added
Line 53:
|}
 
== Decoding the Gillham Code ==
 
The Gillham code is an unusual mix of codes. It is a parallel binary code that uses a Gray code to ensure that there are not multiple bit changes between adjacent altitudes. The bit pattern is split into those bits used to indicate the number of 500ft500 ft increments and those used to indicate the number of 100ft100 ft increments. The split is as follows.{{Citation needed|date=December 2010}}
 
Bits D1 - B4D1–B4 use a standard Gray code to store the number of 500ft500&nbsp;ft increments.<ref name="Code Explanation" />
 
Bits C1 - C4C1–C4 use a non-linear reflected Gray code to store the number of 100ft100&nbsp;ft increments +1. The values when converted to decimal follow this repeating pattern: 1 2 3 4 7 7 4 3 2 1 1 2 3 4 7 ....{{Citation needed|date=December 2010}}
 
The C bits must be converted from Gray to standard binary, the 7 changed to a 5 and the reflected order changed when the 500ft500&nbsp;ft increment is even.{{Citation needed|date=December 2010}}
 
The number resulting from combining the above gives the flight level above the minimum datum (-1200ft−1200&nbsp;ft). This offset must be removed to give a corrected altitude value.{{Citation needed|date=December 2010}}
 
The Gillham code can be decoded using various methods. Standard techniques use hardware <ref name="Decoder Patent"> [http://www.freepatentsonline.com/3805041.pdf Circuit to decode Gillham code]</ref> or software solutions. The latter often uses a look uplookup table but an algorithmic approach can be taken.<ref name="Algorithm C code"> [http://www.ccsinfo.com/forum/viewtopic.php?p=77544 Aviation Gray Code, software decoding function in C language]</ref>
 
==References==