Refactored BoatLocation message, encoders, decoders. It now exposes datatypes that we actually use in the program (double knots, bearings, etc..), instead of the bits-on-the-wire packed units (like int mmPerSec). Also documented it, and updated test.

issue #35 #36
#story[1095]
This commit is contained in:
fjc40
2017-08-06 16:13:25 +12:00
parent ff262a6227
commit 1fbdd09d70
9 changed files with 520 additions and 428 deletions
@@ -24,7 +24,7 @@ public class AC35UnitConverter {
* @return The packed value.
*/
public static int packGPS(double value) {
return (int) (value * 2147483648.0/180.0);//2^31 = 2147483648
return (int) (value * 2147483648.0 / 180.0);//2^31 = 2147483648
}