aprs.me/lib/aprsme
Graham McIntire 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
..
accounts add callsign to users 2025-07-10 16:07:05 -05:00
cluster Remove noisy leader election log 2026-02-20 13:43:13 -06:00
is fix: performance improvements and bug fixes across backend and frontend 2026-03-19 12:41:36 -05:00
packets Add get_nearby_weather_stations/4 query function with spatial filtering 2026-03-22 11:27:45 -05:00
performance Fix packet buffer overflow and system load adjustment issues 2025-07-15 08:16:11 -05:00
telemetry Fix Credo issues and telemetry Decimal coercion 2026-02-20 09:55:56 -06:00
workers Partition packets table by day and simplify cleanup 2026-02-20 11:25:16 -06:00
accounts.ex Fix callsign registration to be case-insensitive 2026-02-19 13:20:07 -06:00
application.ex Partition packets table by day and simplify cleanup 2026-02-20 11:25:16 -06:00
bad_packet.ex refactor to use external parser 2025-06-24 14:22:09 -05:00
broadcast_task_supervisor.ex perf: optimize slow tests - 40% reduction in top 10 slowest tests 2026-03-03 10:47:40 -06:00
cache.ex Fix code review batch 3: auth, performance, dedup, cache TTL 2026-02-20 07:29:27 -06:00
callsign.ex Fix code review findings: security, correctness, performance, dead code 2026-02-19 18:49:27 -06:00
circuit_breaker.ex Fix code review findings: security, correctness, performance, dead code 2026-02-19 18:49:27 -06:00
cleanup_scheduler.ex fix: performance improvements and bug fixes across backend and frontend 2026-03-19 12:41:36 -05:00
connection_monitor.ex Fix multiple TODO bugs: drain handler, callsign dedup, packet pipeline 2026-02-19 18:27:25 -06:00
convert.ex more i18n 2025-07-06 10:28:27 -05:00
data_extended.ex update deps 2025-07-16 08:20:20 -05:00
db_optimizer.ex Fix code review findings: security, correctness, performance, dead code 2026-02-19 18:49:27 -06:00
deployment_notifier.ex Fix code formatting 2025-07-28 13:24:16 -05:00
device_cache.ex Fix code review findings batch 2: dead code, encoding, correctness 2026-02-20 07:29:27 -06:00
device_identification.ex Fix code review findings batch 2: dead code, encoding, correctness 2026-02-20 07:29:27 -06:00
device_parser.ex refactor 2025-10-12 10:56:49 -05:00
devices.ex refactor to use external parser 2025-06-24 14:22:09 -05:00
devices_seeder.ex Fix potential crashes and unsafe operations throughout the app 2025-07-28 08:35:12 -05:00
dynamic_supervisor.ex Add distributed Erlang clustering for single APRS-IS connection 2025-07-25 10:30:29 -05:00
encoding.ex Fix APRS object display and comment encoding issues 2026-02-20 18:06:32 -06:00
encoding_utils.ex Fix APRS object display and comment encoding issues 2026-02-20 18:06:32 -06:00
error_handler.ex clean up warnings 2025-07-16 08:55:46 -05:00
geo_utils.ex Increase GPS drift threshold from 15m to 50m 2025-07-21 11:23:37 -05:00
log_sanitizer.ex more tests 2026-02-09 17:21:16 -06:00
maidenhead.ex Partition packets table by day and simplify cleanup 2026-02-20 11:25:16 -06:00
mailer.ex refactor to use external parser 2025-06-24 14:22:09 -05:00
migration_lock.ex format 2025-07-27 11:16:16 -05:00
packet.ex Remove dead PostGIS code, deduplicate utilities, and simplify module hierarchy 2026-02-20 13:39:07 -06:00
packet_consumer.ex fix: performance improvements and bug fixes across backend and frontend 2026-03-19 12:41:36 -05:00
packet_consumer_pool.ex Fix packet buffer overflow with parallel consumer pool 2025-07-19 14:49:52 -05:00
packet_counter.ex performance improvements 2025-07-14 16:35:58 -05:00
packet_field_whitelist.ex Consolidate 24 packet columns into JSONB data field 2026-02-20 13:02:47 -06:00
packet_pipeline_supervisor.ex Fix multiple TODO bugs: drain handler, callsign dedup, packet pipeline 2026-02-19 18:27:25 -06:00
packet_producer.ex Add TCP backpressure to packet pipeline 2026-02-19 15:31:51 -06:00
packet_replay.ex clean up warnings 2025-07-16 08:55:46 -05:00
packet_replay_behaviour.ex refactor to use external parser 2025-06-24 14:22:09 -05:00
packet_sanitizer.ex Consolidate 24 packet columns into JSONB data field 2026-02-20 13:02:47 -06:00
packets.ex fix: performance improvements and bug fixes across backend and frontend 2026-03-19 12:41:36 -05:00
packets_behaviour.ex refactor: Remove CachedQueries and rename optimized functions 2025-07-30 13:17:56 -05:00
partition_manager.ex Partition packets table by day and simplify cleanup 2026-02-20 11:25:16 -06:00
postgres_notifier.ex Improve info page live updates and fix APRS parser 2025-07-28 15:14:33 -05:00
postgres_types.ex refactor to use external parser 2025-06-24 14:22:09 -05:00
rate_limiter.ex update deps 2025-07-16 08:20:20 -05:00
regex_cache.ex Reduce nesting depth in regex_cache, connection_monitor, and device_identification 2026-02-09 11:55:51 -06:00
release.ex Complete nested module alias fixes and update Sobelow skips 2026-02-09 11:26:47 -06:00
repo.ex refactor to use external parser 2025-06-24 14:22:09 -05:00
schema.ex refactor to use external parser 2025-06-24 14:22:09 -05:00
shutdown_handler.ex Remove dead modules, unused deps, and commented-out code 2026-02-20 08:09:22 -06:00
signal_handler.ex fix: Resolve majority of dialyzer type errors 2025-07-30 13:30:21 -05:00
spatial_pubsub.ex Fix code review batch 3: auth, performance, dedup, cache TTL 2026-02-20 07:29:27 -06:00
streaming_packets_pubsub.ex Batch push_events, RF path queries, and ETS tuning for hot paths 2026-02-20 08:30:54 -06:00