Go Back  PPRuNe Forums > Ground & Other Ops Forums > Engineers & Technicians
Reload this Page >

I will give 10 points to anyone who can answer this one!!

Wikiposts
Search
Engineers & Technicians In this day and age of increased CRM and safety awareness, a forum for the guys and girls who keep our a/c serviceable.

I will give 10 points to anyone who can answer this one!!

Thread Tools
 
Search this Thread
 
Old 15th Dec 2002, 02:22
  #1 (permalink)  
Thread Starter
 
Join Date: Oct 2002
Location: aus
Posts: 206
Likes: 0
Received 0 Likes on 0 Posts
I will give 10 points to anyone who can answer this one!!

Hi All,

I am writing a program that reads gillham gray code for a data logger. For those who don't know, gray code is that sent by an altitude encoder to a transponder in light aircraft.

I have a list of Gillham codes, and that is OK, but what I need for writing a program is a mathmatical equasion that converts the gillham code to either binary, hex, or decimal.

I have searched the internet in every way that I can and I can't find the info that I need, so my question is can anybody help me find out how to get this equasion PPPLLLLEEEEAAASSSSEEEEEEE???????????


Regards,

Pullock.
pullock is offline  
Old 15th Dec 2002, 04:05
  #2 (permalink)  
 
Join Date: Apr 2000
Location: USA
Posts: 78
Likes: 0
Received 0 Likes on 0 Posts
4 bit gray code from 'Digital Fundamentals" 6th Edition by Floyd

Decimal --- Binary --- Gray Code

0 0000 0000
1 0001 0001
2 0010 0011
3 0011 0010
4 0100 0110
5 0101 0111
6 0110 0101
7 0111 0100
8 1000 1100
9 1001 1101
10 1010 1111
11 1011 1110
12 1100 1010
13 1101 1011
14 1110 1001
15 1111 1000

Can't you re-write someone else's Ti-8X conversion program?
redtail is offline  
Old 15th Dec 2002, 12:50
  #3 (permalink)  
Thread Starter
 
Join Date: Oct 2002
Location: aus
Posts: 206
Likes: 0
Received 0 Likes on 0 Posts
Thanks for the heads up so far guys, I did find the list of codes in an ATC600A manual, however it still doesn't provide me with any easy equasion for the conversion. Short of writing a program that refers to a look up table of all the codes, i'm still stumped.........
pullock is offline  
Old 20th Dec 2002, 15:24
  #4 (permalink)  
 
Join Date: Nov 2002
Location: Berks, UK
Posts: 1
Likes: 0
Received 0 Likes on 0 Posts
Arrow

pullock,

At the danger of boring you to death with maths:

For a Gray-coded binary string G[i] of length n, the equivalent decoded binary string B[i] where i = [n-1 .. 0] can be got from the following:


Firstly, assign MSB of G to MSB of B (MSB of both strings are always the same):

B[n-1] = G[n-1]


For the rest of the bits:

B[i] = B[i+1] XOR G[i]

...for i= [n-2 .. 0]


I can post 'C' source for a working encoder and decoder (up to n=32 or 64) if required.

Cheers,
SCT
South California Tea is offline  
Old 21st Dec 2002, 11:38
  #5 (permalink)  
 
Join Date: Oct 1999
Location: Adelaide
Posts: 668
Likes: 0
Received 0 Likes on 0 Posts
Yeah, what he said Guv
SeldomFixit is offline  
Old 11th Jan 2003, 16:58
  #6 (permalink)  
 
Join Date: Sep 2001
Location: Blighty
Posts: 788
Received 87 Likes on 22 Posts
Baker Street and..... Mornington Crescent!


Shouldn't this be in Jet Blast??
HOVIS is offline  

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service

Copyright © 2024 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.