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/reach/configuration.go

45 lines
1.6 KiB
Go
Raw Normal View History

2018-09-20 17:28:18 +02:00
package reach
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 *ReachView) Configuration() (*Configuration, error) {
configuration := &Configuration{}
if err := r.fetch(eventGetConfiguration, nil, eventCurrentConfiguration, configuration); err != nil {
return nil, err
}
return configuration, nil
}