mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
feat(cockpit): keep the orbital camera on a ground target
In the satellite orbital view a single click on a mapped ground point (a ground point of a layer that is on, such as a Mapped Installations site, a fire or a local data pack feature) keeps the camera on it. Each frame the look is aimed from the satellite's position to the point's Earth-fixed position in the track-up nadir frame the arrows tilt, so the point stays at the centre as the satellite moves. The swing onto the point, or between points, uses the arrows' easing on a slower clock and then holds the point exactly; reduced motion cuts. A click elsewhere, FOCUS on the focused point, NADIR, Home or 0 ends the focus and the view eases back to nadir; an arrow ends it and tilts on from where the view is. The focus also ends, easing back, when the point leaves the ±45° reach or the satellite's horizon, when its layer is turned off or its record is dropped, and with the view. While focused the readout gives the single off-nadir angle to the point (OFF-NADIR 23.4°), names it in a polite live region, and the swath reads approximate as for a tilt. Clicks still reach Cesium's own handler and never untrack the satellite; a click a tool owns is ignored. Under the readout, IN REACH lists the mapped points facing the satellite that are within the reach or in the frame, nearest to nadir first and at most 12, rebuilt once a second. A row opens the point's position, source and OpenStreetMap tags (or its layer's properties); FOCUS focuses it, switches to it, or ends the focus held on it, and is unavailable for a point in frame but beyond the reach.
This commit is contained in:
1 parent
745c11969b
commit
567c833582
24 files changed
+2132
-19
No files matched your search
@@ -14,6 +14,7 @@ import {
|
||||
shownOwnerMark,
|
||||
} from '../../ownerFlag.js';
|
||||
import { useCockpitStore } from '../../stores/cockpit.js';
|
||||
import CockpitOrbitalReach from './CockpitOrbitalReach.vue';
|
||||
|
||||
// The orbital view's HUD: a nadir reticle over the picture, the satellite's
|
||||
// identity and orbit, and the optical zoom. The Cockpit controller presents
|
||||
@@ -254,6 +255,12 @@ watch(
|
||||
|
||||
// The off-nadir tilt; an untilted view shows no readout or reset.
|
||||
const look = computed(() => orbital.value?.look || { offset: false });
|
||||
// A ground focus names its target in a polite live region; the angle,
|
||||
// which changes every update, is left out of it.
|
||||
const focusText = computed(() => {
|
||||
const label = look.value.focus?.label;
|
||||
return label ? t('FOCUS · {name}', { name: label }) : '';
|
||||
});
|
||||
|
||||
const transition = computed(() => orbital.value?.transition || {});
|
||||
const lensStyle = computed(() => {
|
||||
@@ -317,9 +324,12 @@ const lensStyle = computed(() => {
|
||||
<p class="cockpit-orbital-north">{{ trackUp ? t('TRACK UP') : t('NORTH UP') }}</p>
|
||||
<!-- Shown only while the view is tilted off nadir: where it looks and the way back. -->
|
||||
<div v-if="look.offset" class="cockpit-orbital-look">
|
||||
<span id="cockpit-orbital-look-readout" class="cockpit-orbital-look-readout" aria-live="polite">{{ look.readout }}</span>
|
||||
<span id="cockpit-orbital-look-readout" class="cockpit-orbital-look-readout" :aria-live="look.focus ? 'off' : 'polite'">{{ look.readout }}</span>
|
||||
<button id="cockpit-orbital-nadir" ref="nadirButton" type="button" class="cockpit-orbital-nadir" :aria-label="t('Return the view to nadir')" :title="t('Return to nadir (Home or 0)')" aria-keyshortcuts="Home 0">{{ t('NADIR') }}</button>
|
||||
</div>
|
||||
<p id="cockpit-orbital-focus" class="cockpit-orbital-focus" aria-live="polite">{{ focusText }}</p>
|
||||
<!-- The mapped points the view shows or can be turned to, each with FOCUS. -->
|
||||
<CockpitOrbitalReach />
|
||||
</div>
|
||||
<div class="cockpit-orbital-optics">
|
||||
<button id="cockpit-orbital-zoom-out" ref="zoomOutButton" type="button" class="cockpit-orbital-zoom-button" :disabled="atWidest" :aria-label="t('Zoom out')" :title="t('Zoom out (−)')" aria-keyshortcuts="- _">−</button>
|
||||
|
||||
Reference in new issue
Block a user