[OpenMap Users] Possible bug introduced in beta 4.6.4

From: Stéphane Wasserhardt <swasserhardt_at_cls.fr>
Date: Wed, 21 Mar 2007 14:53:50 +0100

Hi !

I'm searching for a robust way to cut a lat/lon segment (a segment over
earth's surface between 2 LatLonPoints) in multiple sub-segments (ie, find
N equally distributed points between two points).
I thought that the Geo class was the best choice, but I quickly ran into
problems.

That's why I created a little test program for the "Geo" class, which shows
potential bugs...
Before continuing with the test results, could you tell me if the "Geo"
class really was the best choice ? Should I have used GreatCircle instead ?
Maybe something else ?... Thanks in advance !

So, let's continue with the test program itself. It performs two tests on
two "Geo" points : g1 and g2 :

- Test 1 :

Computes the distance and azimuth from g1 to g2.
Moves g1 by this distance, and following this azimuth.
The result should be g2. We show the deviation between g2 and the observed
result.

- Test 2 :

[The first step is the same as test1's.]
Divides the distance by 10.
Moves 10 times g1 by this distance (still following the same azimuth).
Again the result should be g2. We show the deviation between g2 and the
observed result.

This program has been run on both openMap 4.6.3 and openMap 4.6.4b.
It shows that 4.6.4b implementation seems broken...
For both implementations, the second test shows high deviations !
In my case, little deviations are not a problem since distances are below 1
decimal degree. But 4.6.4b's deviations are far too high !!

And here is the output :

-----------------------------------------------------------
USING OPENMAP 4.6.3
-----------------------------------------------------------

g1 : Geo[20.0,20.0]
g2 : Geo[29.999999999999996,29.999999999999993]
g1 after offset (distance, azimuth) :
Geo[29.999999999999996,29.999999999999993]
Deviation from g2 (lat, lon) : (0.0, 0.0)

Moving g1 (offset) 10 times, without changing azimuth, by this distance :
after offset 1 : Geo[21.02853320245362,20.932366413556945]
after offset 2 : Geo[22.056764030886367,21.871285544459013]
after offset 3 : Geo[23.084684148889718,22.817152986960153]
after offset 4 : Geo[24.112285318805373,23.770377508240788]
after offset 5 : Geo[25.139559402852676,24.731382071201555]
after offset 6 : Geo[26.16649836331953,25.70060492940822]
after offset 7 : Geo[27.19309426175399,26.678500801632477]
after offset 8 : Geo[28.219339257088087,27.665542134254125]
after offset 9 : Geo[29.24522560261881,28.662220460722107]
after offset 10 : Geo[30.270745641763757,29.66904786833158]
Deviation from g2 (lat, lon) : (-0.27074564176376015, 0.3309521316684112)

-----------------------------------------------------------

g1 : Geo[20.0,20.0]
g2 : Geo[40.00000000000001,80.0]
g1 after offset (distance, azimuth) : Geo[39.99999999999998,80.00000000000001]
Deviation from g2 (lat, lon) : (2.8421709430404007E-14,
-1.4210854715202004E-14)

Moving g1 (offset) 10 times, without changing azimuth, by this distance :
after offset 1 : Geo[23.106955527243272,24.838982767838413]
after offset 2 : Geo[26.20095215725036,29.79837364605876]
after offset 3 : Geo[29.281283903720595,34.898892931740185]
after offset 4 : Geo[32.34715497252656,40.16367725585349]
after offset 5 : Geo[35.39766054765095,45.6188574286973]
after offset 6 : Geo[38.43176139254251,51.29427962161371]
after offset 7 : Geo[41.44825038924716,57.22441888539887]
after offset 8 : Geo[44.44570837586461,63.44955327525972]
after offset 9 : Geo[47.42244551735262,70.01729526907744]
after offset 10 : Geo[50.37642275309575,76.98461972142428]
Deviation from g2 (lat, lon) : (-10.376422753095746, 3.0153802785757193)

-----------------------------------------------------------
USING OPENMAP 4.6.4b
-----------------------------------------------------------

g1 : Geo[20.0,20.0]
g2 : Geo[29.999999999999996,29.999999999999993]
g1 after offset (distance, azimuth) : Geo[30.27824184184844,29.664327499230744]
Deviation from g2 (lat, lon) : (-0.2782418418484447, 0.3356725007692489)

Moving g1 (offset) 10 times, without changing azimuth, by this distance :
after offset 1 : Geo[21.054615479862942,20.899012387668222]
after offset 2 : Geo[22.108926299466045,21.80451692628775]
after offset 3 : Geo[23.1629236643685,22.716915339478042]
after offset 4 : Geo[24.21659890231631,23.636623125331568]
after offset 5 : Geo[25.269943465157084,24.564070653699424]
after offset 6 : Geo[26.32294892972509,25.49970434324379]
after offset 7 : Geo[27.37560699762677,26.443987926717686]
after offset 8 : Geo[28.4279094938509,27.397403813894215]
after offset 9 : Geo[29.4798483641196,28.360454562663193]
after offset 10 : Geo[30.531415670888602,29.3336644700637]
Deviation from g2 (lat, lon) : (-0.531415670888606, 0.6663355299362941)

-----------------------------------------------------------

g1 : Geo[20.0,20.0]
g2 : Geo[40.00000000000001,80.0]
g1 after offset (distance, azimuth) : Geo[41.36598261305894,79.89583328336424]
Deviation from g2 (lat, lon) : (-1.3659826130589323, 0.10416671663575983)

Moving g1 (offset) 10 times, without changing azimuth, by this distance :
after offset 1 : Geo[23.23921888006311,24.740982014513776]
after offset 2 : Geo[26.465307390769393,29.6061708120319]
after offset 3 : Geo[29.677503706192955,34.61787909360868]
after offset 4 : Geo[32.87494738293999,39.80119573293444]
after offset 5 : Geo[36.05665646556723,45.18468526615926]
after offset 6 : Geo[39.221496757280626,50.80127375015558]
after offset 7 : Geo[42.36814069287761,56.68938912280942]
after offset 8 : Geo[45.49501213015433,62.89445321022558]
after offset 9 : Geo[48.60021167293886,69.47086650377678]
after offset 10 : Geo[51.681414498457734,76.48469474221949]
Deviation from g2 (lat, lon) : (-11.681414498457727, 3.5153052577805113)

Regards,
Stephane

```--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
```
Received on Wed Mar 21 2007 - 09:55:25 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:08 EDT