aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-12-22 21:22:06 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2020-12-22 21:22:06 -0800
commit1ca3ab609cc77706178a9784287272555d577382 (patch)
treefe3b11ce140666e6f0febe51748aefb4fc986ecc /src/test/java/org/traccar
parent2fc6343fc770bd09ba76e4511f0f94ac786d2c6a (diff)
downloadtrackermap-server-1ca3ab609cc77706178a9784287272555d577382.tar.gz
trackermap-server-1ca3ab609cc77706178a9784287272555d577382.tar.bz2
trackermap-server-1ca3ab609cc77706178a9784287272555d577382.zip
Fix average speed (fix #4616)
Diffstat (limited to 'src/test/java/org/traccar')
-rw-r--r--src/test/java/org/traccar/reports/ReportUtilsTest.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/java/org/traccar/reports/ReportUtilsTest.java b/src/test/java/org/traccar/reports/ReportUtilsTest.java
index 01b9c276f..deb17ddd2 100644
--- a/src/test/java/org/traccar/reports/ReportUtilsTest.java
+++ b/src/test/java/org/traccar/reports/ReportUtilsTest.java
@@ -91,7 +91,7 @@ public class ReportUtilsTest extends BaseTest {
assertEquals(date("2016-01-01 00:02:00.000"), itemTrip.getStartTime());
assertEquals(date("2016-01-01 00:05:00.000"), itemTrip.getEndTime());
assertEquals(180000, itemTrip.getDuration());
- assertEquals(10, itemTrip.getAverageSpeed(), 0.01);
+ assertEquals(32.4, itemTrip.getAverageSpeed(), 0.01);
assertEquals(10, itemTrip.getMaxSpeed(), 0.01);
assertEquals(3000, itemTrip.getDistance(), 0.01);
@@ -145,7 +145,7 @@ public class ReportUtilsTest extends BaseTest {
assertEquals(date("2016-01-01 00:02:00.000"), itemTrip.getStartTime());
assertEquals(date("2016-01-01 00:05:00.000"), itemTrip.getEndTime());
assertEquals(180000, itemTrip.getDuration());
- assertEquals(10, itemTrip.getAverageSpeed(), 0.01);
+ assertEquals(32.4, itemTrip.getAverageSpeed(), 0.01);
assertEquals(10, itemTrip.getMaxSpeed(), 0.01);
assertEquals(3000, itemTrip.getDistance(), 0.01);
@@ -160,7 +160,7 @@ public class ReportUtilsTest extends BaseTest {
assertEquals(date("2016-01-01 00:02:00.000"), itemTrip.getStartTime());
assertEquals(date("2016-01-01 00:05:00.000"), itemTrip.getEndTime());
assertEquals(180000, itemTrip.getDuration());
- assertEquals(10, itemTrip.getAverageSpeed(), 0.01);
+ assertEquals(32.4, itemTrip.getAverageSpeed(), 0.01);
assertEquals(10, itemTrip.getMaxSpeed(), 0.01);
assertEquals(3000, itemTrip.getDistance(), 0.01);
@@ -216,7 +216,7 @@ public class ReportUtilsTest extends BaseTest {
assertEquals(date("2016-01-01 00:02:00.000"), itemTrip.getStartTime());
assertEquals(date("2016-01-01 00:09:00.000"), itemTrip.getEndTime());
assertEquals(420000, itemTrip.getDuration());
- assertEquals(8.57, itemTrip.getAverageSpeed(), 0.01);
+ assertEquals(32.4, itemTrip.getAverageSpeed(), 0.01);
assertEquals(10, itemTrip.getMaxSpeed(), 0.01);
assertEquals(7000, itemTrip.getDistance(), 0.01);
@@ -370,7 +370,7 @@ public class ReportUtilsTest extends BaseTest {
assertEquals(date("2016-01-01 00:00:00.000"), itemTrip.getStartTime());
assertEquals(date("2016-01-01 00:04:00.000"), itemTrip.getEndTime());
assertEquals(240000, itemTrip.getDuration());
- assertEquals(6.75, itemTrip.getAverageSpeed(), 0.01);
+ assertEquals(4.86, itemTrip.getAverageSpeed(), 0.01);
assertEquals(7, itemTrip.getMaxSpeed(), 0.01);
assertEquals(600, itemTrip.getDistance(), 0.01);