Hi!
I am working with the TLW2 topflytech device using the T800xProtocolDecoder file.
After reading carefully the protocol, I don't understand why the valid position is set using the history/real time bit.
So, a valid position is when there is GNSS data and is a Real time position.
if (BitUtil.check(status, 6)) {
position.setValid(!BitUtil.check(status, 7));
position.setTime(readDate(buf));
position.setAltitude(buf.readFloatLE());
position.setLongitude(buf.readFloatLE());
position.setLatitude(buf.readFloatLE());
position.setSpeed(UnitsConverter.knotsFromKph(BcdUtil.readInteger(buf, 4) * 0.1));
position.setCourse(buf.readUnsignedShort());
}
I understand that a not valid position is when the device has not signal and send 0,0 coords.
I hope someone could help me to understand!
Thanks
When you get historical position is the time also old or current?
Hi Anton, the time is also old. Time is formed by byte 53 to byte 58.
Then it's probably decoded incorrectly.
Hi!
I am working with the TLW2 topflytech device using the T800xProtocolDecoder file.
After reading carefully the protocol, I don't understand why the valid position is set using the history/real time bit.
So, a valid position is when there is GNSS data and is a Real time position.
if (BitUtil.check(status, 6)) { position.setValid(!BitUtil.check(status, 7)); // BIT 7 = 1 => History.... BIT 7 = 0 => Real time position.setTime(readDate(buf)); position.setAltitude(buf.readFloatLE()); position.setLongitude(buf.readFloatLE()); position.setLatitude(buf.readFloatLE()); position.setSpeed(UnitsConverter.knotsFromKph(BcdUtil.readInteger(buf, 4) * 0.1)); position.setCourse(buf.readUnsignedShort()); }
I understand that a not valid position is when the device has not signal and send 0,0 coords.
I hope someone could help me to understand!
Thanks