View Javadoc
1   package au.gov.amsa.geo.distance;
2   
3   import java.util.concurrent.atomic.AtomicLong;
4   
5   import com.google.common.util.concurrent.AtomicDouble;
6   
7   public class DistanceCalculationMetrics {
8       AtomicLong fixesPassedEffectiveSpeedCheck = new AtomicLong(0);
9       AtomicLong fixes = new AtomicLong(0);
10      AtomicLong fixesInTimeRange = new AtomicLong();
11      AtomicLong fixesWithinRegion = new AtomicLong(0);
12      AtomicLong segments = new AtomicLong(0);
13      AtomicLong segmentsTimeDifferenceOk = new AtomicLong(0);
14      AtomicLong segmentsDistanceOk = new AtomicLong(0);
15      AtomicDouble totalNauticalMiles = new AtomicDouble(0);
16      AtomicLong segmentCells = new AtomicLong(0);
17  
18      @Override
19      public String toString() {
20          StringBuilder builder = new StringBuilder();
21          builder.append("Metrics [fixes=");
22          builder.append(fixes);
23          builder.append(", fixesInTimeRange=");
24          builder.append(fixesInTimeRange);
25          builder.append(", fixesWithinRegion=");
26          builder.append(fixesWithinRegion);
27          builder.append(", fixesEffectiveSpeedOk=");
28          builder.append(fixesPassedEffectiveSpeedCheck.get());
29          builder.append(", segments=");
30          builder.append(segments);
31          builder.append(", segmentsTimeDifferenceOk=");
32          builder.append(segmentsTimeDifferenceOk);
33          builder.append(", segmentsDistanceOk=");
34          builder.append(segmentsDistanceOk);
35          builder.append(", segmentCells=");
36          builder.append(segmentCells);
37          builder.append(", totalNauticalMiles=");
38          builder.append(totalNauticalMiles);
39          builder.append("]");
40          return builder.toString();
41      }
42  
43  }