Documentation ¶
Index ¶
- Variables
- type AntennaLocation
- type BSSID
- type Client
- func (c *Client) GNSSLR1110SingleFrame(ctx context.Context, rxInfo []*gw.UplinkRXInfo, useRxTime bool, pl []byte) (common.Location, error)
- func (c *Client) RSSIMultiFrame(ctx context.Context, rxInfo [][]*gw.UplinkRXInfo) (common.Location, error)
- func (c *Client) RSSISingleFrame(ctx context.Context, rxInfo []*gw.UplinkRXInfo) (common.Location, error)
- func (c *Client) TDOAMultiFrame(ctx context.Context, rxInfo [][]*gw.UplinkRXInfo) (common.Location, error)
- func (c *Client) TDOASingleFrame(ctx context.Context, rxInfo []*gw.UplinkRXInfo) (common.Location, error)
- func (c *Client) WifiTDOASingleFrame(ctx context.Context, rxInfo []*gw.UplinkRXInfo, aps []WifiAccessPoint) (common.Location, error)
- type GNSSLR1110SingleFrameRequest
- type LocationResult
- type LocationSolverResult
- type RSSIMultiFrameRequest
- type RSSISingleFrameRequest
- type Response
- type TDOAMultiFrameRequest
- type TDOASingleFrameRequest
- type UplinkRSSI
- type UplinkTDOA
- type V3Response
- type WifiAccessPoint
- type WifiTDOASingleFrameRequest
Constants ¶
This section is empty.
Variables ¶
var (
ErrNoLocation = errors.New("no location returned")
)
errors
Functions ¶
This section is empty.
Types ¶
type AntennaLocation ¶
type AntennaLocation struct { Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` Altitude float64 `json:"altitude"` }
AntennaLocation implements the LoRa Cloud AntennaLocation object.
type BSSID ¶
type BSSID [6]byte
BSSID defines a BSSID identifier,.
func (BSSID) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (*BSSID) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a LoRa Cloud Geolocation client.
func (*Client) GNSSLR1110SingleFrame ¶
func (c *Client) GNSSLR1110SingleFrame(ctx context.Context, rxInfo []*gw.UplinkRXInfo, useRxTime bool, pl []byte) (common.Location, error)
GNSSLR1110SingleFrame request.
func (*Client) RSSIMultiFrame ¶
func (c *Client) RSSIMultiFrame(ctx context.Context, rxInfo [][]*gw.UplinkRXInfo) (common.Location, error)
RSSIMultiFrame request.
func (*Client) RSSISingleFrame ¶
func (c *Client) RSSISingleFrame(ctx context.Context, rxInfo []*gw.UplinkRXInfo) (common.Location, error)
RSSISingleFrame request.
func (*Client) TDOAMultiFrame ¶
func (c *Client) TDOAMultiFrame(ctx context.Context, rxInfo [][]*gw.UplinkRXInfo) (common.Location, error)
TDOAMultiFrame request.
func (*Client) TDOASingleFrame ¶
func (c *Client) TDOASingleFrame(ctx context.Context, rxInfo []*gw.UplinkRXInfo) (common.Location, error)
TDOASingleFrame request.
func (*Client) WifiTDOASingleFrame ¶
func (c *Client) WifiTDOASingleFrame(ctx context.Context, rxInfo []*gw.UplinkRXInfo, aps []WifiAccessPoint) (common.Location, error)
WifiTDOASingleFrame request.
type GNSSLR1110SingleFrameRequest ¶
type GNSSLR1110SingleFrameRequest struct { Payload helpers.HEXBytes `json:"payload"` GNSSCaptureTime *float64 `json:"gnss_capture_time,omitempty"` GNSSCaptureTimeAccuracy *float64 `json:"gnss_capture_time_accuracy,omitempty"` GNSSAssistPosition []float64 `json:"gnss_assist_position,omitempty"` GNSSAssistAltitude *float64 `json:"gnss_assist_altitude,omitempty"` GNSSUse2DSolver bool `json:"gnss_use_2D_solver,omitempty"` }
GNSSLR1110SingleFrameRequest implements the LoRa Cloud GNSS LR1110 Single-Frame request.
func NewGNSSLR1110SingleFrameRequest ¶
func NewGNSSLR1110SingleFrameRequest(rxInfo []*gw.UplinkRXInfo, useRxTime bool, pl []byte) GNSSLR1110SingleFrameRequest
NewGNSSLR1110SingleFrameRequest creates a new GNSSLR1110SingleFrameRequest.
type LocationResult ¶
type LocationResult struct { Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` Altitude float64 `json:"altitude"` Accuracy int `json:"accuracty"` AlgorithmType string `json:"algorithmType"` NumberOfGatewaysReceived int `json:"numberOfGatewaysReceived"` NumberOfGatewaysUsed int `json:"numberOfGatewaysUsed"` }
LocationResult implements the LoRa Cloud LocationResult object.
type LocationSolverResult ¶
type LocationSolverResult struct { ECEF []float64 `json:"ecef"` LLH []float64 `json:"llh"` GDOP float64 `json:"gdop"` Accuracy float64 `json:"accuracy"` CaptureTimeGPS float64 `json:"capture_time_gps"` CaptureTimeUTC float64 `json:"capture_time_utc"` }
LocationSolverResult implements the LoRa Cloud LocationSolverResult object.
type RSSIMultiFrameRequest ¶
type RSSIMultiFrameRequest struct {
LoRaWAN [][]UplinkRSSI `json:"lorawan"`
}
RSSIMultiFrameRequest implements the LoRa Cloud RSSI Multi-Frame request.
func NewRSSIMultiFrameRequest ¶
func NewRSSIMultiFrameRequest(rxInfo [][]*gw.UplinkRXInfo) RSSIMultiFrameRequest
NewRSSIMultiFrameRequest creates a new RSSIMultiFrameRequest.
type RSSISingleFrameRequest ¶
type RSSISingleFrameRequest struct {
LoRaWAN []UplinkRSSI `json:"lorawan"`
}
RSSISingleFrameRequest implements the LoRa Cloud RSSI Single-Frame request.
func NewRSSISingleFrameRequest ¶
func NewRSSISingleFrameRequest(rxInfo []*gw.UplinkRXInfo) RSSISingleFrameRequest
NewRSSISingleFrameRequest creates a new RSSISingleFrameRequest.
type Response ¶
type Response struct { Result *LocationResult `json:"result"` Errors []string `json:"errors"` Warnings []string `json:"warnings"` }
Response implements the LoRa Cloud Response object.
type TDOAMultiFrameRequest ¶
type TDOAMultiFrameRequest struct {
LoRaWAN [][]UplinkTDOA `json:"lorawan"`
}
TDOAMultiFrameRequest implements the LoRa Cloud TDOA Multi-Frame request.
func NewTDOAMultiFrameRequest ¶
func NewTDOAMultiFrameRequest(rxInfo [][]*gw.UplinkRXInfo) TDOAMultiFrameRequest
NewTDOAMultiFrameRequest creates a new TDOAMultiFrameRequest.
type TDOASingleFrameRequest ¶
type TDOASingleFrameRequest struct {
LoRaWAN []UplinkTDOA `json:"lorawan"`
}
TDOASingleFrameRequest implements the LoRa Cloud TDOA Single-Frame request.
func NewTDOASingleFrameRequest ¶
func NewTDOASingleFrameRequest(rxInfo []*gw.UplinkRXInfo) TDOASingleFrameRequest
NewTDOASingleFrameRequest creates a new TDOASingleFrameRequest.
type UplinkRSSI ¶
type UplinkRSSI struct { GatewayID lorawan.EUI64 `json:"gatewayId"` RSSI float64 `json:"rssi"` SNR float64 `json:"snr"` AntennaID int `json:"antennaId"` AntennaLocation AntennaLocation `json:"antennaLocation"` }
UplinkRSSI implements the LoRa Cloud UplinkRssi object.
func NewUplinkRSSI ¶
func NewUplinkRSSI(rxInfo []*gw.UplinkRXInfo) []UplinkRSSI
NewUplinkRSSI creates a new UplinkRSSI.
type UplinkTDOA ¶
type UplinkTDOA struct { GatewayID lorawan.EUI64 `json:"gatewayId"` RSSI float64 `json:"rssi"` SNR float64 `json:"snr"` TOA uint32 `json:"toa"` AntennaID int `json:"antennaId"` AntennaLocation AntennaLocation `json:"antennaLocation"` }
UplinkTDOA implements the LoRa Cloud UplinkTdoa object.
func NewUplinkTDOA ¶
func NewUplinkTDOA(rxInfo []*gw.UplinkRXInfo) []UplinkTDOA
NewUplinkTDOA creates a new UplinkTDOA.
type V3Response ¶
type V3Response struct { Result *LocationSolverResult `json:"result"` Errors []string `json:"errors"` Warnings []string `json:"warnings"` }
V3Response implements the LoRa Cloud API v3 Response object.
type WifiAccessPoint ¶
type WifiAccessPoint struct { MacAddress BSSID `json:"macAddress"` SignalStrength int `json:"signalStrength"` }
WifiAccessPoint implements the LoRa Cloud WifiAccessPoints object.
type WifiTDOASingleFrameRequest ¶
type WifiTDOASingleFrameRequest struct { LoRaWAN []UplinkTDOA `json:"lorawan"` WifiAccessPoints []WifiAccessPoint `json:"wifiAccessPoints"` }
WifiTDOASingleFrameRequest implements the LoRa Cloud Wifi / TDOA Single-Frame request.
func NewWifiTDOASingleFrameRequest ¶
func NewWifiTDOASingleFrameRequest(rxInfo []*gw.UplinkRXInfo, aps []WifiAccessPoint) WifiTDOASingleFrameRequest
NewWifiTDOASingleFrameRequest creates a new WifiTDOASingleFrameRequest.