Skip to content

A spy satellite simulator in your browser, except the data is real. Live open source spatial intelligence on a photorealistic 3D globe.

Merge remote-tracking branch 'origin/main' into i18n-spanish

German Khokhlove48841072d44
diff --cc src/sdr/controller.js
index 0dbca7219,bcd1d1750..60d766928
--- a/src/sdr/controller.js
+++ b/src/sdr/controller.js
@@@ -1210,14 -1703,25 +1713,25 @@@ export class SdrController
});
this._audioNode?.port.postMessage({ type: 'volume', value: 0 });
try {
- for (let scan = 0; scan < 18 && token === this._seekToken; scan += 1) {
- const span = FM_MAX_HZ - FM_MIN_HZ;
- const rawCenter = origin + seekDirection * scan * 1_200_000;
- const center = FM_MIN_HZ + positiveModulo(rawCenter - FM_MIN_HZ, span);
+ for (
+ let scan = 0;
+ scan < FM_SEEK_FRAMES && token === this._seekToken;
+ scan += 1
+ ) {
+ const rawCenter = origin + seekDirection * scan * FM_SEEK_STEP_HZ;
+ const position =
+ FM_SEEK_LAP_START_HZ +
+ positiveModulo(rawCenter - FM_SEEK_LAP_START_HZ, FM_SEEK_LAP_HZ);
+ const center = clampFmFrequency(position);
+ // tuneFm reports the failure; no spectrum is valid for this frame.
+ if (!(await this.tuneFm(center, { quiet: true }))) {
+ if (token === this._seekToken)
+ this._setState({ seeking: false, seekMessage: 'Seek stopped' });
+ return null;
+ }
const sequence = this._spectrumSequence;
- await this.tuneFm(center, { quiet: true });
this._setState({
- seekMessage: `Scanning ${(center / 1_000_000).toFixed(1)} MHz…`,
+ seekMessage: t('Scanning {mhz} MHz…', { mhz: formatMhz(center) }),
});
if (
!(await this._waitForSpectrum(sequence)) ||