This repository has been archived on 2024-08-02. You can view files and clone it, but cannot push or open issues or pull requests.
orion/emlid/reachview/configuration.go

45 lines
1.6 KiB
Go

package reachview
const (
eventGetConfiguration = "get configuration"
eventCurrentConfiguration = "current configuration"
)
// Configuration is a configuration
type Configuration struct {
RTKSettings *RTKSettings `mapstructure:"rtk settings,omitempty"`
}
// RTKSettings -
type RTKSettings struct {
GLONASSARMode string `mapstructure:"glonass ar mode"`
UpdateRate string `mapstructure:"update rate"`
ElevationMaskAngle string `mapstructure:"elevation mask angle"`
MaxHorizontalAcceleration string `mapstructure:"max horizontal acceleration"`
SNRMask string `mapstructure:"snr mask"`
GPSARMode string `mapstructure:"gps ar mode"`
PositionningMode string `mapstructure:"positioning mode"`
PositioningSystems *PositionningSystems `mapstructure:"positioning systems,omitempty"`
MaxVerticalAcceleration string `mapstructure:"max vertical acceleration"`
}
// PositionningSystems -
type PositionningSystems struct {
GLONASS bool `json:"glonass"`
SBAS bool `json:"sbas"`
QZS bool `json:"qzs"`
QZSS bool `json:"qzss"`
Compass bool `json:"compass"`
Galileo bool `json:"galileo"`
GPS bool `json:"gps"`
}
// Configuration fetches and return the current configuration of the ReachRS module
func (r *Client) Configuration() (*Configuration, error) {
configuration := &Configuration{}
if err := r.ReqResp(eventGetConfiguration, nil, eventCurrentConfiguration, configuration); err != nil {
return nil, err
}
return configuration, nil
}