mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-02 18:33:54 +00:00
reverting commit ecd8cb2d55 which broke test RaceLogWindFixEventSerializerTest
This commit is contained in:
1 parent
5fcd0f29f2
commit
d96988159e
1 file changed
+1
-9
+1
-9
@@ -29,17 +29,9 @@ public class WindJsonDeserializer implements JsonDeserializer<Wind> {
|
||||
Number timeStamp = (Number) object.get(WindJsonSerializer.FIELD_TIMEPOINT);
|
||||
Number direction = (Number) object.get(WindJsonSerializer.FIELD_DIRECTION);
|
||||
Number speedInKnots = (Number) object.get(WindJsonSerializer.FIELD_SPEED_IN_KNOTS);
|
||||
|
||||
Bearing degreeBearing = null;
|
||||
if (direction.doubleValue() >= 180) {
|
||||
degreeBearing = new DegreeBearingImpl(direction.doubleValue()-180);
|
||||
} else {
|
||||
degreeBearing = new DegreeBearingImpl(direction.doubleValue()+180);
|
||||
}
|
||||
|
||||
Bearing degreeBearing = new DegreeBearingImpl(direction.doubleValue());
|
||||
SpeedWithBearing speedBearing = new KnotSpeedWithBearingImpl(speedInKnots.doubleValue(), degreeBearing);
|
||||
Wind wind = new WindImpl(position, new MillisecondsTimePoint(timeStamp.longValue()), speedBearing);
|
||||
|
||||
return wind;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user