Merged master and added a few comments
This commit is contained in:
@@ -349,9 +349,8 @@ public class RaceViewController extends Controller {
|
||||
|
||||
@Override
|
||||
public void handle(long now) {
|
||||
//if sails are out
|
||||
double sailDir;
|
||||
//if sails are luffing
|
||||
//if sails are out etc
|
||||
if (boat.isSailsOut()) {
|
||||
double windDir = visualiserRace.getVisualiserRaceState().getWindDirection().degrees();
|
||||
double windOffset = (360 - windDir + boat.getBearing().degrees()) % 360;
|
||||
@@ -366,6 +365,7 @@ public class RaceViewController extends Controller {
|
||||
sailDir = visualiserRace.getVisualiserRaceState().getWindDirection().degrees();
|
||||
}
|
||||
|
||||
//get new place to move towards
|
||||
double compA = ((sailCurrent - sailDir) % 360 + 360) % 360;//degrees right
|
||||
if (compA > 180) compA = 360 - compA;
|
||||
double compB = ((sailDir - sailCurrent) % 360 + 360) % 360;//degrees left
|
||||
|
||||
Reference in New Issue
Block a user