Solved

# Distance & Bearing between two waypoints?

Posted on 2005-04-10
1,508 Views
Distance & Bearing between two waypoints?

Given a two Waypoints - for Example:  N 44° 48.169   W 073° 25.625
N 44° 49.628   W 073° 26.610

How would you determine the  bearing and distance between two waypoints?

Formula and answer to the waypoints given

thanks!

IElite
0
Question by:IElite

LVL 84

Accepted Solution

bearing = asin(
sin(lon1-lon2)*cos(lat2)
/
sin(acos(sin(lat2)*sin(lat1)+cos(lat1)*cos(lat2)*cos(lon2-lon1)))
)

distance = acos(sin(lat2)*sin(lat1)+cos(lat1)*cos(lat2)*cos(lon2-lon1))
0

Author Comment

How do I do a (lon1-lon 2) with Degrees Decinal Minutes?

IElite
0

LVL 31

Assisted Solution

what format are they in?
0

LVL 31

Expert Comment

The above formula gives the radial distance, there is a difference between the radial distance and the distance in miles or kilometers, you must multiple the radial distance by the earths radius to get the physical distance.

http://www.circuitcellar.com/library/print/1000/Stefan123/5.htm

3950 miles (6356.9 kilometres). Polar
3963 miles (6378.5 kilometres). Equitorial

0

LVL 31

Expert Comment

you must also convert the lon lat to radians first, ie multiply degrees by 2*Pi/360
0

Author Comment

073° 25.625

Im not getting it!  I do i convert these numbers so I can do an operation (Example: lon1-lon2)

073° 25.625
-  073° 26.610

I need to be able to do this from with in programming source code.....

IELite

0

LVL 22

Expert Comment

Do you want to do it on the WGS84 ellipsoid, or is the spherical approximation good enough for you?
0

Author Comment

0

LVL 22

Expert Comment

You need to google for the Vincenty direct and inverse algorithms.  They do exactly what you want, but they're kind of complex.

0

LVL 17

Expert Comment

Here is an on-line calculator you can use to check your calculation (look near the bottom for a couple of links:

http://pollux.nss.nima.mil/calc/calc_options.html#Distance%20Calculator
0

LVL 22

Expert Comment

I believe ozo's answer is for the spherical approximation, not WGS84.
0

LVL 31

Expert Comment

You are correct.
0

## Featured Post

### Suggested Solutions

How to solve this equation 3 43
Whisker Plot 1 32
Relative frequency assesment method 2 32
Discrete Probability 2 40
This is a research brief on the potential colonization of humans on Mars.
Lithium-ion batteries area cornerstone of today's portable electronic devices, and even though they are relied upon heavily, their chemistry and origin are not of common knowledge. This article is about a device on which every smartphone, laptop, an…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…