No description
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) |
||
|---|---|---|
| .cursor/rules | ||
| .devcontainer | ||
| .forgejo/workflows | ||
| .github/workflows | ||
| assets | ||
| config | ||
| docs | ||
| k8s | ||
| lib | ||
| priv | ||
| rel | ||
| scripts | ||
| test | ||
| vendor | ||
| .credo.exs | ||
| .dialyzer_ignore.exs | ||
| .dockerignore | ||
| .formatter.exs | ||
| .gitignore | ||
| .gitmodules | ||
| .sobelow-skips | ||
| .test-commands | ||
| .tool-versions | ||
| AGENTS.md | ||
| capture_aprs.py | ||
| CHANGELOG.md | ||
| CLAUDE.md | ||
| Dockerfile | ||
| fly.toml | ||
| horusec-config.json | ||
| LICENSE | ||
| mix.exs | ||
| mix.lock | ||
| README.md | ||
| renovate.json | ||
| security-policy.json | ||
| tail_logs.sh | ||
| TODO.md | ||
| tsconfig.json | ||
Aprs
Prerequisites
Before setting up the project, ensure you have the following installed:
- Elixir 1.17+
- Erlang/OTP
- PostgreSQL with PostGIS extension
Setup
To start your Phoenix server:
- Run the complete setup:
mix setup - Start Phoenix endpoint with
mix phx.serveror inside IEx withiex -S mix phx.server
Now you can visit localhost:4000 from your browser.
Ready to run in production? Please check our deployment guides.
Deployment
This application is deployed to a Kubernetes cluster using Flux GitOps. The Kubernetes manifests are in the k8s/ directory and are automatically applied by Flux when changes are pushed to the main branch.
Learn more
- Official website: https://www.phoenixframework.org/
- Guides: https://hexdocs.pm/phoenix/overview.html
- Docs: https://hexdocs.pm/phoenix
- Forum: https://elixirforum.com/c/phoenix-forum
- Source: https://github.com/phoenixframework/phoenix