src/ufo/filters/TrackCheckShip.cc
bool TrackCheckShip::earlyBreak(const std::vector<std::reference_wrapper<TrackObservation>>
                                &trackObs, const std::string trackId) const {
  bool breakResult = false;
  const auto& trackStats = *(trackObs[0].get().getFullTrackStatistics());
  // if at least half of the track segments have a time difference of less than an hour
  // (if non-buoy), are faster than a configured maximum speed, or exhibit at least a 90
  // degree bend
  if ((2 * ((options_.inputCategory.value() != SurfaceObservationSubtype::BUOY &&
             options_.inputCategory.value() != SurfaceObservationSubtype::BUOYPROF)
            * trackStats.numShort_ + trackStats.numFast_) + trackStats.numBends_)
      >= (trackObs.size() - 1)) {
    oops::Log::trace() << "ShipTrackCheck: " << trackId << "\n" <<
                          "Time difference < 1 hour: " << trackStats.numShort_ << "\n" <<
                          "Fast: " << trackStats.numFast_ << "\n" <<
                          "Bends: " << trackStats.numBends_ << "\n" <<
                          "Total observations: " << trackObs.size() << "\n" <<
                          "Track was not checked." << std::endl;

    breakResult = true;
  }
  if (options_.testingMode)
    diagnostics_->storeEarlyBreakResult(breakResult);
  return breakResult;
}
/// \brief \returns true if at least half of the track segments have
/// incremented the relevant rejection counters
///
/// This filter is best for mostly-accurate observation tracks. If the track has
/// many "errors" (as indicated by the counters that are incremented before
/// any observations are removed), it will stop early by default.
///
/// Sometimes caused by two ships with same callsign or various reports with wrong time,
/// the check gives up. This is particularly a problem with WOD01 data - case studies
/// suggest that most suspect data is reasonable.
\brief \returns true if at least half of the track segments have
incremented the relevant rejection counters

This filter is best for mostly-accurate observation tracks. If the track has
many "errors" (as indicated by the counters that are incremented before
any observations are removed), it will stop early by default.

Sometimes caused by two ships with same callsign or various reports with wrong time,
the check gives up. This is particularly a problem with WOD01 data - case studies
suggest that most suspect data is reasonable.
\ brief \ returns true if at least half of the track segments have incremented the relevant rejection counters This filter is best for mostly - accurate observation tracks . If the track has many " errors " ( as indicated by the counters that are incremented before any observations are removed ) it will stop early by default . Sometimes caused by two ships with same callsign or various reports with wrong time the check gives up . This is particularly a problem with WOD01 data - case studies suggest that most suspect data is reasonable .
bool TrackCheckShip::earlyBreak(const std::vector<std::reference_wrapper<TrackObservation>>
                                &trackObs, const std::string trackId) const {
  bool breakResult = false;
  const auto& trackStats = *(trackObs[0].get().getFullTrackStatistics());
  if ((2 * ((options_.inputCategory.value() != SurfaceObservationSubtype::BUOY &&
             options_.inputCategory.value() != SurfaceObservationSubtype::BUOYPROF)
            * trackStats.numShort_ + trackStats.numFast_) + trackStats.numBends_)
      >= (trackObs.size() - 1)) {
    oops::Log::trace() << "ShipTrackCheck: " << trackId << "\n" <<
                          "Time difference < 1 hour: " << trackStats.numShort_ << "\n" <<
                          "Fast: " << trackStats.numFast_ << "\n" <<
                          "Bends: " << trackStats.numBends_ << "\n" <<
                          "Total observations: " << trackObs.size() << "\n" <<
                          "Track was not checked." << std::endl;
    breakResult = true;
  }
  if (options_.testingMode)
    diagnostics_->storeEarlyBreakResult(breakResult);
  return breakResult;
}
bool TrackCheckShip :: earlyBreak ( const std :: vector < std :: reference_wrapper < TrackObservation > > & trackObs , const std :: string trackId ) const { bool breakResult = false ; const auto & trackStats = * ( trackObs [ 0 ] . get ( ) . getFullTrackStatistics ( ) ) ; if ( ( 2 * ( ( options_ . inputCategory . value ( ) != SurfaceObservationSubtype :: BUOY && options_ . inputCategory . value ( ) != SurfaceObservationSubtype :: BUOYPROF ) * trackStats . numShort_ + trackStats . numFast_ ) + trackStats . numBends_ ) >= ( trackObs . size ( ) - 1 ) ) { oops :: Log :: trace ( ) << " " << trackId << " \n " << " " << trackStats . numShort_ << " \n " << " " << trackStats . numFast_ << " \n " << " " << trackStats . numBends_ << " \n " << " " << trackObs . size ( ) << " \n " << " " << std :: endl ; breakResult = true ; } if ( options_ . testingMode ) diagnostics_ -> storeEarlyBreakResult ( breakResult ) ; return breakResult ; }
\brief \returns true if at least half of the track segments have
incremented the relevant rejection counters
\ brief \ returns true if at least half of the track segments have incremented the relevant rejection counters
// if at least half of the track segments have a time difference of less than an hour // (if non-buoy), are faster than a configured maximum speed, or exhibit at least a 90 // degree bend