X-Git-Url: https://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2Fdata%2FDataPoint.java;h=5e864ce10e821068310932621f24c011be9e3097;hp=46c4acd9d1ad562883ed9d8a8830802d1f123c19;hb=da0b1f449260a0b4a94318006382a9039726ef3e;hpb=5625a1abadb5f2ca5f017fe7dbda1d5141cb637b diff --git a/tim/prune/data/DataPoint.java b/tim/prune/data/DataPoint.java index 46c4acd..5e864ce 100644 --- a/tim/prune/data/DataPoint.java +++ b/tim/prune/data/DataPoint.java @@ -138,30 +138,37 @@ public class DataPoint } + /** @return latitude */ public Coordinate getLatitude() { return _latitude; } + /** @return longitude */ public Coordinate getLongitude() { return _longitude; } + /** @return true if point has altitude */ public boolean hasAltitude() { return _altitude.isValid(); } + /** @return altitude */ public Altitude getAltitude() { return _altitude; } + /** @return true if point has timestamp */ public boolean hasTimestamp() { return _timestamp.isValid(); } + /** @return timestamp */ public Timestamp getTimestamp() { return _timestamp; } + /** @return waypoint name, if any */ public String getWaypointName() { return _waypointName; @@ -202,10 +209,7 @@ public class DataPoint { return !inOther.isWaypoint(); } - else - { - return (inOther._waypointName != null && inOther._waypointName.equals(_waypointName)); - } + return (inOther._waypointName != null && inOther._waypointName.equals(_waypointName)); } @@ -246,21 +250,33 @@ public class DataPoint public DataPoint[] interpolate(DataPoint inEndPoint, int inNumPoints) { DataPoint[] range = new DataPoint[inNumPoints]; - Coordinate endLatitude = inEndPoint.getLatitude(); - Coordinate endLongitude = inEndPoint.getLongitude(); - Altitude endAltitude = inEndPoint.getAltitude(); - // Loop over points for (int i=0; i