  
      // 100Hz publish for notcars, 20Hz for cars
      const char* trigger_msg = sm["carParams"].getCarParams().getNotCar() ? "accelerometer" : "cameraOdometry";
      if (sm.updated(trigger_msg)) {
        bool inputsOK = sm.allAliveAndValid();
        bool gpsOK = this->isGpsOK();
        bool sensorsOK = sm.allAliveAndValid({"accelerometer", "gyroscope"});
  
        MessageBuilder msg_builder;
        kj::ArrayPtr<capnp::byte> bytes = this->get_message_bytes(msg_builder, inputsOK, sensorsOK, gpsOK, filterInitialized);
        pm.send("liveLocationKalman", bytes.begin(), bytes.size());
 
</s> remove   bool isGpsOK();
 </s> add   bool is_gps_ok();
  bool critical_services_valid(std::map<std::string, double> critical_services);
  bool is_timestamp_valid(double current_time);
      bool inputsOK = sm.allAliveAndValid() && this->are_inputs_ok();
      bool gpsOK = this->is_gps_ok();
  
      // 100Hz publish for notcars, 20Hz for cars
      const char* trigger_msg = sm["carParams"].getCarParams().getNotCar() ? "accelerometer" : "cameraOdometry";
      if (sm.updated(trigger_msg)) {
      bool inputsOK = sm.allAliveAndValid() && this->are_inputs_ok();
      bool gpsOK = this->is_gps_ok();
      bool inputsOK = sm.allAliveAndValid() && this->are_inputs_ok();
      bool gpsOK = this->is_gps_ok();
        bool sensorsOK = sm.allAliveAndValid({"accelerometer", "gyroscope"});
  
        MessageBuilder msg_builder;
        kj::ArrayPtr<capnp::byte> bytes = this->get_message_bytes(msg_builder, inputsOK, sensorsOK, gpsOK, filterInitialized);
        pm.send("liveLocationKalman", bytes.begin(), bytes.size());
keep keep keep keep replace replace keep keep keep keep keep
 [locationd] Add input checks (#26460)

* add input checks with same decay as reset_tracker

* add observation timings check

* typo

* bugfix

* improve offline locationd visibility

* sbugfix offline lld

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> 
selfdrive/locationd/locationd.cc