# Android Question[SOLVED] GPS Library - BearingTo and DistanceTo

#### JMB

##### Active Member
Longtime User
Hi there,

Does anyone know if these methods take into account the curvature of the earth?

They don't appear to...

I've been doing bearing and distance checks against waypoints from an aviation database and the distances just don't match.

JMB

Last edited:

#### emexes

##### Expert
I thought they did. Two easy no-math-required tests:

What bearing do you get if you travel to a different longitude at the same latitude (other than at equator or poles)?

What distance do you get if you travel 90 degrees around equator?

#### emexes

##### Expert
If your mismatches are small, it might be that one model is using a spherical earth, and the other a fat earth (technical term escapes me, is something like: oblate sphere?)

Spherical earths also have the issue of: which radius to use?

Longtime User
Last edited:

#### emexes

##### Expert
Sorry, got distracted by football. I tested BearingTo and DistanceTo in B4A this afternoon per post #2, and the results I got agree with agraham - calculations are of a spherical-like shape, in that:

1/ Distance of 90 degrees of longitude at the equator is slightly longer than 90 degrees from pole to equator (ie, the earth is flattish!) and both are about 10000 km.

2/ Bearing between two points of same latitude other than equator is not orthagonal, which indicates is not line of constant latitude (rhumb line) and thus is probably great circle, ie shortest distance.

Last edited:

#### JMB

##### Active Member
Longtime User
Gentleman, thank you for your posts. Turns out I was using two slightly different databases to confirm the positions.

Very useful to know that it uses the WGS84 ellipsoid.

JMB

Replies
9
Views
1K
Replies
4
Views
1K
Android Question GPS BearingTo
Replies
1
Views
1K
Android Question GPS and location.Distanceto
Replies
4
Views
2K
D
Android Question GPS and DistanceTo
Replies
1
Views
2K