Implémentation des méthodes nécessaires pour le paramétrage de la "base automatique" #2

Merged
cmsassot merged 10 commits from issue-227 into master 2025-07-16 16:08:33 +02:00
9 changed files with 437 additions and 2 deletions
Showing only changes of commit 359a0018c5 - Show all commits

View File

@ -264,6 +264,40 @@ var testCases = []operationTestCase{
t.Logf("Task Message : %s", taskmessage)
},
},
{
Name: "SetBaseModeAveragePosition",
Run: func(t *testing.T, ops protocol.Operations) {
ctx := context.Background()
if err := ops.Connect(ctx); err != nil {
t.Errorf("%+v", errors.WithStack(err))
return
}
defer func() {
if err := ops.Close(ctx); err != nil {
t.Errorf("%+v", errors.WithStack(err))
}
}()
latitude := -90 + rand.Float64()*180
longitude := -180 + rand.Float64()*360
height := rand.Float64() * 1000
antennaOffset := toFixed(rand.Float64()*2, 3)
opts := []protocol.SetBaseOptionFunc{
protocol.WithBaseLatitude(latitude),
protocol.WithBaseLongitude(longitude),
protocol.WithBaseHeight(height),
protocol.WithBaseAntennaOffset(antennaOffset),
protocol.WithBaseMode("fix-and-hold"),
}
if err := ops.SetBase(ctx, opts...); err != nil {
t.Errorf("%+v", errors.WithStack(err))
}
},
},
{
Name: "SetBaseCorrections",
Run: func(t *testing.T, ops protocol.Operations) {