From ca7062764f837f28152aaf4b989454cf8458cb73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Cebri=C3=A1n=20Juan?= Date: Tue, 3 Jul 2018 12:37:08 +0200 Subject: [PATCH] Add serialize member function, necessary to serialize and restore Gnss_Synchro objects from a byte stream --- src/core/system_parameters/gnss_synchro.h | 39 +++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/src/core/system_parameters/gnss_synchro.h b/src/core/system_parameters/gnss_synchro.h index 922420bc4..6e240c0c3 100644 --- a/src/core/system_parameters/gnss_synchro.h +++ b/src/core/system_parameters/gnss_synchro.h @@ -4,6 +4,7 @@ * \author * Luis Esteve, 2012. luis(at)epsilon-formacion.com * Javier Arribas, 2012. jarribas(at)cttc.es + * Álvaro Cebrián Juan, 2018. acebrianjuan(at)gmail.com * ------------------------------------------------------------------------- * * Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors) @@ -73,6 +74,44 @@ public: double RX_time; //!< Set by Observables processing block bool Flag_valid_pseudorange; //!< Set by Observables processing block double interp_TOW_ms; //!< Set by Observables processing block + + + /*! + * \brief This member function is necessary to serialize and restore + * Gnss_Synchro objects from a byte stream. + */ + template + void serialize(Archive& ar, const unsigned int version) + { + // Satellite and signal info + ar& System; + ar& Signal; + ar& PRN; + ar& Channel_ID; + ar& Acq_delay_samples; + ar& Acq_doppler_hz; + ar& Acq_samplestamp_samples; + ar& Flag_valid_acquisition; + //Tracking + ar& fs; + ar& Prompt_I; + ar& Prompt_Q; + ar& CN0_dB_hz; + ar& Carrier_Doppler_hz; + ar& Carrier_phase_rads; + ar& Code_phase_samples; + ar& Tracking_sample_counter; + ar& Flag_valid_symbol_output; + ar& correlation_length_ms; + //Telemetry Decoder + ar& Flag_valid_word; + ar& TOW_at_current_symbol_ms; + // Observables + ar& Pseudorange_m; + ar& RX_time; + ar& Flag_valid_pseudorange; + ar& interp_TOW_ms; + } }; #endif