Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > Navigation
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 04-05-2015, 09:31   #1
Registered User

Join Date: Sep 2011
Location: St. Maarten
Posts: 39
Send a message via Skype™ to Lserpa
Calculate distance and bearing between two positions

Hello all,

I am looking for an easy, offline way of calculating the distance and bearing between two points. I found one in the net but it is a little too math to me.

Does anyone know of a simple, downloadable formula, preferably in Excel?

Thanks in advance

Luis Serpa
Lserpa is offline   Reply With Quote
Old 04-05-2015, 10:20   #2
Registered User

Join Date: Apr 2007
Location: Jupiter FL
Boat: temporarily boatless...
Posts: 803
Re: Calculate distance and bearing between two positions

The way that your question is written, I don't think you will get many answers.

The simplest way is with a chart, dividers, parallel ruler, and the compass rose.

If you are saying you know your own location and the distance to two points, but not their distance from each other, then you can use any online triangle calculator to get the distance between those two points, as well as the angle of any of the corners of the triangle, from which, if you know the bearing of one of the points from you, you can calculate the bearing from one of the points to the next.

As I said, it is really not clear enough what you are trying to do.

Pete
pete33458 is offline   Reply With Quote
Old 04-05-2015, 10:22   #3
Registered User

Join Date: Oct 2008
Location: Halifax, Canada
Boat: Hughes 35 and Lagoon 380 S2
Posts: 105
Re: Calculate distance and bearing between two positions

What about this

Calculate distance and bearing between two Latitude/Longitude points using haversine formula in JavaScript
pierrrre is offline   Reply With Quote
Old 04-05-2015, 11:00   #4
Registered User

Join Date: Aug 2009
Location: between the devil and the deep blue sea
Boat: a sailing boat
Posts: 20,437
Re: Calculate distance and bearing between two positions

Enter both WPTs into a handheld and read the bearing and distance.

Or use cosine from lat long difference allowing for lat adjusted length of one degree of lat long.

Or use haversine formula for longer distances over the ortho.

There are many ways so it depends on what you want to do and how big the distances are.

b.
barnakiel is offline   Reply With Quote
Old 04-05-2015, 13:17   #5
֍֎֍֎֍֎֍֎֍֎

Join Date: Apr 2006
Posts: 15,136
Re: Calculate distance and bearing between two positions

Unless you are on a powerbeat or running dead downwind, remember that you may be tacking and that can add 40% to the distance you'll actually have to be traveling.
hellosailor is offline   Reply With Quote
Old 04-05-2015, 14:18   #6
Registered User
 
psneeld's Avatar

Join Date: Oct 2010
Location: Avalon, NJ
Boat: Albin 40 double cabin Trawler
Posts: 1,886
Re: Calculate distance and bearing between two positions

Starpath had a wind calculator you can download....I use it for all sorts of things.

Just plug in a number or two and it gives you all the parts of a triangle.

Didn't see it when I just looked it up at Starpath navigation...but maybe it was for Windows not android and I don't have my other computer right now.
psneeld is offline   Reply With Quote
Old 16-02-2022, 07:34   #7
Registered User

Join Date: Apr 2018
Location: Albania
Boat: Cargo ship
Posts: 32
Re: Calculate distance and bearing between two positions

Hello i want formula for calculate bearing and distance between longitude and latitude in excel thanks
biku navigator is offline   Reply With Quote
Old 16-02-2022, 07:41   #8
Registered User
 
Shrew's Avatar

Join Date: Aug 2010
Posts: 3,109
Re: Calculate distance and bearing between two positions

A chart and basic navigation tools would do this significantly easier.
Shrew is offline   Reply With Quote
Old 16-02-2022, 15:05   #9
Registered User
 
StuM's Avatar

Cruisers Forum Supporter

Join Date: Nov 2013
Location: Port Moresby,Papua New Guinea
Boat: FP Belize Maestro 43 and OPBs
Posts: 12,891
Re: Calculate distance and bearing between two positions

Quote:
Originally Posted by biku navigator View Post
Hello i want formula for calculate bearing and distance between longitude and latitude in excel thanks

VBA written in MS Access, but should work in Excel as well.


Inputs and Output in Radians:
Conversion from/to Degrees/NM is left as an exercise for the reader



Distance"

Code:
Distance = 2 * arcsin(Sqr((Sin((lat1 - lat2) / 2)) ^ 2 + Cos(lat1) * Cos(lat2) * (Sin((lon1 - lon2) / 2)) ^ 2))
Bearing:

Code:
If (Cos(lat1) < 0.0000001) Then ' a small number ~ machine precision
  If (lat1 > 0) Then
     Bearing = 3.14159265358979    '  starting from N pole
  Else
     Bearing = 0        '  starting from S pole
  End If
 Exit Function
End If
If Sin(lon2 - lon1) < 0 Then
   Bearing = acos((Sin(lat2) - Sin(lat1) * Cos(Distance)) / (Sin(Distance) * Cos(lat1)))
Else
   Bearing = 2 * 3.14159265358979 - acos((Sin(lat2) - Sin(lat1) * Cos(Distance)) / (Sin(Distance) * Cos(lat1)))
End If
StuM is offline   Reply With Quote
Reply

Tags
cal


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to calculate the load capacity supported a catamaran and a sailboat? lasiemartins Construction, Maintenance & Refit 26 02-11-2019 03:32
Distance Between Two Points by Lat/Lon onestepcsy37 Navigation 25 02-12-2017 18:19
Minimum Distance Between Cutlass Bearing and Shaft Zinc Han Engines and Propulsion Systems 13 13-07-2014 18:12
Display all Bearing and Distance dave777 OpenCPN 4 21-01-2012 20:46
distance between fuel capn_nik Pacific & South China Sea 1 25-07-2004 08:29

Advertise Here


All times are GMT -7. The time now is 22:16.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.