MCPcopy Create free account
hub / github.com/facebook/time / TestEncodeMSM7HalfCycleInverted

Function TestEncodeMSM7HalfCycleInverted

rtcm/msm_encode_test.go:231–243  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

229 require.NoError(t, err)
230 d := decodeMSM7(t, frame)
231 require.Len(t, d.roughRate, 1)
232 require.Len(t, d.fineRate, 1)
233
234 wavelength := speedOfLight / 1575.42e6
235 totalRate := float64(d.roughRate[0]) + float64(d.fineRate[0])*0.0001 // m/s
236 gotDoppler := -totalRate / wavelength
237 require.InDelta(t, float64(doppler), gotDoppler, 1.0)
238 require.Positive(t, d.roughRate[0], "receding satellite has a positive range rate")
239}
240
241func TestEncodeMSM7HalfCycleInverted(t *testing.T) {
242 // DF420 (half-cycle ambiguity) is the inverse of the u-blox "half cycle
243 // valid" flag: resolved -> 0, unresolved -> 1.
244 resolved := gpsObs(5, 20000000, 105000000, -100, 45)
245 resolved.HalfCyc = true
246 d := decodeMSM7(t, mustEncode(t, resolved))

Callers

nothing calls this directly

Calls 3

gpsObsFunction · 0.85
decodeMSM7Function · 0.85
mustEncodeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…