feat(AveragePosition): method to emit average_base_coordinates message

This commit is contained in:
2025-06-11 12:00:30 +02:00
parent 81741d20c1
commit abebc7d8c6
6 changed files with 85 additions and 2 deletions

View File

@ -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)
}