diff --git a/reach/client/protocol/testsuite/operations.go b/reach/client/protocol/testsuite/operations.go index 4490b7f..f249c12 100644 --- a/reach/client/protocol/testsuite/operations.go +++ b/reach/client/protocol/testsuite/operations.go @@ -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) {