How to Determine the Orientation of the Satellite Pyramid

let satellite = viewer.entites.add({
position:position,
orientation:new Cesium.VelocityOrientationProperty(position),
model:{}
})
let primitive = createQuadrangularPyramid()
let modelMatrix = satellite.computeModelMatrix(viewer.clock.currentTime)
Cesium.Matrix4.multiply(modelMartix,Cesium.Matrix4.fromRotationTranslation(Cesium.Matrix3.fromRotationY(Cesium.Math.toRadians(-180))),modelMatrix)
primitive.modelMatrix =modelMatrix

This behaves correctly in circular orbits, but not in elliptical orbits
The satellite is also in the wrong direction!

1646620878(1)

Hi @11118,

Thank you for sharing this information with the community! I would love to learn more about how you are updating your satellite entity. Be sure to check that you are using the correct units when updating the orientation of this entity.

Best,
Sam

I passed ‘orientation:new Cesium.VelocityOrientationProperty(position),’ Calculate the direction of the satellite. But it seems wrong.

@11118, it looks like Entity.orientation expects an object of type Property. I suggest that you use the member Property.definitionChanged to help ensure that you are actually updating the orientation of your entity.

I do not have a lot of experience using the VelocityOrientationProperty object. You might want to investigate how exactly the quaternion is generated from this object. It’s also possible that your entity data is inconsistent, yielding an unexpected orientation.