Merge branch 'wind_arrow_direction_5' into 'master'

Wind arrow direction 5

This should fix the wind arrow direction.

The polars were actually backwards so wind was being simulated with: into wind = faster, away from wind = slower.

#### A.C:
- Downwind means the boat's bearing is aligned with the wind arrow.
- Upwind means the boat's bearing is facing directly into the wind arrow.
- Pressing the upwind key should turn the boat in the upwind direction.
- Pressing the downwind key should turn the boat in the downwind direction.
- Facing upwind should result in a boat speed of roughly 0kn.
- Facing downwind should result in non-zero boat speed (roughly 14kn with 12kn wind).


Fixes #51 

See merge request !45
main
David Wu 8 years ago
commit 4cb0948aaf

@ -32,7 +32,7 @@ public class NewPolars {
public static void addPolars(double trueWindSpeed, Bearing trueWindAngle, double boatSpeed){
double tws = trueWindSpeed;
double bs = boatSpeed;
double twa = trueWindAngle.degrees();
double twa = trueWindAngle.degrees() + 180;
if (!polars.containsKey(tws)){
polars.put(tws, new TreeMap<>());
}

@ -321,7 +321,7 @@ public class InGameLobbyController extends Controller {
* @param interval Countdown interval to check
*/
private void countdownText(long interval){
countdownTenPane.setVisible(false);
//Do nothing if 5 seconds or less to go
if (interval <=5000){
countdownTenPane.setVisible(false);

Loading…
Cancel
Save