Documentation
¶
Index ¶
- Constants
- Variables
- func AcpLocation(offset int) *time.Location
- func MgrsPrecision(mgrs string) (int, error)
- func ParseAcpTimeZone(tz string) (*time.Location, error)
- type AstroData
- type CloudCover
- type DailyForecast
- type Dtg
- type HourlyForecast
- type Location
- type LunarPhase
- type MetocReport
- type MoonData
- type Plan
- type PlanLocation
- type PrecipitationIntensity
- type PrecipitationType
- type SunData
- type TempRiskCategory
- type Twilight
Constants ¶
View Source
const ( ParseAcp121Full = "021504 Jan 2006" FormatAcp121Full = "021504MST Jan 2006" ParseAcp121Short = "021504" FormatAcp121Short = "021504MST" Acp121Date = "_2 Jan 2006" ParseAcp121Time = "1504" FormatAcp121Time = "1504MST" )
Variables ¶
View Source
var AcpTimeZonesByLetter = map[string]int{
"A": 1, "B": 2, "C": 3, "D": 4, "E": 5, "F": 6, "G": 7, "H": 8, "I": 9, "K": 10, "L": 11, "M": 12,
"N": -1, "O": -2, "P": -3, "Q": -4, "R": -5, "S": -6, "T": -7, "U": -8, "V": -9, "W": -10, "X": -11, "Y": -12,
"Z": 0,
}
View Source
var AcpTimeZonesByOffset = map[int]string{
1: "A", 2: "B", 3: "C", 4: "D", 5: "E", 6: "F", 7: "G", 8: "H", 9: "I", 10: "K", 11: "L", 12: "M",
-1: "N", -2: "O", -3: "P", -4: "Q", -5: "R", -6: "S", -7: "T", -8: "U", -9: "V", -10: "W", -11: "X", -12: "Y",
0: "Z",
}
Functions ¶
func AcpLocation ¶
func MgrsPrecision ¶
Types ¶
type CloudCover ¶
type CloudCover string
const ( Overcast CloudCover = "OVC" // 8/8 cloud cover Broken CloudCover = "BKN" // 5/8-7/8 cloud cover Scattered CloudCover = "SCT" // 3/8-5/8 cloud cover Few CloudCover = "FEW" // 1/8-3/8 cloud cover Clear CloudCover = "CLR" // <1/8 cloud cover )
type DailyForecast ¶
type HourlyForecast ¶
type HourlyForecast struct { DateTime Dtg WindDirection float64 WindSpeed float64 WindGust float64 Visibility float64 PrecipitationAmount float64 PrecipitationType []PrecipitationType PrecipitationProbability float64 CloudCover CloudCover Temperature float64 FeelsLike float64 Dewpoint float64 Pressure float64 }
type Location ¶
func ParseLocationFromMgrs ¶
type LunarPhase ¶
type LunarPhase string
const ( New LunarPhase = "NEW" WaxingCrescent LunarPhase = "WXC" FirstQuarter LunarPhase = "1ST" WaxingGibbous LunarPhase = "WXG" Full LunarPhase = "FUL" WaningGibbous LunarPhase = "WNG" LastQuarter LunarPhase = "LST" WaningCrescent LunarPhase = "WNC" )
type MetocReport ¶
type MetocReport struct { Dates []Dtg Generated Dtg Location Location TzOffset int AstroData map[Dtg]AstroData Forecast map[Dtg]DailyForecast }
func NewMetocReport ¶
func NewMetocReport(locationName, locationMgrs string, tzoffset int) (MetocReport, error)
func (*MetocReport) AddDateToMetocReport ¶
func (m *MetocReport) AddDateToMetocReport(date Dtg)
type MoonData ¶
type MoonData struct { Phase LunarPhase MoonRise Dtg MoonSet Dtg }
type Plan ¶
type Plan struct { Tzoffset int `yaml:"tzoffset"` Locations []PlanLocation `yaml:"locations"` }
type PlanLocation ¶
type PrecipitationIntensity ¶
type PrecipitationIntensity string
const ( HeavyPrecip PrecipitationIntensity = "HEAVY" ModeratePrecip PrecipitationIntensity = "MODERATE" LightPrecip PrecipitationIntensity = "LIGHT" NoPrecip PrecipitationIntensity = "NONE" )
func CalculatePrecipitationIntensity ¶
func CalculatePrecipitationIntensity(precip float64) PrecipitationIntensity
type PrecipitationType ¶
type PrecipitationType int
const ( FreezingRain PrecipitationType = 0 Hail PrecipitationType = 1 Snow PrecipitationType = 2 Rain PrecipitationType = 3 )
type TempRiskCategory ¶
type TempRiskCategory string
const ( ExtremeRisk TempRiskCategory = "EXTREME" HighRisk TempRiskCategory = "HIGH" ModerateRisk TempRiskCategory = "MODERATE" LowRisk TempRiskCategory = "LOW" NoRisk TempRiskCategory = "N/A" )
func CalculateColdCategory ¶
func CalculateColdCategory(windChill float64) TempRiskCategory
func CalculateHeatCategory ¶
func CalculateHeatCategory(heatIndex float64) TempRiskCategory
Click to show internal directories.
Click to hide internal directories.