mutability / dump1090

Dump1090 is a simple Mode S decoder for RTLSDR devices
528 stars 137 forks source link

Adjust precision of feet -> meters conversion #155

Closed toofishes closed 8 years ago

toofishes commented 8 years ago

From https://en.wikipedia.org/wiki/Foot_(unit), the foot is recognized as being exactly 0.3048 meters. It isn't clear where the former conversion factor of 3.2828 came from, as it really should be 1 / 0.3048 = 3.28084.

In any case, we're better off just using the official value, as we can multiply rather than divide.

For an altitude of 37,000 feet, the old code gives 11,270.9 meters, and the new code gives 11,277.6 meters. Not exactly a huge difference, but seems worth getting it right.

toofishes commented 8 years ago

Inspired by the change in #153, which made me double-check the other conversion here.

mutability commented 8 years ago

Thanks!