Fixed speed notbeing displayed from AC35 live data

- Turns out the AC35 stream gives the speed in the SOG (speed over ground) section, not the boat speed section

#story[782]
main
Erika Savell 9 years ago
parent d38baa9fc4
commit cfa6ba1c3f

@ -61,6 +61,9 @@ public class BoatLocationDecoder {
currentSet = Arrays.copyOfRange(encodedBoatLocation,52, 54);
rudderAngle = Arrays.copyOfRange(encodedBoatLocation,54, 56);
// System.out.println(bytesToInt(sourceID));
// System.out.println(bytesToInt(boatSpeed));
message = new BoatLocationMessage(messageVersionNumber, bytesToLong(time),
bytesToInt(sourceID), bytesToInt(seqNum),
deviceType, bytesToInt(latitude),

@ -166,7 +166,7 @@ public class BoatLocationMessage extends AC35Data
this.roll = 0;
this.boatSpeed = convertBoatSpeedDoubleToInt(boatSpeed);
this.boatCOG = 0;
this.boatSOG = 0;
this.boatSOG = convertBoatSpeedDoubleToInt(boatSpeed);
this.apparentWindSpeed = 0;
this.apparentWindAngle = 0;
this.trueWindSpeed = 0;

@ -84,7 +84,7 @@ public class StreamedRace extends Race {
double lon = boatLocationMessage.getLongitudeDouble();
boat.setCurrentPosition(new GPSCoordinate(lat, lon));
boat.setHeading(boatLocationMessage.getHeadingDegrees());
boat.setVelocity(boatLocationMessage.getBoatSpeed() * MMPS_TO_KN);
boat.setVelocity(boatLocationMessage.getBoatSOG() * MMPS_TO_KN);
}
}

Loading…
Cancel
Save