Ejemplo n.º 1
0
 def add_RXM_SFRB(self, msg):
     """add some RXM_SFRB subframe data"""
     ion = ephemeris.IonosphericData(msg)
     if ion.valid:
         if msg.svid in self.ionospheric:
             old_ion = self.ionospheric[msg.svid]
         else:
             old_ion = None
         self.ionospheric[msg.svid] = ion
         if old_ion is None or old_ion != ion:
             util.saveObject('ionospheric.dat', self.ionospheric)
Ejemplo n.º 2
0
 def add_AID_EPH(self, msg):
     """add some AID_EPH ephemeris data"""
     eph = ephemeris.EphemerisData(msg)
     if eph.valid:
         if eph.svid in self.ephemeris:
             old_eph = self.ephemeris[eph.svid]
         else:
             old_eph = None
         self.ephemeris[eph.svid] = eph
         if old_eph is None or old_eph != eph:
             self.smooth.reset(eph.svid)
             util.saveObject('ephemeris.dat', self.ephemeris)
Ejemplo n.º 3
0
            t += t_wrap

            t_last = t

            for s in msg.recs:
                if not s.flags & 1:  # ignore svs not used in soln
                    continue

                sat_el[t - t_first, s.svid] = s.elev
                sat_az[t - t_first, s.svid] = s.azim

                if opts.satlog is None:
                    sat_res[t - t_first, s.svid] = s.prRes / 100.  # Resid in cm

if opts.save_pos is not None:
    util.saveObject(opts.save_pos, (sat_el, sat_az, sat_res))
    util.saveObject(opts.save_pos + '.stamp', t_first)
    print("Saved OK")

p_err = []
dg_err = []
with open(opts.errlog, mode='r') as f:
    f.readline()

    for l in f:
        n, d, nxy, dxy = l.split()

        p_err.append(float(n))
        dg_err.append(float(d))

# trim off the last element of each array which may contain incomplete
Ejemplo n.º 4
0
                t_wrap = t_last

            t += t_wrap

            t_last = t

            for s in msg.recs:
                if not s.flags & 1: # ignore svs not used in soln
                    continue

                sat_el[t - t_first, s.svid] = s.elev
                sat_az[t - t_first, s.svid] = s.azim
                sat_res[t - t_first, s.svid] = s.prRes / 100.   # Resid in cm

if opts.save_pos is not None:
    util.saveObject(opts.save_pos, (sat_el, sat_az, sat_res))
    util.saveObject(opts.save_pos + '.stamp', t_first)
    print("Saved OK")

p_err = []
dg_err = []
with open(opts.errlog, mode='r') as f:
    f.readline()

    for l in f:
        n, d, nxy, dxy = l.split()

        p_err.append(float(n))
        dg_err.append(float(d))