fixed autovmg.

This commit is contained in:
Joseph Gardner
2017-08-17 16:50:13 +12:00
parent dcd1df2999
commit 5ba6f52669
@@ -321,6 +321,11 @@ public class MockRace extends Race {
checkPosition(boat, totalElapsedMilliseconds); checkPosition(boat, totalElapsedMilliseconds);
if (boat.getCurrentSpeed() == 0) {
newOptimalVMG(boat);
boat.setBearing(boat.calculateBearingToNextMarker());
}
setBoatSpeed(boat); setBoatSpeed(boat);
//Calculates the distance travelled, in meters, in the current timeslice. //Calculates the distance travelled, in meters, in the current timeslice.