Skip to content

Commit

Permalink
Fix #27
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuNls committed Jun 4, 2015
1 parent 5bb1bf0 commit adb4d81
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions application/models/measure.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ function getMeasuresByUser($userId, $userWatches)
return $data;
}

private function computeAccuracy(&$watchMeasure){
$userDelta = $watchMeasure->measureUserTime + $watchMeasure->accuracyUserTime;
$refDelta = $watchMeasure->measureReferenceTime + $watchMeasure->accuracyReferenceTime;
private function computeAccuracy($watchMeasure){
$userDelta = $watchMeasure->accuracyUserTime - $watchMeasure->measureUserTime + ;
$refDelta = $watchMeasure->accuracyReferenceTime - $watchMeasure->measureReferenceTime
$accuracy = ($userDelta*86400/$refDelta)-86400;
$accuracy = floor($accuracy*10.0)/10.0;
$watchMeasure->accuracy = $accuracy;
$accuracy = sprintf("%.2f", $accuracy);
return $accuracy;
}

function addBaseMesure($watchId, $referenceTime, $userTime)
Expand Down

0 comments on commit adb4d81

Please sign in to comment.