Skip to content
This repository has been archived by the owner on Sep 14, 2019. It is now read-only.

Adjust precision of feet -> meters conversion #155

Merged
merged 1 commit into from
Oct 22, 2016

Conversation

toofishes
Copy link

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.

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.
@toofishes
Copy link
Author

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

@mutability mutability merged commit 45575cf into mutability:master Oct 22, 2016
@mutability
Copy link
Owner

Thanks!

@toofishes toofishes deleted the meters-precision branch October 22, 2016 20:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants