mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Read the camera through its port when applying flight snapshots
The flights snapshot renderer took the camera's ground point from the Cesium camera, built fix positions and history entries with Cesium types, and handed the scene to the mesh floor sampler itself. It now reads the ground point from the camera port's pose, asks the flights motion part for fix positions, copies and history entries, compares fix times in whole milliseconds as before, and lets the rendering part sample the mesh floor. The file no longer touches Cesium and leaves the allow-list.
This commit is contained in:
1 parent
dbd6363e43
commit
436b110547
5 files changed
+73
-35
No files matched your search
@@ -1064,11 +1064,35 @@ export function createMotion({
|
||||
/** The display instant `epochMs` as a JulianDate, for `_motionRegime`. */
|
||||
const _displayTimeAt = (epochMs, result) => julianAt(epochMs, result);
|
||||
|
||||
/** A feed fix's ECEF position, from its degrees and render altitude. */
|
||||
const _fixPosition = (lonDeg, latDeg, heightM) =>
|
||||
Cesium.Cartesian3.fromDegrees(lonDeg, latDeg, heightM);
|
||||
|
||||
/** A copy of a fix position, for a trail that keeps it. */
|
||||
const _copyPosition = (position) => Cesium.Cartesian3.clone(position);
|
||||
|
||||
/**
|
||||
* A position-history entry for a feed fix at `epochMs`, carrying the fix's
|
||||
* own velocity and track; it keeps a copy of `position`.
|
||||
*/
|
||||
function _historyFix(epochMs, position, velocity, track) {
|
||||
return {
|
||||
time: julianAt(epochMs),
|
||||
epochMs,
|
||||
position: Cesium.Cartesian3.clone(position),
|
||||
velocity,
|
||||
track,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
_refloorStaleGroundedContacts,
|
||||
_deadReckon,
|
||||
_displayTimeAt,
|
||||
_fixEpochMs: fixEpochMs,
|
||||
_fixPosition,
|
||||
_copyPosition,
|
||||
_historyFix,
|
||||
_motionRegime,
|
||||
_extrapolateFix,
|
||||
_isTrackWarmingUp,
|
||||
|
||||
Reference in new issue
Block a user