Yes, I just realized too. Sorry for the confusion. So it seems it is possible to implement it in Pd! Even with only 32bit floats.
Attached all three working implementations and I added also the equirectangular approximation which should be faster and still accurate for short distances.
Thank you everyone very much!
On 2015년 06월 08일 18:22, Cyrille Henry wrote:
ahah!! using -118.4 better than 118.4 also gives me the expected result. (2287.26)
all confusion came that i i was using the wrong set of value...
cheer c
Le 08/06/2015 11:10, Lorenzo Sutton a écrit :
Hi,
On 07/06/2015 04:48, Max wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Merci Cyrille,
in the formula the intermediate steps are quite small fractions and it seems their precision is important. In the test case the Pd implementation is 8917.74 km off the proper result (2887.26). However I need a precision of about 1m.
So I assume the haversine formula is not implementable in Pd at all? (unless double precision will be there that is)
I had a go at immplementing it in Pd Vanilla, with a few [expr], and the result seems the one expected... no?
Lorenzo
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list