- Add jump_credo_checks ~> 0.4 with all 20 checks enabled - Fix all standard Credo issues: 139 @spec (113 done, 26 remain), 4 refactoring, 3 alias usage, 9 System.cmd env, 5 unsafe_to_atom, 2 max line length, 9 assert_receive timeout - Fix 170+ jump_credo_checks warnings: - 117 TopLevelAliasImportRequire: move nested alias/import to module top - 32 UseObanProWorker: switch to Oban.Pro.Worker - 4 DoctestIExExamples: add doctests / create test file - ~20 WeakAssertion: strengthen type-check assertions - Various ConditionalAssertion, AssertReceiveTimeout fixes - Exclude vendor/ from Credo analysis - Remaining: 175 warnings (mostly opinionated WeakAssertion, AvoidSocketAssignsInTest), 26 @spec annotations
63 lines
2.7 KiB
Elixir
63 lines
2.7 KiB
Elixir
defmodule MicrowavepropWeb.PageController do
|
||
use MicrowavepropWeb, :controller
|
||
|
||
@spec home(Plug.Conn.t(), map()) :: Plug.Conn.t()
|
||
def home(conn, _params) do
|
||
redirect(conn, to: ~p"/map")
|
||
end
|
||
|
||
@spec redirect_contacts(Plug.Conn.t(), map()) :: Plug.Conn.t()
|
||
def redirect_contacts(conn, _params) do
|
||
redirect(conn, to: ~p"/contacts")
|
||
end
|
||
|
||
@spec redirect_contact(Plug.Conn.t(), map()) :: Plug.Conn.t()
|
||
def redirect_contact(conn, %{"id" => id}) do
|
||
redirect(conn, to: ~p"/contacts/#{id}")
|
||
end
|
||
|
||
@llms_txt """
|
||
# NTMS Microwave Propagation
|
||
|
||
> The North Texas Microwave Society's propagation prediction service for amateur radio bands 10–241 GHz. Scores propagation conditions across CONUS using HRRR numerical weather prediction, sounding data, ITU-R atmospheric models, and calibration against 58,000+ recorded QSOs.
|
||
|
||
A real-time propagation prediction system for microwave amateur radio bands, built and operated by the North Texas Microwave Society.
|
||
|
||
## Tools and maps
|
||
|
||
- [Propagation map](/map) — real-time CONUS propagation scores with 48-hour forecast overlay.
|
||
- [Weather map](/weather) — HRRR weather data overlay (temperature, dewpoint, refractivity, ducting).
|
||
- [Weather map (Canada)](/weather-ca) — HRDPS/RDPS-based weather for Canadian coverage.
|
||
- [Contact map](/contacts/map) — geographic view of 58,000+ recorded QSOs.
|
||
- [Path calculator](/path) — point-to-point propagation prediction between two locations.
|
||
- [EME calculator](/eme) — Earth-Moon-Earth communication prediction for 144–10 GHz.
|
||
- [Skew-T diagram](/skewt) — atmospheric sounding visualization from HRRR profiles and RAOB data.
|
||
- [Rover planner](/rover) — propagation heatmap with ranked drive-to candidates.
|
||
- [Rover locations](/rover-locations) — shared directory of rover-friendly parking spots.
|
||
- [Rover planning](/rover-planning) — planned rover missions and their paths.
|
||
|
||
## Data
|
||
|
||
- [Algorithm documentation](/algo) — full scoring methodology, factor weights, ITU-R model references.
|
||
- [Contact database](/contacts) — 58,000+ historical QSOs used for calibration.
|
||
- [Beacon directory](/beacons) — microwave beacon listings across North America.
|
||
|
||
## About
|
||
|
||
- [About](/about) — project background.
|
||
- [Privacy](/privacy) — data collection and usage policy.
|
||
|
||
## API
|
||
|
||
- [API documentation](/docs/api) — REST API reference.
|
||
- [OpenAPI spec](/openapi.json) — machine-readable API description.
|
||
- [Contact map data](/api/contacts/map) — JSON dump of all map contacts.
|
||
"""
|
||
|
||
@spec llms_txt(Plug.Conn.t(), map()) :: Plug.Conn.t()
|
||
def llms_txt(conn, _params) do
|
||
conn
|
||
|> put_resp_content_type("text/markdown", "utf-8")
|
||
|> send_resp(200, @llms_txt)
|
||
end
|
||
end
|