removed the get best heading method as it was incorrect and not related to this story

#story[900]
main
hba56 9 years ago
parent d7294f73a1
commit a4480f3ccf

@ -132,34 +132,6 @@ public class Polar {
this.trueWindAngles.add(option7);
}
/**
*
* @param angleToDestination
* @param angleOfWind
* @return
*/
public double getBestHeading(double angleToDestination, double angleOfWind){
double vmg = 0;
double vmgTemp = 0;
double[] bestOption = null;
for(double[] option: this.trueWindAngles) {
double angle = option[0] - angleToDestination;
vmgTemp = cos(angle)*option[1];
if(bestOption == null){
vmg = vmgTemp;
bestOption = option;
}else if (vmgTemp > vmg){
vmg = vmgTemp;
bestOption = option;
}
}
return bestOption[0];
}
public Integer getTrueWindSpeed() {
return trueWindSpeed;
}

@ -1,7 +0,0 @@
package seng302.Model;
/**
* Created by hba56 on 10/05/17.
*/
public class PolarTest {
}
Loading…
Cancel
Save