Initial MVP commit
All checks were successful
ci/woodpecker/push/build-image Pipeline was successful

This commit is contained in:
2026-03-17 08:35:16 -05:00
parent 8c092c2247
commit 27817f9e43
29 changed files with 1890 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
package constants
import "time"
const (
// ObservationWindow defines how far back observations are queried.
ObservationWindow = 30 * time.Minute
// ForecastQueryLimit defines the max forecast periods returned.
ForecastQueryLimit = 5
// DefaultOutputUnitSystem is the API's default output unit system.
DefaultOutputUnitSystem = "us"
// DefaultHTTPAddr is the default listen address for the HTTP server.
DefaultHTTPAddr = ":8080"
)
var SupportedTimestampLayouts = []string{
time.RFC3339Nano,
time.RFC3339,
}
const (
TempFahrenheitPrecision = 1
WindMphPrecision = 1
KmhPerMph = 1.609344
MphPerKmh = 1 / KmhPerMph
)

View File

@@ -0,0 +1,17 @@
package constants
func CelsiusToFahrenheit(c float64) float64 {
return c*9.0/5.0 + 32.0
}
func FahrenheitToCelsius(f float64) float64 {
return (f - 32.0) * 5.0 / 9.0
}
func KmhToMph(kmh float64) float64 {
return kmh * MphPerKmh
}
func MphToKmh(mph float64) float64 {
return mph * KmhPerMph
}