@mearman/doppler 1.1.1 → 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.
@@ -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.1",
4
+ "version": "1.2.0",
5
5
  "bin": {
6
6
  "doppler": "./dist-cli/doppler.mjs"
7
7
  },