This commit is contained in:
2026-01-03 14:16:16 -08:00
commit 1f0e678d47
71 changed files with 16127 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
package model
import "time"
// WeatherPoint represents weather conditions at a specific point in time
type WeatherPoint struct {
Time time.Time
WindSpeedMPH float64
WindDirection int // 0-359 degrees
WindGustMPH float64
}
// Thresholds defines the criteria for flyable conditions
type Thresholds struct {
SpeedMin float64 `json:"speedMin"` // default 7 mph
SpeedMax float64 `json:"speedMax"` // default 14 mph
DirCenter int `json:"dirCenter"` // default 270 (West)
DirRange int `json:"dirRange"` // default 15 degrees
}
// DefaultThresholds returns the default threshold values
func DefaultThresholds() Thresholds {
return Thresholds{
SpeedMin: 7,
SpeedMax: 14,
DirCenter: 270,
DirRange: 15,
}
}
// Assessment contains the analysis of weather conditions for paragliding
type Assessment struct {
Status string // "GOOD" or "BAD"
Reason string // explanation of the status
FlyableNow bool // whether conditions are currently flyable
BestWindow *FlyableWindow // the best flyable window (if any)
AllWindows []FlyableWindow // all flyable windows found
}
// FlyableWindow represents a continuous period of flyable conditions
type FlyableWindow struct {
Start time.Time
End time.Time
Duration time.Duration
}