Commit graph

1183 commits

Author SHA1 Message Date
a9cf2d3eb8
Add logging to map location determination for debugging 2026-03-22 16:27:43 -05:00
CI
cbbe5f7720 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1774214293-c769d89 [skip ci] 2026-03-22 21:18:56 +00:00
c769d89264
fix: stabilize packet broadcast tests 2026-03-22 16:17:55 -05:00
CI
ff81984a83 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1774213748-139568c [skip ci] 2026-03-22 21:09:55 +00:00
139568cd05
Log Cloudflare geolocation headers on each request 2026-03-22 16:08:52 -05:00
6988116a42
Fix Cloudflare IP geolocation not reaching LiveView on page load
The IPGeolocation plug was setting session data, but the live_session
wasn't forwarding it to the LiveView mount. Also removed the root-path
restriction so geolocation works on any initial page load.
2026-03-22 16:08:00 -05:00
CI
b45aae070b chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1774213340-8937c1f [skip ci] 2026-03-22 21:03:06 +00:00
8937c1fb57
fix: handle APRS status DB ownership exits 2026-03-22 16:02:03 -05:00
CI
26e86ddba8 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1774210808-0d4314b [skip ci] 2026-03-22 20:20:49 +00:00
0d4314b880
Fix object positioning to use object name instead of origin callsign
Objects and items were being displayed at the origin station's location
instead of their actual coordinates because the broadcast used the
sender (origin callsign) as the identifier instead of object_name/item_name.

For example, object CALGRY sent by VE6RWB-15 was appearing at VE6RWB-15's
location instead of CALGRY's actual coordinates.

Changes:
- Modified broadcast_single_packet to use object_name for objects
  and item_name for items as the identifier instead of sender
- Added tests verifying objects and items broadcast with correct identifier
- Objects/items now display at their specified coordinates, not origin station

Fixes the positioning bug where objects appeared at sender location.
2026-03-22 15:19:52 -05:00
CI
c1e33c8de2 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1774210397-0c9087b [skip ci] 2026-03-22 20:14:05 +00:00
0c9087b7f1
Add email notifications for production errors
Implements error email notifications that:
- Send email only for first occurrence of each unique error
- Only send in production environment (dev/test are silent)
- Include error details, location, and link to ErrorTracker UI
- Use existing Resend/Swoosh configuration for delivery
- Email sent to graham@mcintire.me

Integrates with ErrorTracker via telemetry events.
2026-03-22 15:12:59 -05:00
CI
812163fa92 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1774206357-c928cd5 [skip ci] 2026-03-22 19:06:03 +00:00
c928cd576c
chore: update APRS parser submodule
Updates parser with fixes for:
- Altitude parsing regex bug and validation
- Temperature validation to reject unreasonable values
2026-03-22 14:05:41 -05:00
CI
ffc314d017 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1774205420-b5c9388 [skip ci] 2026-03-22 18:51:00 +00:00
b5c9388399
fix: add wind direction normalization in changeset
Normalize wind direction values to valid range (0-359 degrees) during
packet insertion. Invalid wind direction values (360 or > 360, or
negative) are automatically set to 0, preventing bad data from entering
the database.

This complements the fix in the APRS parser and ensures data integrity
at the application level as well.
2026-03-22 13:50:06 -05:00
CI
449c81d6f2 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1774205344-2b715a5 [skip ci] 2026-03-22 18:49:10 +00:00
2b715a5a1a
chore: update APRS parser submodule
Updates parser to include fix for invalid wind direction values.
Parser now normalizes 360° to 0° and rejects values > 360.
2026-03-22 13:48:49 -05:00
CI
cc155072c9 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1774205106-ca9bcf2 [skip ci] 2026-03-22 18:45:48 +00:00
ca9bcf21a7
fix: add course value normalization in changeset
Normalize course values to valid range (0-359 degrees) during packet
insertion. Invalid course values (negative or >= 360) are automatically
set to 0, preventing bad data from entering the database.

This complements the fix in the APRS parser and ensures data integrity
at the application level as well.
2026-03-22 13:44:51 -05:00
CI
2ca0cf9d39 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1774204995-c88b662 [skip ci] 2026-03-22 18:43:21 +00:00
c88b6626d9
chore: update APRS parser submodule
Updates parser to include fix for invalid MicE course values.
Parser now normalizes negative and out-of-range course values to 0.
2026-03-22 13:43:01 -05:00
CI
dc91ea716f chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1774204388-e8a5754 [skip ci] 2026-03-22 18:33:14 +00:00
e8a5754da8
Update APRS parser with coordinate normalization fixes
Updated vendored parser (vendor/aprs) to include:
- Longitude wrapping instead of clamping (192° → -168°)
- Proper MicE coordinate normalization
- Fixed tests to expect wrapping behavior

This complements the application-level coordinate fixes and ensures
coordinates are normalized at parse time.
2026-03-22 13:32:53 -05:00
CI
d05bf98d53 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1774204098-ae8f2ac [skip ci] 2026-03-22 18:28:59 +00:00
ae8f2acc48
Fix symbol validation - prevent empty symbol codes
Added validation to ensure all packets with positions have valid symbols:
- symbol_code must be exactly 1 character, defaults to '>' (car) if missing
- symbol_table_id must be exactly 1 character, defaults to '/' if missing
- Validation only applies to packets with positions

Fixed 5 existing packets with empty symbol codes that would have caused
display issues on the map.

This prevents errors when rendering APRS symbols and ensures all positioned
packets can be displayed correctly.
2026-03-22 13:28:03 -05:00
CI
3ebcbfc78d chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1774203373-57f243d [skip ci] 2026-03-22 18:16:50 +00:00
57f243d5b6
Fix coordinate normalization bug
Added proper latitude/longitude normalization to prevent invalid coordinates:
- Longitude now wraps to -180 to 180 range (e.g., 199.0 -> -161.0)
- Latitude now clamps to -90 to 90 range
- Applied normalization before creating geometry in Packet module

Fixed 7 existing packets with invalid coordinates:
- WB6WWJ-N: 199.0 -> -161.0
- BI7MCK-1: 320.3 -> -39.7

This prevents map display issues and ensures PostGIS spatial queries
work correctly.
2026-03-22 13:15:57 -05:00
CI
a3aa2c61e0 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1774203084-6d63638 [skip ci] 2026-03-22 18:12:07 +00:00
6d63638312
Remove dead code - unused controller actions
All pages are already LiveView, so removed:
- InfoController (replaced by InfoLive.Show)
- PageController.home and .packets (unused functions)

Remaining PageController functions are health/status JSON endpoints only.
All user-facing pages use LiveView with proper session continuity.
2026-03-22 13:11:08 -05:00
CI
afed0e45bb chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1774202882-fdf1169 [skip ci] 2026-03-22 18:08:48 +00:00
fdf116971d
Allow searching for objects and items by name
Updated get_latest_packet_for_callsign to search by sender, object_name,
or item_name. This allows users to search for objects like "RADIOWRLD"
or "147.06-WC" and have the map center on them, just like searching for
a station callsign.

For example:
- Searching "RADIOWRLD" now finds the GPS Central store object
- Searching "147.06-WC" finds the Calgary repeater object
- Searching "CALGRY" still finds the Calgary station

This makes objects first-class searchable entities on the map.
2026-03-22 13:07:37 -05:00
CI
ad7cdc6ee2 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1774202779-544d864 [skip ci] 2026-03-22 18:06:58 +00:00
544d8648a0
Fix object/item packets showing sender callsign instead of object name
Objects and items now display with their own names on the map instead of
the originating station's callsign. This prevents confusion where stations
creating objects (like repeaters) appear at multiple locations.

For example, CALGRY creates repeater objects (147.06-WC, 146.85-NH) which
were appearing on the map labeled as "CALGRY" at the repeater locations
instead of showing the actual object names.

Changes:
- Updated map_label() to return object_name for object packets
- Updated map_label() to return item_name for item packets
- Position packets continue to show the sender callsign
- Updated tests to expect object/item names instead of sender

This matches APRS.fi behavior where objects are displayed separately
from their originating station.
2026-03-22 13:02:24 -05:00
CI
4e85ccda05 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1774199807-732ea61 [skip ci] 2026-03-22 17:17:25 +00:00
732ea61a2e
docs: add weather nearby API endpoint to documentation
Adds comprehensive documentation for GET /api/v1/weather/nearby endpoint:
- Parameter descriptions (lat, lon, radius, hours, limit)
- Example requests with curl
- Success and error response formats
- Updated planned endpoints section
2026-03-22 12:16:32 -05:00
CI
1d908abe0e chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1774196881-3d89908 [skip ci] 2026-03-22 16:28:45 +00:00
3d89908ea3
chore: remove deleted cursor rules file 2026-03-22 11:27:45 -05:00
a796f8a3a9
Add Weather API controller with parameter validation
Implements GET /api/v1/weather/nearby endpoint with comprehensive parameter
validation and error handling. The controller validates required parameters
(lat, lon, radius) and optional parameters (hours, limit) with appropriate
range checking. Integrates with PreparedQueries for efficient database access
and WeatherJSON for response serialization.

Key features:
- Required params: lat (-90 to 90), lon (-180 to 180), radius (0-1000 miles)
- Optional params: hours (1-168, default 6), limit (1-100, default 50)
- Proper error responses via FallbackController (400 for bad requests, 422 for validation)
- Full test coverage (16 tests) including edge cases and error scenarios

Also updates FallbackController to handle {:error, status, message} tuples
and fixes WeatherJSON to support both field name formats (lat/lon and latitude/longitude)
for compatibility with existing tests and actual query results.
2026-03-22 11:27:45 -05:00
e539dc5a3e
Add WeatherJSON view module for API responses
- Implements nearby/1 function to format weather station data
- Returns structured JSON with data and meta fields
- Handles null weather fields gracefully
- Includes distance, position, weather data, and symbols
- Formats DateTime to ISO8601 strings
- All tests passing (3/3)
2026-03-22 11:27:45 -05:00
47fc071263
Add get_nearby_weather_stations/4 query function with spatial filtering
Implements PostGIS-based query to find weather stations within a radius:
- Uses ST_DWithin for efficient spatial filtering within radius (miles to meters)
- Orders results by ST_Distance (closest first)
- Filters by has_weather, has_position, and time window (default 6h)
- Deduplicates by base_callsign using DISTINCT ON (avoids duplicate SSIDs)
- Returns all weather fields: temp, humidity, pressure, wind, rain
- Configurable limit (default 50) and hours options

Comprehensive test coverage (10 tests):
- Spatial filtering within/outside radius
- Time window filtering
- Base callsign deduplication (most recent SSID)
- Distance ordering verification
- Required field validation
- Edge cases (empty results, no weather data)
2026-03-22 11:27:45 -05:00
6ed10d11f4
docs: add weather nearby API implementation plan
Detailed TDD implementation plan for GET /api/v1/weather/nearby endpoint.
Includes database queries, JSON views, controller logic, and comprehensive
testing strategy.
2026-03-22 11:27:45 -05:00
d87ef4dac5
config: disable SSL/TLS for database connections
Adds ssl: false to Repo config to disable database encryption.
2026-03-22 11:27:44 -05:00
bc6fdcd9c2
Add design doc for weather nearby API endpoint
Documents new GET /api/v1/weather/nearby endpoint for finding weather
stations within a radius of a lat/lon point. Uses PostGIS ST_DWithin
for efficient spatial queries with configurable time window and result
limits.
2026-03-22 11:27:44 -05:00
CI
f142b273d1 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1774029416-df6431c [skip ci] 2026-03-20 17:57:39 +00:00
df6431c899
Disable database SSL/TLS encryption
Removed DATABASE_SSL and DATABASE_SSL_VERIFY environment variable
handling and SSL configuration from database connection settings.
2026-03-20 12:56:38 -05:00
CI
4d79bcb9ba chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1773943041-e19fef1 [skip ci] 2026-03-19 17:58:51 +00:00
e19fef1d70
chore(deps): update floki 0.38.1, igniter 0.7.6, swoosh 1.23.1 2026-03-19 12:57:07 -05:00
CI
120966ea2a chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1773942267-ac42896 [skip ci] 2026-03-19 17:45:09 +00:00
ac42896271
fix: performance improvements and bug fixes across backend and frontend
Backend:
- Use indexed has_weather boolean for weather queries instead of 6 OR conditions
- Enable gzip compression for static assets
- Re-enable security headers (CSP, X-Frame-Options, X-Content-Type-Options)
- Supervise cleanup task via BroadcastTaskSupervisor instead of Task.start
- Relax IsSupervisor restart limits (5/60s) to survive transient network issues
- Remove dead code: empty cache invalidation block, commented-out logging

Frontend:
- Use callsignIndex for O(1) marker dedup instead of O(n) forEach scan
- Consolidate triple packet loop into single pass in new_packets handler
- Batch trail visualization updates via requestAnimationFrame
- Replace DOM querySelectorAll z-index scan with simple counter
- Only rebuild OMS markers when crossing clustering zoom threshold
- Clean up trail manager on hook destroy
- Remove dead commented-out localStorage code
2026-03-19 12:41:36 -05:00