octave-patch-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-patch-tracker] [patch #9974] [octave forge](mapping) gc2sc scxsc


From: Philip Nienhuis
Subject: [Octave-patch-tracker] [patch #9974] [octave forge](mapping) gc2sc scxsc gcxsc
Date: Sun, 11 Oct 2020 16:54:54 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0

Update of patch #9974 (project octave):

                  Status:             In Progress => Done                   

    _______________________________________________________

Follow-up Comment #15:

Pushed scxsc.m here:
http://hg.code.sf.net/p/octave/mapping/rev/d878d7828ae1

Pushed gcxsc.m here:
http://hg.code.sf.net/p/octave/mapping/rev/1d59b083067f

... and I fixed a few other things in gcxgc.m.

All in all this patch was much, much more work than I expected :-)
While testing all these 3 functions + gcxgc.m together, ever more corner cases
turned up. Let's say I've earned a lot.

You *were* right about the haversine formula being more accurate than the
spherical cosine formula for small values. After some experimenting I found
that below 25-40 degrees the haversine formula is more accurate and even much
more accurate once the spherical distance gets below 5 degrees. So the
Wikipedia article about the haversine formula (comment #10) could use some
improvement.
For spherical distances over 179 degrees the haversine formula degenerates
quickly. In scxsc.m I had to make a split to get suffcient accuracy for small
and large distances between circle centres.
All in all scxsc.m is now very accurate AFAICS.

The function distance.m that also invokes the spherical cosine formula is
similarly affected for small point distances. I looked into it but found it
has been written in such a convoluted way that fixing it is unduly hard for
now. Maybe later.

The inaccuracy of gc2sc.m I reported in comment #14 is caused by reckon.m
being slightly inaccurate. I suppose there are also formulas for reckoning
based on haversine and coversine functions but I couldn't find one, nor a
useful reference. Can you?

Anyway, closing report.

I'll play around with the new functions a little the coming days, if I find no
more bugs I'll make a new mapping package release.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/patch/?9974>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]