Python tool for aircraft Doppler audio geolocation using historical ADS-B flight data (Source-available)
Python acoustic-geolocationads-baircraft-trackingairplaneaudio-forensicsdoppler-effectdoppler-shiftgeolocationosintsignal-processing
Integrate Pages design and add an interactive Doppler explanation (#398)
Cinna Davisf3d8ba57ad07
diff --git a/docs/examples.html b/docs/examples.htmlindex 37a6a1e..e1ce3bf 100644--- a/docs/examples.html+++ b/docs/examples.html@@ -9,8 +9,9 @@<meta name="robots" content="index,follow,max-image-preview:large"><link rel="canonical" href="https://1337isnot1337.github.io/DOPPLERGEIST/examples.html"><link rel="preload" href="site-fonts/GeistSerif-Regular.woff2" as="font" type="font/woff2" crossorigin>-<link rel="stylesheet" href="site.css">-<link rel="icon" href="site-media/dopplergeist-banner-preview.png" type="image/png">+<link rel="stylesheet" href="site.css?v=2">+<script src="site.js?v=2" defer></script>+<link rel="icon" href="site-media/favicon.svg" type="image/svg+xml"><meta property="og:type" content="website"><meta property="og:site_name" content="DOPPLERGEIST"><meta property="og:title" content="Audio Geolocation Examples — DOPPLERGEIST">@@ -31,31 +32,33 @@<a class="skip" href="#main">Skip to content</a><header class="site-header wrap"><a class="brand" href="./" aria-label="DOPPLERGEIST home">DOPPLERGEIST</a>-<nav aria-label="Main navigation"><a href="examples.html" aria-current="page">Examples</a><a href="how-it-works.html">How it works</a><a href="https://github.com/1337isnot1337/DOPPLERGEIST">GitHub <span aria-hidden="true">↗</span></a></nav>+<nav aria-label="Main navigation"><a href="./">Overview</a><a href="examples.html" aria-current="page">Examples</a><a href="how-it-works.html">How it works</a><a class="nav-repo" href="https://github.com/1337isnot1337/DOPPLERGEIST">GitHub <span aria-hidden="true">↗</span></a></nav></header><main id="main">-<section class="page-heading wrap"><h1>From the recordings.</h1><p>Spectrograms, flight matches, and location searches. Select a figure to see it full size.</p></section>+<section class="page-heading wrap"><h1>From the recordings.</h1><p>Real recordings, measured frequency curves, and candidate maps. Each figure shows a different part of the search; a high score alone does not establish a location.</p></section>+<nav class="page-jumps wrap" aria-label="On this page"><a href="#livermore">Livermore</a><a href="#frequency">Frequency</a><a href="#discovery">Discovery</a><a href="#map">Location</a></nav><section class="section first wrap" aria-labelledby="livermore"><div class="section-intro"><h2 id="livermore">Livermore, California</h2><p>The automatic MP3 search and a configured run of the same recording. Both produced ranked candidates without accepting a location. <a href="https://github.com/1337isnot1337/DOPPLERGEIST/blob/main/docs/LIVERMORE_DEMO.md">Read the experiment</a>.</p></div>-<figure class=""><a class="figure-link" href="site-media/livermore-automatic-mp3.png" aria-label="View full-size image: Automatic real MP3 analysis with the observed Doppler curve and ranked locations on a Livermore satellite map"><img src="site-media/livermore-automatic-mp3.webp" srcset="site-media/livermore-automatic-mp3-960.webp 960w, site-media/livermore-automatic-mp3.webp 2610w" sizes="(max-width: 600px) calc(100vw - 40px), (max-width: 900px) calc(100vw - 64px), min(1240px, calc(100vw - 112px))" width="2610" height="1278" fetchpriority="high" alt="Automatic real MP3 analysis with the observed Doppler curve and ranked locations on a Livermore satellite map"></a></figure>-<figure class="separate-figure"><a class="figure-link" href="site-media/livermore-configured.png" aria-label="View full-size image: Configured Livermore search showing a recorded flyover and a bounded map of candidate microphone positions"><img src="site-media/livermore-configured.webp" srcset="site-media/livermore-configured-960.webp 960w, site-media/livermore-configured.webp 2610w" sizes="(max-width: 600px) calc(100vw - 40px), (max-width: 900px) calc(100vw - 64px), min(1240px, calc(100vw - 112px))" width="2610" height="1278" loading="lazy" decoding="async" alt="Configured Livermore search showing a recorded flyover and a bounded map of candidate microphone positions"></a></figure>+<figure class="evidence-figure"><div class="figure-heading"><span>Automatic MP3 search</span><span aria-hidden="true">↗</span></div><a class="figure-link" href="site-media/livermore-automatic-mp3.png" aria-label="View full-size image: Automatic real MP3 analysis with the observed Doppler curve and ranked locations on a Livermore satellite map"><img src="site-media/livermore-automatic-mp3.webp" srcset="site-media/livermore-automatic-mp3-960.webp 960w, site-media/livermore-automatic-mp3.webp 2610w" sizes="(max-width: 700px) calc(100vw - 62px), (max-width: 900px) calc(100vw - 98px), min(1166px, calc(100vw - 146px))" width="2610" height="1278" fetchpriority="high" alt="Automatic real MP3 analysis with the observed Doppler curve and ranked locations on a Livermore satellite map"></a><figcaption>Recorded audio and ranked candidates. The run remained inconclusive.</figcaption></figure>+<figure class="evidence-figure separate-figure"><div class="figure-heading"><span>Configured search</span><span aria-hidden="true">↗</span></div><a class="figure-link" href="site-media/livermore-configured.png" aria-label="View full-size image: Configured Livermore search showing a recorded flyover and a bounded map of candidate microphone positions"><img src="site-media/livermore-configured.webp" srcset="site-media/livermore-configured-960.webp 960w, site-media/livermore-configured.webp 2610w" sizes="(max-width: 700px) calc(100vw - 62px), (max-width: 900px) calc(100vw - 98px), min(1166px, calc(100vw - 146px))" width="2610" height="1278" loading="lazy" decoding="async" alt="Configured Livermore search showing a recorded flyover and a bounded map of candidate microphone positions"></a><figcaption>The same recording with configured event settings. No location was accepted.</figcaption></figure></section><section class="section wrap" aria-labelledby="frequency"><div class="section-intro"><h2 id="frequency">Reading the frequency.</h2><p>Measured tones and the aircraft models fitted to them.</p></div><div class="pair">-<figure class=""><a class="figure-link" href="site-media/measured-event.png" aria-label="View full-size image: Recorded aircraft Doppler ridge and a fitted straight-pass curve"><img src="site-media/measured-event.webp" srcset="site-media/measured-event-960.webp 960w, site-media/measured-event.webp 1500w" sizes="(max-width: 600px) calc(100vw - 40px), (max-width: 900px) calc(100vw - 64px), min(1240px, calc(100vw - 112px))" width="1500" height="600" loading="lazy" decoding="async" alt="Recorded aircraft Doppler ridge and a fitted straight-pass curve"></a></figure>-<figure class=""><a class="figure-link" href="site-media/physical-model.png" aria-label="View full-size image: Observed aircraft spectrogram with a best-fitting sound propagation model"><img src="site-media/physical-model.webp" srcset="site-media/physical-model-960.webp 960w, site-media/physical-model.webp 1600w" sizes="(max-width: 600px) calc(100vw - 40px), (max-width: 900px) calc(100vw - 64px), min(1240px, calc(100vw - 112px))" width="1600" height="640" loading="lazy" decoding="async" alt="Observed aircraft spectrogram with a best-fitting sound propagation model"></a></figure>+<figure class="evidence-figure"><div class="figure-heading"><span>The measured ridge</span><span aria-hidden="true">↗</span></div><a class="figure-link" href="site-media/measured-event.png" aria-label="View full-size image: Recorded aircraft Doppler ridge and a fitted straight-pass curve"><img src="site-media/measured-event.webp" srcset="site-media/measured-event-960.webp 960w, site-media/measured-event.webp 1500w" sizes="(max-width: 700px) calc(100vw - 62px), (max-width: 900px) calc(50vw - 78px), min(554px, calc(50vw - 102px))" width="1500" height="600" loading="lazy" decoding="async" alt="Recorded aircraft Doppler ridge and a fitted straight-pass curve"></a><figcaption>A moving tone in the recording, with a fitted straight-pass curve.</figcaption></figure>+<figure class="evidence-figure"><div class="figure-heading"><span>The flight-path model</span><span aria-hidden="true">↗</span></div><a class="figure-link" href="site-media/physical-model.png" aria-label="View full-size image: Observed aircraft spectrogram with a best-fitting sound propagation model"><img src="site-media/physical-model.webp" srcset="site-media/physical-model-960.webp 960w, site-media/physical-model.webp 1600w" sizes="(max-width: 700px) calc(100vw - 62px), (max-width: 900px) calc(50vw - 78px), min(554px, calc(50vw - 102px))" width="1600" height="640" loading="lazy" decoding="async" alt="Observed aircraft spectrogram with a best-fitting sound propagation model"></a><figcaption>A trajectory-based prediction over the recorded spectrogram.</figcaption></figure></div>-<figure class="separate-figure"><a class="figure-link" href="site-media/track-overlay.png" aria-label="View full-size image: Second recorded flyover with cyan Doppler model over the descending frequency ridge"><img src="site-media/track-overlay.webp" srcset="site-media/track-overlay-960.webp 960w, site-media/track-overlay.webp 1600w" sizes="(max-width: 600px) calc(100vw - 40px), (max-width: 900px) calc(100vw - 64px), min(1240px, calc(100vw - 112px))" width="1600" height="640" loading="lazy" decoding="async" alt="Second recorded flyover with cyan Doppler model over the descending frequency ridge"></a></figure>+<figure class="evidence-figure separate-figure"><div class="figure-heading"><span>A second passage</span><span aria-hidden="true">↗</span></div><a class="figure-link" href="site-media/track-overlay.png" aria-label="View full-size image: Second recorded flyover with cyan Doppler model over the descending frequency ridge"><img src="site-media/track-overlay.webp" srcset="site-media/track-overlay-960.webp 960w, site-media/track-overlay.webp 1600w" sizes="(max-width: 700px) calc(100vw - 62px), (max-width: 900px) calc(100vw - 98px), min(1166px, calc(100vw - 146px))" width="1600" height="640" loading="lazy" decoding="async" alt="Second recorded flyover with cyan Doppler model over the descending frequency ridge"></a><figcaption>A flight-path prediction laid over another recorded frequency ridge.</figcaption></figure></section><section class="section wrap" aria-labelledby="discovery"><div class="section-intro"><h2 id="discovery">Finding the flyovers.</h2><p>Automatic discovery across an entire recording, then a closer look at grouped acoustic traces.</p></div>-<figure class=""><a class="figure-link" href="site-media/discovery-overview.png" aria-label="View full-size image: Whole-recording discovery showing candidate moving-frequency traces over recording time"><img src="site-media/discovery-overview.webp" srcset="site-media/discovery-overview-960.webp 960w, site-media/discovery-overview.webp 1560w" sizes="(max-width: 600px) calc(100vw - 40px), (max-width: 900px) calc(100vw - 64px), min(1240px, calc(100vw - 112px))" width="1560" height="650" loading="lazy" decoding="async" alt="Whole-recording discovery showing candidate moving-frequency traces over recording time"></a></figure>-<figure class="separate-figure"><a class="figure-link" href="site-media/acoustic-families.png" aria-label="View full-size image: Frequency traces grouped into a canonical acoustic episode over 60 seconds"><img src="site-media/acoustic-families.webp" srcset="site-media/acoustic-families-960.webp 960w, site-media/acoustic-families.webp 1560w" sizes="(max-width: 600px) calc(100vw - 40px), (max-width: 900px) calc(100vw - 64px), min(1240px, calc(100vw - 112px))" width="1560" height="650" loading="lazy" decoding="async" alt="Frequency traces grouped into a canonical acoustic episode over 60 seconds"></a></figure>+<figure class="evidence-figure"><div class="figure-heading"><span>Across the recording</span><span aria-hidden="true">↗</span></div><a class="figure-link" href="site-media/discovery-overview.png" aria-label="View full-size image: Whole-recording discovery showing candidate moving-frequency traces over recording time"><img src="site-media/discovery-overview.webp" srcset="site-media/discovery-overview-960.webp 960w, site-media/discovery-overview.webp 1560w" sizes="(max-width: 700px) calc(100vw - 62px), (max-width: 900px) calc(100vw - 98px), min(1166px, calc(100vw - 146px))" width="1560" height="650" loading="lazy" decoding="async" alt="Whole-recording discovery showing candidate moving-frequency traces over recording time"></a><figcaption>Moving-frequency proposals found by the detector; proposals are not confirmed aircraft.</figcaption></figure>+<figure class="evidence-figure separate-figure"><div class="figure-heading"><span>Grouping the traces</span><span aria-hidden="true">↗</span></div><a class="figure-link" href="site-media/acoustic-families.png" aria-label="View full-size image: Frequency traces grouped into a canonical acoustic episode over 60 seconds"><img src="site-media/acoustic-families.webp" srcset="site-media/acoustic-families-960.webp 960w, site-media/acoustic-families.webp 1560w" sizes="(max-width: 700px) calc(100vw - 62px), (max-width: 900px) calc(100vw - 98px), min(1166px, calc(100vw - 146px))" width="1560" height="650" loading="lazy" decoding="async" alt="Frequency traces grouped into a canonical acoustic episode over 60 seconds"></a><figcaption>Related tones are grouped so harmonics do not count as independent flyovers.</figcaption></figure></section><section class="section wrap location-section" aria-labelledby="map"><div><h2 id="map">Searching the map.</h2><p>Each point is a possible microphone location. Color shows the fit score; the star marks the highest score.</p><a class="text-link" href="how-it-works.html">Read the method <span aria-hidden="true">↗</span></a></div>-<figure class=""><a class="figure-link" href="site-media/location-scores.png" aria-label="View full-size image: Geographic grid colored by location fit score, with the highest-scoring position marked by a red star"><img src="site-media/location-scores.webp" srcset="site-media/location-scores-960.webp 960w, site-media/location-scores.webp 1120w" sizes="(max-width: 600px) calc(100vw - 40px), (max-width: 900px) calc(100vw - 64px), min(1240px, calc(100vw - 112px))" width="1120" height="960" loading="lazy" decoding="async" alt="Geographic grid colored by location fit score, with the highest-scoring position marked by a red star"></a></figure>+<figure class="evidence-figure"><div class="figure-heading"><span>The candidate map</span><span aria-hidden="true">↗</span></div><a class="figure-link" href="site-media/location-scores.png" aria-label="View full-size image: Geographic grid colored by location fit score, with the highest-scoring position marked by a red star"><img src="site-media/location-scores.webp" srcset="site-media/location-scores-960.webp 960w, site-media/location-scores.webp 1120w" sizes="(max-width: 700px) calc(100vw - 62px), (max-width: 900px) calc(100vw - 98px), min(1166px, calc(100vw - 146px))" width="1120" height="960" loading="lazy" decoding="async" alt="Geographic grid colored by location fit score, with the highest-scoring position marked by a red star"></a><figcaption>Color encodes fit score, not location probability.</figcaption></figure></section><p class="wrap source-link"><a href="https://github.com/1337isnot1337/DOPPLERGEIST/tree/main/evidence">Browse the source figures</a></p>+<div class="next-page wrap"><span>What connects these figures?</span><a href="how-it-works.html">Understand the method <span aria-hidden="true">→</span></a></div></main><footer class="wrap"><a class="brand" href="./">DOPPLERGEIST</a>diff --git a/docs/how-it-works.html b/docs/how-it-works.htmlindex a4d4417..fae187a 100644--- a/docs/how-it-works.html+++ b/docs/how-it-works.html@@ -9,8 +9,9 @@<meta name="robots" content="index,follow,max-image-preview:large"><link rel="canonical" href="https://1337isnot1337.github.io/DOPPLERGEIST/how-it-works.html"><link rel="preload" href="site-fonts/GeistSerif-Regular.woff2" as="font" type="font/woff2" crossorigin>-<link rel="stylesheet" href="site.css">-<link rel="icon" href="site-media/dopplergeist-banner-preview.png" type="image/png">+<link rel="stylesheet" href="site.css?v=2">+<script src="site.js?v=2" defer></script>+<link rel="icon" href="site-media/favicon.svg" type="image/svg+xml"><meta property="og:type" content="website"><meta property="og:site_name" content="DOPPLERGEIST"><meta property="og:title" content="How Aircraft Doppler Audio Geolocation Works — DOPPLERGEIST">@@ -31,19 +32,40 @@<a class="skip" href="#main">Skip to content</a><header class="site-header wrap"><a class="brand" href="./" aria-label="DOPPLERGEIST home">DOPPLERGEIST</a>-<nav aria-label="Main navigation"><a href="examples.html">Examples</a><a href="how-it-works.html" aria-current="page">How it works</a><a href="https://github.com/1337isnot1337/DOPPLERGEIST">GitHub <span aria-hidden="true">↗</span></a></nav>+<nav aria-label="Main navigation"><a href="./">Overview</a><a href="examples.html">Examples</a><a href="how-it-works.html" aria-current="page">How it works</a><a class="nav-repo" href="https://github.com/1337isnot1337/DOPPLERGEIST">GitHub <span aria-hidden="true">↗</span></a></nav></header><main id="main">-<section class="page-heading wrap"><h1>Sound gives away<br><span>the location.</span></h1><p>A passing aircraft’s pitch changes with its motion relative to the microphone. DOPPLERGEIST matches that change to recorded flight paths.</p></section>-<section class="section first wrap" aria-labelledby="hear"><div class="section-intro"><h2 id="hear">Find the aircraft in the audio.</h2><p>The detector scans the full recording for moving frequency ridges and groups harmonics from the same passage.</p></div>-<figure class=""><a class="figure-link" href="site-media/discovery-overview.png" aria-label="View full-size image: Automatic acoustic discovery plot showing Doppler ridges at multiple times in a real recording"><img src="site-media/discovery-overview.webp" srcset="site-media/discovery-overview-960.webp 960w, site-media/discovery-overview.webp 1560w" sizes="(max-width: 600px) calc(100vw - 40px), (max-width: 900px) calc(100vw - 64px), min(1240px, calc(100vw - 112px))" width="1560" height="650" fetchpriority="high" alt="Automatic acoustic discovery plot showing Doppler ridges at multiple times in a real recording"></a></figure>+<section class="page-heading wrap"><h1>A moving source.<br><span>A changing pitch.</span></h1><p>A passing aircraft’s pitch changes with its motion relative to the microphone. DOPPLERGEIST matches that change to recorded flight paths.</p></section>+<section class="section first wrap" aria-labelledby="pitch"><div class="section-intro"><h2 id="pitch">Why the pitch falls.</h2><p>On approach, each wave has less distance to travel than the one before it. Waves arrive closer together: a higher pitch. As the aircraft recedes, they arrive farther apart: a lower pitch.</p></div><div class="doppler-demo" data-doppler>+<div class="demo-heading"><span class="eyebrow">A passing aircraft, explained</span><span class="demo-phase" data-phase>Approaching · higher pitch</span></div>+<svg class="doppler-scene" viewBox="0 0 1080 490" role="img" aria-labelledby="demo-title demo-desc">+<title id="demo-title">How motion changes the pitch at a microphone</title>+<desc id="demo-desc">An aircraft moves from left to right, emitting evenly timed sound waves. Waves are closer together ahead and farther apart behind. The received pitch drops as the aircraft passes. The diagram includes sound travel time and illustrates a constant tone and speed; it is not recorded data.</desc>+<defs><clipPath id="wave-area"><rect width="1080" height="310"/></clipPath><linearGradient id="curve-color"><stop stop-color="#bba6fa"/><stop offset="1" stop-color="#79e2d1"/></linearGradient></defs>+<g clip-path="url(#wave-area)"><path class="flight-line" d="M40 105H1040"/><g class="wavefronts" data-waves><circle cx="400.0" cy="105" r="42.0"/><circle cx="380.0" cy="105" r="98.0"/><circle cx="360.0" cy="105" r="154.0"/><circle cx="340.0" cy="105" r="210.0"/><circle cx="320.0" cy="105" r="266.0"/><circle cx="300.0" cy="105" r="322.0"/><circle cx="280.0" cy="105" r="378.0"/><circle cx="260.0" cy="105" r="434.0"/><circle cx="240.0" cy="105" r="490.0"/><circle cx="220.0" cy="105" r="546.0"/><circle cx="200.0" cy="105" r="602.0"/><circle cx="180.0" cy="105" r="658.0"/></g>+<g class="aircraft" data-plane transform="translate(415 105)"><path d="M22 0 0-5-14-23-21-23-14-4-29-7-33-3-23 0-33 3-29 7-14 4-21 23-14 23 0 5Z"/></g>+<path class="sound-link" data-sound-link d="M316.97 105L540 265"/>+<circle class="receiver-halo" cx="540" cy="265" r="21"/><g class="receiver"><rect x="536" y="252" width="8" height="15" rx="4"/><path d="M532 262v3a8 8 0 0 0 16 0v-3m-8 11v7m-6 0h12"/></g>+</g>+<text x="44" y="40">AIRCRAFT MOTION →</text><text x="577" y="271">Microphone</text>+<path class="chart-grid" d="M80 340V456H1000M80 405H1000"/>+<text x="80" y="330">RECEIVED PITCH</text><text x="1000" y="395" text-anchor="end">Source pitch</text>+<path class="pitch-curve" d="M80.00,337.05 L84.60,337.13 L89.20,337.21 L93.80,337.29 L98.40,337.37 L103.00,337.46 L107.60,337.54 L112.20,337.63 L116.80,337.72 L121.40,337.82 L126.00,337.91 L130.60,338.01 L135.20,338.12 L139.80,338.22 L144.40,338.33 L149.00,338.44 L153.60,338.56 L158.20,338.67 L162.80,338.79 L167.40,338.92 L172.00,339.05 L176.60,339.18 L181.20,339.31 L185.80,339.45 L190.40,339.60 L195.00,339.75 L199.60,339.90 L204.20,340.06 L208.80,340.22 L213.40,340.39 L218.00,340.56 L222.60,340.74 L227.20,340.93 L231.80,341.12 L236.40,341.31 L241.00,341.52 L245.60,341.73 L250.20,341.94 L254.80,342.17 L259.40,342.40 L264.00,342.64 L268.60,342.88 L273.20,343.14 L277.80,343.40 L282.40,343.68 L287.00,343.96 L291.60,344.25 L296.20,344.55 L300.80,344.87 L305.40,345.19 L310.00,345.53 L314.60,345.87 L319.20,346.23 L323.80,346.61 L328.40,346.99 L333.00,347.39 L337.60,347.80 L342.20,348.23 L346.80,348.68 L351.40,349.14 L356.00,349.61 L360.60,350.11 L365.20,350.62 L369.80,351.14 L374.40,351.69 L379.00,352.26 L383.60,352.85 L388.20,353.45 L392.80,354.08 L397.40,354.73 L402.00,355.40 L406.60,356.10 L411.20,356.81 L415.80,357.55 L420.40,358.32 L425.00,359.11 L429.60,359.92 L434.20,360.76 L438.80,361.62 L443.40,362.51 L448.00,363.42 L452.60,364.36 L457.20,365.32 L461.80,366.31 L466.40,367.32 L471.00,368.36 L475.60,369.41 L480.20,370.49 L484.80,371.60 L489.40,372.72 L494.00,373.86 L498.60,375.02 L503.20,376.19 L507.80,377.38 L512.40,378.59 L517.00,379.80 L521.60,381.03 L526.20,382.26 L530.80,383.50 L535.40,384.75 L540.00,385.99 L544.60,387.24 L549.20,388.48 L553.80,389.72 L558.40,390.96 L563.00,392.18 L567.60,393.40 L572.20,394.60 L576.80,395.79 L581.40,396.97 L586.00,398.13 L590.60,399.27 L595.20,400.39 L599.80,401.49 L604.40,402.57 L609.00,403.63 L613.60,404.67 L618.20,405.68 L622.80,406.67 L627.40,407.63 L632.00,408.57 L636.60,409.48 L641.20,410.37 L645.80,411.23 L650.40,412.07 L655.00,412.88 L659.60,413.67 L664.20,414.44 L668.80,415.18 L673.40,415.89 L678.00,416.59 L682.60,417.26 L687.20,417.91 L691.80,418.54 L696.40,419.14 L701.00,419.73 L705.60,420.30 L710.20,420.84 L714.80,421.37 L719.40,421.88 L724.00,422.38 L728.60,422.85 L733.20,423.31 L737.80,423.76 L742.40,424.18 L747.00,424.60 L751.60,425.00 L756.20,425.38 L760.80,425.76 L765.40,426.11 L770.00,426.46 L774.60,426.80 L779.20,427.12 L783.80,427.43 L788.40,427.74 L793.00,428.03 L797.60,428.31 L802.20,428.59 L806.80,428.85 L811.40,429.10 L816.00,429.35 L820.60,429.59 L825.20,429.82 L829.80,430.05 L834.40,430.26 L839.00,430.47 L843.60,430.68 L848.20,430.87 L852.80,431.06 L857.40,431.25 L862.00,431.43 L866.60,431.60 L871.20,431.77 L875.80,431.93 L880.40,432.09 L885.00,432.24 L889.60,432.39 L894.20,432.53 L898.80,432.67 L903.40,432.81 L908.00,432.94 L912.60,433.07 L917.20,433.19 L921.80,433.32 L926.40,433.43 L931.00,433.55 L935.60,433.66 L940.20,433.77 L944.80,433.87 L949.40,433.97 L954.00,434.07 L958.60,434.17 L963.20,434.26 L967.80,434.36 L972.40,434.45 L977.00,434.53 L981.60,434.62 L986.20,434.70 L990.80,434.78 L995.40,434.86 L1000.00,434.94"/><path class="chart-cursor" data-cursor d="M375.71 340V456"/><circle class="pitch-dot" data-dot cx="375.71" cy="351.85" r="6"/>+<text x="80" y="482">Approach</text><text x="1000" y="482" text-anchor="end">Recession · time →</text>+</svg>+<div class="demo-controls" hidden><button type="button" class="play-button" data-play>Play flyover</button><label class="timeline-label">Flyover position<input data-time type="range" min="0" max="1000" value="321" aria-label="Scrub through the flyover"></label><output data-pitch>Higher pitch</output></div>+<p class="demo-note">Illustration · constant speed and tone, stationary microphone. The dashed line traces the sound arriving now back to its emission point.</p>+</div><details class="physics-detail"><summary>The physics behind the curve</summary><div><p>For a steady source tone and a stationary microphone, the received frequency is <code>f = f₀ c / (c + vᵣ)</code>. Here <code>f₀</code> is the source frequency, <code>c</code> is sound speed, and <code>vᵣ</code> is radial velocity at emission, positive when moving away.</p><p>Sound emitted at time <code>τ</code> arrives at <code>t = τ + r(τ) / c</code>. The model solves for that emission time before calculating the pitch. The sound of closest approach arrives after the aircraft has passed.</p><a href="https://github.com/1337isnot1337/DOPPLERGEIST/blob/main/docs/METHODOLOGY.md#physical-model-and-sign-convention">Read the physical model ↗</a></div></details></section>+<nav class="page-jumps wrap" aria-label="On this page"><a href="#hear">Detect</a><a href="#flight">Match</a><a href="#search">Locate</a><a href="#run">Run locally</a></nav>+<section class="section wrap" aria-labelledby="hear"><div class="section-intro"><h2 id="hear">Find the aircraft in the audio.</h2><p>The detector scans the full recording for moving frequency ridges and groups harmonics from the same passage.</p></div>+<figure class="evidence-figure"><div class="figure-heading"><span>Across the recording</span><span aria-hidden="true">↗</span></div><a class="figure-link" href="site-media/discovery-overview.png" aria-label="View full-size image: Automatic acoustic discovery plot showing Doppler ridges at multiple times in a real recording"><img src="site-media/discovery-overview.webp" srcset="site-media/discovery-overview-960.webp 960w, site-media/discovery-overview.webp 1560w" sizes="(max-width: 700px) calc(100vw - 62px), (max-width: 900px) calc(100vw - 98px), min(1166px, calc(100vw - 146px))" width="1560" height="650" loading="lazy" decoding="async" alt="Automatic acoustic discovery plot showing Doppler ridges at multiple times in a real recording"></a><figcaption>Moving-frequency proposals found by the detector; proposals are not confirmed aircraft.</figcaption></figure></section><section class="section wrap" aria-labelledby="flight"><div class="section-intro"><h2 id="flight">Match the flight path.</h2><p>Historical ADS-B data supplies aircraft positions and velocities. The model predicts the sound received at each possible microphone position, including its travel time.</p></div>-<figure class=""><a class="figure-link" href="site-media/physical-model.png" aria-label="View full-size image: Cyan sound-propagation model aligned with a measured aircraft Doppler curve"><img src="site-media/physical-model.webp" srcset="site-media/physical-model-960.webp 960w, site-media/physical-model.webp 1600w" sizes="(max-width: 600px) calc(100vw - 40px), (max-width: 900px) calc(100vw - 64px), min(1240px, calc(100vw - 112px))" width="1600" height="640" loading="lazy" decoding="async" alt="Cyan sound-propagation model aligned with a measured aircraft Doppler curve"></a></figure>+<figure class="evidence-figure"><div class="figure-heading"><span>The flight-path model</span><span aria-hidden="true">↗</span></div><a class="figure-link" href="site-media/physical-model.png" aria-label="View full-size image: Cyan sound-propagation model aligned with a measured aircraft Doppler curve"><img src="site-media/physical-model.webp" srcset="site-media/physical-model-960.webp 960w, site-media/physical-model.webp 1600w" sizes="(max-width: 700px) calc(100vw - 62px), (max-width: 900px) calc(100vw - 98px), min(1166px, calc(100vw - 146px))" width="1600" height="640" loading="lazy" decoding="async" alt="Cyan sound-propagation model aligned with a measured aircraft Doppler curve"></a><figcaption>A trajectory-based prediction over the recorded spectrogram.</figcaption></figure></section><section class="section wrap location-section" aria-labelledby="search"><div><h2 id="search">Find the shared position.</h2><p>The search fits independent flyovers to one location and recording clock. Terrain and aircraft altitude enter the sound-propagation calculation.</p><p>The result includes ranked locations and a decision. Ambiguous matches or incomplete coverage produce an inconclusive result.</p><a class="text-link" href="https://github.com/1337isnot1337/DOPPLERGEIST/blob/main/docs/CONFIDENCE.md">Decision rules <span aria-hidden="true">↗</span></a></div>-<figure class=""><a class="figure-link" href="site-media/location-scores.png" aria-label="View full-size image: Scored microphone positions on a geographic grid, with the highest score marked by a star"><img src="site-media/location-scores.webp" srcset="site-media/location-scores-960.webp 960w, site-media/location-scores.webp 1120w" sizes="(max-width: 600px) calc(100vw - 40px), (max-width: 900px) calc(100vw - 64px), min(1240px, calc(100vw - 112px))" width="1120" height="960" loading="lazy" decoding="async" alt="Scored microphone positions on a geographic grid, with the highest score marked by a star"></a></figure>+<figure class="evidence-figure"><div class="figure-heading"><span>The candidate map</span><span aria-hidden="true">↗</span></div><a class="figure-link" href="site-media/location-scores.png" aria-label="View full-size image: Scored microphone positions on a geographic grid, with the highest score marked by a star"><img src="site-media/location-scores.webp" srcset="site-media/location-scores-960.webp 960w, site-media/location-scores.webp 1120w" sizes="(max-width: 700px) calc(100vw - 62px), (max-width: 900px) calc(100vw - 98px), min(1166px, calc(100vw - 146px))" width="1120" height="960" loading="lazy" decoding="async" alt="Scored microphone positions on a geographic grid, with the highest score marked by a star"></a><figcaption>Color encodes fit score, not location probability.</figcaption></figure></section><section class="section wrap setup" aria-labelledby="run"><h2 id="run">Run it locally.</h2><p>Install Python 3.11 or later and FFmpeg, then start the local upload interface.</p><pre><code>git clone https://github.com/1337isnot1337/DOPPLERGEIST.git@@ -53,6 +75,7 @@ python -m venv .venv.venv/bin/dopplergeist serve --jobs jobs --online --port 8765</code></pre><p>Open <code>http://127.0.0.1:8765</code> and provide your audio and recording-time window. File upload time does not establish when the audio was recorded.</p><a class="text-link" href="https://github.com/1337isnot1337/DOPPLERGEIST/blob/main/docs/SETUP.md">Full setup instructions <span aria-hidden="true">↗</span></a></section>+<div class="next-page wrap"><span>See the method in recorded data</span><a href="examples.html">Explore the examples <span aria-hidden="true">→</span></a></div></main><footer class="wrap"><a class="brand" href="./">DOPPLERGEIST</a>diff --git a/docs/index.html b/docs/index.htmlindex c6c9cfc..6da1183 100644--- a/docs/index.html+++ b/docs/index.html@@ -9,8 +9,9 @@<meta name="robots" content="index,follow,max-image-preview:large"><link rel="canonical" href="https://1337isnot1337.github.io/DOPPLERGEIST/"><link rel="preload" href="site-fonts/GeistSerif-Regular.woff2" as="font" type="font/woff2" crossorigin>-<link rel="stylesheet" href="site.css">-<link rel="icon" href="site-media/dopplergeist-banner-preview.png" type="image/png">+<link rel="stylesheet" href="site.css?v=2">+<script src="site.js?v=2" defer></script>+<link rel="icon" href="site-media/favicon.svg" type="image/svg+xml"><meta property="og:type" content="website"><meta property="og:site_name" content="DOPPLERGEIST"><meta property="og:title" content="DOPPLERGEIST — Aircraft Doppler Audio Geolocation">@@ -31,34 +32,49 @@<a class="skip" href="#main">Skip to content</a><header class="site-header wrap"><a class="brand" href="./" aria-label="DOPPLERGEIST home">DOPPLERGEIST</a>-<nav aria-label="Main navigation"><a href="examples.html">Examples</a><a href="how-it-works.html">How it works</a><a href="https://github.com/1337isnot1337/DOPPLERGEIST">GitHub <span aria-hidden="true">↗</span></a></nav>+<nav aria-label="Main navigation"><a href="./" aria-current="page">Overview</a><a href="examples.html">Examples</a><a href="how-it-works.html">How it works</a><a class="nav-repo" href="https://github.com/1337isnot1337/DOPPLERGEIST">GitHub <span aria-hidden="true">↗</span></a></nav></header><main id="main"><section class="hero wrap">-<h1>Find where a<br><span>recording was made.</span></h1>-<p>DOPPLERGEIST geolocates audio by matching the sound of passing aircraft to historical flight paths.</p>-<img class="banner" src="site-media/dopplergeist-banner.svg" width="1400" height="289" fetchpriority="high" alt="A descending violet-to-mint Doppler curve crossing an airplane, from the DOPPLERGEIST project banner">+<p class="eyebrow">Aircraft audio geolocation</p>+<div class="hero-copy"><h1>A flight leaves<br>a trace <span>in sound.</span></h1><div><p>DOPPLERGEIST uses the changing pitch of passing aircraft and historical flight paths to search for where a recording was made.</p><div class="hero-links"><a class="text-link" href="how-it-works.html">Explore the method <span aria-hidden="true">→</span></a><a href="examples.html">See real recordings</a></div></div></div>+<div class="doppler-demo" data-doppler>+<div class="demo-heading"><span class="eyebrow">A passing aircraft, explained</span><span class="demo-phase" data-phase>Approaching · higher pitch</span></div>+<svg class="doppler-scene" viewBox="0 0 1080 490" role="img" aria-labelledby="demo-title demo-desc">+<title id="demo-title">How motion changes the pitch at a microphone</title>+<desc id="demo-desc">An aircraft moves from left to right, emitting evenly timed sound waves. Waves are closer together ahead and farther apart behind. The received pitch drops as the aircraft passes. The diagram includes sound travel time and illustrates a constant tone and speed; it is not recorded data.</desc>+<defs><clipPath id="wave-area"><rect width="1080" height="310"/></clipPath><linearGradient id="curve-color"><stop stop-color="#bba6fa"/><stop offset="1" stop-color="#79e2d1"/></linearGradient></defs>+<g clip-path="url(#wave-area)"><path class="flight-line" d="M40 105H1040"/><g class="wavefronts" data-waves><circle cx="400.0" cy="105" r="42.0"/><circle cx="380.0" cy="105" r="98.0"/><circle cx="360.0" cy="105" r="154.0"/><circle cx="340.0" cy="105" r="210.0"/><circle cx="320.0" cy="105" r="266.0"/><circle cx="300.0" cy="105" r="322.0"/><circle cx="280.0" cy="105" r="378.0"/><circle cx="260.0" cy="105" r="434.0"/><circle cx="240.0" cy="105" r="490.0"/><circle cx="220.0" cy="105" r="546.0"/><circle cx="200.0" cy="105" r="602.0"/><circle cx="180.0" cy="105" r="658.0"/></g>+<g class="aircraft" data-plane transform="translate(415 105)"><path d="M22 0 0-5-14-23-21-23-14-4-29-7-33-3-23 0-33 3-29 7-14 4-21 23-14 23 0 5Z"/></g>+<path class="sound-link" data-sound-link d="M316.97 105L540 265"/>+<circle class="receiver-halo" cx="540" cy="265" r="21"/><g class="receiver"><rect x="536" y="252" width="8" height="15" rx="4"/><path d="M532 262v3a8 8 0 0 0 16 0v-3m-8 11v7m-6 0h12"/></g>+</g>+<text x="44" y="40">AIRCRAFT MOTION →</text><text x="577" y="271">Microphone</text>+<path class="chart-grid" d="M80 340V456H1000M80 405H1000"/>+<text x="80" y="330">RECEIVED PITCH</text><text x="1000" y="395" text-anchor="end">Source pitch</text>+<path class="pitch-curve" d="M80.00,337.05 L84.60,337.13 L89.20,337.21 L93.80,337.29 L98.40,337.37 L103.00,337.46 L107.60,337.54 L112.20,337.63 L116.80,337.72 L121.40,337.82 L126.00,337.91 L130.60,338.01 L135.20,338.12 L139.80,338.22 L144.40,338.33 L149.00,338.44 L153.60,338.56 L158.20,338.67 L162.80,338.79 L167.40,338.92 L172.00,339.05 L176.60,339.18 L181.20,339.31 L185.80,339.45 L190.40,339.60 L195.00,339.75 L199.60,339.90 L204.20,340.06 L208.80,340.22 L213.40,340.39 L218.00,340.56 L222.60,340.74 L227.20,340.93 L231.80,341.12 L236.40,341.31 L241.00,341.52 L245.60,341.73 L250.20,341.94 L254.80,342.17 L259.40,342.40 L264.00,342.64 L268.60,342.88 L273.20,343.14 L277.80,343.40 L282.40,343.68 L287.00,343.96 L291.60,344.25 L296.20,344.55 L300.80,344.87 L305.40,345.19 L310.00,345.53 L314.60,345.87 L319.20,346.23 L323.80,346.61 L328.40,346.99 L333.00,347.39 L337.60,347.80 L342.20,348.23 L346.80,348.68 L351.40,349.14 L356.00,349.61 L360.60,350.11 L365.20,350.62 L369.80,351.14 L374.40,351.69 L379.00,352.26 L383.60,352.85 L388.20,353.45 L392.80,354.08 L397.40,354.73 L402.00,355.40 L406.60,356.10 L411.20,356.81 L415.80,357.55 L420.40,358.32 L425.00,359.11 L429.60,359.92 L434.20,360.76 L438.80,361.62 L443.40,362.51 L448.00,363.42 L452.60,364.36 L457.20,365.32 L461.80,366.31 L466.40,367.32 L471.00,368.36 L475.60,369.41 L480.20,370.49 L484.80,371.60 L489.40,372.72 L494.00,373.86 L498.60,375.02 L503.20,376.19 L507.80,377.38 L512.40,378.59 L517.00,379.80 L521.60,381.03 L526.20,382.26 L530.80,383.50 L535.40,384.75 L540.00,385.99 L544.60,387.24 L549.20,388.48 L553.80,389.72 L558.40,390.96 L563.00,392.18 L567.60,393.40 L572.20,394.60 L576.80,395.79 L581.40,396.97 L586.00,398.13 L590.60,399.27 L595.20,400.39 L599.80,401.49 L604.40,402.57 L609.00,403.63 L613.60,404.67 L618.20,405.68 L622.80,406.67 L627.40,407.63 L632.00,408.57 L636.60,409.48 L641.20,410.37 L645.80,411.23 L650.40,412.07 L655.00,412.88 L659.60,413.67 L664.20,414.44 L668.80,415.18 L673.40,415.89 L678.00,416.59 L682.60,417.26 L687.20,417.91 L691.80,418.54 L696.40,419.14 L701.00,419.73 L705.60,420.30 L710.20,420.84 L714.80,421.37 L719.40,421.88 L724.00,422.38 L728.60,422.85 L733.20,423.31 L737.80,423.76 L742.40,424.18 L747.00,424.60 L751.60,425.00 L756.20,425.38 L760.80,425.76 L765.40,426.11 L770.00,426.46 L774.60,426.80 L779.20,427.12 L783.80,427.43 L788.40,427.74 L793.00,428.03 L797.60,428.31 L802.20,428.59 L806.80,428.85 L811.40,429.10 L816.00,429.35 L820.60,429.59 L825.20,429.82 L829.80,430.05 L834.40,430.26 L839.00,430.47 L843.60,430.68 L848.20,430.87 L852.80,431.06 L857.40,431.25 L862.00,431.43 L866.60,431.60 L871.20,431.77 L875.80,431.93 L880.40,432.09 L885.00,432.24 L889.60,432.39 L894.20,432.53 L898.80,432.67 L903.40,432.81 L908.00,432.94 L912.60,433.07 L917.20,433.19 L921.80,433.32 L926.40,433.43 L931.00,433.55 L935.60,433.66 L940.20,433.77 L944.80,433.87 L949.40,433.97 L954.00,434.07 L958.60,434.17 L963.20,434.26 L967.80,434.36 L972.40,434.45 L977.00,434.53 L981.60,434.62 L986.20,434.70 L990.80,434.78 L995.40,434.86 L1000.00,434.94"/><path class="chart-cursor" data-cursor d="M375.71 340V456"/><circle class="pitch-dot" data-dot cx="375.71" cy="351.85" r="6"/>+<text x="80" y="482">Approach</text><text x="1000" y="482" text-anchor="end">Recession · time →</text>+</svg>+<div class="demo-controls" hidden><button type="button" class="play-button" data-play>Play flyover</button><label class="timeline-label">Flyover position<input data-time type="range" min="0" max="1000" value="321" aria-label="Scrub through the flyover"></label><output data-pitch>Higher pitch</output></div>+<p class="demo-note">Illustration · constant speed and tone, stationary microphone. The dashed line traces the sound arriving now back to its emission point.</p>+</div><p class="hero-footnote">The pitch curve is a clue. Matching independent flyovers to the same place and time is the test.</p></section><section class="section wrap" aria-labelledby="livermore">-<div class="section-intro"><h2 id="livermore">An aircraft over Livermore.</h2><p>An MP3 recorded in Livermore, matched against 466 nearby aircraft.</p></div>-<figure class=""><a class="figure-link" href="site-media/livermore-automatic-mp3.png" aria-label="View full-size image: Recorded aircraft frequency falling from 160 to 100 Hz beside a satellite map of ranked recording locations in Livermore"><img src="site-media/livermore-automatic-mp3.webp" srcset="site-media/livermore-automatic-mp3-960.webp 960w, site-media/livermore-automatic-mp3.webp 2610w" sizes="(max-width: 600px) calc(100vw - 40px), (max-width: 900px) calc(100vw - 64px), min(1240px, calc(100vw - 112px))" width="2610" height="1278" loading="lazy" decoding="async" alt="Recorded aircraft frequency falling from 160 to 100 Hz beside a satellite map of ranked recording locations in Livermore"></a></figure>+<div class="section-intro"><h2 id="livermore">An aircraft over Livermore.</h2><p>An MP3 recorded in Livermore, searched against 466 nearby aircraft. The search ranked candidate locations but did not accept a location.</p></div>+<figure class="evidence-figure"><div class="figure-heading"><span>Automatic MP3 search</span><span aria-hidden="true">↗</span></div><a class="figure-link" href="site-media/livermore-automatic-mp3.png" aria-label="View full-size image: Recorded aircraft frequency falling from 160 to 100 Hz beside a satellite map of ranked recording locations in Livermore"><img src="site-media/livermore-automatic-mp3.webp" srcset="site-media/livermore-automatic-mp3-960.webp 960w, site-media/livermore-automatic-mp3.webp 2610w" sizes="(max-width: 700px) calc(100vw - 62px), (max-width: 900px) calc(100vw - 98px), min(1166px, calc(100vw - 146px))" width="2610" height="1278" loading="lazy" decoding="async" alt="Recorded aircraft frequency falling from 160 to 100 Hz beside a satellite map of ranked recording locations in Livermore"></a><figcaption>Recorded audio and ranked candidates. The run remained inconclusive.</figcaption></figure><p class="section-link"><a href="https://github.com/1337isnot1337/DOPPLERGEIST/blob/main/docs/LIVERMORE_DEMO.md#all-aircraft-archive-mp3-ranking">View the experiment <span aria-hidden="true">↗</span></a></p></section>-<section class="section wrap" aria-labelledby="doppler">-<div class="section-intro"><h2 id="doppler">The Doppler shift, visible.</h2><p>Pitch falls as an aircraft passes. That curve connects the recording to the aircraft’s motion.</p></div>-<div class="pair">-<figure class=""><a class="figure-link" href="site-media/measured-event.png" aria-label="View full-size image: Purple spectrogram showing a descending aircraft frequency ridge, with a green fitted curve"><img src="site-media/measured-event.webp" srcset="site-media/measured-event-960.webp 960w, site-media/measured-event.webp 1500w" sizes="(max-width: 600px) calc(100vw - 40px), (max-width: 900px) calc(100vw - 64px), min(1240px, calc(100vw - 112px))" width="1500" height="600" loading="lazy" decoding="async" alt="Purple spectrogram showing a descending aircraft frequency ridge, with a green fitted curve"></a></figure>-<figure class=""><a class="figure-link" href="site-media/physical-model.png" aria-label="View full-size image: The same recorded spectrogram with a cyan flight-path Doppler model following the observed frequency"><img src="site-media/physical-model.webp" srcset="site-media/physical-model-960.webp 960w, site-media/physical-model.webp 1600w" sizes="(max-width: 600px) calc(100vw - 40px), (max-width: 900px) calc(100vw - 64px), min(1240px, calc(100vw - 112px))" width="1600" height="640" loading="lazy" decoding="async" alt="The same recorded spectrogram with a cyan flight-path Doppler model following the observed frequency"></a></figure>-</div>-<p class="section-link"><a href="how-it-works.html">How audio geolocation works <span aria-hidden="true">↗</span></a></p>-</section>+<section class="section wrap method-summary" aria-labelledby="doppler">+<div class="section-intro"><h2 id="doppler">From a pitch curve<br>to a place on the map.</h2><p>A single sound can fit more than one flight. The search needs the recording, the flight history, and a consistent explanation for both.</p></div>+<ol class="method-steps"><li><h3>Read the sound.</h3><p>Find moving tones across the recording. Group related harmonics into one passage.</p></li><li><h3>Follow the aircraft.</h3><p>Use historical ADS-B positions to predict the pitch at each possible microphone location.</p></li><li><h3>Test the fit.</h3><p>Match independent flyovers to one location and clock. Return inconclusive when the evidence falls short.</p></li></ol>+<p class="section-link"><a href="how-it-works.html">Follow the method <span aria-hidden="true">→</span></a></p></section><section class="section wrap" aria-labelledby="flyovers"><div class="section-intro"><h2 id="flyovers">More flyovers. One location.</h2><p>DOPPLERGEIST scans the whole recording and fits independent flyovers to a shared microphone position and clock.</p></div>-<figure class=""><a class="figure-link" href="site-media/discovery-overview.png" aria-label="View full-size image: Automatically detected moving-frequency traces spread across an hour-long recording"><img src="site-media/discovery-overview.webp" srcset="site-media/discovery-overview-960.webp 960w, site-media/discovery-overview.webp 1560w" sizes="(max-width: 600px) calc(100vw - 40px), (max-width: 900px) calc(100vw - 64px), min(1240px, calc(100vw - 112px))" width="1560" height="650" loading="lazy" decoding="async" alt="Automatically detected moving-frequency traces spread across an hour-long recording"></a></figure>+<figure class="evidence-figure"><div class="figure-heading"><span>Across the recording</span><span aria-hidden="true">↗</span></div><a class="figure-link" href="site-media/discovery-overview.png" aria-label="View full-size image: Automatically detected moving-frequency traces spread across an hour-long recording"><img src="site-media/discovery-overview.webp" srcset="site-media/discovery-overview-960.webp 960w, site-media/discovery-overview.webp 1560w" sizes="(max-width: 700px) calc(100vw - 62px), (max-width: 900px) calc(100vw - 98px), min(1166px, calc(100vw - 146px))" width="1560" height="650" loading="lazy" decoding="async" alt="Automatically detected moving-frequency traces spread across an hour-long recording"></a><figcaption>Moving-frequency proposals found by the detector; proposals are not confirmed aircraft.</figcaption></figure><p class="section-link"><a href="examples.html">See the example gallery <span aria-hidden="true">↗</span></a></p></section>-<section class="closing wrap"><h2>Start with a recording.</h2><p>Run DOPPLERGEIST locally with your audio and its recording-time window.</p><a class="text-link" href="https://github.com/1337isnot1337/DOPPLERGEIST#quickstart">Get DOPPLERGEIST <span aria-hidden="true">↗</span></a></section>+<section class="closing wrap"><h2>Start with a recording.</h2><p>Run DOPPLERGEIST locally with your audio and its recording-time window.</p><a class="text-link" href="how-it-works.html#run">Get DOPPLERGEIST <span aria-hidden="true">↗</span></a></section></main><footer class="wrap">diff --git a/docs/site-media/favicon.svg b/docs/site-media/favicon.svgnew file mode 100644index 0000000..7e79195--- /dev/null+++ b/docs/site-media/favicon.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" rx="14" fill="#090e21"/><path d="M10 18C34 18 30 46 54 46" fill="none" stroke="#bba6fa" stroke-width="5"/><circle cx="32" cy="32" r="7" fill="#79e2d1"/></svg>diff --git a/docs/site.css b/docs/site.cssindex 42c5743..31030af 100644--- a/docs/site.css+++ b/docs/site.css@@ -1,110 +1,171 @@-@font-face {- font-family: "Geist Serif";- src: url("site-fonts/GeistSerif-Regular.woff2") format("woff2");- font-style: normal;- font-weight: 400;- font-display: swap;-}-@font-face {- font-family: "Geist";- src: url("site-fonts/Geist-Regular.woff2") format("woff2");- font-style: normal;- font-weight: 400;- font-display: swap;-}-:root {- color-scheme: dark;- --bg: #090e21;- --text: #f7f1ff;- --muted: #b5bdd4;- --lilac: #bba6fa;- --mint: #79e2d1;- --line: #2b344f;-}+@font-face { font-family: "Geist Serif"; src: url("site-fonts/GeistSerif-Regular.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }+@font-face { font-family: "Geist"; src: url("site-fonts/Geist-Regular.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }+:root { color-scheme: dark; --bg: #090e21; --surface: #10172b; --text: #f7f1ff; --muted: #b5bdd4; --lilac: #bba6fa; --mint: #79e2d1; --line: #2b344f; }* { box-sizing: border-box; }-html { scroll-behavior: smooth; }-body { margin: 0; background: var(--bg); color: var(--text); font: 400 18px/1.6 "Geist", Arial, sans-serif; -webkit-font-smoothing: antialiased; }+html { scroll-behavior: smooth; scroll-padding-top: 32px; }+body { margin: 0; background: var(--bg); color: var(--text); font: 400 18px/1.65 "Geist", Arial, sans-serif; -webkit-font-smoothing: antialiased; }h1, h2, .brand { font-family: "Geist Serif", Georgia, serif; font-weight: 400; }-h1, h2, p, figure { margin: 0; }-h1 { font-size: clamp(64px, 7.5vw, 108px); line-height: 1.04; letter-spacing: -.035em; }+h1, h2, h3, p, figure { margin: 0; }+h1 { font-size: clamp(56px, 6.6vw, 94px); line-height: 1.06; letter-spacing: -.035em; text-wrap: balance; }h1 span { color: var(--lilac); }-h2 { font-size: clamp(36px, 4.1vw, 58px); line-height: 1.12; letter-spacing: -.025em; text-wrap: balance; }-a { color: inherit; text-underline-offset: .24em; text-decoration-thickness: 1px; }+h2 { font-size: clamp(36px, 4vw, 56px); line-height: 1.14; letter-spacing: -.025em; text-wrap: balance; }+h3 { font-size: 21px; font-weight: 400; }+a { color: inherit; text-underline-offset: .25em; text-decoration-thickness: 1px; }a:hover { color: var(--mint); }-a:focus-visible { outline: 2px solid var(--mint); outline-offset: 6px; }+:focus-visible { outline: 2px solid var(--mint); outline-offset: 6px; }img { display: block; max-width: 100%; height: auto; }+button, input { font: inherit; }+button { cursor: pointer; }+[hidden] { display: none !important; }::selection { background: var(--lilac); color: var(--bg); }-.wrap { width: min(1240px, calc(100% - 112px)); margin-inline: auto; }-.skip { position: absolute; top: 12px; left: 12px; transform: translateY(-180%); z-index: 2; background: var(--mint); color: var(--bg); padding: 10px 20px; }+.wrap { width: min(1200px, calc(100% - 112px)); margin-inline: auto; }+.skip { position: absolute; top: 12px; left: 12px; transform: translateY(-180%); z-index: 5; background: var(--mint); color: var(--bg); padding: 10px 20px; }.skip:focus { transform: none; }.site-header { min-height: 98px; display: flex; align-items: center; justify-content: space-between; gap: 32px; border-bottom: 1px solid var(--line); }.brand { font-size: 25px; letter-spacing: .015em; text-decoration: none; }-nav { display: flex; gap: 30px; align-items: center; font-size: 15px; }-nav a { text-decoration: none; }-nav a[aria-current="page"] { color: var(--mint); }-.hero { padding-top: 76px; }-.hero > p { max-width: 625px; margin-top: 27px; font-size: 21px; line-height: 1.55; color: var(--muted); }-.banner { width: 100%; margin-top: 48px; }-.section { padding-top: 112px; }-.section-intro { margin-bottom: 35px; }-.section-intro p { color: var(--muted); max-width: 660px; margin-top: 17px; }-.figure-link { display: block; cursor: zoom-in; }+nav { display: flex; gap: 28px; align-items: center; font-size: 14px; }+nav a { text-decoration: none; padding-block: 10px; }+nav a[aria-current="page"] { color: var(--mint); text-decoration: underline; text-underline-offset: 8px; }+.nav-repo { border-left: 1px solid var(--line); padding-left: 28px; }+.hero { padding-top: 62px; }+.eyebrow { color: var(--muted); font-size: 12px; letter-spacing: .13em; text-transform: uppercase; }+.hero-copy { display: grid; grid-template-columns: 1.35fr 1fr; gap: 6%; align-items: end; margin-top: 24px; }+.hero-copy h1 { font-size: clamp(54px, 5.6vw, 80px); }+.hero-copy > div { padding-bottom: 7px; }+.hero-copy p { color: var(--muted); max-width: 470px; font-size: 19px; }+.hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 26px; margin-top: 24px; font-size: 15px; }+.hero-links > a:last-child { text-decoration-color: var(--line); }+.hero-footnote { font-size: 14px; color: var(--muted); margin-top: 18px; }+.section { padding-top: 104px; }+.section-intro { margin-bottom: 32px; }+.section-intro p { color: var(--muted); max-width: 690px; margin-top: 20px; }+.evidence-figure { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 0 16px; }+.figure-heading { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 13px; padding: 14px 2px; }+.figure-link { display: block; cursor: zoom-in; background: #fbfaf7; border-radius: 3px; overflow: hidden; }.figure-link img { width: 100%; }-figcaption { max-width: 840px; margin-top: 17px; font-size: 15px; line-height: 1.65; color: var(--muted); }-figcaption a { color: var(--text); }-.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }-.section-link { margin-top: 30px; }+.figure-link:focus-visible { outline-offset: 3px; }+figcaption { padding: 16px 2px 18px; font-size: 14px; line-height: 1.6; color: var(--muted); }+.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }+.section-link { margin-top: 24px; font-size: 16px; }.section-link a, .text-link { color: var(--mint); text-decoration: none; display: inline-block; border-bottom: 1px solid var(--mint); padding-bottom: 4px; }.section-link a:hover, .text-link:hover { color: var(--text); border-color: var(--text); }-.closing { padding-block: 120px; }+.method-summary { margin-top: 96px; border-top: 1px solid var(--line); padding-top: 58px; }+.method-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; list-style: none; padding: 0; margin: 42px 0 0; counter-reset: step; }+.method-steps li { border-top: 1px solid var(--line); padding-top: 22px; counter-increment: step; }+.method-steps h3::before { content: "0" counter(step) " / "; color: var(--lilac); font-size: 13px; margin-right: 6px; }+.method-steps p { margin-top: 14px; font-size: 16px; color: var(--muted); }+.closing { padding-block: 100px; }.closing p { margin: 21px 0 28px; color: var(--muted); max-width: 600px; }-footer { border-top: 1px solid var(--line); padding-block: 32px 42px; display: flex; justify-content: space-between; align-items: center; gap: 30px; }-footer nav { font-size: 14px; color: var(--muted); }-.page-heading { padding-top: 80px; }+footer { border-top: 1px solid var(--line); padding-block: 30px 40px; display: flex; justify-content: space-between; align-items: center; gap: 30px; }+footer nav { font-size: 13px; color: var(--muted); }+.page-heading { padding-top: 72px; }.page-heading h1 { max-width: 1120px; }-.page-heading p { color: var(--muted); font-size: 21px; max-width: 690px; margin-top: 27px; }-.first { padding-top: 76px; }-.separate-figure { margin-top: 54px; }-.location-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: 8%; align-items: center; }+.page-heading p { color: var(--muted); font-size: 20px; max-width: 720px; margin-top: 25px; }+.page-jumps { margin-top: 44px; border-bottom: 1px solid var(--line); padding-bottom: 12px; gap: 32px; flex-wrap: wrap; }+.first { padding-top: 64px; }+.separate-figure { margin-top: 32px; }+.location-section { display: grid; grid-template-columns: .85fr 1.15fr; gap: 7%; align-items: center; }.location-section p { margin-top: 22px; color: var(--muted); }.location-section .text-link { margin-top: 26px; }-main > .section:last-child { padding-bottom: 110px; }-.setup { max-width: 1000px; }.setup > p { margin-block: 24px; max-width: 720px; color: var(--muted); }code { font-family: "SFMono-Regular", Consolas, monospace; font-size: .87em; }-pre { margin-block: 32px; padding: 30px; overflow-x: auto; background: #10152d; border-left: 2px solid var(--lilac); line-height: 1.9; }+pre { margin-block: 28px; padding: 28px; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--lilac); border-radius: 3px; line-height: 1.9; }+.source-link { margin-top: 42px; color: var(--mint); font-size: 16px; }+.next-page { display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); padding-block: 36px 60px; margin-top: 80px; }+.next-page > span { font-size: 15px; color: var(--muted); }+.next-page > a { font-family: "Geist Serif", Georgia, serif; font-size: 25px; text-decoration: none; }+/* The illustration shares the site's palette and retains a useful static state. */+.doppler-demo { margin-top: 40px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }+.demo-heading { display: flex; align-items: center; justify-content: space-between; padding: 19px 26px; gap: 16px; border-bottom: 1px solid var(--line); }+.demo-phase { color: var(--mint); font-size: 13px; }+.doppler-scene { display: block; width: 100%; height: auto; }+.doppler-scene text { fill: var(--muted); font: 14px "Geist", Arial, sans-serif; letter-spacing: .02em; }+.flight-line { stroke: var(--line); stroke-dasharray: 5 9; fill: none; }+.wavefronts { fill: none; stroke: var(--lilac); stroke-opacity: .27; stroke-width: 1.2; }+.aircraft { fill: var(--text); }+.sound-link { fill: none; stroke: var(--lilac); stroke-dasharray: 3 6; opacity: .6; }+.receiver-halo { fill: var(--bg); stroke: var(--mint); stroke-opacity: .4; }+.receiver { stroke: var(--mint); fill: none; stroke-width: 2; }+.chart-grid { stroke: var(--line); fill: none; }+.pitch-curve { stroke: url(#curve-color); stroke-width: 3; fill: none; }+.chart-cursor { stroke: var(--mint); stroke-opacity: .45; }+.pitch-dot { fill: var(--mint); stroke: var(--surface); stroke-width: 3; }+.demo-controls { display: flex; align-items: center; gap: 26px; padding: 24px 26px 12px; }+.play-button, .viewer-close { border: 1px solid var(--line); border-radius: 4px; padding: 10px 18px; color: var(--text); background: var(--bg); font-size: 14px; min-width: 128px; min-height: 44px; }+.play-button:hover, .viewer-close:hover { border-color: var(--mint); }+.timeline-label { flex: 1; color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 18px; }+input[type="range"] { width: 100%; min-width: 60px; accent-color: var(--mint); cursor: ew-resize; min-height: 32px; }+.demo-controls output { min-width: 145px; font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; }+.demo-note { margin: 18px 26px 22px; font-size: 12px; color: var(--muted); }+.physics-detail { border-bottom: 1px solid var(--line); padding-block: 24px; font-size: 16px; }+.physics-detail summary { cursor: pointer; color: var(--lilac); }+.physics-detail > div { max-width: 760px; color: var(--muted); padding-top: 18px; }+.physics-detail p + p { margin-top: 15px; }+.physics-detail a { display: inline-block; margin-top: 18px; }+/* Native modal provides Escape, focus containment and focus restoration. */+.figure-viewer { width: min(1500px, 96vw); max-height: 94dvh; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); }+.figure-viewer::backdrop { background: rgb(4 7 17 / .9); }+.viewer-toolbar { display: flex; gap: 24px; align-items: center; justify-content: space-between; margin-bottom: 18px; }+.viewer-toolbar p { font-size: 16px; }+.figure-viewer img { max-height: 70dvh; width: auto; margin-inline: auto; object-fit: contain; }+.viewer-caption { font-size: 14px; color: var(--muted); margin-top: 18px; }+.viewer-original { display: inline-block; font-size: 14px; color: var(--mint); margin-top: 12px; }+body:has(.figure-viewer[open]) { overflow: hidden; }+@media (max-width: 1000px) { .hero-copy { grid-template-columns: 1fr; gap: 24px; } .hero-copy p { max-width: 690px; } .hero-links { margin-top: 18px; } }@media (max-width: 900px) {.wrap { width: calc(100% - 64px); }- .hero, .page-heading { padding-top: 60px; }- h1 { font-size: 72px; }- .section { padding-top: 80px; }- .location-section { gap: 36px; grid-template-columns: 1fr 1fr; }- .closing { padding-block: 90px; }+ .site-header { gap: 20px; }+ nav { gap: 18px; }+ .nav-repo { padding-left: 18px; }+ .brand { font-size: 22px; }+ .hero, .page-heading { padding-top: 48px; }+ .section { padding-top: 72px; }+ .method-summary { margin-top: 72px; padding-top: 42px; }+ .method-steps { gap: 24px; }+ .location-section { gap: 32px; grid-template-columns: 1fr 1fr; }+ .timeline-label { font-size: 0; gap: 0; }footer { align-items: start; }- footer nav { flex-wrap: wrap; justify-content: flex-end; gap: 16px 24px; }+ footer nav { flex-wrap: wrap; justify-content: flex-end; gap: 12px 20px; }}-@media (max-width: 600px) {+@media (max-width: 700px) {body { font-size: 17px; }.wrap { width: calc(100% - 40px); }- .site-header { padding-block: 22px; min-height: 0; flex-wrap: wrap; gap: 17px; }- .brand { font-size: 24px; }- nav { gap: 25px; font-size: 14px; }- .hero, .page-heading { padding-top: 45px; }- h1 { font-size: clamp(43px, 10.7vw, 64px); line-height: 1.08; }- h2 { font-size: 38px; }- .hero > p, .page-heading p { font-size: 18px; margin-top: 23px; }- .banner { margin-top: 32px; }- .section, .first { padding-top: 64px; }- .section-intro { margin-bottom: 25px; }- .section-intro p { margin-top: 15px; }- .pair, .location-section { grid-template-columns: 1fr; gap: 35px; }- figcaption { font-size: 14px; margin-top: 13px; }- .separate-figure { margin-top: 35px; }- .closing { padding-block: 75px; }- main > .section:last-child { padding-bottom: 75px; }- footer { flex-direction: column; gap: 20px; padding-block: 28px; }- footer nav { justify-content: flex-start; gap: 16px 22px; }- pre { padding: 20px; font-size: 14px; }+ .site-header { padding-block: 20px 12px; min-height: 0; flex-wrap: wrap; gap: 10px; }+ .site-header nav { width: 100%; justify-content: space-between; gap: 12px; font-size: 13px; }+ .nav-repo { border-left: 0; padding-left: 0; }+ .hero, .page-heading { padding-top: 38px; }+ h1 { font-size: clamp(42px, 9vw, 64px); line-height: 1.1; }+ h2 { font-size: 36px; }+ .hero-copy { margin-top: 20px; }+ .hero-copy h1 { font-size: clamp(42px, 9vw, 64px); }+ .hero-copy p, .page-heading p { font-size: 18px; }+ .section, .first { padding-top: 60px; }+ .section-intro { margin-bottom: 24px; }+ .pair, .location-section, .method-steps { grid-template-columns: 1fr; gap: 28px; }+ .method-summary { margin-top: 60px; padding-top: 36px; }+ .method-steps { margin-top: 28px; }+ .evidence-figure { padding-inline: 10px; }+ figcaption { font-size: 13px; padding-block: 12px 14px; }+ .figure-heading { font-size: 12px; padding-block: 12px; }+ .closing { padding-block: 68px; }+ .next-page { margin-top: 60px; flex-direction: column; gap: 10px; padding-bottom: 40px; }+ footer { flex-direction: column; gap: 12px; padding-block: 26px; }+ footer nav { justify-content: flex-start; gap: 12px 20px; }+ pre { padding: 18px; font-size: 14px; }+ .page-jumps { gap: 12px 24px; font-size: 13px; margin-top: 28px; }+ .doppler-demo { margin-top: 28px; }+ .demo-heading { padding: 14px 16px; flex-wrap: wrap; gap: 6px; }+ .demo-heading .eyebrow { font-size: 10px; }+ .demo-phase { font-size: 12px; }+ .doppler-scene { min-height: 210px; }+ .doppler-scene text { font-size: 30px; }+ .demo-controls { flex-wrap: wrap; gap: 8px 18px; padding: 12px 16px 0; }+ .timeline-label { order: 3; flex-basis: 100%; }+ .demo-controls output { margin-left: auto; min-width: 0; font-size: 12px; }+ .play-button { min-width: 116px; padding-inline: 12px; }+ .demo-note { margin: 14px 16px 18px; font-size: 11px; }+ .figure-viewer { padding: 12px; }+ .viewer-toolbar { gap: 12px; }+ .viewer-close { min-width: auto; }}@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }-.source-link { padding-bottom: 70px; color: var(--mint); }diff --git a/docs/site.js b/docs/site.jsnew file mode 100644index 0000000..3209248--- /dev/null+++ b/docs/site.js@@ -0,0 +1,128 @@+/* Progressive enhancement only: content, diagrams and original image links work without JS. */+(() => {+ 'use strict';+ const reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)');+ const svgNS = 'http://www.w3.org/2000/svg';++ document.querySelectorAll('[data-doppler]').forEach(demo => {+ const scene = demo.querySelector('svg');+ const waves = demo.querySelector('[data-waves]');+ const plane = demo.querySelector('[data-plane]');+ const line = demo.querySelector('[data-sound-link]');+ const dot = demo.querySelector('[data-dot]');+ const cursor = demo.querySelector('[data-cursor]');+ const slider = demo.querySelector('[data-time]');+ const play = demo.querySelector('[data-play]');+ const phase = demo.querySelector('[data-phase]');+ const pitch = demo.querySelector('[data-pitch]');+ const circles = Array.from({ length: 12 }, () => {+ const circle = document.createElementNS(svgNS, 'circle');+ circle.setAttribute('cy', '105');+ return circle;+ });+ waves.replaceChildren(...circles);+ // Display units, not measured data. v/c = 25/70; microphone is 160 units off track.+ const speed = 25, soundSpeed = 70, distance = 160;+ let progress = 0.16, playing = !reducedMotion.matches, visible = false;+ let frame = null, previous = null;+ function draw() {+ const t = -14 + 28 * progress;+ const x = 540 + speed * t;+ plane.setAttribute('transform', `translate(${x} 105)`);+ const latestEmission = Math.floor(t / 0.8) * 0.8;+ circles.forEach((circle, i) => {+ const emitted = latestEmission - i * 0.8;+ circle.setAttribute('cx', 540 + speed * emitted);+ circle.setAttribute('r', (t - emitted) * soundSpeed);+ });+ // Invert t = tau + r(tau)/c. Frequency depends on velocity at emission.+ let low = t - 30, high = t;+ for (let i = 0; i < 40; i++) {+ const tau = (low + high) / 2;+ if (tau + Math.hypot(speed * tau, distance) / soundSpeed < t) low = tau;+ else high = tau;+ }+ const tau = (low + high) / 2;+ const radial = speed * speed * tau / Math.hypot(speed * tau, distance);+ const ratio = soundSpeed / (soundSpeed + radial);+ // Dashed line connects the emission position, rather than the current plane, to the receiver.+ line.setAttribute('d', `M${540 + speed * tau} 105L540 265`);+ const chartX = 80 + progress * 920;+ dot.setAttribute('cx', chartX);+ dot.setAttribute('cy', 405 - (ratio - 1) * 130);+ cursor.setAttribute('d', `M${chartX} 340V456`);+ const label = Math.abs(ratio - 1) < 0.02 ? 'Near source pitch' : ratio > 1 ? 'Approaching · higher pitch' : 'Receding · lower pitch';+ phase.textContent = label;+ pitch.textContent = `${ratio.toFixed(2)}× source pitch`;+ slider.value = Math.round(progress * 1000);+ slider.setAttribute('aria-valuetext', `${Math.round(progress * 100)}% through flyover, ${label.toLowerCase()}, ${ratio.toFixed(2)} times source pitch`);+ // Keep frequent animation updates out of screen-reader live regions.+ pitch.setAttribute('aria-live', 'off');+ }+ function updateButton() {+ play.textContent = playing ? 'Pause flyover' : progress >= 1 ? 'Replay flyover' : 'Play flyover';+ }+ function tick(now) {+ frame = null;+ if (!playing || !visible || document.hidden) { previous = null; return; }+ if (previous !== null) progress = Math.min(1, progress + Math.min(now - previous, 100) / 18000);+ previous = now;+ draw();+ if (progress >= 1) { playing = false; previous = null; updateButton(); }+ else frame = requestAnimationFrame(tick);+ }+ function schedule() {+ if (playing && visible && !document.hidden && frame === null) frame = requestAnimationFrame(tick);+ }+ play.addEventListener('click', () => {+ if (progress >= 1) progress = 0;+ playing = !playing;+ previous = null;+ updateButton();+ schedule();+ });+ slider.addEventListener('input', () => {+ playing = false;+ previous = null;+ progress = Number(slider.value) / 1000;+ updateButton();+ draw();+ });+ reducedMotion.addEventListener('change', () => {+ if (reducedMotion.matches) { playing = false; previous = null; updateButton(); }+ });+ document.addEventListener('visibilitychange', () => { previous = null; schedule(); });+ const observer = new IntersectionObserver(entries => {+ visible = entries[0].isIntersecting;+ previous = null;+ schedule();+ }, { threshold: 0.15 });+ observer.observe(scene);+ demo.querySelector('.demo-controls').hidden = false;+ updateButton();+ draw();+ });++ if (typeof HTMLDialogElement === 'undefined') return;+ const viewer = document.createElement('dialog');+ viewer.className = 'figure-viewer';+ viewer.setAttribute('aria-labelledby', 'viewer-title');+ viewer.innerHTML = '<div class="viewer-toolbar"><p id="viewer-title"></p><button type="button" class="viewer-close" autofocus>Close <span aria-hidden="true">×</span></button></div><img alt=""><p class="viewer-caption"></p><a class="viewer-original">Open original image ↗</a>';+ document.body.append(viewer);+ viewer.querySelector('button').addEventListener('click', () => viewer.close());+ viewer.addEventListener('click', event => { if (event.target === viewer) viewer.close(); });+ document.querySelectorAll('.figure-link').forEach(link => {+ link.addEventListener('click', event => {+ if (event.ctrlKey || event.metaKey || event.shiftKey || event.altKey || event.button !== 0) return;+ event.preventDefault();+ const figure = link.closest('figure');+ viewer.querySelector('#viewer-title').textContent = figure.querySelector('.figure-heading span').textContent;+ const image = viewer.querySelector('img');+ image.src = link.href;+ image.alt = link.querySelector('img').alt;+ viewer.querySelector('.viewer-caption').textContent = figure.querySelector('figcaption').textContent;+ viewer.querySelector('.viewer-original').href = link.href;+ viewer.showModal();+ });+ });+})();