[sclug] C programming question

Paul Vanlint paul at polyzing.com
Sat Oct 25 09:05:39 UTC 2003


This reminds me of work I used to do when writing network device
drivers.


I had a look at the actual order of data and found that it was in
reverse order. Also, the range value is stored as a 4 byte integer with
4 bytes of padding afterwards.

I modified your program to apply the above and got the following
results:

No    Bearing   Range   Elevation
                gates   angle

 0    260.17    5604     4.41
 1    281.31     812    12.09
 2    301.52     804     9.36
 3    301.51    4814     4.34
 4    328.29    3886     3.95
 5    353.20    6804     1.49
 6    349.17   10926     1.64
 7      0.02    2109     2.15
 8     28.31    3247     2.32
 9     42.11    8852     0.93
10     83.97    1692     2.78
11     84.11    1698     2.71
12     86.10     646     2.61
13    103.97    2936     5.42
14    102.73    2926     6.01
15    151.96   10385     1.81
16    146.39   11124     1.66
17    198.21    4126     4.29
18    207.52    1807     6.41
19    248.68   12406     1.26


These numbers look reasonable.


Program is attached.

Paul.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: showpri.c
Type: text/x-c
Size: 2030 bytes
Desc: not available
Url : http://lists.tmdg.co.uk/pipermail/sclug/attachments/20030514/01b442dd/showpri.bin


More information about the Sclug mailing list