          "gpsWeek": week,
          "gpsTimeOfWeek": tow,
          "kalmanPositionECEF": measurement_msg(value=self.gnss_kf.x[GStates.ECEF_POS].tolist(),
                                          std=np.sqrt(P_diag[GStates.ECEF_POS]).tolist(),
                                          valid=kf_valid),
          "kalmanVelocityECEF": measurement_msg(value=self.gnss_kf.x[GStates.ECEF_VELOCITY].tolist(),
                                          std=np.sqrt(P_diag[GStates.ECEF_VELOCITY]).tolist(),
                                          valid=kf_valid),
          "positionECEF": measurement_msg(value=position_estimate, std=position_std.tolist(), valid=bool(self.last_fix_t == t)),
          "velocityECEF": measurement_msg(value=velocity_estimate, std=velocity_std.tolist(), valid=bool(self.last_fix_t == t)),
  
 
</s> remove                                         valid=kf_valid),
        "positionECEF": measurement_msg(value=position_estimate, std=position_std.tolist(), valid=bool(self.last_fix_t == t)),
        "velocityECEF": measurement_msg(value=velocity_estimate, std=velocity_std.tolist(), valid=bool(self.last_fix_t == t)),

        "measTime": gnss_mono_time,
        "correctedMeasurements": meas_msgs,
        "timeToFirstFix": self.ttff,
        "ephemerisStatuses": self.create_ephem_statuses(),
      }
 </s> add                                         valid=kf_valid)

    msg_dict['gpsWeek'] = self.last_report_time.week
    msg_dict['gpsTimeOfWeek'] = self.last_report_time.tow
    msg_dict['timeToFirstFix'] = self.ttff
    msg_dict['ephemerisStatuses'] = self.create_ephem_statuses()
    out_msg.gnssMeasurements = msg_dict </s> remove       out_msg.gnssMeasurements = {
        "gpsWeek": week,
        "gpsTimeOfWeek": tow,
        "kalmanPositionECEF": measurement_msg(value=self.gnss_kf.x[GStates.ECEF_POS].tolist(),
 </s> add       msg_dict["kalmanPositionECEF"] = measurement_msg(value=self.gnss_kf.x[GStates.ECEF_POS].tolist(), </s> remove     self.assertEqual(375, len(correct_msgs))
    self.assertEqual(375, len([m for m in correct_msgs if m.gnssMeasurements.positionECEF.valid]))
 </s> add     expected_msgs = 376
    self.assertEqual(expected_msgs, len(correct_msgs))
    self.assertEqual(expected_msgs, len([m for m in correct_msgs if m.gnssMeasurements.positionECEF.valid])) </s> remove       self.assertEqual(correct_msgs_expected, len([m for m in correct_msgs if m.gnssMeasurements.positionECEF.valid]))
 </s> add       self.assertEqual(valid_fix_expected, len([m for m in correct_msgs if m.gnssMeasurements.positionECEF.valid])) </s> remove       correct_msgs_expected = 42 if use_qcom else 559
 </s> add       correct_msgs_expected = 44 if use_qcom else 560
      valid_fix_expected = 43 if use_qcom else 560

                                        valid=kf_valid)
      msg_dict["kalmanVelocityECEF"] = measurement_msg(value=self.gnss_kf.x[GStates.ECEF_VELOCITY].tolist(),
          "gpsWeek": week,
          "gpsTimeOfWeek": tow,
          "kalmanPositionECEF": measurement_msg(value=self.gnss_kf.x[GStates.ECEF_POS].tolist(),
                                          std=np.sqrt(P_diag[GStates.ECEF_POS]).tolist(),
                                        valid=kf_valid)
      msg_dict["kalmanVelocityECEF"] = measurement_msg(value=self.gnss_kf.x[GStates.ECEF_VELOCITY].tolist(),
                                        valid=kf_valid)
      msg_dict["kalmanVelocityECEF"] = measurement_msg(value=self.gnss_kf.x[GStates.ECEF_VELOCITY].tolist(),
                                          std=np.sqrt(P_diag[GStates.ECEF_VELOCITY]).tolist(),
                                          valid=kf_valid),
          "positionECEF": measurement_msg(value=position_estimate, std=position_std.tolist(), valid=bool(self.last_fix_t == t)),
          "velocityECEF": measurement_msg(value=velocity_estimate, std=velocity_std.tolist(), valid=bool(self.last_fix_t == t)),
  
keep keep keep keep replace replace keep keep keep keep keep
 Laika cleaner flow (#27633)

* laika flow

* test fixes

* unexpected type

* unexpected type

* explicit type

* ref commit

* back to prev val

* ref 2 
selfdrive/locationd/laikad.py