1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-10-02 00:40:52 +00:00

Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next

This commit is contained in:
Carles Fernandez 2018-12-14 11:55:35 +01:00
commit 0c7ed9448b
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
54 changed files with 371 additions and 368 deletions

View File

@ -15,15 +15,15 @@
<xs:complexType>
<xs:sequence>
<xs:element type="xs:byte" name="i_satellite_PRN"/>
<xs:element type="xs:float" name="d_TOW"/>
<xs:element type="xs:int" name="d_TOW"/>
<xs:element type="xs:float" name="d_Crs"/>
<xs:element type="xs:float" name="d_M_0"/>
<xs:element type="xs:float" name="d_Cuc"/>
<xs:element type="xs:float" name="d_e_eccentricity"/>
<xs:element type="xs:float" name="d_Cus"/>
<xs:element type="xs:float" name="d_Toe1"/>
<xs:element type="xs:float" name="d_Toe2"/>
<xs:element type="xs:float" name="d_Toc"/>
<xs:element type="xs:int" name="d_Toe1"/>
<xs:element type="xs:int" name="d_Toe2"/>
<xs:element type="xs:byte" name="d_Toc"/>
<xs:element type="xs:float" name="d_Cic"/>
<xs:element type="xs:float" name="d_OMEGA0"/>
<xs:element type="xs:float" name="d_Cis"/>

View File

@ -15,9 +15,9 @@
<xs:complexType>
<xs:sequence>
<xs:element type="xs:byte" name="i_satellite_PRN"/>
<xs:element type="xs:float" name="d_TOW"/>
<xs:element type="xs:float" name="d_IODE_SF2"/>
<xs:element type="xs:float" name="d_IODE_SF3"/>
<xs:element type="xs:int" name="d_TOW"/>
<xs:element type="xs:byte" name="d_IODE_SF2"/>
<xs:element type="xs:byte" name="d_IODE_SF3"/>
<xs:element type="xs:float" name="d_Crs"/>
<xs:element type="xs:float" name="d_Delta_n"/>
<xs:element type="xs:float" name="d_M_0"/>
@ -25,8 +25,8 @@
<xs:element type="xs:float" name="d_e_eccentricity"/>
<xs:element type="xs:float" name="d_Cus"/>
<xs:element type="xs:float" name="d_sqrt_A"/>
<xs:element type="xs:float" name="d_Toe"/>
<xs:element type="xs:float" name="d_Toc"/>
<xs:element type="xs:int" name="d_Toe"/>
<xs:element type="xs:int" name="d_Toc"/>
<xs:element type="xs:float" name="d_Cic"/>
<xs:element type="xs:float" name="d_OMEGA0"/>
<xs:element type="xs:float" name="d_Cis"/>
@ -41,7 +41,7 @@
<xs:element type="xs:byte" name="i_SV_accuracy"/>
<xs:element type="xs:byte" name="i_SV_health"/>
<xs:element type="xs:float" name="d_TGD"/>
<xs:element type="xs:float" name="d_IODC"/>
<xs:element type="xs:byte" name="d_IODC"/>
<xs:element type="xs:short" name="i_AODO"/>
<xs:element type="xs:byte" name="b_fit_interval_flag"/>
<xs:element type="xs:float" name="d_spare1"/>

View File

@ -30,25 +30,25 @@
<xs:element type="xs:float" name="C_rs_3"/>
<xs:element type="xs:float" name="C_ic_4"/>
<xs:element type="xs:float" name="C_is_4"/>
<xs:element type="xs:float" name="t0e_1"/>
<xs:element type="xs:float" name="t0c_4"/>
<xs:element type="xs:int" name="t0e_1"/>
<xs:element type="xs:int" name="t0c_4"/>
<xs:element type="xs:float" name="af0_4"/>
<xs:element type="xs:float" name="af1_4"/>
<xs:element type="xs:float" name="af2_4"/>
<xs:element type="xs:float" name="WN_5"/>
<xs:element type="xs:float" name="TOW_5"/>
<xs:element type="xs:short" name="WN_5"/>
<xs:element type="xs:int" name="TOW_5"/>
<xs:element type="xs:float" name="Galileo_satClkDrift"/>
<xs:element type="xs:float" name="Galileo_dtr"/>
<xs:element type="xs:byte" name="flag_all_ephemeris"/>
<xs:element type="xs:byte" name="IOD_ephemeris"/>
<xs:element type="xs:byte" name="IOD_nav_1"/>
<xs:element type="xs:float" name="SISA_3"/>
<xs:element type="xs:byte" name="SISA_3"/>
<xs:element type="xs:byte" name="E5a_HS"/>
<xs:element type="xs:float" name="E5b_HS_5"/>
<xs:element type="xs:float" name="E1B_HS_5"/>
<xs:element type="xs:byte" name="E5b_HS_5"/>
<xs:element type="xs:byte" name="E1B_HS_5"/>
<xs:element type="xs:byte" name="E5a_DVS"/>
<xs:element type="xs:float" name="E5b_DVS_5"/>
<xs:element type="xs:float" name="E1B_DVS_5"/>
<xs:element type="xs:byte" name="E5b_DVS_5"/>
<xs:element type="xs:byte" name="E1B_DVS_5"/>
<xs:element type="xs:float" name="BGD_E1E5a_5"/>
<xs:element type="xs:float" name="BGD_E1E5b_5"/>
</xs:sequence>

View File

@ -13,8 +13,8 @@
<xs:element type="xs:byte" name="Region3_flag_5"/>
<xs:element type="xs:byte" name="Region4_flag_5"/>
<xs:element type="xs:byte" name="Region5_flag_5"/>
<xs:element type="xs:float" name="TOW_5"/>
<xs:element type="xs:float" name="WN_5"/>
<xs:element type="xs:int" name="TOW_5"/>
<xs:element type="xs:short" name="WN_5"/>
</xs:sequence>
<xs:attribute type="xs:byte" name="class_id"/>
<xs:attribute type="xs:byte" name="tracking_level"/>

View File

@ -7,12 +7,12 @@
<xs:sequence>
<xs:element type="xs:float" name="A0_6"/>
<xs:element type="xs:float" name="A1_6"/>
<xs:element type="xs:float" name="Delta_tLS_6"/>
<xs:element type="xs:float" name="t0t_6"/>
<xs:element type="xs:float" name="WNot_6"/>
<xs:element type="xs:byte" name="Delta_tLS_6"/>
<xs:element type="xs:int" name="t0t_6"/>
<xs:element type="xs:short" name="WNot_6"/>
<xs:element type="xs:short" name="WN_LSF_6"/>
<xs:element type="xs:byte" name="DN_6"/>
<xs:element type="xs:float" name="Delta_tLSF_6"/>
<xs:element type="xs:byte" name="Delta_tLSF_6"/>
<xs:element type="xs:byte" name="flag_utc_model"/>
</xs:sequence>
<xs:attribute type="xs:byte" name="class_id"/>

View File

@ -8,12 +8,12 @@
<xs:element type="xs:byte" name="valid"/>
<xs:element type="xs:float" name="d_A1"/>
<xs:element type="xs:float" name="d_A0"/>
<xs:element type="xs:float" name="d_t_OT"/>
<xs:element type="xs:int" name="d_t_OT"/>
<xs:element type="xs:short" name="i_WN_T"/>
<xs:element type="xs:float" name="d_DeltaT_LS"/>
<xs:element type="xs:byte" name="d_DeltaT_LS"/>
<xs:element type="xs:short" name="i_WN_LSF"/>
<xs:element type="xs:byte" name="i_DN"/>
<xs:element type="xs:float" name="d_DeltaT_LSF"/>
<xs:element type="xs:byte" name="d_DeltaT_LSF"/>
</xs:sequence>
<xs:attribute type="xs:byte" name="class_id"/>
<xs:attribute type="xs:byte" name="tracking_level"/>

View File

@ -645,7 +645,7 @@ int sbsreadmsgt(const char *file, int sel, gtime_t ts, gtime_t te,
for (i = 0; i < n; i++)
{
if (!(ext = strrchr(efiles[i], '.'))) continue;
if (strcmp(ext, ".sbs") != 0 && strcmp(ext, ".SBS") &&
if (strcmp(ext, ".sbs") != 0 && strcmp(ext, ".SBS") != 0 &&
strcmp(ext, ".ems") != 0 && strcmp(ext, ".EMS") != 0) continue;
readmsgs(efiles[i], sel, ts, te, sbs);

View File

@ -682,7 +682,7 @@ void decode_solopt(char *buff, solopt_t *opt)
trace(4, "decode_solhead: buff=%s\n", buff);
if (strncmp(buff, COMMENTH, 1) != 0 && strncmp(buff, "+", 1)) return;
if (strncmp(buff, COMMENTH, 1) != 0 && strncmp(buff, "+", 1) != 0) return;
if (strstr(buff, "GPST"))
opt->times = TIMES_GPST;

View File

@ -141,7 +141,7 @@ galileo_telemetry_decoder_cc::galileo_telemetry_decoder_cc(
d_samples_per_symbol = 0U;
d_PRN_code_period_ms = 0U;
d_required_symbols = 0U;
d_frame_length_symbols = 0.0;
d_frame_length_symbols = 0U;
CodeLength = 0;
DataLength = 0;
std::cout << "Galileo unified telemetry decoder error: Unknown frame type " << std::endl;

View File

@ -38,7 +38,7 @@
#ifndef _rotl
#define _rotl(X, N) ((X << N) ^ (X >> (32 - N))) // Used in the parity check algorithm
#define _rotl(X, N) (((X) << (N)) ^ ((X) >> (32 - (N)))) // Used in the parity check algorithm
#endif
using google::LogMessage;

View File

@ -95,15 +95,15 @@ void v27_init(v27_t *v, v27_decision_t *decisions, unsigned int decisions_count,
unsigned int metric,m0,m1,decision;\
metric = (v->poly->c0[i] ^ sym0) + (v->poly->c1[i] ^ sym1);\
m0 = v->old_metrics[i] + metric;\
m1 = v->old_metrics[i+32] + (510 - metric);\
m1 = v->old_metrics[(i)+32] + (510 - metric);\
decision = (signed int)(m0-m1) > 0;\
v->new_metrics[2*i] = decision ? m1 : m0;\
d->w[i/16] |= decision << ((2*i)&31);\
v->new_metrics[2*(i)] = decision ? m1 : m0;\
d->w[(i)/16] |= decision << ((2*(i))&31);\
m0 -= (metric+metric-510);\
m1 += (metric+metric-510);\
decision = (signed int)(m0-m1) > 0;\
v->new_metrics[2*i+1] = decision ? m1 : m0;\
d->w[i/16] |= decision << ((2*i+1)&31);\
v->new_metrics[2*(i)+1] = decision ? m1 : m0;\
d->w[(i)/16] |= decision << ((2*(i)+1)&31);\
}
/** Update a v27_t decoder with a block of symbols.

View File

@ -220,12 +220,12 @@ void gnss_sdr_supl_client::read_supl_data()
{
gps_utc.d_A0 = static_cast<double>(assist.utc.a0) * pow(2.0, -30);
gps_utc.d_A1 = static_cast<double>(assist.utc.a1) * pow(2.0, -50);
gps_utc.d_DeltaT_LS = static_cast<double>(assist.utc.delta_tls);
gps_utc.d_DeltaT_LSF = static_cast<double>(assist.utc.delta_tlsf);
gps_utc.d_t_OT = static_cast<double>(assist.utc.tot) * pow(2.0, 12);
gps_utc.i_DN = static_cast<double>(assist.utc.dn);
gps_utc.i_WN_T = static_cast<double>(assist.utc.wnt);
gps_utc.i_WN_LSF = static_cast<double>(assist.utc.wnlsf);
gps_utc.d_DeltaT_LS = static_cast<int32_t>(assist.utc.delta_tls);
gps_utc.d_DeltaT_LSF = static_cast<int32_t>(assist.utc.delta_tlsf);
gps_utc.d_t_OT = static_cast<int32_t>(assist.utc.tot) * pow(2.0, 12);
gps_utc.i_DN = static_cast<int32_t>(assist.utc.dn);
gps_utc.i_WN_T = static_cast<int32_t>(assist.utc.wnt);
gps_utc.i_WN_LSF = static_cast<int32_t>(assist.utc.wnlsf);
gps_utc.valid = true;
}
@ -268,7 +268,7 @@ void gnss_sdr_supl_client::read_supl_data()
gps_almanac_iterator->second.d_OMEGA0 = static_cast<double>(a->OMEGA_0) * pow(2.0, -23);
gps_almanac_iterator->second.d_sqrt_A = static_cast<double>(a->A_sqrt) * pow(2.0, -11);
gps_almanac_iterator->second.d_OMEGA_DOT = static_cast<double>(a->OMEGA_dot) * pow(2.0, -38);
gps_almanac_iterator->second.i_Toa = static_cast<int32_t>(a->toa) * pow(2.0, 12);
gps_almanac_iterator->second.i_Toa = static_cast<int32_t>(a->toa * pow(2.0, 12));
gps_almanac_iterator->second.d_e_eccentricity = static_cast<double>(a->e) * pow(2.0, -21);
gps_almanac_iterator->second.d_M_0 = static_cast<double>(a->M0) * pow(2.0, -23);
}

View File

@ -52,9 +52,9 @@ asn_TYPE_descriptor_t asn_DEF_OCTET_STRING = {
#undef NEXT_PHASE
#undef PREV_PHASE
#define _CH_PHASE(ctx, inc) do { \
if(ctx->phase == 0) \
ctx->context = 0; \
ctx->phase += inc; \
if((ctx)->phase == 0) \
(ctx)->context = 0; \
(ctx)->phase += (inc); \
} while(0)
#define NEXT_PHASE(ctx) _CH_PHASE(ctx, +1)
#define PREV_PHASE(ctx) _CH_PHASE(ctx, -1)

View File

@ -16,7 +16,7 @@
asn_dec_rval_t rval; \
rval.code = _code; \
if(opt_ctx) opt_ctx->step = step; /* Save context */ \
if(_code == RC_OK || opt_ctx) \
if((_code) == RC_OK || opt_ctx) \
rval.consumed = consumed_myself; \
else \
rval.consumed = 0; /* Context-free */ \

View File

@ -46,8 +46,8 @@
*/
#undef NEXT_PHASE
#define NEXT_PHASE(ctx) do { \
ctx->phase++; \
ctx->step = 0; \
(ctx)->phase++; \
(ctx)->step = 0; \
} while(0)
/*

View File

@ -47,10 +47,10 @@
#undef NEXT_PHASE
#undef PHASE_OUT
#define NEXT_PHASE(ctx) do { \
ctx->phase++; \
ctx->step = 0; \
(ctx)->phase++; \
(ctx)->step = 0; \
} while(0)
#define PHASE_OUT(ctx) do { ctx->phase = 10; } while(0)
#define PHASE_OUT(ctx) do { (ctx)->phase = 10; } while(0)
/*
* Return a standardized complex structure.

View File

@ -47,10 +47,10 @@
#undef NEXT_PHASE
#undef PHASE_OUT
#define NEXT_PHASE(ctx) do { \
ctx->phase++; \
ctx->step = 0; \
(ctx)->phase++; \
(ctx)->step = 0; \
} while(0)
#define PHASE_OUT(ctx) do { ctx->phase = 10; } while(0)
#define PHASE_OUT(ctx) do { (ctx)->phase = 10; } while(0)
/*
* Return a standardized complex structure.

View File

@ -774,11 +774,11 @@ static int write_out(const void *buffer, size_t size, void *key) {
}
static int argument_is_stdin(char *av[], int idx) {
if(strcmp(av[idx], "-")) {
if(strcmp(av[idx], "-") != 0) {
return 0; /* Certainly not <stdin> */
} else {
/* This might be <stdin>, unless `./program -- -` */
if(strcmp(av[-1], "--"))
if(strcmp(av[-1], "--") != 0)
return 1;
else
return 0;

View File

@ -181,12 +181,12 @@ xer_check_tag(const void *buf_ptr, int size, const char *need_tag) {
#define XER_GOT_BODY(chunk_buf, chunk_size, size) do { \
ssize_t converted_size = body_receiver \
(struct_key, chunk_buf, chunk_size, \
(size_t)chunk_size < size); \
(size_t)(chunk_size) < (size)); \
if(converted_size == -1) RETURN(RC_FAIL); \
if(converted_size == 0 \
&& size == (size_t)chunk_size) \
&& (size) == (size_t)(chunk_size)) \
RETURN(RC_WMORE); \
chunk_size = converted_size; \
(chunk_size) = converted_size; \
} while(0)
#define XER_GOT_EMPTY() do { \
if(body_receiver(struct_key, 0, 0, size > 0) == -1) \

View File

@ -60,7 +60,7 @@ _charclass[256] = {
#define TOKEN_CB_CALL(type, _ns, _current_too, _final) do { \
int _ret; \
pstate_e ns = _ns; \
ssize_t _sz = (p - chunk_start) + _current_too; \
ssize_t _sz = (p - chunk_start) + (_current_too); \
if (!_sz) { \
/* Shortcut */ \
state = _ns; \
@ -68,11 +68,11 @@ _charclass[256] = {
} \
_ret = cb(type, chunk_start, _sz, key); \
if(_ret < _sz) { \
if(_current_too && _ret == -1) \
if((_current_too) && _ret == -1) \
state = ns; \
goto finish; \
} \
chunk_start = p + _current_too; \
chunk_start = p + (_current_too); \
state = ns; \
} while(0)

View File

@ -369,7 +369,7 @@ asn_GT2time_frac(const GeneralizedTime_t *st, int *frac_value, int *frac_digits,
errno = EINVAL; \
return -1; \
} else { \
var = var * 10 + (ch - 0x30); \
(var) = (var) * 10 + (ch - 0x30); \
buf++; \
} \
} while(0)

View File

@ -52,9 +52,9 @@ asn_TYPE_descriptor_t asn_DEF_OCTET_STRING = {
#undef NEXT_PHASE
#undef PREV_PHASE
#define _CH_PHASE(ctx, inc) do { \
if(ctx->phase == 0) \
ctx->context = 0; \
ctx->phase += inc; \
if((ctx)->phase == 0) \
(ctx)->context = 0; \
(ctx)->phase += (inc); \
} while(0)
#define NEXT_PHASE(ctx) _CH_PHASE(ctx, +1)
#define PREV_PHASE(ctx) _CH_PHASE(ctx, -1)

View File

@ -16,7 +16,7 @@
asn_dec_rval_t rval; \
rval.code = _code; \
if(opt_ctx) opt_ctx->step = step; /* Save context */ \
if(_code == RC_OK || opt_ctx) \
if((_code) == RC_OK || opt_ctx) \
rval.consumed = consumed_myself; \
else \
rval.consumed = 0; /* Context-free */ \

View File

@ -46,8 +46,8 @@
*/
#undef NEXT_PHASE
#define NEXT_PHASE(ctx) do { \
ctx->phase++; \
ctx->step = 0; \
(ctx)->phase++; \
(ctx)->step = 0; \
} while(0)
/*

View File

@ -47,10 +47,10 @@
#undef NEXT_PHASE
#undef PHASE_OUT
#define NEXT_PHASE(ctx) do { \
ctx->phase++; \
ctx->step = 0; \
(ctx)->phase++; \
(ctx)->step = 0; \
} while(0)
#define PHASE_OUT(ctx) do { ctx->phase = 10; } while(0)
#define PHASE_OUT(ctx) do { (ctx)->phase = 10; } while(0)
/*
* Return a standardized complex structure.

View File

@ -47,10 +47,10 @@
#undef NEXT_PHASE
#undef PHASE_OUT
#define NEXT_PHASE(ctx) do { \
ctx->phase++; \
ctx->step = 0; \
(ctx)->phase++; \
(ctx)->step = 0; \
} while(0)
#define PHASE_OUT(ctx) do { ctx->phase = 10; } while(0)
#define PHASE_OUT(ctx) do { (ctx)->phase = 10; } while(0)
/*
* Return a standardized complex structure.

View File

@ -181,12 +181,12 @@ xer_check_tag(const void *buf_ptr, int size, const char *need_tag) {
#define XER_GOT_BODY(chunk_buf, chunk_size, size) do { \
ssize_t converted_size = body_receiver \
(struct_key, chunk_buf, chunk_size, \
(size_t)chunk_size < size); \
(size_t)(chunk_size) < (size)); \
if(converted_size == -1) RETURN(RC_FAIL); \
if(converted_size == 0 \
&& size == (size_t)chunk_size) \
&& (size) == (size_t)(chunk_size)) \
RETURN(RC_WMORE); \
chunk_size = converted_size; \
(chunk_size) = converted_size; \
} while(0)
#define XER_GOT_EMPTY() do { \
if(body_receiver(struct_key, 0, 0, size > 0) == -1) \

View File

@ -60,7 +60,7 @@ _charclass[256] = {
#define TOKEN_CB_CALL(type, _ns, _current_too, _final) do { \
int _ret; \
pstate_e ns = _ns; \
ssize_t _sz = (p - chunk_start) + _current_too; \
ssize_t _sz = (p - chunk_start) + (_current_too); \
if (!_sz) { \
/* Shortcut */ \
state = _ns; \
@ -68,11 +68,11 @@ _charclass[256] = {
} \
_ret = cb(type, chunk_start, _sz, key); \
if(_ret < _sz) { \
if(_current_too && _ret == -1) \
if((_current_too) && _ret == -1) \
state = ns; \
goto finish; \
} \
chunk_start = p + _current_too; \
chunk_start = p + (_current_too); \
state = ns; \
} while(0)

View File

@ -54,7 +54,7 @@ const int32_t GPS_CNAV_DATA_PAGE_BITS = 300;
const std::vector<std::pair<int32_t, int32_t> > CNAV_PRN({{9, 6}});
const std::vector<std::pair<int32_t, int32_t> > CNAV_MSG_TYPE({{15, 6}});
const std::vector<std::pair<int32_t, int32_t> > CNAV_TOW({{21, 17}}); // GPS Time Of Week in seconds
const double CNAV_TOW_LSB = 6.0;
const int32_t CNAV_TOW_LSB = 6;
const std::vector<std::pair<int32_t, int32_t> > CNAV_ALERT_FLAG({{38, 1}});
// MESSAGE TYPE 10 (Ephemeris 1)
@ -62,11 +62,11 @@ const std::vector<std::pair<int32_t, int32_t> > CNAV_ALERT_FLAG({{38, 1}});
const std::vector<std::pair<int32_t, int32_t> > CNAV_WN({{39, 13}});
const std::vector<std::pair<int32_t, int32_t> > CNAV_HEALTH({{52, 3}});
const std::vector<std::pair<int32_t, int32_t> > CNAV_TOP1({{55, 11}});
const double CNAV_TOP1_LSB = 300.0;
const int32_t CNAV_TOP1_LSB = 300;
const std::vector<std::pair<int32_t, int32_t> > CNAV_URA({{66, 5}});
const std::vector<std::pair<int32_t, int32_t> > CNAV_TOE1({{71, 11}});
const double CNAV_TOE1_LSB = 300.0;
const int32_t CNAV_TOE1_LSB = 300;
const std::vector<std::pair<int32_t, int32_t> > CNAV_DELTA_A({{82, 26}}); // Relative to AREF = 26,559,710 meters
const double CNAV_DELTA_A_LSB = TWO_N9;
@ -90,7 +90,7 @@ const std::vector<std::pair<int32_t, int32_t> > CNAV_L2_PHASING_FLAG({{273, 1}})
// MESSAGE TYPE 11 (Ephemeris 2)
const std::vector<std::pair<int32_t, int32_t> > CNAV_TOE2({{39, 11}});
const double CNAV_TOE2_LSB = 300.0;
const int32_t CNAV_TOE2_LSB = 300;
const std::vector<std::pair<int32_t, int32_t> > CNAV_OMEGA0({{50, 33}});
const double CNAV_OMEGA0_LSB = TWO_N32 * PI; // semi-circles to radians
const std::vector<std::pair<int32_t, int32_t> > CNAV_I0({{83, 33}});
@ -116,12 +116,12 @@ const double CNAV_CUC_LSB = TWO_N30;
// MESSAGE TYPE 30 (CLOCK, IONO, GRUP DELAY)
const std::vector<std::pair<int32_t, int32_t> > CNAV_TOP2({{39, 11}});
const double CNAV_TOP2_LSB = 300.0;
const int32_t CNAV_TOP2_LSB = 300;
const std::vector<std::pair<int32_t, int32_t> > CNAV_URA_NED0({{50, 5}});
const std::vector<std::pair<int32_t, int32_t> > CNAV_URA_NED1({{55, 3}});
const std::vector<std::pair<int32_t, int32_t> > CNAV_URA_NED2({{58, 3}});
const std::vector<std::pair<int32_t, int32_t> > CNAV_TOC({{61, 11}});
const double CNAV_TOC_LSB = 300.0;
const int32_t CNAV_TOC_LSB = 300;
const std::vector<std::pair<int, int> > CNAV_AF0({{72, 26}});
const double CNAV_AF0_LSB = TWO_N35;
const std::vector<std::pair<int, int> > CNAV_AF1({{98, 20}});
@ -167,9 +167,9 @@ const double CNAV_A1_LSB = TWO_N51;
const std::vector<std::pair<int32_t, int32_t> > CNAV_A2({{157, 7}});
const double CNAV_A2_LSB = TWO_N68;
const std::vector<std::pair<int32_t, int32_t> > CNAV_DELTA_TLS({{164, 8}});
const double CNAV_DELTA_TLS_LSB = 1;
const int32_t CNAV_DELTA_TLS_LSB = 1;
const std::vector<std::pair<int32_t, int32_t> > CNAV_TOT({{172, 16}});
const double CNAV_TOT_LSB = TWO_P4;
const int32_t CNAV_TOT_LSB = TWO_P4;
const std::vector<std::pair<int32_t, int32_t> > CNAV_WN_OT({{188, 13}});
const int32_t CNAV_WN_OT_LSB = 1;
const std::vector<std::pair<int32_t, int32_t> > CNAV_WN_LSF({{201, 13}});
@ -177,7 +177,7 @@ const int32_t CNAV_WN_LSF_LSB = 1;
const std::vector<std::pair<int32_t, int32_t> > CNAV_DN({{214, 4}});
const int32_t CNAV_DN_LSB = 1;
const std::vector<std::pair<int32_t, int32_t> > CNAV_DELTA_TLSF({{218, 8}});
const double CNAV_DELTA_TLSF_LSB = 1;
const int32_t CNAV_DELTA_TLSF_LSB = 1;
// TODO: Add more frames (Almanac, etc...)

View File

@ -118,7 +118,7 @@ const std::vector<std::pair<int32_t, int32_t>> T_GD({{197, 8}});
const double T_GD_LSB = TWO_N31;
const std::vector<std::pair<int32_t, int32_t>> IODC({{83, 2}, {211, 8}});
const std::vector<std::pair<int32_t, int32_t>> T_OC({{219, 16}});
const double T_OC_LSB = TWO_P4;
const int32_t T_OC_LSB = static_cast<int32_t>(TWO_P4);
const std::vector<std::pair<int32_t, int32_t>> A_F2({{241, 8}});
const double A_F2_LSB = TWO_N55;
const std::vector<std::pair<int32_t, int32_t>> A_F1({{249, 16}});
@ -143,7 +143,7 @@ const double C_US_LSB = TWO_N29;
const std::vector<std::pair<int32_t, int32_t>> SQRT_A({{227, 8}, {241, 24}});
const double SQRT_A_LSB = TWO_N19;
const std::vector<std::pair<int32_t, int32_t>> T_OE({{271, 16}});
const double T_OE_LSB = TWO_P4;
const int32_t T_OE_LSB = static_cast<int32_t>(TWO_P4);
const std::vector<std::pair<int32_t, int32_t>> FIT_INTERVAL_FLAG({{271, 1}});
const std::vector<std::pair<int32_t, int32_t>> AODO({{272, 5}});
const int32_t AODO_LSB = 900;

View File

@ -103,7 +103,7 @@ const std::vector<std::pair<int32_t, int32_t>> PAGE_TYPE_bit({{1, 6}});
/*Page 1 - Word type 1: Ephemeris (1/4)*/
const std::vector<std::pair<int32_t, int32_t>> IOD_nav_1_bit({{7, 10}});
const std::vector<std::pair<int32_t, int32_t>> T0E_1_bit({{17, 14}});
const double t0e_1_LSB = 60;
const int32_t t0e_1_LSB = 60;
const std::vector<std::pair<int32_t, int32_t>> M0_1_bit({{31, 32}});
const double M0_1_LSB = PI_TWO_N31;
const std::vector<std::pair<int32_t, int32_t>> e_1_bit({{63, 32}});
@ -151,7 +151,7 @@ const double C_ic_4_LSB = TWO_N29;
const std::vector<std::pair<int32_t, int32_t>> C_is_4_bit({{39, 16}});
const double C_is_4_LSB = TWO_N29;
const std::vector<std::pair<int32_t, int32_t>> t0c_4_bit({{55, 14}}); //
const double t0c_4_LSB = 60;
const int32_t t0c_4_LSB = 60;
const std::vector<std::pair<int32_t, int32_t>> af0_4_bit({{69, 31}}); //
const double af0_4_LSB = TWO_N34;
const std::vector<std::pair<int32_t, int32_t>> af1_4_bit({{100, 21}}); //
@ -198,7 +198,7 @@ const std::vector<std::pair<int32_t, int32_t>> A1_6_bit({{39, 24}});
const double A1_6_LSB = TWO_N50;
const std::vector<std::pair<int32_t, int32_t>> Delta_tLS_6_bit({{63, 8}});
const std::vector<std::pair<int32_t, int32_t>> t0t_6_bit({{71, 8}});
const double t0t_6_LSB = 3600;
const int32_t t0t_6_LSB = 3600;
const std::vector<std::pair<int32_t, int32_t>> WNot_6_bit({{79, 8}});
const std::vector<std::pair<int32_t, int32_t>> WN_LSF_6_bit({{87, 8}});
const std::vector<std::pair<int32_t, int32_t>> DN_6_bit({{95, 3}});
@ -294,7 +294,7 @@ const double A_0G_10_LSB = TWO_N35;
const std::vector<std::pair<int32_t, int32_t>> A_1G_10_bit({{103, 12}});
const double A_1G_10_LSB = TWO_N51;
const std::vector<std::pair<int32_t, int32_t>> t_0G_10_bit({{115, 8}});
const double t_0G_10_LSB = 3600;
const int32_t t_0G_10_LSB = 3600;
const std::vector<std::pair<int32_t, int32_t>> WN_0G_10_bit({{123, 6}});

View File

@ -83,7 +83,7 @@ const std::vector<std::pair<int32_t, int32_t>> FNAV_PAGE_TYPE_bit({{1, 6}});
const std::vector<std::pair<int32_t, int32_t>> FNAV_SV_ID_PRN_1_bit({{7, 6}});
const std::vector<std::pair<int32_t, int32_t>> FNAV_IODnav_1_bit({{13, 10}});
const std::vector<std::pair<int32_t, int32_t>> FNAV_t0c_1_bit({{23, 14}});
const double FNAV_t0c_1_LSB = 60;
const int32_t FNAV_t0c_1_LSB = 60;
const std::vector<std::pair<int32_t, int32_t>> FNAV_af0_1_bit({{37, 31}});
const double FNAV_af0_1_LSB = TWO_N34;
const std::vector<std::pair<int32_t, int32_t>> FNAV_af1_1_bit({{68, 21}});
@ -143,7 +143,7 @@ const double FNAV_Crc_3_LSB = TWO_N5;
const std::vector<std::pair<int32_t, int32_t>> FNAV_Crs_3_bit({{145, 16}});
const double FNAV_Crs_3_LSB = TWO_N5;
const std::vector<std::pair<int32_t, int32_t>> FNAV_t0e_3_bit({{161, 14}});
const double FNAV_t0e_3_LSB = 60;
const int32_t FNAV_t0e_3_LSB = 60;
const std::vector<std::pair<int32_t, int32_t>> FNAV_WN_3_bit({{175, 12}});
const std::vector<std::pair<int32_t, int32_t>> FNAV_TOW_3_bit({{187, 20}});
@ -159,13 +159,13 @@ const std::vector<std::pair<int32_t, int32_t>> FNAV_A1_4_bit({{81, 24}});
const double FNAV_A1_4_LSB = TWO_N50;
const std::vector<std::pair<int32_t, int32_t>> FNAV_deltatls_4_bit({{105, 8}});
const std::vector<std::pair<int32_t, int32_t>> FNAV_t0t_4_bit({{113, 8}});
const double FNAV_t0t_4_LSB = 3600;
const int32_t FNAV_t0t_4_LSB = 3600;
const std::vector<std::pair<int32_t, int32_t>> FNAV_WNot_4_bit({{121, 8}});
const std::vector<std::pair<int32_t, int32_t>> FNAV_WNlsf_4_bit({{129, 8}});
const std::vector<std::pair<int32_t, int32_t>> FNAV_DN_4_bit({{137, 3}});
const std::vector<std::pair<int32_t, int32_t>> FNAV_deltatlsf_4_bit({{140, 8}});
const std::vector<std::pair<int32_t, int32_t>> FNAV_t0g_4_bit({{148, 8}});
const double FNAV_t0g_4_LSB = 3600;
const int32_t FNAV_t0g_4_LSB = 3600;
const std::vector<std::pair<int32_t, int32_t>> FNAV_A0g_4_bit({{156, 16}});
const double FNAV_A0g_4_LSB = TWO_N35;
const std::vector<std::pair<int32_t, int32_t>> FNAV_A1g_4_bit({{172, 12}});

View File

@ -54,26 +54,26 @@ Galileo_Ephemeris::Galileo_Ephemeris()
C_rs_3 = 0.0; // Amplitude of the sine harmonic correction term to the orbit radius [meters]
C_ic_4 = 0.0; // Amplitude of the cosine harmonic correction term to the angle of inclination [radians]
C_is_4 = 0.0; // Amplitude of the sine harmonic correction term to the angle of inclination [radians]
t0e_1 = 0.0; // Ephemeris reference time [s]
t0e_1 = 0; // Ephemeris reference time [s]
// Clock correction parameters
t0c_4 = 0.0; // Clock correction data reference Time of Week [sec]
t0c_4 = 0; // Clock correction data reference Time of Week [sec]
af0_4 = 0.0; // SV clock bias correction coefficient [s]
af1_4 = 0.0; // SV clock drift correction coefficient [s/s]
af2_4 = 0.0; // SV clock drift rate correction coefficient [s/s^2]
// GST
WN_5 = 0.0;
TOW_5 = 0.0;
WN_5 = 0;
TOW_5 = 0;
// SV status
SISA_3 = 0.0;
E5a_HS = 0U;
E5b_HS_5 = 0.0;
E1B_HS_5 = 0.0;
SISA_3 = 0;
E5a_HS = 0;
E5b_HS_5 = 0;
E1B_HS_5 = 0;
E5a_DVS = false;
E5b_DVS_5 = 0.0;
E1B_DVS_5 = 0.0;
E5b_DVS_5 = false;
E1B_DVS_5 = false;
BGD_E1E5a_5 = 0.0; // E1-E5a Broadcast Group Delay [s]
BGD_E1E5b_5 = 0.0; // E1-E5b Broadcast Group Delay [s]

View File

@ -67,29 +67,29 @@ public:
double C_rs_3; //!< Amplitude of the sine harmonic correction term to the orbit radius [meters]
double C_ic_4; //!< Amplitude of the cosine harmonic correction term to the angle of inclination [radians]
double C_is_4; //!< Amplitude of the sine harmonic correction term to the angle of inclination [radians]
double t0e_1; //!< Ephemeris reference time [s]
int32_t t0e_1; //!< Ephemeris reference time [s]
/*Clock correction parameters*/
double t0c_4; //!< Clock correction data reference Time of Week [sec]
double af0_4; //!< SV clock bias correction coefficient [s]
double af1_4; //!< SV clock drift correction coefficient [s/s]
double af2_4; //!< SV clock drift rate correction coefficient [s/s^2]
int32_t t0c_4; //!< Clock correction data reference Time of Week [sec]
double af0_4; //!< SV clock bias correction coefficient [s]
double af1_4; //!< SV clock drift correction coefficient [s/s]
double af2_4; //!< SV clock drift rate correction coefficient [s/s^2]
/*GST*/
//Not belong to ephemeris set (page 1 to 4)
double WN_5; //!< Week number
double TOW_5; //!< Time of Week
// Not belong to ephemeris set (page 1 to 4)
int32_t WN_5; //!< Week number
int32_t TOW_5; //!< Time of Week
double Galileo_satClkDrift;
double Galileo_dtr; //!< relativistic clock correction term
// SV status
double SISA_3;
uint32_t E5a_HS; //!< E5a Signal Health Status
double E5b_HS_5; //!< E5b Signal Health Status
double E1B_HS_5; //!< E1B Signal Health Status
int32_t SISA_3;
int32_t E5a_HS; //!< E5a Signal Health Status
int32_t E5b_HS_5; //!< E5b Signal Health Status
int32_t E1B_HS_5; //!< E1B Signal Health Status
bool E5a_DVS; //!< E5a Data Validity Status
double E5b_DVS_5; //!< E5b Data Validity Status
double E1B_DVS_5; //!< E1B Data Validity Status
bool E5b_DVS_5; //!< E5b Data Validity Status
bool E1B_DVS_5; //!< E1B Data Validity Status
double BGD_E1E5a_5; //!< E1-E5a Broadcast Group Delay [s]
double BGD_E1E5b_5; //!< E1-E5b Broadcast Group Delay [s]

View File

@ -70,11 +70,11 @@ void Galileo_Fnav_Message::reset()
// health and Data validity status
FNAV_SV_ID_PRN_1 = 0;
FNAV_IODnav_1 = -1;
FNAV_t0c_1 = 0.0;
FNAV_t0c_1 = 0;
FNAV_af0_1 = 0.0;
FNAV_af1_1 = 0.0;
FNAV_af2_1 = 0.0;
FNAV_SISA_1 = 0.0;
FNAV_SISA_1 = 0;
FNAV_ai0_1 = 0.0;
FNAV_ai1_1 = 0.0;
FNAV_ai2_1 = 0.0;
@ -85,8 +85,8 @@ void Galileo_Fnav_Message::reset()
FNAV_region5_1 = false;
FNAV_BGD_1 = 0.0;
FNAV_E5ahs_1 = 0;
FNAV_WN_1 = 0.0;
FNAV_TOW_1 = 0.0;
FNAV_WN_1 = 0;
FNAV_TOW_1 = 0;
FNAV_E5advs_1 = false;
// WORD 2 Ephemeris (1/3) and GST
@ -97,8 +97,8 @@ void Galileo_Fnav_Message::reset()
FNAV_a12_2 = 0.0;
FNAV_omega0_2 = 0.0;
FNAV_idot_2 = 0.0;
FNAV_WN_2 = 0.0;
FNAV_TOW_2 = 0.0;
FNAV_WN_2 = 0;
FNAV_TOW_2 = 0;
// WORD 3 Ephemeris (2/3) and GST
FNAV_IODnav_3 = -3;
@ -109,9 +109,9 @@ void Galileo_Fnav_Message::reset()
FNAV_Cus_3 = 0.0;
FNAV_Crc_3 = 0.0;
FNAV_Crs_3 = 0.0;
FNAV_t0e_3 = 0.0;
FNAV_WN_3 = 0.0;
FNAV_TOW_3 = 0.0;
FNAV_t0e_3 = 0;
FNAV_WN_3 = 0;
FNAV_TOW_3 = 0;
// WORD 4 Ephemeris (3/3), GST-UTC conversion, GST-GPS conversion and TOW.
// Note that the clock is repeated in this page type
@ -120,17 +120,17 @@ void Galileo_Fnav_Message::reset()
FNAV_Cis_4 = 0.0;
FNAV_A0_4 = 0.0;
FNAV_A1_4 = 0.0;
FNAV_deltatls_4 = 0.0;
FNAV_t0t_4 = 0.0;
FNAV_WNot_4 = 0.0;
FNAV_WNlsf_4 = 0.0;
FNAV_DN_4 = 0.0;
FNAV_deltatlsf_4 = 0.0;
FNAV_t0g_4 = 0.0;
FNAV_deltatls_4 = 0;
FNAV_t0t_4 = 0;
FNAV_WNot_4 = 0;
FNAV_WNlsf_4 = 0;
FNAV_DN_4 = 0;
FNAV_deltatlsf_4 = 0;
FNAV_t0g_4 = 0;
FNAV_A0g_4 = 0.0;
FNAV_A1g_4 = 0.0;
FNAV_WN0g_4 = 0.0;
FNAV_TOW_4 = 0.0;
FNAV_WN0g_4 = 0;
FNAV_TOW_4 = 0;
// WORD 5 Almanac (SVID1 and SVID2(1/2)), Week Number and almanac reference time
FNAV_IODa_5 = 0;
@ -238,7 +238,7 @@ void Galileo_Fnav_Message::decode_page(const std::string& data)
case 1: // SVID, Clock correction, SISA, Ionospheric correction, BGD, GST, Signal health and Data validity status
FNAV_SV_ID_PRN_1 = static_cast<int32_t>(read_navigation_unsigned(data_bits, FNAV_SV_ID_PRN_1_bit));
FNAV_IODnav_1 = static_cast<int32_t>(read_navigation_unsigned(data_bits, FNAV_IODnav_1_bit));
FNAV_t0c_1 = static_cast<double>(read_navigation_unsigned(data_bits, FNAV_t0c_1_bit));
FNAV_t0c_1 = static_cast<int32_t>(read_navigation_unsigned(data_bits, FNAV_t0c_1_bit));
FNAV_t0c_1 *= FNAV_t0c_1_LSB;
FNAV_af0_1 = static_cast<double>(read_navigation_signed(data_bits, FNAV_af0_1_bit));
FNAV_af0_1 *= FNAV_af0_1_LSB;
@ -246,7 +246,7 @@ void Galileo_Fnav_Message::decode_page(const std::string& data)
FNAV_af1_1 *= FNAV_af1_1_LSB;
FNAV_af2_1 = static_cast<double>(read_navigation_signed(data_bits, FNAV_af2_1_bit));
FNAV_af2_1 *= FNAV_af2_1_LSB;
FNAV_SISA_1 = static_cast<double>(read_navigation_unsigned(data_bits, FNAV_SISA_1_bit));
FNAV_SISA_1 = static_cast<int32_t>(read_navigation_unsigned(data_bits, FNAV_SISA_1_bit));
FNAV_ai0_1 = static_cast<double>(read_navigation_unsigned(data_bits, FNAV_ai0_1_bit));
FNAV_ai0_1 *= FNAV_ai0_1_LSB;
FNAV_ai1_1 = static_cast<double>(read_navigation_signed(data_bits, FNAV_ai1_1_bit));
@ -261,8 +261,8 @@ void Galileo_Fnav_Message::decode_page(const std::string& data)
FNAV_BGD_1 = static_cast<double>(read_navigation_signed(data_bits, FNAV_BGD_1_bit));
FNAV_BGD_1 *= FNAV_BGD_1_LSB;
FNAV_E5ahs_1 = static_cast<uint32_t>(read_navigation_unsigned(data_bits, FNAV_E5ahs_1_bit));
FNAV_WN_1 = static_cast<double>(read_navigation_unsigned(data_bits, FNAV_WN_1_bit));
FNAV_TOW_1 = static_cast<double>(read_navigation_unsigned(data_bits, FNAV_TOW_1_bit));
FNAV_WN_1 = static_cast<int32_t>(read_navigation_unsigned(data_bits, FNAV_WN_1_bit));
FNAV_TOW_1 = static_cast<int32_t>(read_navigation_unsigned(data_bits, FNAV_TOW_1_bit));
FNAV_E5advs_1 = static_cast<bool>(read_navigation_unsigned(data_bits, FNAV_E5advs_1_bit));
flag_TOW_1 = true;
flag_TOW_set = true;
@ -282,8 +282,8 @@ void Galileo_Fnav_Message::decode_page(const std::string& data)
FNAV_omega0_2 *= FNAV_omega0_2_LSB;
FNAV_idot_2 = static_cast<double>(read_navigation_signed(data_bits, FNAV_idot_2_bit));
FNAV_idot_2 *= FNAV_idot_2_LSB;
FNAV_WN_2 = static_cast<double>(read_navigation_unsigned(data_bits, FNAV_WN_2_bit));
FNAV_TOW_2 = static_cast<double>(read_navigation_unsigned(data_bits, FNAV_TOW_2_bit));
FNAV_WN_2 = static_cast<int32_t>(read_navigation_unsigned(data_bits, FNAV_WN_2_bit));
FNAV_TOW_2 = static_cast<int32_t>(read_navigation_unsigned(data_bits, FNAV_TOW_2_bit));
flag_TOW_2 = true;
flag_TOW_set = true;
flag_ephemeris_1 = true;
@ -304,10 +304,10 @@ void Galileo_Fnav_Message::decode_page(const std::string& data)
FNAV_Crc_3 *= FNAV_Crc_3_LSB;
FNAV_Crs_3 = static_cast<double>(read_navigation_signed(data_bits, FNAV_Crs_3_bit));
FNAV_Crs_3 *= FNAV_Crs_3_LSB;
FNAV_t0e_3 = static_cast<double>(read_navigation_unsigned(data_bits, FNAV_t0e_3_bit));
FNAV_t0e_3 = static_cast<int32_t>(read_navigation_unsigned(data_bits, FNAV_t0e_3_bit));
FNAV_t0e_3 *= FNAV_t0e_3_LSB;
FNAV_WN_3 = static_cast<double>(read_navigation_unsigned(data_bits, FNAV_WN_3_bit));
FNAV_TOW_3 = static_cast<double>(read_navigation_unsigned(data_bits, FNAV_TOW_3_bit));
FNAV_WN_3 = static_cast<int32_t>(read_navigation_unsigned(data_bits, FNAV_WN_3_bit));
FNAV_TOW_3 = static_cast<int32_t>(read_navigation_unsigned(data_bits, FNAV_TOW_3_bit));
flag_TOW_3 = true;
flag_TOW_set = true;
flag_ephemeris_2 = true;
@ -322,21 +322,21 @@ void Galileo_Fnav_Message::decode_page(const std::string& data)
FNAV_A0_4 *= FNAV_A0_4_LSB;
FNAV_A1_4 = static_cast<double>(read_navigation_signed(data_bits, FNAV_A1_4_bit));
FNAV_A1_4 *= FNAV_A1_4_LSB;
FNAV_deltatls_4 = static_cast<double>(read_navigation_signed(data_bits, FNAV_deltatls_4_bit));
FNAV_t0t_4 = static_cast<double>(read_navigation_unsigned(data_bits, FNAV_t0t_4_bit));
FNAV_deltatls_4 = static_cast<int32_t>(read_navigation_signed(data_bits, FNAV_deltatls_4_bit));
FNAV_t0t_4 = static_cast<int32_t>(read_navigation_unsigned(data_bits, FNAV_t0t_4_bit));
FNAV_t0t_4 *= FNAV_t0t_4_LSB;
FNAV_WNot_4 = static_cast<double>(read_navigation_unsigned(data_bits, FNAV_WNot_4_bit));
FNAV_WNlsf_4 = static_cast<double>(read_navigation_unsigned(data_bits, FNAV_WNlsf_4_bit));
FNAV_DN_4 = static_cast<double>(read_navigation_unsigned(data_bits, FNAV_DN_4_bit));
FNAV_deltatlsf_4 = static_cast<double>(read_navigation_signed(data_bits, FNAV_deltatlsf_4_bit));
FNAV_t0g_4 = static_cast<double>(read_navigation_unsigned(data_bits, FNAV_t0g_4_bit));
FNAV_WNot_4 = static_cast<int32_t>(read_navigation_unsigned(data_bits, FNAV_WNot_4_bit));
FNAV_WNlsf_4 = static_cast<int32_t>(read_navigation_unsigned(data_bits, FNAV_WNlsf_4_bit));
FNAV_DN_4 = static_cast<int32_t>(read_navigation_unsigned(data_bits, FNAV_DN_4_bit));
FNAV_deltatlsf_4 = static_cast<int32_t>(read_navigation_signed(data_bits, FNAV_deltatlsf_4_bit));
FNAV_t0g_4 = static_cast<int32_t>(read_navigation_unsigned(data_bits, FNAV_t0g_4_bit));
FNAV_t0g_4 *= FNAV_t0g_4_LSB;
FNAV_A0g_4 = static_cast<double>(read_navigation_signed(data_bits, FNAV_A0g_4_bit));
FNAV_A0g_4 *= FNAV_A0g_4_LSB;
FNAV_A1g_4 = static_cast<double>(read_navigation_signed(data_bits, FNAV_A1g_4_bit));
FNAV_A1g_4 *= FNAV_A1g_4_LSB;
FNAV_WN0g_4 = static_cast<double>(read_navigation_unsigned(data_bits, FNAV_WN0g_4_bit));
FNAV_TOW_4 = static_cast<double>(read_navigation_unsigned(data_bits, FNAV_TOW_4_bit));
FNAV_WN0g_4 = static_cast<int32_t>(read_navigation_unsigned(data_bits, FNAV_WN0g_4_bit));
FNAV_TOW_4 = static_cast<int32_t>(read_navigation_unsigned(data_bits, FNAV_TOW_4_bit));
flag_TOW_4 = true;
flag_TOW_set = true;
flag_ephemeris_3 = true;

View File

@ -95,11 +95,11 @@ public:
// health and Data validity status
int32_t FNAV_SV_ID_PRN_1;
int32_t FNAV_IODnav_1;
double FNAV_t0c_1;
int32_t FNAV_t0c_1;
double FNAV_af0_1;
double FNAV_af1_1;
double FNAV_af2_1;
double FNAV_SISA_1;
int32_t FNAV_SISA_1;
double FNAV_ai0_1;
double FNAV_ai1_1;
double FNAV_ai2_1;
@ -110,8 +110,8 @@ public:
bool FNAV_region5_1;
double FNAV_BGD_1;
int32_t FNAV_E5ahs_1;
double FNAV_WN_1;
double FNAV_TOW_1;
int32_t FNAV_WN_1;
int32_t FNAV_TOW_1;
bool FNAV_E5advs_1;
// WORD 2 Ephemeris (1/3) and GST
@ -122,8 +122,8 @@ public:
double FNAV_a12_2;
double FNAV_omega0_2;
double FNAV_idot_2;
double FNAV_WN_2;
double FNAV_TOW_2;
int32_t FNAV_WN_2;
int32_t FNAV_TOW_2;
// WORD 3 Ephemeris (2/3) and GST
int32_t FNAV_IODnav_3;
@ -134,9 +134,9 @@ public:
double FNAV_Cus_3;
double FNAV_Crc_3;
double FNAV_Crs_3;
double FNAV_t0e_3;
double FNAV_WN_3;
double FNAV_TOW_3;
int32_t FNAV_t0e_3;
int32_t FNAV_WN_3;
int32_t FNAV_TOW_3;
// WORD 4 Ephemeris (3/3), GST-UTC conversion, GST-GPS conversion and TOW.
// Note that the clock is repeated in this page type
@ -145,17 +145,17 @@ public:
double FNAV_Cis_4;
double FNAV_A0_4;
double FNAV_A1_4;
double FNAV_deltatls_4;
double FNAV_t0t_4;
double FNAV_WNot_4;
double FNAV_WNlsf_4;
double FNAV_DN_4;
double FNAV_deltatlsf_4;
double FNAV_t0g_4;
int32_t FNAV_deltatls_4;
int32_t FNAV_t0t_4;
int32_t FNAV_WNot_4;
int32_t FNAV_WNlsf_4;
int32_t FNAV_DN_4;
int32_t FNAV_deltatlsf_4;
int32_t FNAV_t0g_4;
double FNAV_A0g_4;
double FNAV_A1g_4;
double FNAV_WN0g_4;
double FNAV_TOW_4;
int32_t FNAV_WN0g_4;
int32_t FNAV_TOW_4;
// WORD 5 Almanac (SVID1 and SVID2(1/2)), Week Number and almanac reference time
int32_t FNAV_IODa_5;

View File

@ -45,6 +45,6 @@ Galileo_Iono::Galileo_Iono()
Region4_flag_5 = false; // Ionospheric Disturbance Flag for region 4
Region5_flag_5 = false; // Ionospheric Disturbance Flag for region 5
TOW_5 = 0.0;
WN_5 = 0.0;
TOW_5 = 0;
WN_5 = 0;
}

View File

@ -55,8 +55,8 @@ public:
bool Region5_flag_5; //!< Ionospheric Disturbance Flag for region 5
// from page 5 (UTC) to have a timestamp
double TOW_5; //!< UTC data reference Time of Week [s]
double WN_5; //!< UTC data reference Week number [week]
int32_t TOW_5; //!< UTC data reference Time of Week [s]
int32_t WN_5; //!< UTC data reference Week number [week]
/*!
* Default constructor

View File

@ -74,7 +74,7 @@ void Galileo_Navigation_Message::reset()
// Word type 1: Ephemeris (1/4)
IOD_nav_1 = 0;
t0e_1 = 0.0;
t0e_1 = 0;
M0_1 = 0.0;
e_1 = 0.0;
A_1 = 0.0;
@ -94,7 +94,7 @@ void Galileo_Navigation_Message::reset()
C_us_3 = 0.0; // Amplitude of the sine harmonic correction term to the argument of latitude [radians]
C_rc_3 = 0.0; // Amplitude of the cosine harmonic correction term to the orbit radius [meters]
C_rs_3 = 0.0; // Amplitude of the sine harmonic correction term to the orbit radius [meters]
SISA_3 = 0.0; //
SISA_3 = 0; //
// Word type 4: Ephemeris (4/4) and Clock correction parameter/
IOD_nav_4 = 0;
@ -103,7 +103,7 @@ void Galileo_Navigation_Message::reset()
C_is_4 = 0.0; // Amplitude of the sine harmonic correction term to the angle of inclination [radians]
// Clock correction parameters
t0c_4 = 0.0;
t0c_4 = 0;
af0_4 = 0.0;
af1_4 = 0.0;
af2_4 = 0.0;
@ -125,24 +125,24 @@ void Galileo_Navigation_Message::reset()
BGD_E1E5b_5 = 0.0;
E5b_HS_5 = 0;
E1B_HS_5 = 0;
E5b_DVS_5 = 0;
E1B_DVS_5 = 0;
E5b_DVS_5 = false;
E1B_DVS_5 = false;
// GST
WN_5 = 0.0;
TOW_5 = 0.0;
WN_5 = 0;
TOW_5 = 0;
spare_5 = 0.0;
// Word type 6: GST-UTC conversion parameters
A0_6 = 0.0;
A1_6 = 0.0;
Delta_tLS_6 = 0.0;
t0t_6 = 0.0;
WNot_6 = 0.0;
Delta_tLS_6 = 0;
t0t_6 = 0;
WNot_6 = 0;
WN_LSF_6 = 0;
DN_6 = 0;
Delta_tLSF_6 = 0.0;
TOW_6 = 0.0;
Delta_tLSF_6 = 0;
TOW_6 = 0;
// Word type 7: Almanac for SVID1 (1/2), almanac reference time and almanac reference week number
IOD_a_7 = 0;
@ -199,13 +199,13 @@ void Galileo_Navigation_Message::reset()
// GST-GPS
A_0G_10 = 0.0;
A_1G_10 = 0.0;
t_0G_10 = 0.0;
WN_0G_10 = 0.0;
t_0G_10 = 0;
WN_0G_10 = 0;
// Word type 0: I/NAV Spare Word
Time_0 = 0.0;
WN_0 = 0.0;
TOW_0 = 0.0;
Time_0 = 0;
WN_0 = 0;
TOW_0 = 0;
flag_TOW_6 = false;
@ -653,7 +653,7 @@ int32_t Galileo_Navigation_Message::page_jk_decoder(const char* data_jk)
case 1: // Word type 1: Ephemeris (1/4)
IOD_nav_1 = static_cast<int32_t>(read_navigation_unsigned(data_jk_bits, IOD_nav_1_bit));
DLOG(INFO) << "IOD_nav_1= " << IOD_nav_1;
t0e_1 = static_cast<double>(read_navigation_unsigned(data_jk_bits, T0E_1_bit));
t0e_1 = static_cast<int32_t>(read_navigation_unsigned(data_jk_bits, T0E_1_bit));
t0e_1 = t0e_1 * t0e_1_LSB;
DLOG(INFO) << "t0e_1= " << t0e_1;
M0_1 = static_cast<double>(read_navigation_signed(data_jk_bits, M0_1_bit));
@ -709,7 +709,7 @@ int32_t Galileo_Navigation_Message::page_jk_decoder(const char* data_jk)
C_rs_3 = static_cast<double>(read_navigation_signed(data_jk_bits, C_rs_3_bit));
C_rs_3 = C_rs_3 * C_rs_3_LSB;
DLOG(INFO) << "C_rs_3= " << C_rs_3;
SISA_3 = static_cast<double>(read_navigation_unsigned(data_jk_bits, SISA_3_bit));
SISA_3 = static_cast<int32_t>(read_navigation_unsigned(data_jk_bits, SISA_3_bit));
DLOG(INFO) << "SISA_3= " << SISA_3;
flag_ephemeris_3 = true;
DLOG(INFO) << "flag_tow_set" << flag_TOW_set;
@ -727,7 +727,7 @@ int32_t Galileo_Navigation_Message::page_jk_decoder(const char* data_jk)
C_is_4 = C_is_4 * C_is_4_LSB;
DLOG(INFO) << "C_is_4= " << C_is_4;
// Clock correction parameters
t0c_4 = static_cast<double>(read_navigation_unsigned(data_jk_bits, t0c_4_bit));
t0c_4 = static_cast<int32_t>(read_navigation_unsigned(data_jk_bits, t0c_4_bit));
t0c_4 = t0c_4 * t0c_4_LSB;
DLOG(INFO) << "t0c_4= " << t0c_4;
af0_4 = static_cast<double>(read_navigation_signed(data_jk_bits, af0_4_bit));
@ -777,14 +777,14 @@ int32_t Galileo_Navigation_Message::page_jk_decoder(const char* data_jk)
DLOG(INFO) << "E5b_HS_5= " << E5b_HS_5;
E1B_HS_5 = static_cast<int32_t>(read_navigation_unsigned(data_jk_bits, E1B_HS_5_bit));
DLOG(INFO) << "E1B_HS_5= " << E1B_HS_5;
E5b_DVS_5 = static_cast<int32_t>(read_navigation_unsigned(data_jk_bits, E5b_DVS_5_bit));
E5b_DVS_5 = static_cast<bool>(read_navigation_unsigned(data_jk_bits, E5b_DVS_5_bit));
DLOG(INFO) << "E5b_DVS_5= " << E5b_DVS_5;
E1B_DVS_5 = static_cast<int32_t>(read_navigation_unsigned(data_jk_bits, E1B_DVS_5_bit));
E1B_DVS_5 = static_cast<bool>(read_navigation_unsigned(data_jk_bits, E1B_DVS_5_bit));
DLOG(INFO) << "E1B_DVS_5= " << E1B_DVS_5;
// GST
WN_5 = static_cast<double>(read_navigation_unsigned(data_jk_bits, WN_5_bit));
WN_5 = static_cast<int32_t>(read_navigation_unsigned(data_jk_bits, WN_5_bit));
DLOG(INFO) << "WN_5= " << WN_5;
TOW_5 = static_cast<double>(read_navigation_unsigned(data_jk_bits, TOW_5_bit));
TOW_5 = static_cast<int32_t>(read_navigation_unsigned(data_jk_bits, TOW_5_bit));
DLOG(INFO) << "TOW_5= " << TOW_5;
flag_TOW_5 = true; // set to false externally
spare_5 = static_cast<double>(read_navigation_unsigned(data_jk_bits, spare_5_bit));
@ -801,20 +801,20 @@ int32_t Galileo_Navigation_Message::page_jk_decoder(const char* data_jk)
A1_6 = static_cast<double>(read_navigation_signed(data_jk_bits, A1_6_bit));
A1_6 = A1_6 * A1_6_LSB;
DLOG(INFO) << "A1_6= " << A1_6;
Delta_tLS_6 = static_cast<double>(read_navigation_signed(data_jk_bits, Delta_tLS_6_bit));
Delta_tLS_6 = static_cast<int32_t>(read_navigation_signed(data_jk_bits, Delta_tLS_6_bit));
DLOG(INFO) << "Delta_tLS_6= " << Delta_tLS_6;
t0t_6 = static_cast<double>(read_navigation_unsigned(data_jk_bits, t0t_6_bit));
t0t_6 = static_cast<int32_t>(read_navigation_unsigned(data_jk_bits, t0t_6_bit));
t0t_6 = t0t_6 * t0t_6_LSB;
DLOG(INFO) << "t0t_6= " << t0t_6;
WNot_6 = static_cast<double>(read_navigation_unsigned(data_jk_bits, WNot_6_bit));
WNot_6 = static_cast<int32_t>(read_navigation_unsigned(data_jk_bits, WNot_6_bit));
DLOG(INFO) << "WNot_6= " << WNot_6;
WN_LSF_6 = static_cast<int32_t>(read_navigation_unsigned(data_jk_bits, WN_LSF_6_bit));
DLOG(INFO) << "WN_LSF_6= " << WN_LSF_6;
DN_6 = static_cast<int32_t>(read_navigation_unsigned(data_jk_bits, DN_6_bit));
DLOG(INFO) << "DN_6= " << DN_6;
Delta_tLSF_6 = static_cast<double>(read_navigation_signed(data_jk_bits, Delta_tLSF_6_bit));
Delta_tLSF_6 = static_cast<int32_t>(read_navigation_signed(data_jk_bits, Delta_tLSF_6_bit));
DLOG(INFO) << "Delta_tLSF_6= " << Delta_tLSF_6;
TOW_6 = static_cast<double>(read_navigation_unsigned(data_jk_bits, TOW_6_bit));
TOW_6 = static_cast<int32_t>(read_navigation_unsigned(data_jk_bits, TOW_6_bit));
DLOG(INFO) << "TOW_6= " << TOW_6;
flag_TOW_6 = true; // set to false externally
flag_utc_model = true; // set to false externally
@ -963,11 +963,11 @@ int32_t Galileo_Navigation_Message::page_jk_decoder(const char* data_jk)
A_1G_10 = A_1G_10 * A_1G_10_LSB;
flag_GGTO_2 = true;
DLOG(INFO) << "A_1G_10= " << A_1G_10;
t_0G_10 = static_cast<double>(read_navigation_unsigned(data_jk_bits, t_0G_10_bit));
t_0G_10 = static_cast<int32_t>(read_navigation_unsigned(data_jk_bits, t_0G_10_bit));
t_0G_10 = t_0G_10 * t_0G_10_LSB;
flag_GGTO_3 = true;
DLOG(INFO) << "t_0G_10= " << t_0G_10;
WN_0G_10 = static_cast<double>(read_navigation_unsigned(data_jk_bits, WN_0G_10_bit));
WN_0G_10 = static_cast<int32_t>(read_navigation_unsigned(data_jk_bits, WN_0G_10_bit));
flag_GGTO_4 = true;
DLOG(INFO) << "WN_0G_10= " << WN_0G_10;
flag_almanac_4 = true;
@ -975,11 +975,11 @@ int32_t Galileo_Navigation_Message::page_jk_decoder(const char* data_jk)
break;
case 0: // Word type 0: I/NAV Spare Word
Time_0 = static_cast<double>(read_navigation_unsigned(data_jk_bits, Time_0_bit));
Time_0 = static_cast<int32_t>(read_navigation_unsigned(data_jk_bits, Time_0_bit));
DLOG(INFO) << "Time_0= " << Time_0;
WN_0 = static_cast<double>(read_navigation_unsigned(data_jk_bits, WN_0_bit));
WN_0 = static_cast<int32_t>(read_navigation_unsigned(data_jk_bits, WN_0_bit));
DLOG(INFO) << "WN_0= " << WN_0;
TOW_0 = static_cast<double>(read_navigation_unsigned(data_jk_bits, TOW_0_bit));
TOW_0 = static_cast<int32_t>(read_navigation_unsigned(data_jk_bits, TOW_0_bit));
DLOG(INFO) << "TOW_0= " << TOW_0;
DLOG(INFO) << "flag_tow_set" << flag_TOW_set;
break;

View File

@ -93,7 +93,7 @@ public:
// Word type 1: Ephemeris (1/4)
int32_t IOD_nav_1; //!< IOD_nav page 1
double t0e_1; //!< Ephemeris reference time [s]
int32_t t0e_1; //!< Ephemeris reference time [s]
double M0_1; //!< Mean anomaly at reference time [semi-circles]
double e_1; //!< Eccentricity
double A_1; //!< Square root of the semi-major axis [meters^1/2]
@ -113,7 +113,7 @@ public:
double C_us_3; //!< Amplitude of the sine harmonic correction term to the argument of latitude [radians]
double C_rc_3; //!< Amplitude of the cosine harmonic correction term to the orbit radius [meters]
double C_rs_3; //!< Amplitude of the sine harmonic correction term to the orbit radius [meters]
double SISA_3;
int32_t SISA_3;
// Word type 4: Ephemeris (4/4) and Clock correction parameters*/
int32_t IOD_nav_4; //
@ -122,10 +122,10 @@ public:
double C_is_4; //!< Amplitude of the sine harmonic correction term to the angle of inclination [radians]
// Clock correction parameters
double t0c_4; //!< Clock correction data reference Time of Week [sec]
double af0_4; //!< SV clock bias correction coefficient [s]
double af1_4; //!< SV clock drift correction coefficient [s/s]
double af2_4; //!< clock drift rate correction coefficient [s/s^2]
int32_t t0c_4; //!< Clock correction data reference Time of Week [sec]
double af0_4; //!< SV clock bias correction coefficient [s]
double af1_4; //!< SV clock drift correction coefficient [s/s]
double af2_4; //!< clock drift rate correction coefficient [s/s^2]
double spare_4;
// Word type 5: Ionospheric correction, BGD, signal health and data validity status and GST*/
@ -143,26 +143,26 @@ public:
double BGD_E1E5a_5; //!< E1-E5a Broadcast Group Delay [s]
double BGD_E1E5b_5; //!< E1-E5b Broadcast Group Delay [s]
int32_t E5b_HS_5; //!< E5b Signal Health Status
int32_t E1B_HS_5; //!< E1B Signal Health Status
int32_t E5b_DVS_5; //!< E5b Data Validity Status
int32_t E1B_DVS_5; //!< E1B Data Validity Status
int32_t E5b_HS_5; //!< E5b Signal Health Status
int32_t E1B_HS_5; //!< E1B Signal Health Status
bool E5b_DVS_5; //!< E5b Data Validity Status
bool E1B_DVS_5; //!< E1B Data Validity Status
// GST
double WN_5;
double TOW_5;
int32_t WN_5;
int32_t TOW_5;
double spare_5;
// Word type 6: GST-UTC conversion parameters
double A0_6;
double A1_6;
double Delta_tLS_6;
double t0t_6;
double WNot_6;
int32_t Delta_tLS_6;
int32_t t0t_6;
int32_t WNot_6;
int32_t WN_LSF_6;
int32_t DN_6;
double Delta_tLSF_6;
double TOW_6;
int32_t Delta_tLSF_6;
int32_t TOW_6;
// Word type 7: Almanac for SVID1 (1/2), almanac reference time and almanac reference week number
int32_t IOD_a_7;
@ -217,15 +217,15 @@ public:
int32_t E1B_HS_10;
// GST-GPS conversion
double A_0G_10; //!< Constant term of the offset Delta t systems
double A_1G_10; //!< Rate of change of the offset Delta t systems
double t_0G_10; //!< Reference time for Galileo/GPS Time Offset (GGTO) data
double WN_0G_10; //!< Week Number of Galileo/GPS Time Offset (GGTO) reference
double A_0G_10; //!< Constant term of the offset Delta t systems
double A_1G_10; //!< Rate of change of the offset Delta t systems
int32_t t_0G_10; //!< Reference time for Galileo/GPS Time Offset (GGTO) data
int32_t WN_0G_10; //!< Week Number of Galileo/GPS Time Offset (GGTO) reference
// Word type 0: I/NAV Spare Word
double Time_0;
double WN_0;
double TOW_0;
int32_t Time_0;
int32_t WN_0;
int32_t TOW_0;
double Galileo_satClkDrift;
double Galileo_dtr; //!< Relativistic clock correction term

View File

@ -36,28 +36,28 @@ Galileo_Utc_Model::Galileo_Utc_Model()
// Word type 6: GST-UTC conversion parameters
A0_6 = 0.0;
A1_6 = 0.0;
Delta_tLS_6 = 0.0;
t0t_6 = 0.0;
WNot_6 = 0.0;
Delta_tLS_6 = 0;
t0t_6 = 0;
WNot_6 = 0;
WN_LSF_6 = 0;
DN_6 = 0;
Delta_tLSF_6 = 0.0;
Delta_tLSF_6 = 0;
flag_utc_model = false;
// GPS to Galileo GST conversion parameters
A_0G_10 = 0.0;
A_1G_10 = 0.0;
t_0G_10 = 0.0;
WN_0G_10 = 0.0;
t_0G_10 = 0;
WN_0G_10 = 0;
}
double Galileo_Utc_Model::GST_to_UTC_time(double t_e, int WN)
double Galileo_Utc_Model::GST_to_UTC_time(double t_e, int32_t WN)
{
double t_Utc;
double t_Utc_daytime;
double Delta_t_Utc = 0;
// Determine if the effectivity time of the leap second event is in the past
int weeksToLeapSecondEvent = WN_LSF_6 - (WN % 256);
int32_t weeksToLeapSecondEvent = WN_LSF_6 - (WN % 256);
if ((weeksToLeapSecondEvent) >= 0) // is not in the past
{

View File

@ -47,22 +47,22 @@ public:
// Word type 6: GST-UTC conversion parameters
double A0_6;
double A1_6;
double Delta_tLS_6;
double t0t_6; //!< UTC data reference Time of Week [s]
double WNot_6; //!< UTC data reference Week number [week]
int32_t Delta_tLS_6;
int32_t t0t_6; //!< UTC data reference Time of Week [s]
int32_t WNot_6; //!< UTC data reference Week number [week]
int32_t WN_LSF_6;
int32_t DN_6;
double Delta_tLSF_6;
int32_t Delta_tLSF_6;
bool flag_utc_model;
// GPS to Galileo GST conversion parameters
double A_0G_10;
double A_1G_10;
double t_0G_10;
double WN_0G_10;
int32_t t_0G_10;
int32_t WN_0G_10;
//double TOW_6;
double GST_to_UTC_time(double t_e, int WN); //!< GST-UTC Conversion Algorithm and Parameters
double GST_to_UTC_time(double t_e, int32_t WN); //!< GST-UTC Conversion Algorithm and Parameters
/*!
* Default constructor
*/

View File

@ -37,17 +37,17 @@ Gps_CNAV_Ephemeris::Gps_CNAV_Ephemeris()
{
i_satellite_PRN = 0U;
d_Toe1 = -1.0;
d_Toe2 = -1.0;
d_Toe1 = -1;
d_Toe2 = -1;
d_TOW = 0.0;
d_TOW = 0;
d_Crs = 0.0;
d_M_0 = 0.0;
d_Cuc = 0.0;
d_e_eccentricity = 0.0;
d_Cus = 0.0;
d_Toc = 0.0;
d_Toc = 0;
d_Cic = 0.0;
d_OMEGA0 = 0.0;
d_Cis = 0.0;
@ -79,7 +79,7 @@ Gps_CNAV_Ephemeris::Gps_CNAV_Ephemeris()
i_URA = 0;
i_signal_health = 0;
d_Top = 0.0;
d_Top = 0;
d_DELTA_A = 0.0;
d_A_DOT = 0.0;
d_Delta_n = 0.0;

View File

@ -54,7 +54,7 @@ public:
int32_t i_GPS_week; //!< GPS week number, aka WN [week]
int32_t i_URA; //!< ED Accuracy Index
int32_t i_signal_health; //!< Signal health (L1/L2/L5)
double d_Top; //!< Data predict time of week
int32_t d_Top; //!< Data predict time of week
double d_DELTA_A; //!< Semi-major axis difference at reference time
double d_A_DOT; //!< Change rate in semi-major axis
double d_Delta_n; //!< Mean Motion Difference From Computed Value [semi-circles/s]
@ -63,8 +63,8 @@ public:
double d_e_eccentricity; //!< Eccentricity
double d_OMEGA; //!< Argument of Perigee [semi-cicles]
double d_OMEGA0; //!< Longitude of Ascending Node of Orbit Plane at Weekly Epoch [semi-cicles]
double d_Toe1; //!< Ephemeris data reference time of week (Ref. 20.3.3.4.3 IS-GPS-200E) [s]
double d_Toe2; //!< Ephemeris data reference time of week (Ref. 20.3.3.4.3 IS-GPS-200E) [s]
int32_t d_Toe1; //!< Ephemeris data reference time of week (Ref. 20.3.3.4.3 IS-GPS-200E) [s]
int32_t d_Toe2; //!< Ephemeris data reference time of week (Ref. 20.3.3.4.3 IS-GPS-200E) [s]
double d_DELTA_OMEGA_DOT; //!< Rate of Right Ascension difference [semi-circles/s]
double d_i_0; //!< Inclination Angle at Reference Time [semi-circles]
double d_IDOT; //!< Rate of Inclination Angle [semi-circles/s]
@ -76,7 +76,7 @@ public:
double d_Cuc; //!< Amplitude of the Cosine Harmonic Correction Term to the Argument of Latitude [rad]
// Clock Correction and Accuracy Parameters
double d_Toc; //!< clock data reference time (Ref. 20.3.3.3.3.1 IS-GPS-200E) [s]
int32_t d_Toc; //!< clock data reference time (Ref. 20.3.3.3.3.1 IS-GPS-200E) [s]
double d_A_f0; //!< Coefficient 0 of code phase offset model [s]
double d_A_f1; //!< Coefficient 1 of code phase offset model [s/s]
double d_A_f2; //!< Coefficient 2 of code phase offset model [s/s^2]
@ -92,7 +92,7 @@ public:
double d_ISCL5I;
double d_ISCL5Q;
double d_TOW; //!< Time of GPS Week of the ephemeris set (taken from subframes TOW) [s]
int32_t d_TOW; //!< Time of GPS Week of the ephemeris set (taken from subframes TOW) [s]
/*! \brief If true, enhanced level of integrity assurance.
*

View File

@ -55,7 +55,7 @@ void Gps_CNAV_Navigation_Message::reset()
d_satvel_Y = 0.0;
d_satvel_Z = 0.0;
d_TOW = 0.0;
d_TOW = 0;
}
@ -148,7 +148,7 @@ void Gps_CNAV_Navigation_Message::decode_page(std::bitset<GPS_CNAV_DATA_PAGE_BIT
PRN = static_cast<int32_t>(read_navigation_unsigned(data_bits, CNAV_PRN));
ephemeris_record.i_satellite_PRN = PRN;
d_TOW = static_cast<double>(read_navigation_unsigned(data_bits, CNAV_TOW));
d_TOW = static_cast<int32_t>(read_navigation_unsigned(data_bits, CNAV_TOW));
d_TOW *= CNAV_TOW_LSB;
ephemeris_record.d_TOW = d_TOW;
@ -162,10 +162,10 @@ void Gps_CNAV_Navigation_Message::decode_page(std::bitset<GPS_CNAV_DATA_PAGE_BIT
case 10: // Ephemeris 1/2
ephemeris_record.i_GPS_week = static_cast<int32_t>(read_navigation_unsigned(data_bits, CNAV_WN));
ephemeris_record.i_signal_health = static_cast<int32_t>(read_navigation_unsigned(data_bits, CNAV_HEALTH));
ephemeris_record.d_Top = static_cast<double>(read_navigation_unsigned(data_bits, CNAV_TOP1));
ephemeris_record.d_Top = static_cast<int32_t>(read_navigation_unsigned(data_bits, CNAV_TOP1));
ephemeris_record.d_Top *= CNAV_TOP1_LSB;
ephemeris_record.d_URA0 = static_cast<double>(read_navigation_signed(data_bits, CNAV_URA));
ephemeris_record.d_Toe1 = static_cast<double>(read_navigation_unsigned(data_bits, CNAV_TOE1));
ephemeris_record.d_Toe1 = static_cast<int32_t>(read_navigation_unsigned(data_bits, CNAV_TOE1));
ephemeris_record.d_Toe1 *= CNAV_TOE1_LSB;
ephemeris_record.d_DELTA_A = static_cast<double>(read_navigation_signed(data_bits, CNAV_DELTA_A));
ephemeris_record.d_DELTA_A *= CNAV_DELTA_A_LSB;
@ -188,7 +188,7 @@ void Gps_CNAV_Navigation_Message::decode_page(std::bitset<GPS_CNAV_DATA_PAGE_BIT
b_flag_ephemeris_1 = true;
break;
case 11: // Ephemeris 2/2
ephemeris_record.d_Toe2 = static_cast<double>(read_navigation_unsigned(data_bits, CNAV_TOE2));
ephemeris_record.d_Toe2 = static_cast<int32_t>(read_navigation_unsigned(data_bits, CNAV_TOE2));
ephemeris_record.d_Toe2 *= CNAV_TOE2_LSB;
ephemeris_record.d_OMEGA0 = static_cast<double>(read_navigation_signed(data_bits, CNAV_OMEGA0));
ephemeris_record.d_OMEGA0 *= CNAV_OMEGA0_LSB;
@ -214,7 +214,7 @@ void Gps_CNAV_Navigation_Message::decode_page(std::bitset<GPS_CNAV_DATA_PAGE_BIT
break;
case 30: // (CLOCK, IONO, GRUP DELAY)
//clock
ephemeris_record.d_Toc = static_cast<double>(read_navigation_unsigned(data_bits, CNAV_TOC));
ephemeris_record.d_Toc = static_cast<int32_t>(read_navigation_unsigned(data_bits, CNAV_TOC));
ephemeris_record.d_Toc *= CNAV_TOC_LSB;
ephemeris_record.d_URA0 = static_cast<double>(read_navigation_signed(data_bits, CNAV_URA_NED0));
ephemeris_record.d_URA1 = static_cast<double>(read_navigation_unsigned(data_bits, CNAV_URA_NED1));
@ -282,9 +282,9 @@ void Gps_CNAV_Navigation_Message::decode_page(std::bitset<GPS_CNAV_DATA_PAGE_BIT
b_flag_iono_valid = true;
break;
case 33: // (CLOCK & UTC)
ephemeris_record.d_Top = static_cast<double>(read_navigation_unsigned(data_bits, CNAV_TOP1));
ephemeris_record.d_Top = static_cast<int32_t>(read_navigation_unsigned(data_bits, CNAV_TOP1));
ephemeris_record.d_Top = ephemeris_record.d_Top * CNAV_TOP1_LSB;
ephemeris_record.d_Toc = static_cast<double>(read_navigation_unsigned(data_bits, CNAV_TOC));
ephemeris_record.d_Toc = static_cast<int32_t>(read_navigation_unsigned(data_bits, CNAV_TOC));
ephemeris_record.d_Toc = ephemeris_record.d_Toc * CNAV_TOC_LSB;
ephemeris_record.d_A_f0 = static_cast<double>(read_navigation_signed(data_bits, CNAV_AF0));
ephemeris_record.d_A_f0 = ephemeris_record.d_A_f0 * CNAV_AF0_LSB;
@ -300,10 +300,10 @@ void Gps_CNAV_Navigation_Message::decode_page(std::bitset<GPS_CNAV_DATA_PAGE_BIT
utc_model_record.d_A2 = static_cast<double>(read_navigation_signed(data_bits, CNAV_A2));
utc_model_record.d_A2 = utc_model_record.d_A2 * CNAV_A2_LSB;
utc_model_record.d_DeltaT_LS = static_cast<double>(read_navigation_signed(data_bits, CNAV_DELTA_TLS));
utc_model_record.d_DeltaT_LS = static_cast<int32_t>(read_navigation_signed(data_bits, CNAV_DELTA_TLS));
utc_model_record.d_DeltaT_LS = utc_model_record.d_DeltaT_LS * CNAV_DELTA_TLS_LSB;
utc_model_record.d_t_OT = static_cast<double>(read_navigation_signed(data_bits, CNAV_TOT));
utc_model_record.d_t_OT = static_cast<int32_t>(read_navigation_signed(data_bits, CNAV_TOT));
utc_model_record.d_t_OT = utc_model_record.d_t_OT * CNAV_TOT_LSB;
utc_model_record.i_WN_T = static_cast<int32_t>(read_navigation_signed(data_bits, CNAV_WN_OT));
@ -315,7 +315,7 @@ void Gps_CNAV_Navigation_Message::decode_page(std::bitset<GPS_CNAV_DATA_PAGE_BIT
utc_model_record.i_DN = static_cast<int32_t>(read_navigation_signed(data_bits, CNAV_DN));
utc_model_record.i_DN = utc_model_record.i_DN * CNAV_DN_LSB;
utc_model_record.d_DeltaT_LSF = static_cast<double>(read_navigation_signed(data_bits, CNAV_DELTA_TLSF));
utc_model_record.d_DeltaT_LSF = static_cast<int32_t>(read_navigation_signed(data_bits, CNAV_DELTA_TLSF));
utc_model_record.d_DeltaT_LSF = utc_model_record.d_DeltaT_LSF * CNAV_DELTA_TLSF_LSB;
b_flag_utc_valid = true;
break;

View File

@ -65,7 +65,7 @@ private:
Gps_CNAV_Utc_Model utc_model_record;
public:
double d_TOW;
int32_t d_TOW;
bool b_flag_ephemeris_1;
bool b_flag_ephemeris_2;
bool b_flag_iono_valid; //!< If set, it indicates that the ionospheric parameters are filled and are not yet read by the get_iono

View File

@ -37,12 +37,12 @@ Gps_CNAV_Utc_Model::Gps_CNAV_Utc_Model()
d_A2 = 0.0;
d_A1 = 0.0;
d_A0 = 0.0;
d_t_OT = 0.0;
d_t_OT = 0;
i_WN_T = 0;
d_DeltaT_LS = 0.0;
d_DeltaT_LS = 0;
i_WN_LSF = 0;
i_DN = 0;
d_DeltaT_LSF = 0.0;
d_DeltaT_LSF = 0;
}

View File

@ -46,15 +46,15 @@ class Gps_CNAV_Utc_Model
public:
bool valid;
// UTC parameters
double d_A2; //!< 2nd order term of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200H) [s/s]
double d_A1; //!< 1st order term of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200H) [s/s]
double d_A0; //!< Constant of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200H) [s]
double d_t_OT; //!< Reference time for UTC data (reference 20.3.4.5 and 20.3.3.5.2.4 IS-GPS-200H) [s]
int32_t i_WN_T; //!< UTC reference week number [weeks]
double d_DeltaT_LS; //!< delta time due to leap seconds [s]. Number of leap seconds since 6-Jan-1980 as transmitted by the GPS almanac.
int32_t i_WN_LSF; //!< Week number at the end of which the leap second becomes effective [weeks]
int32_t i_DN; //!< Day number (DN) at the end of which the leap second becomes effective [days]
double d_DeltaT_LSF; //!< Scheduled future or recent past (relative to NAV message upload) value of the delta time due to leap seconds [s]
double d_A2; //!< 2nd order term of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200H) [s/s]
double d_A1; //!< 1st order term of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200H) [s/s]
double d_A0; //!< Constant of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200H) [s]
int32_t d_t_OT; //!< Reference time for UTC data (reference 20.3.4.5 and 20.3.3.5.2.4 IS-GPS-200H) [s]
int32_t i_WN_T; //!< UTC reference week number [weeks]
int32_t d_DeltaT_LS; //!< delta time due to leap seconds [s]. Number of leap seconds since 6-Jan-1980 as transmitted by the GPS almanac.
int32_t i_WN_LSF; //!< Week number at the end of which the leap second becomes effective [weeks]
int32_t i_DN; //!< Day number (DN) at the end of which the leap second becomes effective [days]
int32_t d_DeltaT_LSF; //!< Scheduled future or recent past (relative to NAV message upload) value of the delta time due to leap seconds [s]
/*!
* Default constructor

View File

@ -38,7 +38,7 @@
Gps_Ephemeris::Gps_Ephemeris()
{
i_satellite_PRN = 0U;
d_TOW = 0.0;
d_TOW = 0;
d_Crs = 0.0;
d_Delta_n = 0.0;
d_M_0 = 0.0;
@ -46,8 +46,8 @@ Gps_Ephemeris::Gps_Ephemeris()
d_e_eccentricity = 0.0;
d_Cus = 0.0;
d_sqrt_A = 0.0;
d_Toe = 0.0;
d_Toc = 0.0;
d_Toe = 0;
d_Toc = 0;
d_Cic = 0.0;
d_OMEGA0 = 0.0;
d_Cis = 0.0;
@ -61,11 +61,11 @@ Gps_Ephemeris::Gps_Ephemeris()
b_L2_P_data_flag = false;
i_SV_accuracy = 0;
i_SV_health = 0;
d_IODE_SF2 = 0.0;
d_IODE_SF3 = 0.0;
d_TGD = 0.0; // Estimated Group Delay Differential: L1-L2 correction term only for the benefit of "L1 P(Y)" or "L2 P(Y)" s users [s]
d_IODC = 0.0; // Issue of Data, Clock
i_AODO = 0; // Age of Data Offset (AODO) term for the navigation message correction table (NMCT) contained in subframe 4 (reference paragraph 20.3.3.5.1.9) [s]
d_IODE_SF2 = 0;
d_IODE_SF3 = 0;
d_TGD = 0.0; // Estimated Group Delay Differential: L1-L2 correction term only for the benefit of "L1 P(Y)" or "L2 P(Y)" s users [s]
d_IODC = 0; // Issue of Data, Clock
i_AODO = 0; // Age of Data Offset (AODO) term for the navigation message correction table (NMCT) contained in subframe 4 (reference paragraph 20.3.3.5.1.9) [s]
b_fit_interval_flag = false; // indicates the curve-fit interval used by the CS (Block II/IIA/IIR/IIR-M/IIF) and SS (Block IIIA) in determining the ephemeris parameters, as follows: 0 = 4 hours, 1 = greater than 4 hours.
d_spare1 = 0.0;

View File

@ -60,7 +60,7 @@ private:
public:
uint32_t i_satellite_PRN; // SV PRN NUMBER
double d_TOW; //!< Time of GPS Week of the ephemeris set (taken from subframes TOW) [s]
int32_t d_TOW; //!< Time of GPS Week of the ephemeris set (taken from subframes TOW) [s]
double d_Crs; //!< Amplitude of the Sine Harmonic Correction Term to the Orbit Radius [m]
double d_Delta_n; //!< Mean Motion Difference From Computed Value [semi-circles/s]
double d_M_0; //!< Mean Anomaly at Reference Time [semi-circles]
@ -68,8 +68,8 @@ public:
double d_e_eccentricity; //!< Eccentricity [dimensionless]
double d_Cus; //!< Amplitude of the Sine Harmonic Correction Term to the Argument of Latitude [rad]
double d_sqrt_A; //!< Square Root of the Semi-Major Axis [sqrt(m)]
double d_Toe; //!< Ephemeris data reference time of week (Ref. 20.3.3.4.3 IS-GPS-200E) [s]
double d_Toc; //!< clock data reference time (Ref. 20.3.3.3.3.1 IS-GPS-200E) [s]
int32_t d_Toe; //!< Ephemeris data reference time of week (Ref. 20.3.3.4.3 IS-GPS-200E) [s]
int32_t d_Toc; //!< clock data reference time (Ref. 20.3.3.3.3.1 IS-GPS-200E) [s]
double d_Cic; //!< Amplitude of the Cosine Harmonic Correction Term to the Angle of Inclination [rad]
double d_OMEGA0; //!< Longitude of Ascending Node of Orbit Plane at Weekly Epoch [semi-circles]
double d_Cis; //!< Amplitude of the Sine Harmonic Correction Term to the Angle of Inclination [rad]
@ -83,11 +83,11 @@ public:
bool b_L2_P_data_flag; //!< When true, indicates that the NAV data stream was commanded OFF on the P-code of the L2 channel
int32_t i_SV_accuracy; //!< User Range Accuracy (URA) index of the SV (reference paragraph 6.2.1) for the standard positioning service user (Ref 20.3.3.3.1.3 IS-GPS-200E)
int32_t i_SV_health;
double d_TGD; //!< Estimated Group Delay Differential: L1-L2 correction term only for the benefit of "L1 P(Y)" or "L2 P(Y)" s users [s]
double d_IODC; //!< Issue of Data, Clock
double d_IODE_SF2; //!< Issue of Data, Ephemeris (IODE), subframe 2
double d_IODE_SF3; //!< Issue of Data, Ephemeris(IODE), subframe 3
int32_t i_AODO; //!< Age of Data Offset (AODO) term for the navigation message correction table (NMCT) contained in subframe 4 (reference paragraph 20.3.3.5.1.9) [s]
double d_TGD; //!< Estimated Group Delay Differential: L1-L2 correction term only for the benefit of "L1 P(Y)" or "L2 P(Y)" s users [s]
int32_t d_IODC; //!< Issue of Data, Clock
int32_t d_IODE_SF2; //!< Issue of Data, Ephemeris (IODE), subframe 2
int32_t d_IODE_SF3; //!< Issue of Data, Ephemeris(IODE), subframe 3
int32_t i_AODO; //!< Age of Data Offset (AODO) term for the navigation message correction table (NMCT) contained in subframe 4 (reference paragraph 20.3.3.5.1.9) [s]
bool b_fit_interval_flag; //!< indicates the curve-fit interval used by the CS (Block II/IIA/IIR/IIR-M/IIF) and SS (Block IIIA) in determining the ephemeris parameters, as follows: 0 = 4 hours, 1 = greater than 4 hours.
double d_spare1;
@ -111,7 +111,7 @@ public:
*/
bool b_integrity_status_flag;
bool b_alert_flag; //!< If true, indicates that the SV URA may be worse than indicated in d_SV_accuracy, use that SV at our own risk.
bool b_antispoofing_flag; //!< If true, the AntiSpoofing mode is ON in that SV
bool b_antispoofing_flag; //!< If true, the AntiSpoofing mode is ON in that SV
// clock terms derived from ephemeris data
double d_satClkDrift; //!< GPS clock error

View File

@ -39,14 +39,14 @@ m * \file gps_navigation_message.cc
void Gps_Navigation_Message::reset()
{
b_valid_ephemeris_set_flag = false;
d_TOW = 0.0;
d_TOW_SF1 = 0.0;
d_TOW_SF2 = 0.0;
d_TOW_SF3 = 0.0;
d_TOW_SF4 = 0.0;
d_TOW_SF5 = 0.0;
d_IODE_SF2 = 0.0;
d_IODE_SF3 = 0.0;
d_TOW = 0;
d_TOW_SF1 = 0;
d_TOW_SF2 = 0;
d_TOW_SF3 = 0;
d_TOW_SF4 = 0;
d_TOW_SF5 = 0;
d_IODE_SF2 = 0;
d_IODE_SF3 = 0;
d_Crs = 0.0;
d_Delta_n = 0.0;
d_M_0 = 0.0;
@ -54,8 +54,8 @@ void Gps_Navigation_Message::reset()
d_e_eccentricity = 0.0;
d_Cus = 0.0;
d_sqrt_A = 0.0;
d_Toe = 0.0;
d_Toc = 0.0;
d_Toe = 0;
d_Toc = 0;
d_Cic = 0.0;
d_OMEGA0 = 0.0;
d_Cis = 0.0;
@ -70,7 +70,7 @@ void Gps_Navigation_Message::reset()
i_SV_accuracy = 0;
i_SV_health = 0;
d_TGD = 0.0;
d_IODC = -1.0;
d_IODC = -1;
i_AODO = 0;
b_fit_interval_flag = false;
@ -117,12 +117,12 @@ void Gps_Navigation_Message::reset()
d_beta3 = 0.0;
d_A1 = 0.0;
d_A0 = 0.0;
d_t_OT = 0.0;
d_t_OT = 0;
i_WN_T = 0;
d_DeltaT_LS = 0.0;
d_DeltaT_LS = 0;
i_WN_LSF = 0;
i_DN = 0;
d_DeltaT_LSF = 0.0;
d_DeltaT_LSF = 0;
// Almanac
i_Toa = 0;
@ -257,9 +257,9 @@ int32_t Gps_Navigation_Message::subframe_decoder(char* subframe)
// The transmitted TOW is actual TOW of the next subframe
// (the variable subframe at this point contains bits of the last subframe).
//TOW = bin2dec(subframe(31:47)) * 6;
d_TOW_SF1 = static_cast<double>(read_navigation_unsigned(subframe_bits, TOW));
d_TOW_SF1 = static_cast<int32_t>(read_navigation_unsigned(subframe_bits, TOW));
//we are in the first subframe (the transmitted TOW is the start time of the next subframe) !
d_TOW_SF1 = d_TOW_SF1 * 6.0;
d_TOW_SF1 = d_TOW_SF1 * 6;
d_TOW = d_TOW_SF1; // Set transmission time
b_integrity_status_flag = read_navigation_bool(subframe_bits, INTEGRITY_STATUS_FLAG);
b_alert_flag = read_navigation_bool(subframe_bits, ALERT_FLAG);
@ -271,8 +271,8 @@ int32_t Gps_Navigation_Message::subframe_decoder(char* subframe)
i_code_on_L2 = static_cast<int32_t>(read_navigation_unsigned(subframe_bits, CA_OR_P_ON_L2));
d_TGD = static_cast<double>(read_navigation_signed(subframe_bits, T_GD));
d_TGD = d_TGD * T_GD_LSB;
d_IODC = static_cast<double>(read_navigation_unsigned(subframe_bits, IODC));
d_Toc = static_cast<double>(read_navigation_unsigned(subframe_bits, T_OC));
d_IODC = static_cast<int32_t>(read_navigation_unsigned(subframe_bits, IODC));
d_Toc = static_cast<int32_t>(read_navigation_unsigned(subframe_bits, T_OC));
d_Toc = d_Toc * T_OC_LSB;
d_A_f0 = static_cast<double>(read_navigation_signed(subframe_bits, A_F0));
d_A_f0 = d_A_f0 * A_F0_LSB;
@ -283,13 +283,13 @@ int32_t Gps_Navigation_Message::subframe_decoder(char* subframe)
break;
case 2: //--- It is subframe 2 -------------------
d_TOW_SF2 = static_cast<double>(read_navigation_unsigned(subframe_bits, TOW));
d_TOW_SF2 = d_TOW_SF2 * 6.0;
d_TOW_SF2 = static_cast<int32_t>(read_navigation_unsigned(subframe_bits, TOW));
d_TOW_SF2 = d_TOW_SF2 * 6;
d_TOW = d_TOW_SF2; // Set transmission time
b_integrity_status_flag = read_navigation_bool(subframe_bits, INTEGRITY_STATUS_FLAG);
b_alert_flag = read_navigation_bool(subframe_bits, ALERT_FLAG);
b_antispoofing_flag = read_navigation_bool(subframe_bits, ANTI_SPOOFING_FLAG);
d_IODE_SF2 = static_cast<double>(read_navigation_unsigned(subframe_bits, IODE_SF2));
d_IODE_SF2 = static_cast<int32_t>(read_navigation_unsigned(subframe_bits, IODE_SF2));
d_Crs = static_cast<double>(read_navigation_signed(subframe_bits, C_RS));
d_Crs = d_Crs * C_RS_LSB;
d_Delta_n = static_cast<double>(read_navigation_signed(subframe_bits, DELTA_N));
@ -304,7 +304,7 @@ int32_t Gps_Navigation_Message::subframe_decoder(char* subframe)
d_Cus = d_Cus * C_US_LSB;
d_sqrt_A = static_cast<double>(read_navigation_unsigned(subframe_bits, SQRT_A));
d_sqrt_A = d_sqrt_A * SQRT_A_LSB;
d_Toe = static_cast<double>(read_navigation_unsigned(subframe_bits, T_OE));
d_Toe = static_cast<int32_t>(read_navigation_unsigned(subframe_bits, T_OE));
d_Toe = d_Toe * T_OE_LSB;
b_fit_interval_flag = read_navigation_bool(subframe_bits, FIT_INTERVAL_FLAG);
i_AODO = static_cast<int32_t>(read_navigation_unsigned(subframe_bits, AODO));
@ -312,8 +312,8 @@ int32_t Gps_Navigation_Message::subframe_decoder(char* subframe)
break;
case 3: // --- It is subframe 3 -------------------------------------
d_TOW_SF3 = static_cast<double>(read_navigation_unsigned(subframe_bits, TOW));
d_TOW_SF3 = d_TOW_SF3 * 6.0;
d_TOW_SF3 = static_cast<int32_t>(read_navigation_unsigned(subframe_bits, TOW));
d_TOW_SF3 = d_TOW_SF3 * 6;
d_TOW = d_TOW_SF3; // Set transmission time
b_integrity_status_flag = read_navigation_bool(subframe_bits, INTEGRITY_STATUS_FLAG);
b_alert_flag = read_navigation_bool(subframe_bits, ALERT_FLAG);
@ -332,7 +332,7 @@ int32_t Gps_Navigation_Message::subframe_decoder(char* subframe)
d_OMEGA = d_OMEGA * OMEGA_LSB;
d_OMEGA_DOT = static_cast<double>(read_navigation_signed(subframe_bits, OMEGA_DOT));
d_OMEGA_DOT = d_OMEGA_DOT * OMEGA_DOT_LSB;
d_IODE_SF3 = static_cast<double>(read_navigation_unsigned(subframe_bits, IODE_SF3));
d_IODE_SF3 = static_cast<int32_t>(read_navigation_unsigned(subframe_bits, IODE_SF3));
d_IDOT = static_cast<double>(read_navigation_signed(subframe_bits, I_DOT));
d_IDOT = d_IDOT * I_DOT_LSB;
break;
@ -340,8 +340,8 @@ int32_t Gps_Navigation_Message::subframe_decoder(char* subframe)
case 4: // --- It is subframe 4 ---------- Almanac, ionospheric model, UTC parameters, SV health (PRN: 25-32)
int32_t SV_data_ID;
int32_t SV_page;
d_TOW_SF4 = static_cast<double>(read_navigation_unsigned(subframe_bits, TOW));
d_TOW_SF4 = d_TOW_SF4 * 6.0;
d_TOW_SF4 = static_cast<int32_t>(read_navigation_unsigned(subframe_bits, TOW));
d_TOW_SF4 = d_TOW_SF4 * 6;
d_TOW = d_TOW_SF4; // Set transmission time
b_integrity_status_flag = read_navigation_bool(subframe_bits, INTEGRITY_STATUS_FLAG);
b_alert_flag = read_navigation_bool(subframe_bits, ALERT_FLAG);
@ -384,13 +384,13 @@ int32_t Gps_Navigation_Message::subframe_decoder(char* subframe)
d_A1 = d_A1 * A_1_LSB;
d_A0 = static_cast<double>(read_navigation_signed(subframe_bits, A_0));
d_A0 = d_A0 * A_0_LSB;
d_t_OT = static_cast<double>(read_navigation_unsigned(subframe_bits, T_OT));
d_t_OT = static_cast<int32_t>(read_navigation_unsigned(subframe_bits, T_OT));
d_t_OT = d_t_OT * T_OT_LSB;
i_WN_T = static_cast<int32_t>(read_navigation_unsigned(subframe_bits, WN_T));
d_DeltaT_LS = static_cast<double>(read_navigation_signed(subframe_bits, DELTAT_LS));
d_DeltaT_LS = static_cast<int32_t>(read_navigation_signed(subframe_bits, DELTAT_LS));
i_WN_LSF = static_cast<int32_t>(read_navigation_unsigned(subframe_bits, WN_LSF));
i_DN = static_cast<int32_t>(read_navigation_unsigned(subframe_bits, DN)); // Right-justified ?
d_DeltaT_LSF = static_cast<double>(read_navigation_signed(subframe_bits, DELTAT_LSF));
d_DeltaT_LSF = static_cast<int32_t>(read_navigation_signed(subframe_bits, DELTAT_LSF));
flag_iono_valid = true;
flag_utc_model_valid = true;
}
@ -417,8 +417,8 @@ int32_t Gps_Navigation_Message::subframe_decoder(char* subframe)
case 5: //--- It is subframe 5 -----------------almanac health (PRN: 1-24) and Almanac reference week number and time.
int32_t SV_data_ID_5;
int32_t SV_page_5;
d_TOW_SF5 = static_cast<double>(read_navigation_unsigned(subframe_bits, TOW));
d_TOW_SF5 = d_TOW_SF5 * 6.0;
d_TOW_SF5 = static_cast<int32_t>(read_navigation_unsigned(subframe_bits, TOW));
d_TOW_SF5 = d_TOW_SF5 * 6;
d_TOW = d_TOW_SF5; // Set transmission time
b_integrity_status_flag = read_navigation_bool(subframe_bits, INTEGRITY_STATUS_FLAG);
b_alert_flag = read_navigation_bool(subframe_bits, ALERT_FLAG);

View File

@ -62,14 +62,14 @@ private:
public:
bool b_valid_ephemeris_set_flag; // flag indicating that this ephemeris set have passed the validation check
// broadcast orbit 1
double d_TOW; //!< Time of GPS Week of the ephemeris set (taken from subframes TOW) [s]
double d_TOW_SF1; //!< Time of GPS Week from HOW word of Subframe 1 [s]
double d_TOW_SF2; //!< Time of GPS Week from HOW word of Subframe 2 [s]
double d_TOW_SF3; //!< Time of GPS Week from HOW word of Subframe 3 [s]
double d_TOW_SF4; //!< Time of GPS Week from HOW word of Subframe 4 [s]
double d_TOW_SF5; //!< Time of GPS Week from HOW word of Subframe 5 [s]
double d_IODE_SF2;
double d_IODE_SF3;
int32_t d_TOW; //!< Time of GPS Week of the ephemeris set (taken from subframes TOW) [s]
int32_t d_TOW_SF1; //!< Time of GPS Week from HOW word of Subframe 1 [s]
int32_t d_TOW_SF2; //!< Time of GPS Week from HOW word of Subframe 2 [s]
int32_t d_TOW_SF3; //!< Time of GPS Week from HOW word of Subframe 3 [s]
int32_t d_TOW_SF4; //!< Time of GPS Week from HOW word of Subframe 4 [s]
int32_t d_TOW_SF5; //!< Time of GPS Week from HOW word of Subframe 5 [s]
int32_t d_IODE_SF2;
int32_t d_IODE_SF3;
double d_Crs; //!< Amplitude of the Sine Harmonic Correction Term to the Orbit Radius [m]
double d_Delta_n; //!< Mean Motion Difference From Computed Value [semi-circles/s]
double d_M_0; //!< Mean Anomaly at Reference Time [semi-circles]
@ -79,8 +79,8 @@ public:
double d_Cus; //!< Amplitude of the Sine Harmonic Correction Term to the Argument of Latitude [rad]
double d_sqrt_A; //!< Square Root of the Semi-Major Axis [sqrt(m)]
// broadcast orbit 3
double d_Toe; //!< Ephemeris data reference time of week (Ref. 20.3.3.4.3 IS-GPS-200E) [s]
double d_Toc; //!< clock data reference time (Ref. 20.3.3.3.3.1 IS-GPS-200E) [s]
int32_t d_Toe; //!< Ephemeris data reference time of week (Ref. 20.3.3.4.3 IS-GPS-200E) [s]
int32_t d_Toc; //!< clock data reference time (Ref. 20.3.3.3.3.1 IS-GPS-200E) [s]
double d_Cic; //!< Amplitude of the Cosine Harmonic Correction Term to the Angle of Inclination [rad]
double d_OMEGA0; //!< Longitude of Ascending Node of Orbit Plane at Weekly Epoch [semi-circles]
double d_Cis; //!< Amplitude of the Sine Harmonic Correction Term to the Angle of Inclination [rad]
@ -97,8 +97,8 @@ public:
// broadcast orbit 6
int32_t i_SV_accuracy; //!< User Range Accuracy (URA) index of the SV (reference paragraph 6.2.1) for the standard positioning service user (Ref 20.3.3.3.1.3 IS-GPS-200E)
int32_t i_SV_health;
double d_TGD; //!< Estimated Group Delay Differential: L1-L2 correction term only for the benefit of "L1 P(Y)" or "L2 P(Y)" s users [s]
double d_IODC; //!< Issue of Data, Clock
double d_TGD; //!< Estimated Group Delay Differential: L1-L2 correction term only for the benefit of "L1 P(Y)" or "L2 P(Y)" s users [s]
int32_t d_IODC; //!< Issue of Data, Clock
// broadcast orbit 7
int32_t i_AODO; //!< Age of Data Offset (AODO) term for the navigation message correction table (NMCT) contained in subframe 4 (reference paragraph 20.3.3.5.1.9) [s]
bool b_fit_interval_flag; //!< indicates the curve-fit interval used by the CS (Block II/IIA/IIR/IIR-M/IIF) and SS (Block IIIA) in determining the ephemeris parameters, as follows: 0 = 4 hours, 1 = greater than 4 hours.
@ -162,14 +162,15 @@ public:
// UTC parameters
bool flag_utc_model_valid; //!< If set, it indicates that the UTC model parameters are filled
double d_A1; //!< 1st order term of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200E) [s/s]
double d_A0; //!< Constant of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200E) [s]
double d_t_OT; //!< Reference time for UTC data (reference 20.3.4.5 and 20.3.3.5.2.4 IS-GPS-200E) [s]
double d_A1; //!< 1st order term of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200E) [s/s]
double d_A2; //!< 2nd order term of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200E) [s/s]
int32_t d_t_OT; //!< Reference time for UTC data (reference 20.3.4.5 and 20.3.3.5.2.4 IS-GPS-200E) [s]
int32_t i_WN_T; //!< UTC reference week number [weeks]
double d_DeltaT_LS; //!< delta time due to leap seconds [s]. Number of leap seconds since 6-Jan-1980 as transmitted by the GPS almanac.
int32_t d_DeltaT_LS; //!< delta time due to leap seconds [s]. Number of leap seconds since 6-Jan-1980 as transmitted by the GPS almanac.
int32_t i_WN_LSF; //!< Week number at the end of which the leap second becomes effective [weeks]
int32_t i_DN; //!< Day number (DN) at the end of which the leap second becomes effective [days]
double d_DeltaT_LSF; //!< Scheduled future or recent past (relative to NAV message upload) value of the delta time due to leap seconds [s]
int32_t d_DeltaT_LSF; //!< Scheduled future or recent past (relative to NAV message upload) value of the delta time due to leap seconds [s]
// Satellite velocity
double d_satvel_X; //!< Earth-fixed velocity coordinate x of the satellite [m]

View File

@ -35,14 +35,15 @@
Gps_Utc_Model::Gps_Utc_Model()
{
valid = false;
d_A1 = 0.0;
d_A0 = 0.0;
d_t_OT = 0.0;
d_A1 = 0.0;
d_A2 = 0.0;
d_t_OT = 0;
i_WN_T = 0;
d_DeltaT_LS = 0.0;
d_DeltaT_LS = 0;
i_WN_LSF = 0;
i_DN = 0;
d_DeltaT_LSF = 0.0;
d_DeltaT_LSF = 0;
}

View File

@ -45,14 +45,15 @@ class Gps_Utc_Model
public:
bool valid;
// UTC parameters
double d_A1; //!< 1st order term of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200E) [s/s]
double d_A0; //!< Constant of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200E) [s]
double d_t_OT; //!< Reference time for UTC data (reference 20.3.4.5 and 20.3.3.5.2.4 IS-GPS-200E) [s]
int32_t i_WN_T; //!< UTC reference week number [weeks]
double d_DeltaT_LS; //!< delta time due to leap seconds [s]. Number of leap seconds since 6-Jan-1980 as transmitted by the GPS almanac.
int32_t i_WN_LSF; //!< Week number at the end of which the leap second becomes effective [weeks]
int32_t i_DN; //!< Day number (DN) at the end of which the leap second becomes effective [days]
double d_DeltaT_LSF; //!< Scheduled future or recent past (relative to NAV message upload) value of the delta time due to leap seconds [s]
double d_A0; //!< Constant of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200E) [s]
double d_A1; //!< 1st order term of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200E) [s/s]
double d_A2; //!< 2nd order term of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200E) [s/s]
int32_t d_t_OT; //!< Reference time for UTC data (reference 20.3.4.5 and 20.3.3.5.2.4 IS-GPS-200E) [s]
int32_t i_WN_T; //!< UTC reference week number [weeks]
int32_t d_DeltaT_LS; //!< delta time due to leap seconds [s]. Number of leap seconds since 6-Jan-1980 as transmitted by the GPS almanac.
int32_t i_WN_LSF; //!< Week number at the end of which the leap second becomes effective [weeks]
int32_t i_DN; //!< Day number (DN) at the end of which the leap second becomes effective [days]
int32_t d_DeltaT_LSF; //!< Scheduled future or recent past (relative to NAV message upload) value of the delta time due to leap seconds [s]
/*!
* Default constructor