Mercator Sailing: Course and Distance
08-31-2018, 05:46 AM (This post was last modified: 09-01-2018 05:45 AM by Dieter.)
Post: #15
 Dieter Senior Member Posts: 2,397 Joined: Dec 2013
RE: Mercator Sailing: Course and Distance
(08-31-2018 02:15 AM)Gene222 Wrote:  I see what I am doing wrong. The course is 270 (due west) on a Mercator map. I was looking a polar map. I guess starpath.com online Mercator calculator was right.

For the record: my 35s program returns 1875,78 miles and a course exactly West, true course 270°.

By the way, the result 1875,4003 nm of the starpath.com Mercator Calculator simply is 180°·60·cos(80°). This is a simplified formula that ignores (!) the ellipsoid's eccentricity. That's why there is another factor in my same-latitude-formula – which returns the correct result.

(08-31-2018 02:15 AM)Gene222 Wrote:  I still have errors in my program. The Latitude difference for the above problem is 600' and the Meridional parts for point 1 and 2 are not the same.

This really sounds like there are errors. ;-)
For 80° the meridional parts (WGS84) should be 8352,48.

Your results of –3456,8203 and –4507,4040 are the meridional part values for latitudes of –50° and –60°, respectively. Maybe this helps finding the error.

(08-31-2018 02:15 AM)Gene222 Wrote:  My procedure for East-West courses needs to be cleaned up, which should be easy to do.

I can't read your program (no Prime here), but from what I see when I open it in a text editor the program distinguishes various cases for different hemispheres. For instance in one case the absolute values of the meridional parts are added. I don't think this is required – the sign convention handles this automatically. Try it.

Here is the way I do the calculation, in pseudocode. I hope I got it right. ;-)

Code:
e=0,08181919... M1=Meridionalparts(lat1)     M2=Meridionalparts(lat2) DMP=M2-M1 dlong=long2-long1 if dlong < -180 then dlong=dlong+360 if dlong > +180 then dlong=dlong-360    // edit: corrected this line dlongminutes=60*dlong dlatminutes=60*(lat2-lat1) if DMP=0 then    course=0    distance=abs(dlongminutes)*cos(lat1)*(1-e^2*sin^2(lat1))/(1-e^2) else    course=arctan(abs(dlongminutes/DMP))    distance=abs(dlatminutes)/cos(course) end

Finally the true course is calculated. I do it wih the 35s "ARG" command which returns something like ATAN2 in some programming languages, a quadrant-adjusted angle (0...180 for Q1 and Q2, 0...-180 for Q3 and Q4, in this case add 360°), and it also works for DMP=0. You'll know how to do it on the Prime. ;-)

Dieter
 « Next Oldest | Next Newest »

 Messages In This Thread Mercator Sailing: Course and Distance - Eddie W. Shore - 08-10-2018, 03:08 AM RE: Mercator Sailing: Course and Distance - PedroLeiva - 08-10-2018, 11:23 AM RE: Mercator Sailing: Course and Distance - Dieter - 08-12-2018, 05:13 PM RE: Mercator Sailing: Course and Distance - Eddie W. Shore - 09-22-2018, 11:37 PM RE: Mercator Sailing: Course and Distance - Gene222 - 08-24-2018, 07:21 PM RE: Mercator Sailing: Course and Distance - Dieter - 08-25-2018, 06:08 AM RE: Mercator Sailing: Course and Distance - Eddie W. Shore - 09-22-2018, 11:39 PM RE: Mercator Sailing: Course and Distance - Gene222 - 08-26-2018, 12:30 AM RE: Mercator Sailing: Course and Distance - Dieter - 08-26-2018, 07:18 AM RE: Mercator Sailing: Course and Distance - Albert Chan - 09-10-2022, 03:17 PM RE: Mercator Sailing: Course and Distance - Gene222 - 08-28-2018, 12:46 AM RE: Mercator Sailing: Course and Distance - Dieter - 08-28-2018, 08:53 AM RE: Mercator Sailing: Course and Distance - Dieter - 08-28-2018, 04:49 PM RE: Mercator Sailing: Course and Distance - Gene222 - 08-29-2018, 09:02 PM RE: Mercator Sailing: Course and Distance - Dieter - 08-30-2018, 05:49 AM RE: Mercator Sailing: Course and Distance - Gene222 - 08-30-2018, 11:59 PM RE: Mercator Sailing: Course and Distance - Gene222 - 08-31-2018, 02:15 AM RE: Mercator Sailing: Course and Distance - Dieter - 08-31-2018 05:46 AM RE: Mercator Sailing: Course and Distance - Dieter - 09-01-2018, 05:51 AM RE: Mercator Sailing: Course and Distance - VadimV - 12-21-2022, 08:31 PM RE: Mercator Sailing: Course and Distance - Gene222 - 09-01-2018, 02:52 AM RE: Mercator Sailing: Course and Distance - Gene222 - 09-02-2018, 04:03 PM RE: Mercator Sailing: Course and Distance - Dieter - 09-02-2018, 06:27 PM RE: Mercator Sailing: Course and Distance - Gene222 - 09-03-2018, 10:10 PM RE: Mercator Sailing: Course and Distance - Dieter - 09-04-2018, 07:19 PM RE: Mercator Sailing: Course and Distance - Gene222 - 09-05-2018, 05:46 PM

User(s) browsing this thread: 1 Guest(s)