Mock.Race:
Usages of VMG.bearing now use the getBearing() function, as the member is now private. #story[873]
This commit is contained in:
@@ -315,9 +315,9 @@ public class Race implements Runnable {
|
||||
boat.calculateBearingToDestination(), min(bound1, bound2), max(bound1,bound2));
|
||||
|
||||
|
||||
double azimuth = newHeading.bearing;
|
||||
if (newHeading.bearing > 180){
|
||||
azimuth = newHeading.bearing -360;
|
||||
double azimuth = newHeading.getBearing();
|
||||
if (newHeading.getBearing() > 180){
|
||||
azimuth = newHeading.getBearing() -360;
|
||||
}
|
||||
|
||||
// if (!GPSCoordinate.isInsideBoundary(calculatePosition(boat.getCurrentPosition(),
|
||||
@@ -327,11 +327,11 @@ public class Race implements Runnable {
|
||||
// newHeading.bearing = tempHeading;
|
||||
// }
|
||||
|
||||
boat.setHeading(newHeading.bearing);
|
||||
boat.setVelocity(newHeading.speed);
|
||||
boat.setHeading(newHeading.getBearing());
|
||||
boat.setVelocity(newHeading.getSpeed());
|
||||
|
||||
//calc the distance travelled in a straight line to windward
|
||||
double angleBetweenDestAndHeading = newHeading.bearing - boat.calculateBearingToDestination();
|
||||
double angleBetweenDestAndHeading = newHeading.getBearing() - boat.calculateBearingToDestination();
|
||||
totalDistanceTravelled = cos(angleBetweenDestAndHeading)*totalDistanceTravelledInTack;
|
||||
boat.setDistanceTravelledInLeg(totalDistanceTravelled);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user