Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added distance and elevation (min/max) computation #38

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Added distance and elevation (min/max) computation #38

wants to merge 9 commits into from

Conversation

thePanz
Copy link

@thePanz thePanz commented Sep 18, 2013

Added distance and elevation (in/max) display.
Unfortunately the GeoPoint distance computation is not correct: after double checking the computed distance with Pedometer hand-drawn path.
The included DistanceUtil class implements the standard Spherical Law of Cosines as in http://movable-type.co.uk/scripts/latlong.html


private static final double DEG2RAD = Math.PI / 180.0;
// private static final double RAD2DEG = 180.0 / Math.PI;
private static final double RADIUS_EARTH_METERS = 6371.01;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value is expressed in Km, so the final computation do not need to convert from meters.
The correct "meters" values is 63781370.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants