I am attempting to cosimulate an aircraft on Unreal Engine using Cesium to generate realistic terrain. I have model working correctly in Simulink and have verified that the ECEF coordinates of the trajectory are correct. I send those data points into Unreal and Cesium but I do not see the plane flying the right coordinates.
My question is, how do I correct set up and feed the position datapoints so that it flies the proper trajectory and I can visualise it.
Have you used the ‘transform Earth-Centered Fixed position to Unreal’ block? If so, could you provide more information? I’ve managed to solve the coordinate problem, but I’m stuck with rotations! I’m also sending roll, pitch, and yaw along with the ECEF, but it’s not working correctly.
@baba_geldi24 I have not heard nor could find this block. Is it a simulink block or something custom you made? I have figured out thus far, that the coordinate system that Unreal uses is defined in the lower left corner, so position references need to be adjusted for that (still working on how that would be, since I believe the unreal axis is always fixed). As for rotations, I believe that would also be the cause of your problem, the fact that rotations in Unreal are about their axis.
Cesium Plugin is include this block. when you send the datas (I sent in json format with udp protocol) for example I send the data ecef_x , ecef_y and ecef_z then connect eachother in vector. then use this block “transform Earth-Centered Fixed position to Unreal”. As I understand It will be solve your problem.
Also you are right unreal uses left corner type. It makes complicated everything because of my object transform beind more complicated. I will be crazy for this project…
@baba_geldi24 would you be able to show a picture of the set up in the level blueprint? I am new to Unreal so I am not so certain how to do this.
I hope, this block will solve your problem.

Could you send a screenshot of the blueprint, what did you connect to each of these ports?
Simulink coordinates into that block, output coordinates can be used with a set actor location block. Also see block SetEarthCenteredEarthFixedRotation,
My apologies, I am new to Unreal Engine so I’m not too sure how?
Can you share a screenshot of how you’re currently getting the coordinates into Unreal from Simulink and how you’re using them?
So currently (to get it where I want on the globe) I set the origin to 0 altitude and the initial latitude and longitude and then manipulate the ECEF coordinates as shown to get the translation that feeds into the Simulation 3D actor Set block as shown.
Then in unreal I have the actor in the scene and I just did this to the blueprint of the actor to be able to track it as it moves in the world.

I still dont understand where to access the incoming data within Unreal Engine
I must admit I am not too well versed in MatLab/Simulink. From my understanding though, you have your model in MatLab and you want to get that data into Unreal Engine?
I haven’t done such a thing myself so I’m not sure I can help much further, I thought you already had the data coming into Unreal which doesn’t seem to be the case. A quick google brought up the following link, not sure if it is of any use:
No I have the data coming in from Matlab to Unreal because when I run it the vehicle moves as I want it to. But the problem is that from the simulink screenshot you can see that the way I have to manipulate the data is not nice. I would like a way to just send the ECEF coordinates into Unreal through that last block and then show. When I do that currently the screen is just black.
Do you have a blueprint within unreal that processes the data coming in from Matlab? As I said, this is new to me and something I haven’t done before - but I would assume you have a blueprint or some code that processes the data coming in from Matlab and then sets that data on an actor? As you’ve said, you should just be able to send the ECEF coordinates from Matlab without doing that data manipulation.
This is a high level blueprint for setting the received Matlab coordinates & rotation onto an Actor that has a CesiumGlobeAnchor component attached. Another thing to check is the origin Lat/Lon values - they should be close to where your vehicle initially starts.