*/
public static void calculateSpeed(Track inTrack, int inIndex, SpeedValue inValue)
{
- inValue.setInvalid();
+ if (inValue != null)
+ {
+ inValue.setInvalid();
+ }
if (inTrack == null || inIndex < 0 || inValue == null)
{
System.err.println("Cannot calculate speed for index " + inIndex);
lateStamp = p.getTimestamp();
}
- stop = (p == null) || p.getSegmentStart() || hasSufficientTimeDifference(point, p);
+ stop = (p == null) || p.getSegmentStart() || hasSufficientTimeDifference(point, p);
index++;
if (p != null && !p.isWaypoint()) {
q = p;
if (p.hasAltitude()) firstAlt = p.getAltitude();
}
- stop = (p == null) || p.getSegmentStart() || hasSufficientTimeDifference(p, point);
+ stop = (p == null) || p.getSegmentStart() || hasSufficientTimeDifference(p, point);
index--;
}
while (!stop);
if (p.hasAltitude()) lastAlt = p.getAltitude();
}
- stop = (p == null) || p.getSegmentStart() || hasSufficientTimeDifference(point, p);
+ stop = (p == null) || p.getSegmentStart() || hasSufficientTimeDifference(point, p);
index++;
}
while (!stop);