Updated the normalized observation schema to remove duplicate and/or unnecessary fields
All checks were successful
ci/woodpecker/push/build-image Pipeline was successful
All checks were successful
ci/woodpecker/push/build-image Pipeline was successful
This commit is contained in:
@@ -14,7 +14,7 @@ import (
|
||||
// 1. METAR phenomena (presentWeather) — most reliable for precip/hazards
|
||||
// 2. textDescription keywords — weaker, but reusable across providers
|
||||
// 3. cloud layers fallback — only for sky-only conditions
|
||||
func mapNWSToWMO(providerDesc string, cloudLayers []model.CloudLayer, phenomena []metarPhenomenon) model.WMOCode {
|
||||
func mapNWSToWMO(providerDesc string, cloudLayers []nwsCloudLayer, phenomena []metarPhenomenon) model.WMOCode {
|
||||
// 1) Prefer METAR phenomena if present.
|
||||
if code := wmoFromPhenomena(phenomena); code != model.WMOUnknown {
|
||||
return code
|
||||
@@ -167,7 +167,7 @@ func wmoFromPhenomena(phenomena []metarPhenomenon) model.WMOCode {
|
||||
return model.WMOUnknown
|
||||
}
|
||||
|
||||
func wmoFromCloudLayers(cloudLayers []model.CloudLayer) model.WMOCode {
|
||||
func wmoFromCloudLayers(cloudLayers []nwsCloudLayer) model.WMOCode {
|
||||
// NWS cloud layer amount values commonly include:
|
||||
// OVC, BKN, SCT, FEW, SKC, CLR, VV (vertical visibility / obscured sky)
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user