[PD] haversine formula in Pd

Max abonnements at revolwear.com
Mon Jun 8 12:36:24 CEST 2015


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 at lists.iem.at mailing list
>> UNSUBSCRIBE and account-management ->
>> http://lists.puredata.info/listinfo/pd-list
>>
> 
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list

-------------- next part --------------
A non-text attachment was scrubbed...
Name: deg2rad.pd
Type: text/x-puredata
Size: 417 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20150608/565de040/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: loca.haversine.pd
Type: text/x-puredata
Size: 4453 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20150608/565de040/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: loca.haversine-help.pd
Type: text/x-puredata
Size: 982 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20150608/565de040/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: loca.distance.pd
Type: text/x-puredata
Size: 1650 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20150608/565de040/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: loca.distance-help.pd
Type: text/x-puredata
Size: 1192 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20150608/565de040/attachment-0004.bin>


More information about the Pd-list mailing list