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 17-04-2011, 19:26   #16
Registered User
 
svcambria's Avatar

Join Date: Jun 2010
Location: Mexico (currently)
Boat: Panda 40 - S/V Cambria
Posts: 573
Re: Distance Between Two Points by Lat/Lon

Quote:
Originally Posted by onestepcsy37 View Post
seems to me there is a way of calculating distances between two points if their lat/lon is known. or maybe a table to look up. anyone know about this??
Gotta agree with Boatman, a pair of dividers and a paper chart will give you the most accurate - not necessarily precise! - answer, as who knows what trail you will actually leave when doing that voyage. Considering errors from projection et. al. ...

Michael
svcambria is offline   Reply With Quote
Old 17-11-2017, 14:32   #17
Registered User

Join Date: Sep 2011
Location: Belgium
Boat: Hunter 456 CC
Posts: 18
Re: Distance Between Two Points by Lat/Lon

The answer can be approached by plane geometry, which could be ok if distance measured are relatively short (<500 NM).

Pythagoras said that in a right triangle the square of the longest side (hypothenuse) equal the sum of the square of the two other sides.

In our case the longest side is the distance and one of the other side is the difference of latitude and the other the difference of longitude expressed in NM

distance ^2 = diffLat^2 + diff lon^2 or
distance ^2 = (Lat'-Lat'')^2 + (lon'-lon'') ^2

The diff Lat is expressed in minutes of angle and the diff of lon is expressed in minutes of angle multiplied by cosine(medium Lat).

More simple to calculate than to explain.
henris is offline   Reply With Quote
Old 18-11-2017, 09:18   #18
Moderator
 
Adelie's Avatar

Join Date: Feb 2010
Location: La Ciudad de la Misión Didacus de Alcalá en Alta California, Virreinato de Nueva España
Boat: Cal 20
Posts: 20,587
Re: Distance Between Two Points by Lat/Lon

Alternatively use an scientific calculator with the formula:
d = acos( sin φ1 ⋅ sin φ2 + cos φ1 ⋅ cos φ2 ⋅ cos Δλ )

φ1 & φ2 are the 2 latitudes
Δλ is the difference in longitude or the absolute value of (λ1 - λ2)
__________________
Num Me Vexo?
For all of your celestial navigation questions: https://navlist.net/
A house is but a boat so poorly built and so firmly run aground no one would think to try and refloat it.
Adelie is online now   Reply With Quote
Old 18-11-2017, 14:30   #19
Registered User

Join Date: Aug 2016
Location: New York
Boat: Pearson 303
Posts: 137
Re: Distance Between Two Points by Lat/Lon

Maybe a more technical answer than you might be looking for, but if you want something more accurate that approximates the shape of the earth not being a perfect sphere you want to leave the work to a script or program.
I've done this a few times (I'm software engineer) and the algorithm you implement is called Haversine's formula and is straight forward to program, but maybe not so fun to do by hand (however doable).
You should be able to find implementations for any popular language on Google or stack overflow.

https://en.m.wikipedia.org/wiki/Haversine_formula
sveinung is offline   Reply With Quote
Old 18-11-2017, 16:10   #20
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: Distance Between Two Points by Lat/Lon

Quote:
Originally Posted by sveinung View Post
the algorithm you implement is called Haversine's formula
That's "haversine". No initial capital and no apostrophe "s".

It's not named after a person, it's named after the trig function used in the formula.

The haversine is 1/2 of a versine (or versed sine) where versine (x) = 1- cos(x)

(There are also coversines and havercosines)
StuM is offline   Reply With Quote
Old 18-11-2017, 17:23   #21
Moderator
 
Adelie's Avatar

Join Date: Feb 2010
Location: La Ciudad de la Misión Didacus de Alcalá en Alta California, Virreinato de Nueva España
Boat: Cal 20
Posts: 20,587
Re: Distance Between Two Points by Lat/Lon

Quote:
Originally Posted by sveinung View Post
Maybe a more technical answer than you might be looking for, but if you want something more accurate that approximates the shape of the earth not being a perfect sphere you want to leave the work to a script or program.
I've done this a few times (I'm software engineer) and the algorithm you implement is called Haversine's formula and is straight forward to program, but maybe not so fun to do by hand (however doable).
You should be able to find implementations for any popular language on Google or stack overflow.

https://en.m.wikipedia.org/wiki/Haversine_formula
What I gave above was the Cosine formula which is the formula for great circle angle on a sphere. It is computationally faster but requires more precision than the haversine formula.

When navigation was done by looking up values in tables, haversines had significantly smaller tables (book sized), easier math steps if I recall but also more math steps.

For computer implementation Cosine is more accurate and takes about 2/3 the time to calc but requires that what ever language you are using be able to handle the acos function well which is not always the case. https://gis.stackexchange.com/questi...ing-distance-b
__________________
Num Me Vexo?
For all of your celestial navigation questions: https://navlist.net/
A house is but a boat so poorly built and so firmly run aground no one would think to try and refloat it.
Adelie is online now   Reply With Quote
Old 18-11-2017, 20:36   #22
Moderator
 
Adelie's Avatar

Join Date: Feb 2010
Location: La Ciudad de la Misión Didacus de Alcalá en Alta California, Virreinato de Nueva España
Boat: Cal 20
Posts: 20,587
Re: Distance Between Two Points by Lat/Lon

After a bit more research and after consulting with the celestial navigation mafia this is what I have for Haversine vs Cosine formulas:

Haversine formula is way easier to do manually, resulting in fewer mistakes. It has been superseded by other manual methods though.

On a computer the Cosine formula is better as long as you aren't talking about 1m distances. Even then just make sure your processor and subroutines will handle 20 significant digits and you should be fine. For celestial navigation and/or route planning, Cosine works just fine.

Programming-wise, Cosine formula is 1 line, Haversine is 3 lines.

Historical aside: The height of tech*nology for navigator’s calculations used to be log tables. As there is no (real) log of a negative number, the ‘versine’ enabled them to keep trig func*tions in positive numbers. Also, the sin²(θ/2) form of the haversine avoided addition (which en*tailed an anti-log lookup, the addi*tion, and a log lookup). Printed tables for the haver*sine/in*verse-haver*sine (and its log*arithm, to aid multip*lica*tions) saved navi*gators from squaring sines, com*puting square roots, etc – arduous and error-prone activ*ities.
http://www.movable-type.co.uk/scripts/latlong.html
__________________
Num Me Vexo?
For all of your celestial navigation questions: https://navlist.net/
A house is but a boat so poorly built and so firmly run aground no one would think to try and refloat it.
Adelie is online now   Reply With Quote
Old 19-11-2017, 05:15   #23
Registered User

Join Date: Aug 2016
Location: New York
Boat: Pearson 303
Posts: 137
Re: Distance Between Two Points by Lat/Lon

I didn't know! Just used to math and CS solutions to be named after their creator.
sveinung is offline   Reply With Quote
Old 19-11-2017, 09:40   #24
cruiser

Join Date: Nov 2017
Posts: 45
Re: Distance Between Two Points by Lat/Lon

Quote:
Originally Posted by onestepcsy37 View Post
seems to me there is a way of calculating distances between two points if their lat/lon is known. or maybe a table to look up. anyone know about this??

earlgray is offline   Reply With Quote
Old 02-12-2017, 17:28   #25
Registered User

Join Date: Dec 2012
Posts: 651
Re: Distance Between Two Points by Lat/Lon

I posted this a couple of years ago. Its pretty much a plagerisation of Bowditch. A guy was confused by Bowditch.
It may help

When Calculating the course and distance between two positions or calculating the final position after having traveled a distance on a course from a position. The calculations are known as "Sailings".

The example you are trying to solve from "Bowditch" is for a "Mercator Sailing"
The method you are trying to use is confused with a "plain sailing"

Trying to decipher "Bowditch" is not easy.

The first method described is for a "Great Circle Sailing". A Great Circle is any line on the earth's surface the plane of which passes through the center of the earth. A great Circle is a line around the earth's circumference.
The only parallel of latitude which is a Great Circle is the Equator. The Equator goes around the earth's circumference.

All longitude meridian lines are Great Circles.



Calculating the great circle distance is relatively straightforward using the great circle formula. The course is more difficult you can calculate the initial course and final course and the vertex (point nearest the pole) But you can't steer a "Great Circle" because it's not a straight course its constantly changing. Great circles cannot be plotted or drawn on a conventional "Mercator chart". On a Mercator Chart Great circles appear as curves. Great circles are only practical for very long distances like across oceans. Where they can be approximated by a series of short straight lines.



When we steer a straight course. We are steering along a "Rumb line". A Rumb line is a line on the earth's surface which crosses all meridians at a constant angle. "Rumb" Lines appear as straight lines when plotted or drawn on Mercator charts.



The Equator and All the Meridians are special "Rumb lines" which are also "Great circles" They have the advantage one minute of arc on a great circle is one nautical mile.
The "meridians" come in handy on Mercator charts. We can measure distance on a Mercator chart with a pair of dividers and compare to the "latitude scale" on a "meridian" to determine the distance in nautical miles . Provide you compare in the same latitude.



A Mercator sailing takes into account the mathematical stretching of the earth to display it on a Mercator chart and the compression of the earth from the round sphere.
This is achieved by using something called "Meridian Parts".


Meridian parts are the distance along the equator which equals the minutes of latitude.
If you are using "Bowditch" there is a table for "Meridian Parts" table 6.
You need to convert the latitudes to "Meridian Parts"



Question: A ship at Lat 32*14'.7N and Long 66*28'.9W is to head for Chesapeake Lightship at Lat 36*58'.7N and Long 75*42'.2W.
By Mercator sailing
Latitude 32" 14.7'N Meridian Parts 2033.4 Longitude 66" 28.9'W
Latitude 36"58.7'N Meridian Parts 2377.1 Longitude 75" 45.2'W
Diff Latitude 4" 44' Diff MP 343.7 Diff Longitude 9" 16.3'
D Lat 284 DMP 343.7 D Long 556.3
Tan Course= D Long/DMP=556.3/343.7
58.3'
Course= 301.7 deg
Distance=D lat/Cos Course=284/Cos58.3=284/0.52547
540.47 miles
Calculated Course 301.7 calculated Distance 540.47 miles.
Hope this helps
D Lat= Distance x cos Co
D Long=Distance x DMP



There are several different methods of calculation or your position after traveling a particular course and distance.
The simple one is to plot it on a chart of the appropriate scale. this tends to be not very acurate as the scale is very small for larger distances.



The Plain Sailing.
Is often used for shorter distances. Straight forward traditional trigonometry is used.
The North South, Side of the triangle, The distance in nautical miles. Converts directly to minutes of latitude. No Problem.
The problem is the east west side of the triangle the distance East or West is in nautical miles NOT Longitude. This East or West Distance is known as Departure.



The next simple sailing is Known as a Parallel Sailing.
This "Sailing" works only when traveling due east or due west. 090 or 270 so it is rarely used. Sometime's is used in a "composite great circle".
On the Equator. The equator is a great circle, so its quite simple 1 minute = 1 nautical mile. Distance in Miles can be converted directly to Longitude.
In any other Latitude the Distance between Meridians gets les the further away you are from the equator.
Distance East or west is known as Departure.
At the equator 1minute of longitude = 1 Nautical Mile of Departure. At The Poles Longitude and Departure=Zero
The basic Formula is
Departure=Difference of longitude x Cosine latitude.
Or
D long= Departure Sec Lat= Departure/Cosine lat
Cos Latitude=Departure/D long
You can use the "Parallel Sailing" formula to convert Departure to D Long in a particular Latitude.



If you look at the Travers Tables in "Bowditch" you will see for each latitude Departure and D long are listed.



The Next type of calculation is the "Middle latitude Sailing".
This is a combination of the" Plain Sailing" and the "Parallel Sailing"
The" Mean Latitude" is half the sum of the two Latitudes.
Use the "Plain Sailing" Basic trig to Determine D Lat and Departure.
Figure out the Middle or Mean latitude.
Use this latitude with "Parallel sailing formula" to Convert Departure To D Long.
This is how the Traverse tables work for a "Travers table sailing"
The Mid Latitude Sailing Or Travers Table sailing Decreases in Accuracy as the distance increases. It is General considered good for only up to 600 miles.
The Travers Tables are a quick easy way to calculate your position for short distances. Often Used for a day's run to Run A Noon to Noon. or to Run a Morning DR or Intercept to Noon in a Sun Run.



The Most Accurate Method. Which can be used at any distance.

Is The "Mercator Sailing"



A Mercator sailing takes into account the mathematical stretching of the earth to display it on a Mercator chart and the compression of the earth from the round sphere.
This is achieved by using something called "Meridian Parts". Meridian parts are the distance along the equator which equals the minutes of latitude
If you are using "Bowditch" there is a table for "Meridian Parts" table 6.
You need to convert the latitudes to "Meridian Parts"
To calculate the Course and Distance Between To Known positions.
Tan Course= D Long/DMP
Distance=D lat/Cos Course
To calculate the Final Position after having traveled a known Course and Distance From a known position.
D Lat= Distance x cos Co
D Long=DMP tan Co


For example- If a ship is at Lat (37*14'45"N ) and Long (155*37'19" W) and steers a course of 140 degrees at 12 knots for 500 miles, what is the new longitude? I can figure latitude easy but the stuff online about

37" 14' 45' N 155" 37" 19' W 140 For 500 Miles 41hrs and 40 minutes at 12 knots.

You need to convert the latitudes to "Meridian Parts"
Question: A ship at Lat 32*14'.7N and Long 66*28'.9W is to head for Chesapeake Lightship at Lat 36*58'.7N and Long 75*42'.2W.
By Mercator sailing
Latitude 32" 14.7'N Meridian Parts 2033.4 Longitude 66" 28.9'W
Latitude 36"58.7'N Meridian Parts 2377.1 Longitude 75" 45.2'W
Diff Latitude 4" 44' Diff MP 343.7 Diff Longitude 9" 16.3'
D Lat 284 DMP 343.7 D Long 556.3



By Mercator.
Latitude 37" 14.75' N Meridian Part 2397.2 Longitude 140' 37.3' W Co 140 Dist 500
D Lat= Dist x Cos Co 500xCos140 =383.02' S D lat = 6" 23' S
D lat 6' 23' S
Final Lat 30 51.75N
lat 37" 14' MP 2396.3 Lat 30 51 MP 1935.7
lat 37" 15' MP 2397.5 Lat 30 52 MP 1936.9
Lat 37"14.75' N MP 2397.2
Lat 30" 51.75' N MP 1936.6
DMP 460.6
D Long= DMP x Tan Cot= 460.6x Tan 140=386.49 minutes = 6" 26.49' W
Longitude 140" 37.3' w
D long 6"26.5'w
Longitude 147'03.8' W
Final Position
Latitude 30" 51.75' N Longitude 147" 03.8'W









By Mid latitude Sailing
37" 14' 45' N 155" 37" 19' W 140 For 500 Miles 41hrs and 40 minutes at 12 knots.
D lat = Dist x Cos Course = 500 x cos 140=383.02 = 6" 23.02' S
Mid latitude= 37" 14.75"N-( 383/2= 191.5s= 3"11.5's)s= 34" 03.25'N
Departure=Dist x Sine course= 500 x sine 140 = 321.39
D Long = Departure / Cos Mid Lat= 321.39 / Cos 34"03.5'N = 321/0.82847=387.93'= 6 27.9'
D long 6" 27.9'w
Latitude 37" 14.75'N Longitude 155" 37.3'w
D Lat 6" 23's D long 6" 27.9" w
Latitude 30" 46.8'N D long 162" 05.2w'










Question: A ship at Lat 32*14'.7N and Long 66*28'.9W is to head for Chesapeake Lightship at Lat 36*58'.7N and Long 75*42'.2W.
Latitude 32" 14.7'N Longitude 66" 28.9'W
Latitude 36"58.7'N Longitude 75" 45.2'W
Diff Latitude 4" 44' Diff Longitude 9" 16.3'
D Lat 284 D Long 556.3
Mid latitude = 32" 14.7+(4"44'/2)=32" 14.7'n+2"22'n= 34"36.7'n
D Long = Departure / Cos Mid Lat
Departure= D long x Cos Mid lat
Departure= 556.3x Cos 43"36.7'N= 457.85
Tan Cours= Departure/Dlat= 457.85/284=1.61215=58.19=301.8
Dist=D Lat/Cos Co=284/cos301.8=284/0.65342=434.63
0.84989

Departure=Dist x Sine course
Sine Co=Departure/Dist=457.8
Dist=Departure/ Sine Course

538.7'
Uricanejack is offline   Reply With Quote
Old 02-12-2017, 18:19   #26
Marine Service Provider
 
boatpoker's Avatar

Join Date: Nov 2008
Location: Port Credit, Ontario or Bahamas
Boat: Benford 38 Fantail Cruiser
Posts: 7,111
Re: Distance Between Two Points by Lat/Lon

My god, please come back Boatman
__________________
If you're not laughing, you're not doin' it right.
boatpoker is offline   Reply With Quote
Reply


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
Lat / Lon Grids with C Map 93 r.fairman OpenCPN 4 10-11-2010 14:32
Connectors and NMEA Logger for Depth and Lat / Long Data Skylark Navigation 1 17-08-2010 07:34
Need Lat / Long of Sunken Atoll Duckhead Pacific & South China Sea 7 11-12-2009 10:25
High Lat. Optical Illusions Tim Gosnell Polar Regions 24 12-02-2006 22:45
Distance from Lat/Lon GordMay The Library 0 30-06-2005 18:27

Advertise Here


All times are GMT -7. The time now is 13:38.


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.