mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 18:22:25 +00:00
Review fixes: station panel and model housekeeping, label-box click, telemetry null stamp
- Installations: the label-box click fallback reaches the controls' methods (it read an undefined member and never ran). - Station model: the docked-companion scan runs once a second again; the hand-over pass runs once, when the model starts drawing. - Station panel: an unchanged view is not republished every frame; one render pump across slider drags, stopped on destroy; destroying the panel hands the joints back to Automatic, and the joint drivers' reset forgets manual choices and the telemetry lock. - Telemetry relay: a null TimeStamp is no time, not the first second of the year. - Drop issCommandShouldShow and issCommandNoteText, which nothing called.
This commit is contained in:
1 parent
ae9cfa4ffb
commit
aeaa192b5f
8 files changed
+63
-77
No files matched your search
@@ -1,24 +1,4 @@
|
||||
import { t } from '../../i18n/index.js';
|
||||
import { ISS_NORAD, issTrackedOnStation } from './policy.js';
|
||||
|
||||
/**
|
||||
* Whether the command panel shows: the ISS selected (tracked), or an object
|
||||
* docked to it, the layer on and the Cockpit not riding it.
|
||||
* @param {{enabled: boolean, trackedNorad: number|null, cockpitHeld: boolean,
|
||||
* docked?: boolean}} input `docked`: the tracked satellite is docked to the
|
||||
* ISS (issTrackedOnStation).
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function issCommandShouldShow({
|
||||
enabled,
|
||||
trackedNorad,
|
||||
cockpitHeld,
|
||||
docked = false,
|
||||
}) {
|
||||
const onStation =
|
||||
trackedNorad === ISS_NORAD || (Boolean(docked) && trackedNorad !== null);
|
||||
return Boolean(enabled) && onStation && !cockpitHeld;
|
||||
}
|
||||
|
||||
const unit = (v) => {
|
||||
const n = Math.hypot(...v);
|
||||
@@ -55,21 +35,6 @@ export function issCommandStatusText(sunlit) {
|
||||
return sunlit ? t('Now: in sunlight') : t("Now: in the Earth's shadow");
|
||||
}
|
||||
|
||||
/**
|
||||
* The Automatic mode's note: what moves the joints right now.
|
||||
* @param {boolean} live Whether the joints are on NASA's telemetry.
|
||||
* @returns {string}
|
||||
*/
|
||||
export function issCommandNoteText(live) {
|
||||
return live
|
||||
? t(
|
||||
"Arrays, radiators and one dish follow NASA's live telemetry. The other dish holds still and the arms sway for illustration.",
|
||||
)
|
||||
: t(
|
||||
'Arrays and radiators follow the Sun, the dishes aim at relay satellites and the arms sway for illustration. Computed, not live telemetry.',
|
||||
);
|
||||
}
|
||||
|
||||
/** Beyond this the camera counts as far, and the zoom button is offered. */
|
||||
export const ISS_COMMAND_FAR_M = 1000;
|
||||
|
||||
|
||||
Reference in new issue
Block a user