Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow missing timestamps or same consecutive timestamps #14

Merged
merged 1 commit into from Apr 23, 2016
Merged

Allow missing timestamps or same consecutive timestamps #14

merged 1 commit into from Apr 23, 2016

Conversation

fbonzon
Copy link
Contributor

@fbonzon fbonzon commented Apr 12, 2016

Fixes #6

  • Remove trailing spaces (sorry, done automatically by my text editor)

Avoids division by zero errors.

$this->journey->stats->minacceleration = min($this->accels);
$this->journey->stats->mindeceleration = min($this->decels);
$this->journey->stats->avgacceleration = round(array_sum($this->accels)/count($this->accels),2);
$this->journey->stats->avgdeceleration = round(array_sum($this->decels)/count($this->accels),2);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 554, changed accels to decels, which I believe was a bug.

@fbonzon
Copy link
Contributor Author

fbonzon commented Apr 22, 2016

Friendly ping.

@bentasker
Copy link
Owner

Sorry, must've missed the original notification!

Looks good to me, merging to fix #6

@bentasker bentasker merged commit f9a4ce6 into bentasker:master Apr 23, 2016
@bentasker
Copy link
Owner

Thanks!

@fbonzon fbonzon deleted the issue-6 branch April 24, 2016 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants