# Use cesium to get world location from GPS LAT/LNG/ALT

**URL:** <https://community.cesium.com/t/use-cesium-to-get-world-location-from-gps-lat-lng-alt/31934>\
**Category:** Cesium for Unreal\
**Created:** [May 6, 2024, 8:03am UTC](https://community.cesium.com/t/use-cesium-to-get-world-location-from-gps-lat-lng-alt/31934 "2024-05-06T08:03:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arbab\_Ijaz](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/arbab_ijaz/32/15538_2.png) [@Arbab\_Ijaz](https://community.cesium.com/u/Arbab_Ijaz)\
**Post date:** [May 6, 2024, 8:03am UTC](https://community.cesium.com/t/use-cesium-to-get-world-location-from-gps-lat-lng-alt/31934/1 "2024-05-06T08:03:23Z")

</div>

I am using spline to simulate a drone locomotion where i create spline on runtime through gps points by converting them in to UE coordinates through transform Lon Lat Height position to unreal node. And also create a dictionary data set that stores speed and rotation values against converted gps values on runtime. Now the problem is i am searching current world location on spline with corresponding gps values in Dictionary it doesn’t find any value. May be because of the node transform Lon Lat Height position to unreal will not provide world location. Is there any way where i can get those values in UE world coordinates  
 ![Find Value in dictionary](https://global.discourse-cdn.com/cesium/original/3X/1/a/1ab6f5be4a161f9fa9ff48a5d22a7a2e2eb31a1b.png)

 ![transform Lon Lat Height position to unreal](https://global.discourse-cdn.com/cesium/original/3X/c/8/c88d77e050134450bc6008924a3283231cdb6b24.png)

---

<div class="post-metadata">

**Author:** ![Brian\_Langevin](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/brian_langevin/32/14490_2.png) [@Brian\_Langevin](https://community.cesium.com/u/Brian_Langevin)\
**Post date:** [May 6, 2024, 4:21pm UTC](https://community.cesium.com/t/use-cesium-to-get-world-location-from-gps-lat-lng-alt/31934/2 "2024-05-06T16:21:08Z")

</div>

HI @Arbab_Ijaz , this looks like an interesting problem.

Your first screenshot looks a little blurry though. Do you think you could post a higher resolution version so we can read it a little easier?

---

<div class="post-metadata">

**Author:** ![Arbab\_Ijaz](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/arbab_ijaz/32/15538_2.png) [@Arbab\_Ijaz](https://community.cesium.com/u/Arbab_Ijaz)\
**Post date:** [May 9, 2024, 5:00am UTC](https://community.cesium.com/t/use-cesium-to-get-world-location-from-gps-lat-lng-alt/31934/3 "2024-05-09T05:00:34Z")

</div>

I have add that piece of code in Blueprint UE.

> **[Get current position on spline posted by anonymous | blueprintUE | PasteBin...](https://blueprintue.com/blueprint/6qw-xyeb/)**
>
> No description provided

---

<div class="post-metadata">

**Author:** ![Brian\_Langevin](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/brian_langevin/32/14490_2.png) [@Brian\_Langevin](https://community.cesium.com/u/Brian_Langevin)\
**Post date:** [May 20, 2024, 4:36pm UTC](https://community.cesium.com/t/use-cesium-to-get-world-location-from-gps-lat-lng-alt/31934/4 "2024-05-20T16:36:45Z")

</div>

Thanks. Hard to know what exactly is the problem, but there are a couple parts of your blueprints that looks conspicuous to me…

Here it looks like your taking Unreal XYZ and outputting to pins labeled Long / Lat / Altitude. If the caller is expecting long / lat, this looks like it won’t work.

 ![image](https://global.discourse-cdn.com/cesium/original/3X/3/7/3749c965cc8baed7a0891e5149364cb237cf7e44.jpeg)

Also, similar situation when getting a spline point. If the spline points are in Unreal world coords, and you are using them in a map that contains long / lat / alt, this doesn’t sound like it’s going to work either. They need to be converted.  
 ![image](https://global.discourse-cdn.com/cesium/original/3X/b/b/bb647bec340b2ee606473c9e3a1d009a0491e658.png)

---

<div class="post-metadata">

**Author:** ![Arbab\_Ijaz](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/arbab_ijaz/32/15538_2.png) [@Arbab\_Ijaz](https://community.cesium.com/u/Arbab_Ijaz)\
**Post date:** [June 3, 2024, 11:58am UTC](https://community.cesium.com/t/use-cesium-to-get-world-location-from-gps-lat-lng-alt/31934/5 "2024-06-03T11:58:13Z")

</div>

In first picture what I’m doing is taking a longitude latitude values and converting it into UE coordinates. This is a custom function that convert Geographical coordinates to UE coordinates.  
In second picture i am using a mavlink Data hash map that stores GPS values (Already converted to UE coordinates)and some data related to gps values like different location values store with different rotation data.  
Now in second picture i am trying to find required data corresponding to current location. As i already converted gps values into UE coordinates and finding it through spline world loaction so i think there is no need of any type of conversion. If I’m not assuming it wrong
