T800x protocol valid messages

sebacipo 4 years ago

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

Anton Tananaev 4 years ago

When you get historical position is the time also old or current?

sebacipo 4 years ago

Hi Anton, the time is also old. Time is formed by byte 53 to byte 58.

Anton Tananaev 4 years ago

Then it's probably decoded incorrectly.