class_docstr: This class represents the internal state of individual tracked objects observed as bbox.
  
  Args:
      bbox (np.array): bbox in [x1,y1,x2,y2,score] format.
      delta_t (int): delta_t of previous observation
class_docstr_tok: ["This","class","represents","the","internal","state","of","individual","tracked","objects","observed","as","bbox",".","Args",":","bbox","(","np.array",")",":","bbox","in","[","x1",",","y1",",","x2",",","y2",",","score","]","format",".","delta_t","(","int",")",":","delta_t","of","previous","observation"]
docstr: Updates the state vector with observed bbox.
docstr_tok: ["Updates","the","state","vector","with","observed","bbox","."]
code: def update(self, bbox, angle_cost=False):
      """
      Updates the state vector with observed bbox.
      """
      if bbox is not None:
          if (
              angle_cost and self.last_observation.sum() >= 0
          ):  # no previous observation
              previous_box = None
              for i in range(self.delta_t):
                  dt = self.delta_t - i
                  if self.age - dt in self.observations:
                      previous_box = self.observations[self.age - dt]
                      break
              if previous_box is None:
                  previous_box = self.last_observation
              """
                    Estimate the track speed direction with observations \Delta t steps away
                  """
              self.velocity = speed_direction(previous_box, bbox)
          """
                Insert new observations. This is a ugly way to maintain both self.observations
                and self.history_observations. Bear it for the moment.
              """
          self.last_observation = bbox
          self.observations[self.age] = bbox
          self.history_observations.append(bbox)
  
          self.time_since_update = 0
          self.history = []
          self.hits += 1
          self.hit_streak += 1
          self.kf.update(convert_bbox_to_z(bbox))
      else:
          self.kf.update(bbox)
  
file_path: PaddleDetection/ppdet/modeling/mot/tracker/ocsort_tracker.py
imports: import numpy
  from ..matching.ocsort_matching import associate, linear_assignment, iou_batch, associate_only_iou
  from ..motion.ocsort_kalman_filter import OCSORTKalmanFilter
  from ppdet.core.workspace import register, serializable
label_desc: Use image node_id 2 for calling the KalmanBoxTracker obj's underlying member method code with example usage: obj.update(bbox, angle_cost) without return types