Please anyone suggest me how to create speedometer and compass like above screenshot by cesium js .
For a speedometer, you’ll need to get the player’s speed per second and multiply by 3600 (and do the appropriate unit conversions) to get your miles per hour or kilometers per hour.
For a compass, there’s a bit of math involved and I don’t know it all, but I hope this helps get you started.
First, you’ll need to figure out the direction to the North Pole. In ECEF coordinates, the north pole can be approximated to (0, 0, 6378100.0). Then, you can get the directional vector between the current position and the pole by getting the camera’s ECEF position and subtracting it from the north pole position. You can use that resulting vector to drive the rotation of your compass needle.
After you have these values, you can use the O3DE User Interface documentation to help you build the on-screen UI.