Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CPA_Map_App.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CPA Animated Map — Application Documentation

**GitHub Repository:** [https://github.com/vlenchik/CPA-Air](https://github.com/vlenchik/CPA-Air)
**Live Site:** [https://vlenchik.github.io/CPA-Air/](https://vlenchik.github.io/CPA-Air/)

## Purpose

This is a single-file, browser-based playback tool for visualizing a **Closest Point of Approach (CPA)** event between two aircraft. It replays a ±60-second window around the CPA moment, animating both aircraft positions on a map while synchronizing optional ATC audio recorded during the event.
Expand Down Expand Up @@ -97,6 +100,15 @@ The script reads the audio file, base64-encodes it, and replaces the placeholder

### Step 4 — Open in a Browser

**Option A: View the Live Site**

The application is hosted on GitHub Pages at:
**[https://vlenchik.github.io/CPA-Air/CPA_map_with_audio_embedded.html](https://vlenchik.github.io/CPA-Air/CPA_map_with_audio_embedded.html)**

This is the easiest way to view the visualization without downloading anything.

**Option B: Run Locally**

Open `CPA_map_with_audio_embedded.html` in any modern browser (Chrome, Firefox, Safari, Edge). No server is needed — just double-click or drag into the browser.

The map will load, the tracks will draw, and the animation will initialize at frame 0. Press **Play** to start. Audio will begin playing synchronized to the animation.
Expand Down
70 changes: 70 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# CPA-Air

**Repository:** [https://github.com/vlenchik/CPA-Air](https://github.com/vlenchik/CPA-Air)
**Live Site:** [https://vlenchik.github.io/CPA-Air/](https://vlenchik.github.io/CPA-Air/)

## Overview

CPA-Air is a browser-based visualization tool for analyzing Closest Point of Approach (CPA) events between aircraft. The application provides an animated map playback synchronized with ATC audio recordings to help pilots, controllers, and investigators review close encounter geometry and communications.

## Features

- **Interactive Map Visualization**: Animated aircraft tracks with real-time position updates
- **Synchronized ATC Audio**: Embedded audio playback aligned with the visual timeline
- **Detailed Flight Data**: Altitude, ground speed, vertical speed, and separation distances
- **Playback Controls**: Variable speed playback (0.25× to 6×), scrubbing, and step-by-step navigation
- **Self-Contained**: Single HTML file deployment with no server requirements

## Current Event

This repository contains analysis of a CPA event between:
- **N748PK** (RV-series aircraft) and **N89WD**
- Location: Near KLVK (San Jose, CA)
- Date/Time: 2026-01-26 at 21:38:48 UTC
- Duration: 120-second window (±60 seconds around CPA)

## Quick Start

### Option 1: View Online (Recommended)

Visit the live site at: **[https://vlenchik.github.io/CPA-Air/](https://vlenchik.github.io/CPA-Air/)**

Available pages:
- [Main Visualization](https://vlenchik.github.io/CPA-Air/CPA_map_with_audio_embedded.html) - Interactive map with embedded audio
- [Event Analysis](https://vlenchik.github.io/CPA-Air/KLVK%20CPA%20250ft%2020260126.html) - Specific CPA event visualization
- [Home Page](https://vlenchik.github.io/CPA-Air/) - Project overview and navigation

### Option 2: Run Locally

1. Clone or download the repository
2. Open `CPA_map_with_audio_embedded.html` in any modern web browser
3. Press **Play** to start the animation and audio
4. Use the controls to adjust playback speed or scrub to specific moments

For detailed documentation on how to build and customize the application, see [CPA_Map_App.md](CPA_Map_App.md).

## Project Structure

- `CPA_map_with_audio.html` - Base HTML file with audio placeholder
- `CPA_map_with_audio_embedded.html` - Final version with embedded audio
- `CPA_map_with_audio_fixed.html` - Fixed version of the map
- `CPA_Map_App.md` - Comprehensive application documentation
- `recording.mp3` / `KLVK2-Jan-26-2026-2130Z.mp3` - ATC audio recordings
- `track_*.csv` / `track_*.json` - Flight track data
- `separation_*.png` - Separation analysis charts
- `trim_atc.sh` - Script for trimming ATC audio

## Dependencies

- **Leaflet 1.9.4** - Interactive mapping library (loaded from CDN)
- **OpenStreetMap** - Map background tiles

Both dependencies require internet connectivity for initial load. Once loaded, the application works offline.

## License

Please refer to the repository for license information.

## Contributing

Contributions are welcome! Please visit the [GitHub repository](https://github.com/vlenchik/CPA-Air) to open issues or submit pull requests.
93 changes: 89 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,96 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Index Page</title>
<title>CPA-Air - Aircraft Closest Point of Approach Visualization</title>
<style>
body {
font-family: Arial, sans-serif;
max-width: 800px;
margin: 50px auto;
padding: 20px;
line-height: 1.6;
}
h1 {
color: #2c3e50;
}
.github-link {
background-color: #24292e;
color: white;
padding: 10px 20px;
text-decoration: none;
border-radius: 5px;
display: inline-block;
margin: 20px 0;
}
.github-link:hover {
background-color: #444d56;
}
.info-box {
background-color: #e3f2fd;
border-left: 4px solid #2196f3;
padding: 15px;
margin: 20px 0;
border-radius: 3px;
}
.info-box strong {
color: #1976d2;
}
.file-list {
background-color: #f6f8fa;
padding: 15px;
border-radius: 5px;
margin: 20px 0;
}
.file-list ul {
list-style-type: none;
padding-left: 0;
}
.file-list li {
padding: 5px 0;
}
.file-list a {
color: #0366d6;
text-decoration: none;
}
.file-list a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<!-- Content copied from 'KLVK CPA 250ft 20260126.html' -->
<h1>Welcome to the Index Page</h1>
<p>This is the content copied from the original file.</p>
<h1>CPA-Air</h1>
<p>Browser-based visualization tool for analyzing Closest Point of Approach (CPA) events between aircraft.</p>

<div class="info-box">
<strong>📍 This site is live at:</strong> <a href="https://vlenchik.github.io/CPA-Air/">https://vlenchik.github.io/CPA-Air/</a>
</div>

<a href="https://github.com/vlenchik/CPA-Air" class="github-link">View on GitHub</a>

<h2>About This Project</h2>
<p>This project provides an animated map playback synchronized with ATC audio recordings to help pilots, controllers, and investigators review close encounter geometry and communications.</p>

<h2>Current Event</h2>
<p>Analysis of a CPA event between N748PK (RV-series aircraft) and N89WD near KLVK (San Jose, CA) on January 26, 2026.</p>

<div class="file-list">
<h3>Available Files</h3>
<ul>
<li><a href="CPA_map_with_audio_embedded.html">CPA_map_with_audio_embedded.html</a> - Interactive visualization (recommended)</li>
<li><a href="KLVK CPA 250ft 20260126.html">KLVK CPA 250ft 20260126.html</a> - Event-specific visualization</li>
<li><a href="CPA_Map_App.md">CPA_Map_App.md</a> - Application documentation</li>
<li><a href="README.md">README.md</a> - Project overview</li>
</ul>
</div>

<h2>Quick Start</h2>
<ol>
<li>Click on one of the HTML visualization files above</li>
<li>Press <strong>Play</strong> to start the animation and audio</li>
<li>Use the controls to adjust playback speed or scrub to specific moments</li>
</ol>

<h2>Repository</h2>
<p>For more information, issues, or contributions, visit: <a href="https://github.com/vlenchik/CPA-Air">https://github.com/vlenchik/CPA-Air</a></p>
</body>
</html>