mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-21 02:32:18 +00:00
ISS live telemetry, STATION and LIVE sections, Tiangong model, drawn through the renderer's draw port
Builds on the ISS 3D model (PR #1690) and brings it onto main's renderer seam: the station models are items of a `models` draw set, posed by heading, pitch and roll from the station's flight axes (`headingPitchRollOfAxes`), with the camera, canvas and clicks read from the renderer's ports; no satellites file reaches Cesium. The joint drivers write column-major matrices into node poses the model part keeps, for a renderer that can pose nodes; until the draw contract has that member the models draw rigid. - ISS joints take their angles from NASA's ISSLive telemetry, relayed by the server behind ISS_TELEMETRY_ENABLED. - STATION and LIVE sections of Context replace the floating command panel and player; both collapse like the Radio section. - Cockpit rides the ISS from mounts on its model; the LIVE page in the Cockpit briefing. - Tiangong as a second station model, with computed joints. - Installations: a label-box click selects the site.
This commit is contained in:
1 parent
fd3ca679ec
commit
9cc077964f
103 files changed
+12033
-1775
No files matched your search
@@ -631,3 +631,70 @@ test('the subject says whether its class may be ridden', () => {
|
||||
])
|
||||
assert.equal(subject(satelliteClass).enterable, true, satelliteClass);
|
||||
});
|
||||
|
||||
test('the station offers its mount only while the Cockpit rides it', async (t) => {
|
||||
const f = await fixture(t);
|
||||
const mount = { label: 'ZARYA' };
|
||||
// The ISS model part works the mount out (issModel.js, stationModel.js);
|
||||
// this layer only decides when the Cockpit may have it, asking the part
|
||||
// whose station the subject is (stationModels.js).
|
||||
const modelPart = (offered) => ({
|
||||
key: 'iss',
|
||||
norad: ISS_NORAD,
|
||||
_updateStationModel() {},
|
||||
_destroyStationModel() {},
|
||||
_standsInFor: () => false,
|
||||
_cockpitMount: () => offered,
|
||||
});
|
||||
f.parts.stationModels = [modelPart(mount)];
|
||||
assert.equal(f.methods.getCockpitMount(), null, 'nothing tracked');
|
||||
f.track(ISS_NORAD);
|
||||
f.nextFrame();
|
||||
assert.equal(f.methods.getCockpitMount(), null, 'tracked, not ridden');
|
||||
f.methods.setCockpitSubject(String(ISS_NORAD));
|
||||
assert.equal(f.methods.getCockpitMount(), mount);
|
||||
// The view asked for is passed on; none asks for the first on offer.
|
||||
const asked = [];
|
||||
f.parts.stationModels = [
|
||||
{
|
||||
...modelPart(mount),
|
||||
_cockpitMount(key) {
|
||||
asked.push(key);
|
||||
return mount;
|
||||
},
|
||||
},
|
||||
];
|
||||
f.methods.getCockpitMount('zarya');
|
||||
f.methods.getCockpitMount();
|
||||
assert.deepEqual(asked, ['zarya', null]);
|
||||
// The model has nothing to offer: not loaded, or not the station.
|
||||
f.parts.stationModels = [modelPart(null)];
|
||||
assert.equal(f.methods.getCockpitMount(), null);
|
||||
delete f.parts.stationModels;
|
||||
assert.equal(f.methods.getCockpitMount(), null);
|
||||
// Another station's part is not asked for the ISS.
|
||||
f.parts.stationModels = [{ ...modelPart(mount), norad: 48274 }];
|
||||
assert.equal(f.methods.getCockpitMount(), null);
|
||||
f.parts.stationModels = [modelPart(mount)];
|
||||
f.methods.setCockpitSubject(null);
|
||||
assert.equal(f.methods.getCockpitMount(), null, 'released');
|
||||
});
|
||||
|
||||
test('a satellite docked to the ISS draws no ring of its own: the ISS’s shows', async (t) => {
|
||||
const f = await fixture(t);
|
||||
f.track(COMPANION);
|
||||
f.nextFrame();
|
||||
assert.equal(f.state._trackedDockedToIss, true);
|
||||
assert.equal(f.ring(COMPANION), undefined, 'no second ring');
|
||||
assert.equal(f.ring(ISS_NORAD).show, true);
|
||||
// The ISS's ring stands for it even with the stations class hidden.
|
||||
f.methods.setParams({ classes: { stations: false } });
|
||||
assert.equal(f.ring(ISS_NORAD).show, true);
|
||||
// Another satellite keeps its own ring; the ISS's goes with its class.
|
||||
f.track(GPS);
|
||||
f.nextFrame();
|
||||
assert.equal(f.state._trackedDockedToIss, false);
|
||||
assert.ok(f.ring(GPS));
|
||||
assert.equal(f.ring(GPS).show, true);
|
||||
assert.equal(f.ring(ISS_NORAD).show, false);
|
||||
});
|
||||
Reference in new issue
Block a user