Classifies every contact's likely non-LOS propagation mechanism and persists the result on contacts.propagation_mechanism. Mechanism is determined in priority order: 1. user_declared_prop_mode (ADIF PROP_MODE from the operator log) 2. EME — moon-ephemeris check, ≥2m band, >1800 km path 3. aurora — Kp≥5 + high-lat path, 50-432 MHz 4. sporadic-E — foEs × 5 ≥ band_mhz, 400-2500 km path 5. meteor_scatter — ±3 days of a shower peak, VHF/UHF 6. rain_scatter — common-volume radar heavy rain, 5-11 GHz ≤800 km 7. tropo_duct — HRRR native_best_duct ≥ band or ducting_detected 8. line_of_sight — ≤50 km path 9. troposcatter — default Persisted via MechanismClassifyWorker (queue: :mechanism, unique on contact_id). Submit-time enqueue path includes :mechanism by default; BackfillEnqueueWorker cron now handles :mechanism alongside existing types so prod continuously backfills any contact with propagation_mechanism_status in (:pending, :queued, :failed). Also added :radar to the cron's type list so common-volume radar backfill runs automatically rather than only via `mix radar_backfill`. New modules: - Microwaveprop.Propagation.MoonEphemeris — Meeus low-precision moon position, accuracy ±1° — enough for the mutual-visibility EME test - Microwaveprop.Propagation.MechanismClassifier — plug-in priority chain over the evidence map - Microwaveprop.Workers.MechanismClassifyWorker — assembles inputs from HRRR / native profiles / common-volume radar / solar_indices / ionosonde + calls the classifier ADIF importer now reads PROP_MODE into user_declared_prop_mode so operator-tagged mechanisms (EME/ES/MS/RS/AS/AUR) become ground truth.
140 lines
4.6 KiB
Elixir
140 lines
4.6 KiB
Elixir
# This file is responsible for configuring your application
|
|
# and its dependencies with the aid of the Config module.
|
|
#
|
|
# This configuration file is loaded before any dependency and
|
|
# is restricted to this project.
|
|
|
|
# General application configuration
|
|
import Config
|
|
|
|
alias Microwaveprop.Workers.CanadianSoundingFetchWorker
|
|
|
|
# Configure esbuild (the version is required)
|
|
config :esbuild,
|
|
version: "0.27.4",
|
|
microwaveprop: [
|
|
args:
|
|
~w(js/app.ts --bundle --target=es2022 --outdir=../priv/static/assets/js --external:/fonts/* --external:/images/* --alias:@=.),
|
|
cd: Path.expand("../assets", __DIR__),
|
|
env: %{"NODE_PATH" => [Path.expand("../deps", __DIR__), Mix.Project.build_path()]}
|
|
]
|
|
|
|
config :live_table,
|
|
app: :microwaveprop,
|
|
repo: Microwaveprop.Repo,
|
|
pubsub: Microwaveprop.PubSub,
|
|
defaults: %{
|
|
custom_footer: {MicrowavepropWeb.LiveTableFooter, :render}
|
|
}
|
|
|
|
# Configure Elixir's Logger
|
|
config :logger, :default_formatter,
|
|
format: "$time $metadata[$level] $message\n",
|
|
metadata: [:request_id, :remote_ip]
|
|
|
|
# Configure the mailer
|
|
#
|
|
# By default it uses the "Local" adapter which stores the emails
|
|
# locally. You can see the emails in your browser, at "/dev/mailbox".
|
|
#
|
|
# For production it's recommended to configure a different adapter
|
|
# at the `config/runtime.exs`.
|
|
config :microwaveprop, Microwaveprop.Mailer, adapter: Swoosh.Adapters.Local
|
|
|
|
# Configure the endpoint
|
|
config :microwaveprop, MicrowavepropWeb.Endpoint,
|
|
url: [host: "localhost"],
|
|
adapter: Bandit.PhoenixAdapter,
|
|
render_errors: [
|
|
formats: [html: MicrowavepropWeb.ErrorHTML, json: MicrowavepropWeb.ErrorJSON],
|
|
layout: false
|
|
],
|
|
pubsub_server: Microwaveprop.PubSub,
|
|
live_view: [signing_salt: "Gdq36xze"]
|
|
|
|
config :microwaveprop, Oban,
|
|
engine: Oban.Pro.Engines.Smart,
|
|
repo: Microwaveprop.Repo,
|
|
queues: [
|
|
solar: 1,
|
|
weather: 20,
|
|
enqueue: 1,
|
|
hrrr: 5,
|
|
terrain: 4,
|
|
commercial: 2,
|
|
iemre: 10,
|
|
# 2 slots so PropagationPruneWorker can run alongside the
|
|
# forecast-hour chain job.
|
|
propagation: 2,
|
|
admin: 1,
|
|
nexrad: 2,
|
|
radar: 2,
|
|
ionosphere: 1,
|
|
space_weather: 1,
|
|
mechanism: 4,
|
|
contact_import: 4
|
|
],
|
|
plugins: [
|
|
{Oban.Plugins.Pruner, max_age: 3600 * 24},
|
|
# See runtime.exs — producer-record-based orphan rescue, not
|
|
# timer-based. Fast recovery from rolling deploys.
|
|
{Oban.Pro.Plugins.DynamicLifeline, rescue_interval: to_timeout(second: 30)},
|
|
{Oban.Plugins.Cron,
|
|
crontab: [
|
|
{"0 8 * * *", Microwaveprop.Workers.SolarIndexWorker},
|
|
{"*/5 * * * *", Microwaveprop.Commercial.PollWorker},
|
|
{"5 * * * *", Microwaveprop.Workers.PropagationGridWorker},
|
|
{"*/2 * * * *", Microwaveprop.Workers.MrmsFetchWorker},
|
|
# AsosAdjustmentWorker disabled — see runtime.exs for rationale.
|
|
# {"*/10 * * * *", Microwaveprop.Workers.AsosAdjustmentWorker},
|
|
{"*/15 * * * *", Microwaveprop.Workers.PropagationPruneWorker},
|
|
# UWYO publishes the 00Z/12Z Canadian radiosondes ~90 minutes after launch
|
|
{"30 1 * * *", CanadianSoundingFetchWorker},
|
|
{"30 13 * * *", CanadianSoundingFetchWorker},
|
|
# GIRO ionosonde stations publish at ~7.5 min cadence; poll every
|
|
# 10 min to pick up fresh foF2/foEs/hmF2 within one cycle.
|
|
{"*/10 * * * *", Microwaveprop.Workers.IonosphereFetchWorker},
|
|
# NOAA SWPC publishes Kp and GOES X-ray at 1-min cadence and F10.7
|
|
# hourly; poll every 5 min for reasonable freshness vs request volume.
|
|
{"*/5 * * * *", Microwaveprop.Workers.SpaceWeatherFetchWorker}
|
|
]}
|
|
]
|
|
|
|
config :microwaveprop, :scopes,
|
|
user: [
|
|
default: true,
|
|
module: Microwaveprop.Accounts.Scope,
|
|
assign_key: :current_scope,
|
|
access_path: [:user, :id],
|
|
schema_key: :user_id,
|
|
schema_type: :binary_id,
|
|
schema_table: :users,
|
|
test_data_fixture: Microwaveprop.AccountsFixtures,
|
|
test_setup_helper: :register_and_log_in_user
|
|
]
|
|
|
|
config :microwaveprop,
|
|
ecto_repos: [Microwaveprop.Repo],
|
|
generators: [timestamp_type: :utc_datetime, binary_id: true]
|
|
|
|
# Use EXLA as default Nx backend for accelerated tensor operations
|
|
config :nx, :default_backend, EXLA.Backend
|
|
|
|
# Use Jason for JSON parsing in Phoenix
|
|
config :phoenix, :json_library, Jason
|
|
|
|
# Configure tailwind (the version is required)
|
|
config :tailwind,
|
|
version: "4.2.2",
|
|
microwaveprop: [
|
|
args: ~w(
|
|
--input=assets/css/app.css
|
|
--output=priv/static/assets/css/app.css
|
|
),
|
|
|
|
# Import environment specific config. This must remain at the bottom
|
|
# of this file so it overrides the configuration defined above.
|
|
cd: Path.expand("..", __DIR__)
|
|
]
|
|
|
|
import_config "#{config_env()}.exs"
|