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:
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user