Wireshark-bugs: [Wireshark-bugs] [Bug 11042] dissection not happening properly for latitude and

Date: Tue, 10 Mar 2015 06:43:42 +0000

Comment # 5 on bug 11042 from
RFC 6757, section 3.1.2:

    http://tools.ietf.org/html/rfc6757#section-3.1.2

says:

   Latitude Degrees:  A 24-bit latitude degree value encoded as a two's
      complement, fixed point number with 9 whole bits.  Positive
      degrees correspond to the Northern Hemisphere and negative degrees
      correspond to the Southern Hemisphere.  The value ranges from -90
      to +90 degrees.

   Longitude Degrees:  A 24-bit longitude degree value encoded as a
      two's complement, fixed point number with 9 whole bits.  The value
      ranges from -180 to +180 degrees.

In packet 24, the latitude, in degrees, is 0x0ad9d8.

0x0ad9d8, in binary, is 0000 1010 1101 1001 1101 1000.

If we put the binary point after the first 9 bits, to have 9 whole bits, that
would be 000010101.101100111011000.

000010101 is 21, and, for the fractional bits:

1 .5
0 .25
1 .125
1 .0625
0 .03125
0 .015625
1 .0078125
1 .00390625
1 .001953125
0 .0009765625
1 .00048828125
1 .000244140625

So that's 21+.701904296875 = 21.701904296875.

Please explain to me why a fixed-point binary value of 0x0ad9d8, with the
binary point after the first 9 bits, should have a value of 21.23 rather than
21.701904296875.  What would the correct interpretation of RFC 6757, section
3.1.2, be, in order to yield that result rather than 21.701904296875?


You are receiving this mail because:
  • You are watching all bug changes.