yageek/lambert

Precision of lambert zone 2 to wgs84 conversion

vincentrou opened this issue · 4 comments

Thanks for this library.
I just want you to know that I had to add a static correction to the wgs84 position. Otherwise, I do not have the same value as the Circé software of IGN or on this website : http://tool-online.com/conversion-coordonnees.php
It is an error of about 10 meters.

I do not test it for other zone than lambert II, but for me it works fine now. I do not try to understand why...
Here is my code with the static correction :

YGPoint point = {robot_pose.getX(),robot_pose.getY(),0,METER};
//Converts point in Lambert Zone 2 to WGS84
point = YGPointConvertWGS84(point,LAMBERT_II);
//Convert to Degree
point = YGPointToDegree(point);
// Static correction of lambert to wgs84 conversion
point.x += 0.000089097;
point.y += 0.000014282;

Could you precise the input and output coordinates with the zone you used ?

I have a similar issue with Lambert II Etendu
you can use for instance 601000,2429600 (center of paris more or less)
and your code yields : Lat:48.864710154 - Lon:2.350033629
the sites yields 48.86472578 2.35012769
and the ubuntu ./Circe program for lambert II Etendu yields 48.86472862 2.35014634

so I guess a) it is somehow a black art.
And the static correction is only correct for a specific place ...

Cheers

This is may due to rounding in the several computation. I'm not a specialist about it. I thought about using a arbitrary precision library to see the impact on the precision and the computing time. But is it the problem, I don't know :(

Which ones should I take as reference ? Do you know if there is official samples of coordinates to trust ?

./Circe seems to give the correct answer, looking at the points and putting them on google map fits