Skip to content

admin-ui: Station:Location lat/long give no format help and invalid values silently disable weather #427

Description

@genwave-radio

🐛 Symptom (T229, demo box)

Station:Location:Latitude / Longitude help text says nothing about format. Operator question from testing: "Is it DD, DMS, DMM, all of them?"

📌 The actual contract (from code)

WeatherContextProvider.TryParseCoordinates (WeatherContextProvider.cs:217-232):

  • Signed decimal degrees only (double.TryParse, InvariantCulture). DMS (53°32'N), DMM, and comma-decimal (53,54) all fail.
  • Ranges: lat ±90, lon ±180. Negative = S/W.
  • Only ≤4 decimal places reach Open-Meteo (formatted "0.####", :253-258).
  • Invalid value ≡ blank: weather silently fails closed (F108.1) with a single Information log. Save-time validation is deliberately AlwaysValid (SettingValidator.cs:372-377) — so an operator who enters DMS gets a green save and a weatherless station with no visible reason.

🔧 Fix sketch

  1. Help text (SettingsForm.tsx:349-354): state signed decimal degrees, ranges, sign convention, period decimal separator, 4-dp precision, and that invalid ≡ blank (weather off).
  2. Optional, worth it: client-side soft warning when the value is non-blank and doesn't parse as DD in range — keep the server permissive as designed, just stop the silent-footgun at the form.

✅ Acceptance

  • Hover help answers the DD/DMS question outright.
  • Entering 53°32'N produces an inline warning before save (if item 2 is taken).

Metadata

Metadata

Assignees

No one assigned

    Labels

    demoFound on GenWave demoenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions