(t *testing.T)
| 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 | |
| 215 | func TestEncodeMSM7UnsupportedConstellation(t *testing.T) { |
| 216 | _, err := EncodeMSM7(1, GnssSBAS, 100000, nil) |
| 217 | require.Error(t, err) |
| 218 | require.NotErrorIs(t, err, ErrNoObservations) |
| 219 | } |
| 220 | |
| 221 | func 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) |
nothing calls this directly
no test coverage detected
searching dependent graphs…