Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct { // Handler is called for handling lightning strike events. Handler Handler // ErrorHook is called when the read hit an error while // processing server data. ErrorHook func(error) // contains filtered or unexported fields }
Client represents a client for the service of https://www.blitzortung.org/en/ for tracking lightning and thunderstorms in real time.
type HandlerFunc ¶
type HandlerFunc func(s *Strike)
func (HandlerFunc) HandleStrike ¶
func (f HandlerFunc) HandleStrike(s *Strike)
type Station ¶
type Station struct { // Station that has reported the signal. ID int `json:"sta"` // Status of the signal. // bit 1 = polarity negative // bit 2 = polarity positive // bit 3 = signal is used for the computation Status int `json:"status"` // Time difference to the time of the lightning strike in nanoseconds. TimeDeltaValue int `json:"time"` Latitude float64 `json:"lat"` // Latitude of the detector in degree (decimal). Longitude float64 `json:"lon"` // Longitude of the detector in degree (decimal). Altitude int `json:"alt"` // Altitude of the detector in meter. }
Station represents a single station that reported a given lightning strike.
type Strike ¶
type Strike struct { Status *int `json:"status,omitempty"` Polarity int `json:"pol"` Signals []Station `json:"sig"` TimeValue big.Int `json:"time"` DelayValue float64 `json:"delay"` // MaxDeviationSpan is the maximal deviation span in nanoseconds. MaxDeviationSpan int `json:"mds"` // MaxCircularGap is the maximal circular gap in degree between two stations. MaxCircularGap *int `json:"mcg,omitempty"` Region int `json:"region"` Latitude float64 `json:"lat"` // Latitude in degree (decimal). Longitude float64 `json:"lon"` // Longitude in degree (decimal). Altitude int `json:"alt"` // Altitude in meter. }
Strike represents a single lightning strike as reported by the remote server.
type UnmarshalError ¶
func (UnmarshalError) Error ¶
func (e UnmarshalError) Error() string
func (UnmarshalError) Is ¶
func (e UnmarshalError) Is(target error) bool
func (UnmarshalError) Unwrap ¶
func (e UnmarshalError) Unwrap() error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.