Skip to content

Commit

Permalink
Merge pull request #705 from osrf/mean_time_calc
Browse files Browse the repository at this point in the history
Fix mean time calculation
  • Loading branch information
nkoenig authored Nov 18, 2020
2 parents 7c44c88 + a2213c2 commit aab915a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions subt_ign/src/GameLogicPlugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2577,10 +2577,10 @@ void GameLogicPluginPrivate::LogRobotArtifactData(
statsMsg.last_artifact_report_time = this->lastReportTime;

double meanReportTime = 0;
if (!this->foundArtifacts.empty())
if (this->foundArtifacts.size() > 1)
{
meanReportTime = (this->lastReportTime-this->firstReportTime) /
this->foundArtifacts.size();
(this->foundArtifacts.size() - 1);
}
out << YAML::Key << "mean_time_between_successful_artifact_reports";
out << YAML::Value << meanReportTime;
Expand Down

0 comments on commit aab915a

Please sign in to comment.