feat(AveragePosition): method to emit average_base_coordinates message
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
package protocol
|
||||
|
||||
import "context"
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
type BaseInfo struct {
|
||||
Mode string
|
||||
@ -8,6 +10,12 @@ type BaseInfo struct {
|
||||
Latitude float64
|
||||
Longitude float64
|
||||
Height float64
|
||||
Accumulation int
|
||||
}
|
||||
type TaskMessage struct {
|
||||
Name string `json:"name"`
|
||||
State string `json:"state"`
|
||||
Payload map[string]interface{} `json:"payload"`
|
||||
}
|
||||
|
||||
type Operations interface {
|
||||
@ -41,4 +49,7 @@ type Operations interface {
|
||||
|
||||
// Reboot restarts the module
|
||||
Reboot(ctx context.Context) error
|
||||
|
||||
// AveragePosition gathers data and computes the average position
|
||||
AveragePosition(ctx context.Context) (*TaskMessage, error)
|
||||
}
|
||||
|
Reference in New Issue
Block a user