Skip to content

Commit

Permalink
Add poc sat model rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
Flowm committed Feb 4, 2025
1 parent 8c22aaf commit 5862a96
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/modules/SatelliteComponentCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,17 @@ export class SatelliteComponentCollection extends CesiumComponentCollection {
const hpr = new Cesium.HeadingPitchRoll(0, Cesium.Math.toRadians(180), 0);
return Cesium.Transforms.headingPitchRollQuaternion(position, hpr);
}, false);
} else if (type === "3D model") {
component.position = fixed;
// Add a constant 2deg/s orientation to the model
console.log("3D Model", component.orientation);
component.orientation = new Cesium.CallbackProperty((time) => {
const position = this.props.position(time);
// ADCS frame -z, -x, y
//const hpr = new Cesium.HeadingPitchRoll(0, 0, -Cesium.Math.toRadians(2) * time.secondsOfDay);

Check failure on line 143 in src/modules/SatelliteComponentCollection.js

View workflow job for this annotation

GitHub Actions / build (16)

Expected exception block, space or tab after '//' in comment

Check failure on line 143 in src/modules/SatelliteComponentCollection.js

View workflow job for this annotation

GitHub Actions / build (18)

Expected exception block, space or tab after '//' in comment
const hpr = new Cesium.HeadingPitchRoll(0, -Cesium.Math.toRadians(30) * time.secondsOfDay, 0);
return Cesium.Transforms.headingPitchRollQuaternion(position, hpr);
}, false);
} else {
component.position = fixed;
component.orientation = new Cesium.VelocityOrientationProperty(fixed);
Expand Down

0 comments on commit 5862a96

Please sign in to comment.