mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-25 06:58:39 +00:00
fixing bug 2197, NPE in Igtimi wind receiver
This commit is contained in:
+7
-3
@@ -220,9 +220,13 @@ public class IgtimiWindReceiver implements BulkFixReceiver {
|
||||
Speed sog = getSOG(timePoint, sogPair);
|
||||
com.sap.sse.common.Util.Pair<COG, COG> cogPair = getSurroundingFixes(getCogTrack(deviceSerialNumber), timePoint);
|
||||
Bearing cog = getCOG(timePoint, cogPair);
|
||||
SpeedWithBearing sogCog = new KnotSpeedWithBearingImpl(sog.getKnots(), cog);
|
||||
SpeedWithBearing trueWindSpeedAndDirection = apparentWindSpeedWithDirection.add(sogCog);
|
||||
result = new WindImpl(pos, timePoint, trueWindSpeedAndDirection);
|
||||
if (sog != null && cog != null) {
|
||||
SpeedWithBearing sogCog = new KnotSpeedWithBearingImpl(sog.getKnots(), cog);
|
||||
SpeedWithBearing trueWindSpeedAndDirection = apparentWindSpeedWithDirection.add(sogCog);
|
||||
result = new WindImpl(pos, timePoint, trueWindSpeedAndDirection);
|
||||
} else {
|
||||
result = null;
|
||||
}
|
||||
} else {
|
||||
result = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user