I have searched the whole PB forum but did not find any real answer to my problem.

I'm working on a GPS module that gives the Longitude, Latitude and Altitude in ECEF format where XYZ is given in SINT32 Little-endian in meters.

Now I have converted the X and Y and got as an example -946051 for X and 374257 for Y

When I use Atn(Y/X) I get value like 89.9998468824687 instead of 99.013540 (note that the results are examples and might not be the real answer) which is 10 degrees off my position.

I have tried several ways of converting this but without luck so if anyone have worked with ECEF (Earth-Centered, Earth-Fixed) it would be good to know how to convert ECEF to Longitude, Latitude, Altitude (LLA) as it's used by many GPS receivers.

Thank you

I'm working on a GPS module that gives the Longitude, Latitude and Altitude in ECEF format where XYZ is given in SINT32 Little-endian in meters.

Now I have converted the X and Y and got as an example -946051 for X and 374257 for Y

When I use Atn(Y/X) I get value like 89.9998468824687 instead of 99.013540 (note that the results are examples and might not be the real answer) which is 10 degrees off my position.

I have tried several ways of converting this but without luck so if anyone have worked with ECEF (Earth-Centered, Earth-Fixed) it would be good to know how to convert ECEF to Longitude, Latitude, Altitude (LLA) as it's used by many GPS receivers.

Thank you

## Comment