        self.update_kalman(current_time, ObservationKind.ODOMETRIC_SPEED, log.carState.vEgo)
        if log.carState.vEgo == 0:
          self.update_kalman(current_time, ObservationKind.NO_ROT, [0, 0, 0])
  
    def handle_ublox_gnss(self, log, current_time):
      if hasattr(log.ubloxGnss, 'measurementReport'):
        self.raw_gnss_counter += 1
        if True or self.raw_gnss_counter % 3==0:
          processed_raw = gnss.process_measurements(gnss.read_raw_ublox(log.ubloxGnss.measurementReport), dog=self.dog)
          corrected_raw = gnss.correct_measurements(processed_raw, self.kf.x[:3], dog=self.dog)
          corrected_raw = np.array([c.as_array() for c in corrected_raw]).reshape((-1,14))
          self.update_kalman(current_time, ObservationKind.PSEUDORANGE_GPS, corrected_raw)
          self.update_kalman(current_time, ObservationKind.PSEUDORANGE_RATE_GPS, corrected_raw)
      #elif hasattr(log.ubloxGnss, 'ephemeris'):
      #  self.dog.add_ublox_ephems([log])
      #  if len(self.dog.orbits.keys()) < 6:
      #    print 'Added ublox ephem now has ', len(self.dog.orbits.keys())
  
    def handle_qcom_gnss(self, log, current_time):
      if hasattr(log.qcomGnss, 'drSvPoly') and self.week is not None:
        self.dog.add_qcom_ephems([log], self.week)
        if len(list(self.dog.orbits.keys())) < 6:
          print('Added qcom ephem now has ', len(list(self.dog.orbits.keys())))
      if hasattr(log.qcomGnss, 'drMeasurementReport') and log.qcomGnss.drMeasurementReport.source == "gps":
        self.week = log.qcomGnss.drMeasurementReport.gpsWeek
  
    def handle_cam_odo(self, log, current_time):
      self.update_kalman(current_time, ObservationKind.CAMERA_ODO_ROTATION, np.concatenate([log.cameraOdometry.rot,
                                                                                            log.cameraOdometry.rotStd]))
      self.update_kalman(current_time, ObservationKind.CAMERA_ODO_TRANSLATION, np.concatenate([log.cameraOdometry.trans,
                                                                                               log.cameraOdometry.transStd]))
 
</s> remove     pass
 </s> add  </s> remove           if max(abs(self.kf.x[23:26])) > 0.07:
 </s> add           if max(abs(self.kf.x[States.IMU_OFFSET])) > 0.07: </s> remove     # initing with bad bearing allowed, maybe bad?
    if not self.filter_ready and len(list(self.dog.orbits.keys())) >6:  # and log.gpsLocationExternal.speed > 5:
 </s> add     # TODO initing with bad bearing not allowed, maybe not bad?
    if not self.filter_ready and log.gpsLocationExternal.speed > 5: </s> remove       initial_state = np.zeros(29)
 </s> add  </s> remove   IN_CAR = os.getenv("IN_CAR", False)
  disabled_logs = os.getenv("DISABLED_LOGS", "").split(",")
  # No speed for now
  disabled_logs.append('carState')
  if IN_CAR:
    addr = "192.168.5.11"
  locationd_thread(gctx, addr, disabled_logs)
 </s> add   locationd_thread(gctx, addr)
        self.update_kalman(current_time, ObservationKind.ODOMETRIC_SPEED, log.carState.vEgo)
        if log.carState.vEgo == 0:
          self.update_kalman(current_time, ObservationKind.NO_ROT, [0, 0, 0])
  






















    def handle_cam_odo(self, log, current_time):
      self.update_kalman(current_time, ObservationKind.CAMERA_ODO_ROTATION, np.concatenate([log.cameraOdometry.rot,
                                                                                            log.cameraOdometry.rotStd]))
      self.update_kalman(current_time, ObservationKind.CAMERA_ODO_TRANSLATION, np.concatenate([log.cameraOdometry.trans,
                                                                                               log.cameraOdometry.transStd]))
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 get ready for live localizer 
selfdrive/locationd/locationd.py