External GPS data to UE4 Cesium Location

I have a really tough issue. I have GPS coordinates in geodetic Lat, Long, and Altitude. I need to feed these into Cesium on tick. Has anyone done anything similar to this? Is there a good way?

I’m currently getting judder, my UDP connection appears to be fine as I can send out normal values to just move an object up and down (0 - 1) and it’s smooth. I’m figuring It’s either precision related to the floating point values I’m sending (a 12.0001200341) 341 being the value I think makes the difference frame to frame. Due to low precision, I believe it could be cutting those numbers off? Any advice or links appreciated.

Anyone ever done this? Can you think of the best way to move the player based on external data fed in via UDP?

Hi @matt3,

I haven’t done that specifically, but I can probably help if you tell me more about what you’re trying to do. Are you trying to do this in Blueprints, and so you’re using the Inaccurate functions? If so, precision could be an issue. If you can send smooth values and get a smooth result, though, that probably eliminates precision as the cause. Could it be that your “real” GPS values are just noisy? That’s pretty normal from GPS hardware, from what I understand. I wouldn’t expect 12.0001200341 versus 12.0001200000 to be very noticeable unless you’re zoomed in very close to the object, as that’s only a few millimeters difference.


Thanks for the reply Kevin.

So interestingly I found using unreal 5 and the blueprint functions fixed the problem. Before doing this, i found calling the inaccurate conversion functions via blueprint as well as calling the conversation functions in C++ both had the same problem in UE4.27. That is… they lost precision.

In order for me to set the location of an actor, it’s required that I feed the values into an FVector. FVectors in 4.27 only take floats as parameters as far as I can tell. So I convert it when I create the FVector ← and this is I believe where the precision loss occurs.

This is not a problem in UE5, and i’m assuming that’s because they allow double precision in blueprints and FVectors but I haven’t yet worked out if that’s the case for certain. I’ll update here as to what I find, but for now I’ve upgraded to UE5 in order to continue my work.

Yes that’s right, UE5 added support for double-precision vectors and matrices. In UE4, it was also not possible to use double-precision values in Blueprints (and that’s why we prefixed the function names with “Inaccurate”).