@mearman/doppler 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -87,7 +87,7 @@ Data flows through four layers inside `src/`, each importing only from the layer
87
87
  - **`pnpm test:e2e` needs a free port 4174** and does not reuse a running server (`reuseExistingServer: false`). Chromium runs with fake audio devices so that the microphone permission prompt does not block.
88
88
  - **The CLI bundle does not depend on `dist/`.** `tsdown.config.ts` marks `@mearman/doppler` and `@mearman/doppler/node` external for the CLI, but `cli/doppler.ts` imports `../src` directly, so the two builds are independent.
89
89
  - **The CLI version is read from `package.json`** via `import.meta.url`, ensuring CLI output (`doppler -v`) stays synchronized with semantic-release without hardcoded literals.
90
- - **`incremental-adsb.yml` builds a day's dataset but does not publish it.** It streams the `adsb.lol` `globe_history` release for the target day through `doppler ingest --input -` and writes `YYYY-MM-DD.dataset.json` on the runner. Where the file is stored is not configured yet.
90
+ - **`incremental-adsb.yml` publishes a day's dataset to Hugging Face.** At 06:00 UTC it streams the `adsb.lol` `globe_history` release for the previous day through `doppler ingest --input -`, keeps one region (the United Kingdom unless the `bbox` input says otherwise) and uploads `YYYY-MM-DD.dataset.json` to the `Mearman/doppler-adsb` dataset repository with the `HF_TOKEN` secret. A day's file can be larger than `loadDatasetFile` can read as one string; the deferred dataset size issue tracks that.
91
91
  - **Real ADS-B data enters through `doppler ingest`.** It accepts a raw `adsb.lol` or `tar1090` trace file, a directory of them, ready-made segments, or (`--input -`) the day's tar on standard input, with `--bbox` to keep one region. Without `--dataset`, `locate` and the PWA match against the three synthetic flyovers in `src/bundled.ts` only.
92
92
  - **Workflows pin actions differently.** `pages.yml` pins actions by commit SHA. `ci.yml` and `incremental-adsb.yml` use version tags. Keep the pins in the style of the file you edit.
93
93
 
@@ -1,4 +1,10 @@
1
1
  import { $ as computeSegmentCpa, $t as QuietIntervalSchema, A as synthesizeMultiFlyoverAudio, At as ConstellationEntry, B as SpectrogramOptions, Bt as GeoPoint3D, C as formatConstellationKey, Ct as define, D as SyntheticAudioConfig, Dt as AircraftCategorySchema, E as encodeWavPcm16, Et as AircraftCategory, F as extractDopplerObservations, Ft as DopplerObservationSchema, G as downmixToMono, Gt as LinearFlightSegmentSchema, H as computeSingleSpectrogramFrame, Ht as HypothesisMatch, I as ComputedSingleFrame, It as DopplerRidgePoint, J as fft, Jt as LocationHypothesis, K as ComplexSpectrum, Kt as ListeningEpisode, L as DopplerSpectrogram, Lt as DopplerRidgePointSchema, M as DechirpScoreResult, Mt as DopplerDataset, N as scoreByEmissionDechirping, Nt as DopplerDatasetSchema, O as detectEnfSignature, Ot as AsymptoticKinematics, P as RidgeTrackerOptions, Pt as DopplerObservation, Q as SynthesizeCurveOptions, Qt as QuietInterval, R as SingleFrameOptions, Rt as EnfSignature, S as expandConstellationQueryKeys, St as getOwn, T as decodeWavBytes, Tt as AdsbPingSchema, U as decimateAudioStream, Ut as HypothesisMatchSchema, V as computeDopplerSpectrogram, Vt as GeoPoint3DSchema, W as designLowPassFirKernel, Wt as LinearFlightSegment, X as simplifyTrajectory4D, Xt as LocationSession, Y as TraceMetadata, Yt as LocationHypothesisSchema, Z as RetardedAcousticPoint, Zt as LocationSessionSchema, _ as unmatchedObservationLogPenalty, _t as geoToLocalEnu, a as BUNDLED_SEGMENTS, at as DEFAULT_SOUND_SPEED_MPS, b as QUERY_BUCKET_SPAN, bt as slantDistanceMeters, c as DopplerSessionEngine, ct as DEFAULT_ELLIPSE_SEGMENTS, d as ObservationSegmentPair, dt as HALF_TURN_DEG, en as SearchConstraints, et as solveRetardedDelaySec, f as RefineCoordinateOptions, ft as HorizontalEllipse, g as refineObserverCoordinateGaussNewton, gt as geoToEcef, h as fisherToConfidenceEllipse95, ht as encodeSpatialCell, i as BUNDLED_GROUND_TRUTH, it as AtmosphereState, j as DechirpOptions, jt as ConstellationEntrySchema, k as estimateTempFromCricketChirpsCelsius, kt as AsymptoticKinematicsSchema, l as SessionEngineOptions, lt as DEFAULT_SPATIAL_RESOLUTION, m as SLANT_SIGMA_FLOOR_METERS, mt as ellipseOutline, n as BUNDLED_DATASET, nn as Vector3D, nt as DopplerCurveMeasurement, o as generateBundledReferenceAudio, ot as effectiveRaySoundSpeedMps, p as RefinedLocationResult, pt as decodeSpatialCellCenter, q as computeHannPowerSpectrumDb, qt as ListeningEpisodeSchema, r as BUNDLED_DEM_GRID, rn as Vector3DSchema, rt as extractAsymptoticKinematics, s as generateBundledReferenceWavBytes, st as speedOfSoundAtTempMps, t as BUNDLED_CONSTELLATIONS, tn as SearchConstraintsSchema, tt as synthesizeRetardedDopplerCurve, u as MAX_ALONG_TRACK_WIND_MPS, ut as FULL_TURN_DEG, v as BuildConstellationOptions, vt as interpolateTerrainElevationMeters, w as matchesSearchConstraints, wt as AdsbPing, x as buildConstellationIndex, xt as recordOf, y as CandidateConstraintTarget, yt as localEnuToGeo, z as SpectrogramFrame, zt as EnfSignatureSchema } from "../index-TOQF-n8K.js";
2
+ /**
3
+ * Whether the bytes open with a RIFF/WAVE header, which `decodeWavBytes` can read without the browser's decoder.
4
+ * @param bytes - The start of a file; the first 12 bytes are enough.
5
+ * @returns `true` for a WAV file.
6
+ */
7
+ export declare function isWav(bytes: Readonly<Uint8Array>): boolean;
2
8
  /**
3
9
  * Decodes an audio or video file's soundtrack into mono samples. WAV decodes in-process at its own sample rate; every other container goes through the browser's decoder, so the supported formats are the ones the browser plays.
4
10
  * @param buffer - The file's bytes. A browser decode detaches this buffer.
@@ -9,6 +9,11 @@ const COMPRESSED_DECODE_RATE_HZ = 44100;
9
9
  const FOUR_CC_BYTES = 4;
10
10
  /** Bytes of the RIFF header's tag plus size field that precede the WAVE form type. */
11
11
  const RIFF_FORM_OFFSET = 8;
12
+ /**
13
+ * Whether the bytes open with a RIFF/WAVE header, which `decodeWavBytes` can read without the browser's decoder.
14
+ * @param bytes - The start of a file; the first 12 bytes are enough.
15
+ * @returns `true` for a WAV file.
16
+ */
12
17
  function isWav(bytes) {
13
18
  const tag = (offset) => String.fromCharCode(...bytes.subarray(offset, offset + FOUR_CC_BYTES));
14
19
  return bytes.length >= 12 && tag(0) === "RIFF" && tag(RIFF_FORM_OFFSET) === "WAVE";
@@ -273,4 +278,4 @@ function importSessionJson(jsonText) {
273
278
  const parsed = JSON.parse(jsonText);
274
279
  return LocationSessionSchema.parse(parsed);
275
280
  }
276
- export { AdsbPingSchema, AircraftCategorySchema, AsymptoticKinematicsSchema, BUNDLED_CONSTELLATIONS, BUNDLED_DATASET, BUNDLED_DEM_GRID, BUNDLED_GROUND_TRUTH, BUNDLED_SEGMENTS, ConstellationEntrySchema, DEFAULT_ELLIPSE_SEGMENTS, DEFAULT_SOUND_SPEED_MPS, DEFAULT_SPATIAL_RESOLUTION, DopplerDatasetSchema, DopplerObservationSchema, DopplerRidgePointSchema, DopplerSessionEngine, EnfSignatureSchema, FULL_TURN_DEG, GeoPoint3DSchema, HALF_TURN_DEG, HypothesisMatchSchema, LinearFlightSegmentSchema, ListeningEpisodeSchema, LocationHypothesisSchema, LocationSessionSchema, MAX_ALONG_TRACK_WIND_MPS, MicMonitor, QUERY_BUCKET_SPAN, QuietIntervalSchema, SLANT_SIGMA_FLOOR_METERS, SearchConstraintsSchema, Vector3DSchema, buildConstellationIndex, computeDopplerSpectrogram, computeHannPowerSpectrumDb, computeSegmentCpa, computeSingleSpectrogramFrame, decimateAudioStream, decodeAudioFile, decodeSpatialCellCenter, decodeWavBytes, define, deleteSessionFromStorage, designLowPassFirKernel, detectEnfSignature, downmixToMono, effectiveRaySoundSpeedMps, ellipseOutline, encodeSpatialCell, encodeWavPcm16, estimateTempFromCricketChirpsCelsius, expandConstellationQueryKeys, exportSessionJson, extractAsymptoticKinematics, extractDopplerObservations, fft, fisherToConfidenceEllipse95, formatConstellationKey, generateBundledReferenceAudio, generateBundledReferenceWavBytes, geoToEcef, geoToLocalEnu, getOwn, importSessionJson, interpolateTerrainElevationMeters, loadCustomDataset, loadSessionById, loadSessionsFromStorage, localEnuToGeo, matchesSearchConstraints, recordOf, refineObserverCoordinateGaussNewton, saveCustomDataset, saveSessionToStorage, scoreByEmissionDechirping, simplifyTrajectory4D, slantDistanceMeters, solveRetardedDelaySec, speedOfSoundAtTempMps, synthesizeMultiFlyoverAudio, synthesizeRetardedDopplerCurve, unmatchedObservationLogPenalty };
281
+ export { AdsbPingSchema, AircraftCategorySchema, AsymptoticKinematicsSchema, BUNDLED_CONSTELLATIONS, BUNDLED_DATASET, BUNDLED_DEM_GRID, BUNDLED_GROUND_TRUTH, BUNDLED_SEGMENTS, ConstellationEntrySchema, DEFAULT_ELLIPSE_SEGMENTS, DEFAULT_SOUND_SPEED_MPS, DEFAULT_SPATIAL_RESOLUTION, DopplerDatasetSchema, DopplerObservationSchema, DopplerRidgePointSchema, DopplerSessionEngine, EnfSignatureSchema, FULL_TURN_DEG, GeoPoint3DSchema, HALF_TURN_DEG, HypothesisMatchSchema, LinearFlightSegmentSchema, ListeningEpisodeSchema, LocationHypothesisSchema, LocationSessionSchema, MAX_ALONG_TRACK_WIND_MPS, MicMonitor, QUERY_BUCKET_SPAN, QuietIntervalSchema, SLANT_SIGMA_FLOOR_METERS, SearchConstraintsSchema, Vector3DSchema, buildConstellationIndex, computeDopplerSpectrogram, computeHannPowerSpectrumDb, computeSegmentCpa, computeSingleSpectrogramFrame, decimateAudioStream, decodeAudioFile, decodeSpatialCellCenter, decodeWavBytes, define, deleteSessionFromStorage, designLowPassFirKernel, detectEnfSignature, downmixToMono, effectiveRaySoundSpeedMps, ellipseOutline, encodeSpatialCell, encodeWavPcm16, estimateTempFromCricketChirpsCelsius, expandConstellationQueryKeys, exportSessionJson, extractAsymptoticKinematics, extractDopplerObservations, fft, fisherToConfidenceEllipse95, formatConstellationKey, generateBundledReferenceAudio, generateBundledReferenceWavBytes, geoToEcef, geoToLocalEnu, getOwn, importSessionJson, interpolateTerrainElevationMeters, isWav, loadCustomDataset, loadSessionById, loadSessionsFromStorage, localEnuToGeo, matchesSearchConstraints, recordOf, refineObserverCoordinateGaussNewton, saveCustomDataset, saveSessionToStorage, scoreByEmissionDechirping, simplifyTrajectory4D, slantDistanceMeters, solveRetardedDelaySec, speedOfSoundAtTempMps, synthesizeMultiFlyoverAudio, synthesizeRetardedDopplerCurve, unmatchedObservationLogPenalty };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mearman/doppler",
3
3
  "description": "Offline and real-time aircraft Doppler audio geolocation library, CLI, and PWA",
4
- "version": "1.1.0",
4
+ "version": "1.2.0",
5
5
  "bin": {
6
6
  "doppler": "./dist-cli/doppler.mjs"
7
7
  },