pjalocha / ogn-tracker

OGN-Tracker with PlatformIO
5 stars 2 forks source link

Small ADSL fixes #2

Closed jakubstepniewicz closed 1 month ago

jakubstepniewicz commented 3 months ago
rvt commented 2 months ago

Why 320 meter offset while the spec states 316?

jakubstepniewicz commented 2 months ago

I've used this one as a reference (may be outdated): ads-l_4_srd860_issue_1.pdf And in ADS-L.4.SRD860.G.1.7, if I understand correctly, the offset is +320m.

rvt commented 2 months ago

@jakubstepniewicz perhaps you are right, it's a bit confusing though... page 22 states:

exp. encoding
-316m .. + 61000m
1m step

Page 25 states something somewhat different.

An offset of 320m is added to encode negative altitudes. Exponential 2 bits for the exponent and 12 bits for the base. The minimum encodable is 61112 m.

Did I mis understood it?

jakubstepniewicz commented 2 months ago

Yes, there seems to be some inconsistency in the table examples. I think we should stick to the more detailed description from ADS-L.4.SRD860.G.1.7, as the values there make way more sense and match the exponential encoding values (0x0000 -> -320m, 0x3FFF -> 61112m).