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

Function TestEncodeMSM7PhaseRangeRate

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

Source from the content-addressed store, hash-verified

209 obs := []RawxObservation{ghostObs(1), ghostObs(14)}
210 frame, err := EncodeMSM7(1, GnssGPS, 288093000, obs)
211 require.ErrorIs(t, err, ErrNoObservations)
212 require.Nil(t, frame)
213}
214
215func TestEncodeMSM7UnsupportedConstellation(t *testing.T) {
216 _, err := EncodeMSM7(1, GnssSBAS, 100000, nil)
217 require.Error(t, err)
218 require.NotErrorIs(t, err, ErrNoObservations)
219}
220
221func TestEncodeMSM7PhaseRangeRate(t *testing.T) {
222 // DF399 must carry the satellite range rate in m/s (-Doppler*wavelength),
223 // not the raw Doppler in Hz. Encode a known Doppler and reconstruct it from
224 // the rough (DF399) + fine (DF404) phase range rate.
225 const doppler float32 = -519.0 // Hz, satellite receding
226 obs := []RawxObservation{gpsObs(5, 20000000, 105000000, doppler, 45)}
227
228 frame, err := EncodeMSM7(1, GnssGPS, 100000, obs)
229 require.NoError(t, err)
230 d := decodeMSM7(t, frame)
231 require.Len(t, d.roughRate, 1)
232 require.Len(t, d.fineRate, 1)

Callers

nothing calls this directly

Calls 4

gpsObsFunction · 0.85
EncodeMSM7Function · 0.85
decodeMSM7Function · 0.85
LenMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…