コード例 #1
0
ファイル: hdf5.py プロジェクト: henryhallam/gnss-analysis
 def _process_eph(self, msg):
   if type(msg) is ob.MsgEphemeris or type(msg) is tr.MsgEphemerisOld:
     if msg.healthy == 1 and msg.valid == 1:
       time = gpstime.gpst_components2datetime(msg.toe_wn, msg.toe_tow)
       m = exclude_fields(msg)
       if time in self.ephemerides:
         self.ephemerides[time].update({msg.prn: m})
       else:
         self.ephemerides[time] = {msg.prn: m}
コード例 #2
0
def tdcp_doppler(nav_meas_old, nav_meas_new):
  """Returns measurement precise Doppler using time difference of
  carrier phase.

  see: libswiftnav/src/track.c:tdcp_dopper

  Parameters
  ----------
  nav_meas_rover : object

  nav_meas_base : object

  """
  t_old = gpstime.gpst_components2datetime(nav_meas_old.tot.wn,
                                           nav_meas_old.tot.tow)
  t_new = gpstime.gpst_components2datetime(nav_meas_new.tot.wn,
                                           nav_meas_new.tot.tow)
  dt = (t_new - t_old).total_seconds()
  doppler = (nav_meas_new.carrier_phase - nav_meas_old.carrier_phase) / dt
  return doppler
コード例 #3
0
 def _process_eph(self, host_offset, host_time, msg):
   if type(msg) in [ob.MsgEphemeris,
                    ob.MsgEphemerisDepA,
                    ob.MsgEphemerisDepB]:
     time = gpstime.gpst_components2datetime(msg.toe_wn, msg.toe_tow)
     t = self.base_ephemerides if from_base(msg) else self.rover_ephemerides
     prn = msg.sid if msg.msg_type is ob.SBP_MSG_EPHEMERIS else msg.prn
     m = exclude_fields(msg)
     m['host_time'] = host_time
     self.eph_seq = self.eph_seq + 1 if host_offset in self.ephemerides else 0
     m['host_offset'] = host_offset + SEQ_INTERVAL*self.eph_seq
     # For the moment, SITL and HITL analyses expect different
     # formats of ephemerides tables. Keep both until everyone's
     # migrated appropriately.
     if msg.healthy == 1 and msg.valid == 1:
       if time in self.ephemerides:
         self.ephemerides[time].update({prn: m})
       else:
         self.ephemerides[time] = {prn: m}
     if prn in t:
       t[prn].update({m['host_offset']: m})
     else:
       t[prn] = {m['host_offset']: m}