Fix mlat inter-block timestamp accounting in oversampling mode.
Add calculated phase into the per-message timestamp (it is already exactly a 12MHz offset)
This commit is contained in:
parent
309f79c488
commit
c3409302ce
|
@ -918,6 +918,9 @@ int main(int argc, char **argv) {
|
||||||
detectModeS(Modes.magnitude, MODES_ASYNC_BUF_SAMPLES);
|
detectModeS(Modes.magnitude, MODES_ASYNC_BUF_SAMPLES);
|
||||||
|
|
||||||
// Update the timestamp ready for the next block
|
// Update the timestamp ready for the next block
|
||||||
|
if (Modes.oversample)
|
||||||
|
Modes.timestampBlk += (MODES_ASYNC_BUF_SAMPLES*5);
|
||||||
|
else
|
||||||
Modes.timestampBlk += (MODES_ASYNC_BUF_SAMPLES*6);
|
Modes.timestampBlk += (MODES_ASYNC_BUF_SAMPLES*6);
|
||||||
Modes.stat_blocks_processed++;
|
Modes.stat_blocks_processed++;
|
||||||
} else {
|
} else {
|
||||||
|
|
2
mode_s.c
2
mode_s.c
|
@ -2292,7 +2292,7 @@ void detectModeS_oversample(uint16_t *m, uint32_t mlen) {
|
||||||
// be correct, but this can be handled by the next layer.
|
// be correct, but this can be handled by the next layer.
|
||||||
if ( (msglen > 0) && (errors <= MODES_MSG_ENCODER_ERRS) ) {
|
if ( (msglen > 0) && (errors <= MODES_MSG_ENCODER_ERRS) ) {
|
||||||
// Set initial mm structure details
|
// Set initial mm structure details
|
||||||
mm.timestampMsg = Modes.timestampBlk + (j*5);
|
mm.timestampMsg = Modes.timestampBlk + (j*5) + initial_phase;
|
||||||
mm.signalLevel = 0;
|
mm.signalLevel = 0;
|
||||||
mm.phase_corrected = 0;
|
mm.phase_corrected = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue