Skip to content

Flymoon 2.0#49

Merged
dbetm merged 85 commits into
mainfrom
dev
May 1, 2026
Merged

Flymoon 2.0#49
dbetm merged 85 commits into
mainfrom
dev

Conversation

@dbetm
Copy link
Copy Markdown
Owner

@dbetm dbetm commented Feb 26, 2026

What's new:

  1. Transit algorithm uses angular separation for a more accurate possibility level
  2. Dual target tracking
  3. Non-transit values now shown in the table
  4. Optional weather check
  5. Setup wizard
  6. Headless monitor mode (no browser required)
  7. Map view — aircraft positions, direction, and altitude
  8. Support for Airlabs as an alternative ADS-B provider (1,000 free API calls/month)
  9. Personal gallery to organize transit photos

This MR closes #28

Fixes and changes since proposal #42

  1. 1e64655 This closes Pause hidden and Auto mode is not working properly #48
  2. 5147e98 This closes Almost a transit, moon high, no alert #50
  3. a4dde24 This closes use km along with nautical miles (for non aviation users) #43
  4. 40249d3 This closes aircraft emojis bad orientation displayed in map #53
  5. Use km, km / m for columns as a normalized way to display results 171009f
  6. Persist bounding box chosen by user in local storage, use as default the defined in the .env file. db19f6c
  7. Don't call API Weather if there are no targets in the sky 6c15d1e
  8. Simplify background transit monitor (multiplarform) a9f1192 This closes Some routes are assuming the project is in user's home #47
  9. Fix altitude bar makers 0a2543e this closes Altitude graph shows aircraft (lines) below sealevel #31
  10. Ask for Pushbullet API key when doing setup with the wizard conf. 9e3faf0
  11. Complete gallery feature 319aad0 This closes Gallery images blank #34
  12. Checkbox to skip weather checking 5d1ce8c This closes Button to skip weather check #56

Pending changes / reviews

dbetm and others added 30 commits February 15, 2026 14:10
New Features:
- Interactive map showing observer location, bounding box, aircraft positions,
  and azimuth arrow to target (Leaflet-based)
- macOS menu bar monitor (menubar_monitor.py) with status display
- Windows system tray monitor (windows_monitor.py)
- Command-line background monitor (monitor.py) with notifications
- Weather-based filtering via OpenWeatherMap API
- Auto mode for dual sun/moon tracking
- Improved config wizard with step-by-step setup and auto bounding box
- Startup config validation with helpful error messages

UI Improvements:
- Draggable bounding box corners on map
- More visible azimuth arrow (solid orange, thicker)
- Legend with proper icons
- Alert button feedback
- Filter out flights with no destination (N/D)

Documentation:
- Updated README with new features
- Added DISTRIBUTION.md for packaging guide
- Added QUICKSTART and technical docs
- Added MENUBAR.md, MONITOR.md, ATTRIBUTION.md
- Helper scripts for launching monitors

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Move Go/Auto buttons above the map for better workflow
- Replace arrowhead on azimuth line (was pointing wrong direction)
- Change aircraft transit markers to colored diamonds (NTDS style)
- Update map legend and README documentation

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…hers

- Transit aircraft shown as colored diamonds (green/orange/yellow)
- Non-transit aircraft shown as airplane emoji with heading rotation
- Legend updated with colored diamond symbols

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Deduplicate flights by ID in auto mode (keeps highest probability)
- Preserve user-edited bounding box across map refreshes
- Track vertex drag events to detect manual edits

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Backend still checks all flights against all targets
- Frontend deduplicates by ID for table display
- Map uses deduplicated list for cleaner visualization
- Keeps highest probability result when duplicates exist

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add sun/moon emoji at start of each table row
- Orange arrow points to sun, blue arrow points to moon
- Arrows only appear for targets above minimum altitude
- Updated legend with both arrow colors

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Fix aircraft emoji rotation (subtract 90° to align with compass)
- Reorder columns: delta alt after plane alt, delta az after plane az
- Show all angles as integers with degree symbol (º)
- Format ETA as mm:ss
- Rename columns: elev, hdg

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Check for undefined/null instead of falsy to allow lat/lon of 0

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Click aircraft on map → flash and scroll to table row
- Click table row → flash and pan to aircraft marker
- Cyan flash animation for rows, scale animation for markers
- Hover effect on table rows

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Header, target, weather, tracking all on one line
- Position inputs and all buttons in one row
- Smaller icon buttons with tooltips
- Removed verbose help text
- Tighter spacing throughout

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Remove redundant targetLabel (icon shows target)
- Reorder: Go/Auto first, then position inputs, then utilities
- Add separators between control groups
- Move tracking status below coordinates

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Transform conflicts with Leaflet's marker positioning

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Detailed map visualization section
- Interactive features: click aircraft/row to flash counterpart
- Azimuth arrow colors explained
- Transit diamond markers explained

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Cmd/Ctrl+click table row to start tracking a flight
- Polls every 6 seconds (max rate on Personal tier)
- Auto-stops after 3 minutes
- Pulsing cyan outline on tracked row
- Cmd/Ctrl+click again to stop early

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Only allow tracking for medium or high probability flights
- Show alert explaining why low/no probability can't be tracked
- Prevents wasting API calls on unlikely transits

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Track ON: two-tone chirp (400Hz → 700Hz) with fade-out
- Track OFF: single lower blip (380Hz)
- Uses Web Audio API, no sound files needed

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- isNaN(null) returns false, causing silent failures
- Now properly checks for null, empty, or "null" strings

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
N/D flights still have full position/track data useful for transit detection

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- New Min° input next to Lat/Lon/Elev
- Saved to localStorage with other position values
- Passed to API and overrides env default
- Defaults to 15°

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…ents

Implements mock demonstration mode that bypasses complex trajectory
calculations and returns hardcoded results with perfect classifications.
Also improves UI with auto-display and toggle functionality.

Demo mode changes:
- Add --demo flag to app.py for activating mock mode
- Create generate_mock_results() in transit.py with hardcoded data
- Returns 2 HIGH, 2 MEDIUM, 2 LOW transits (moon + sun) plus 3 NONE
- Aircraft positioned in circle around observer for map visualization
- Moon at 135° and Sun at 225° azimuth, clearly separated
- Zero calculation errors, 100% reliable for demonstrations

UI improvements:
- Auto-display map and table on page load if position saved
- Go button now toggles show/hide (changes text: Go ↔ Hide)
- Map button toggle syncs with display state
- Results table hidden by default until Go clicked
- Auto mode now shows results immediately

Usage: python3 app.py --demo

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Change flash animation to use linear timing with 3 distinct pulses
- Apply animation to inner div to prevent position interference
- Use haversine formula for aircraft positioning to match map's azimuth arrows
- Center diamond icons on coordinates with flexbox and iconAnchor

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Rename test_data_generator.py to demo_data_generator.py
- Rewrite positioning algorithm to use precise azimuth-based geometry
- Generate flights with guaranteed transit classifications (high/medium/low)
- Add test override support to CelestialObject for deterministic testing
- Fix altitude conversion: API returns feet, not hundreds of feet

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
ALGORITHM CHANGES:
- Replace altitude-dependent thresholds with simple, consistent rules
- Calculate true angular separation: sqrt(alt_diff² + az_diff²)
- New thresholds: HIGH ≤1°, MEDIUM ≤2°, LOW ≤6°, UNLIKELY >6°
- Remove get_thresholds() altitude-dependent logic
- Add calculate_angular_separation() function
- Update check_transit() to use angular separation
- Rename IMPOSSIBLE → UNLIKELY
- Add angular_separation field to all flight results

TEST SUITE:
- tests/test_classification_logic.py: Core math and threshold tests (30/30 passing)
- tests/test_integration.py: Full pipeline integration tests (all passing)
- Validates correct classification at boundary conditions
- Tests with synthetically generated test data

RATIONALE:
- Sun/Moon are 0.5° diameter regardless of altitude
- Aircraft apparent size depends on distance, not target altitude
- Previous code had different rules for different target altitudes (no physical basis)
- New logic is simpler, mathematically correct, and physically sound

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…g box

HEADER CHANGES:
- Line 1: Sun/Moon tracking status with weather (centered)
- Line 3: Sun/Moon alt/az coordinates (can show negative altitudes)
- Remove data timestamp to save space
- Fix Moon display issue (was hidden due to nested conditions)

UI ENHANCEMENTS:
- Add loading spinner during flight data fetch
- Add field captions under all controls (light gray for black background)
- Make Clear button same size as emoji buttons
- Center header content (excluding logo)

BOUNDING BOX:
- Save bounding box coordinates when user drags on map
- Persist to localStorage with Save button
- Auto-load saved bounding box on next visit

BUG FIXES:
- Fix sort_results() to handle None values in angular_separation
- Fix weatherText scope issue in JavaScript
- Disable old renderTargetCoordinates() that was overwriting display

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@Tailspin45
Copy link
Copy Markdown
Contributor

Closing stale PR per maintainer request.

@Tailspin45
Copy link
Copy Markdown
Contributor

Hi @dbetm — quick cleanup pass: the other stale open PRs were closed today. This one still appears open and old; if it’s no longer active, could you please close it? Thanks!

@dbetm
Copy link
Copy Markdown
Owner Author

dbetm commented Apr 1, 2026

Hi @dbetm — quick cleanup pass: the other stale open PRs were closed today. This one still appears open and old; if it’s no longer active, could you please close it? Thanks!

Hey @Tailspin45 it's active. I'm actively polishing and testing this group of changes, it's intended to merge to prod

@Tailspin45
Copy link
Copy Markdown
Contributor

Tailspin45 commented Apr 2, 2026 via email

@dbetm
Copy link
Copy Markdown
Owner Author

dbetm commented Apr 8, 2026

Hmmm. I thought that was your PR and sent a note asking you to remove it. Weird. GitHub doesn't show any open PRTs at my end About to change the name too. Something like zipcatcher because that URL is available.

On Apr 1, 2026, at 10:42 AM, David Betancourt Montellano @.***> wrote: dbetm left a comment (dbetm/flymoon#49) <#49?email_source=notifications&email_token=AINDPBIF3S7WZRQUSUVWTMT4TVIJ7A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMJXGE4DKNZXHEZ2M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJNLQOJPWG33NNVSW45C7N5YGK3S7MNWGSY3L#issuecomment-4171857793> Hi @dbetm https://github.com/dbetm — quick cleanup pass: the other stale open PRs were closed today. This one still appears open and old; if it’s no longer active, could you please close it? Thanks! Hey @Tailspin45 https://github.com/Tailspin45 it's active. I'm actively polishing and testing this group of changes, it's intended to merge to prod — Reply to this email directly, view it on GitHub <#49?email_source=notifications&email_token=AINDPBIF3S7WZRQUSUVWTMT4TVIJ7A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMJXGE4DKNZXHEZ2M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJNLQOJPWG33NNVSW45C7N5YGK3S7MNWGSY3L#issuecomment-4171857793>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AINDPBIQGO3VB5P7JQHJQFT4TVIJ7AVCNFSM6AAAAACWAC56GWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DCNZRHA2TONZZGM. You are receiving this because you were mentioned.

Okay, I think at this point your project is different and big approach that simple flymoon to predict transits, so good to know there's an available domain

Comment thread monitor.py Dismissed
Comment thread monitor.py Dismissed
Comment thread monitor.py Dismissed
Comment thread monitor.py Dismissed
Comment thread src/flight_data.py Dismissed
Comment thread src/transit.py Dismissed
Comment thread src/weather.py Fixed
Comment thread src/weather.py Fixed
Comment thread app.py Dismissed
Comment thread app.py Dismissed
@dbetm dbetm merged commit 7f23045 into main May 1, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev enhancement New feature or request refactor

Projects

None yet

3 participants