diff --git a/src/almanac.c b/src/almanac.c index 72e704ad..f25163d9 100755 --- a/src/almanac.c +++ b/src/almanac.c @@ -105,6 +105,7 @@ static void gps_calc_sat_state_almanac(const almanac_t* alm_, double t, s16 week double ea = ma; /* Starting value for E. */ double ea_old; double temp; + // TODO: inclination offset for QZSS different from GPS double ecc = alm->ecc; u32 count = 0; @@ -144,6 +145,7 @@ static void gps_calc_sat_state_almanac(const almanac_t* alm_, double t, s16 week /* Compute the satellite's position in Earth-Centered Earth-Fixed * coordinates. */ + // TODO: inclination offset for QZSS different from GPS pos[0] = x * cos(om) - y * cos(alm->inc) * sin(om); pos[1] = x * sin(om) + y * cos(alm->inc) * cos(om); pos[2] = y * sin(alm->inc); diff --git a/src/ephemeris.c b/src/ephemeris.c index 726c6e42..b6ef2821 100644 --- a/src/ephemeris.c +++ b/src/ephemeris.c @@ -276,7 +276,7 @@ void decode_ephemeris(u32 frame_words[3][8], ephemeris_t *e) { assert(frame_words != NULL); assert(e != NULL); - assert(e->sid.constellation == CONSTELLATION_GPS); + assert((e->sid.constellation == CONSTELLATION_GPS) || (e->sid.constellation == CONSTELLATION_QZSS)); ephemeris_kepler_t *k = &e->kepler; /* These unions facilitate signed/unsigned conversion and sign extension. */ @@ -308,6 +308,7 @@ void decode_ephemeris(u32 frame_words[3][8], ephemeris_t *e) e->healthy = !(frame_words[0][3-3] >> (30-17) & 1); /* t_gd: Word 7, bits 17-24 */ + // TODO onebyte.u8 = frame_words[0][7-3] >> (30-24) & 0xFF; k->tgd = onebyte.s8 * pow(2,-31);