(t *testing.T)
| 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)) |
| 247 | require.Equal(t, uint32(0), d.half[0], "resolved half cycle -> DF420 0") |
| 248 | |
| 249 | unresolved := gpsObs(6, 20000000, 105000000, -100, 45) |
| 250 | unresolved.HalfCyc = false |
| 251 | d = decodeMSM7(t, mustEncode(t, unresolved)) |
| 252 | require.Equal(t, uint32(1), d.half[0], "unresolved half cycle -> DF420 1") |
| 253 | } |
| 254 | |
| 255 | func TestEncodeMSM7GLONASS(t *testing.T) { |
| 256 | // GLONASS is FDMA: the wavelength depends on the frequency channel. The |
| 257 | // encoder must still produce a valid frame with real measurements. |
| 258 | obs := []RawxObservation{ |
| 259 | {PrMes: 19500000, CpMes: carrierPhaseCycles(GnssGLONASS, 0, 5, 19500000), DoMes: 1500, GnssID: GnssGLONASS, SvID: 3, SigID: 0, FreqID: 5, CNO: 44, PrValid: true, CpValid: true}, |
| 260 | {PrMes: 21000000, CpMes: carrierPhaseCycles(GnssGLONASS, 0, 1, 21000000), DoMes: -2000, GnssID: GnssGLONASS, SvID: 7, SigID: 0, FreqID: 1, CNO: 41, PrValid: true, CpValid: true}, |
| 261 | } |
| 262 | frame, err := EncodeMSM7(1, GnssGLONASS, 100000, obs) |
| 263 | require.NoError(t, err) |
nothing calls this directly
no test coverage detected
searching dependent graphs…