Converting WGS Coordinates (Latitude, Longitude, Altitude) to XYZ Coordinates

I need to convert WGS Coordinates into XYZ coordinates and visualize them on a globe, but somehow the results are way off. My Playground Example demonstrates the problem. The red pin is positioned at the southern coast of Argentina when it is supposed to be located at Albuquerque, New Mexico :slight_smile:

Some help would be appreciated. :rocket:

Welcome aboard!

I don’t think you can use these calculation with the equirectangular representation of the earth.

See for eg:

Got it work. Just had some of the axis wrong.