Fixed GPs Coordinates as well as got Boats to display

- Fixed GPS conversion number being wrong (extra 1)
- Fixed Boats displaying as the boat = null (cough Joseph) was stopping it from working as well as track is broken.
#story[782]
This commit is contained in:
Fan-Wu Yang
2017-05-01 20:13:16 +12:00
parent 04366c2e4c
commit 5444b872bd
4 changed files with 10 additions and 12 deletions
@@ -5,14 +5,14 @@ package seng302.Networking.Utils;
*/
public class AC35UnitConverter {
public static double convertGPS(long value){
public static double convertGPS(int value){
//converts latitude or longitue to angle
return (double) value * 180.0/21474836418.0;//2^31 = 21474836418
return (double) value * 180.0 / 2147483648.0;//2^31 = 2147483648
}
public static int convertGPSToInt(double value){
//converts latitude or longitue to angle
return (int) (value * 21474836418.0/180.0);//2^31 = 21474836418
return (int) (value * 2147483648.0/180.0);//2^31 = 2147483648
}
public static double convertHeading(long value){