Fixed a bug where calculateVMG was placing velocity into the VMG object, instead of speed.
Maybe fixed a bug when a bearingLowerBound which is greater than bearingUpperBound is provided.
Added another test case.
Mock.Constants:
Added knots to millimeters per second conversion factor.
Mock.Boat:
Added calculateDIstanceToNextMarker function, which returns the distance, in nautical miles, to the next mark.
Mock.Race:
Added wind direction as a race property.
Added wind speed as a race property.
The race status messages sent by Race now use Race's wind speed and direction.
#story[873]
//TODO for wind speeds larger than any in the Polars table, we will simply not find an upper bound, and therefore never calculate an upper VMG, or interpolate between them.
RaceStatusraceStatus=newRaceStatus(System.currentTimeMillis(),raceId,4,startTime,0,2300,2,boatStatuses);//TODO FIX the second currentTime is a placeholder! Also, replace magic values.
@ -213,7 +223,7 @@ public class Race implements Runnable {
}
}
boatOffset=(boatOffset+1)%(startingBoats.size());
RaceStatusraceStatus=newRaceStatus(System.currentTimeMillis(),raceId,3,startTime,0,2300,2,boatStatuses);//TODO FIX the second currentTime is a placeholder! Also, replace magic values.