feat(test): change base mode for average position
This commit is contained in:
parent
f560465364
commit
359a0018c5
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user