LGT-92 and crazy position

Hi,

Sometimes my LGT-92 see my position really far away. Yesterday I had a couple of points 2.5km from my real position. The winner is 9000km.
I think there is an issue on how the position is encoded or in the payload.
Did you see that on your side?
For your information I am using the firmware 1.6.4 and the associated payload

You’re going to need to be more specific.

For example, provide both accurate and erroneous payloads in still assembled form, before parsing and conversion to values. Also show or link to whatever you are using to parse the packets.

And please don’t blank out the numbers: take it somewhere non-private if you need to, but to get help you’re going to have to include the actual values, not X’s.

Yo are right!
So here are two payloads with erroneous position:
01738d3001738d300edc44000401df7c0000
This one gives the same latitude / longitude (24.35, 24.35)

02b698d4fb9cc71f0ef744462d01d3ac8c96
This one gives the latitude/longitude (45.521108, -73.611489)

This payload gives the good position:
02b6b574fb9d3ef70ef244461401db7b1612
The latitude/longitude are: (45.528436,-73.580809)

And I am using this payload:
/*function Decoder(bytes, port) {

// Decode an uplink message from a buffer

// (array) of bytes to an object of fields.

var value=bytes[0]<<16 | bytes[1]<<8 | bytes[2];

if(bytes[0] & 0x80)

{

value |=0xFFFFFF000000;

}

var latitude=value/10000;//gps latitude,units: °

value=bytes[3]<<16 | bytes[4]<<8 | bytes[5];

if(bytes[3] & 0x80)

{

value |=0xFFFFFF000000;

}

var longitude=value/10000;//gps longitude,units: °

var alarm=(bytes[6] & 0x40)?"TRUE":"FALSE";//Alarm status

value=((bytes[6] & 0x3f) <<8) | bytes[7];

var batV=value/1000;//Battery,units:V

value=bytes[8]<<8 | bytes[9];

if(bytes[8] & 0x80)

{

value |=0xFFFF0000;

}

var roll=value/100;//roll,units: °

value=bytes[10]<<8 | bytes[11];

if(bytes[10] & 0x80)

{

value |=0xFFFF0000;

}

var pitch=value/100; //pitch,units: °

return {

Latitude: latitude,

Longitud: longitude,

Roll: roll,

Pitch:pitch,

BatV:batV,

ALARM_status:alarm,

};

}*/

//The function is :

function Decoder(bytes, port) {

// Decode an uplink message from a buffer

// (array) of bytes to an object of fields.

var latitude=0;//gps latitude,units: °

if(bytes[0] !== 0)

{

  latitude=(bytes[0]<<24 | bytes[1]<<16 | bytes[2]<<8 | bytes[3])/1000000;//gps latitude,units: °

}

else

{

  latitude=0;//gps latitude,units: °

}

var longitude = 0;

if(bytes[4] !== 0)

{

  longitude=(bytes[4]<<24 | bytes[5]<<16 | bytes[6]<<8 | bytes[7])/1000000;//gps longitude,units: °

}

else

{

 longitude=0;//gps longitude,units: °

}

var alarm=(bytes[8] & 0x40)?"TRUE":"FALSE";//Alarm status

var batV=(((bytes[8] & 0x3f) <<8) | bytes[9])/1000;//Battery,units:V

if(bytes[10] & 0xC0==0x40)

{

  var motion_mode="Move";

}

else if(bytes[10] & 0xC0 ==0x80)

{

  motion_mode="Collide";

}

else if(bytes[10] & 0xC0 ==0xC0)

{

  motion_mode="User";

}

else

{

  motion_mode="Disable";

}                                            //mode of motion

var led_updown=(bytes[10] & 0x20)?"ON":"OFF";//LED status for position,uplink and downlink

var Firmware = 160+(bytes[10] & 0x1f);  // Firmware version; 5 bits 

var roll=(bytes[11]<<8 | bytes[12])/100;//roll,units: °

var pitch=(bytes[13]<<8 | bytes[14])/100; //pitch,units: °

var hdop = 0;

if(bytes[15] > 0)

{

   hdop =bytes[15]/100; //hdop,units: °

}

else

{

   hdop =bytes[15];

}

var altitude =(bytes[16]<<8 | bytes[17]) / 100; //Altitude,units: °

return {

Latitude: latitude,

Longitude: longitude,

Roll: roll,

Pitch:pitch,

BatV:batV,

ALARM_status:alarm,

MD:motion_mode,

LON:led_updown,

FW:Firmware,

HDOP:hdop,

Altitude2:altitude,

};

}

That one is clearly wrong, uninitialized, or not intended to be a position fix at all.

Is the LoRaWan port number the same for that as for the other messages?

Do you have any way to tell if the GPS receiver has a solution?

Debug effort may need to focus on what is going on in the node and its firmware. Is there any output you can get from a serial port?

Yes it was the same port as other messages.

It’s hard to monitor with the serial port as it doesn’t happen every day and for know I don’t know how to reproduce this…
Most of the time my tracker is on the debug port because I try to catch why I lose it some times. It’s on but it doesn’t detect motion and doesn’t send the position. And for the internal watchdog everything is find so it doesn’t reboot by itself.
But the serial port is not really verbose…

Seems like firmware issues - in particular, if it only sends on movement, and it’s not moving, then the transmissions you get may be a result of GPS position errors.

What you really want here is firmware source code; if that’s not available, then you may want to start with the code of the similar hardware developer platform (forget what that’s called) and make your own GPS firmware from it.

Or you may want to take the issue up with the manufacturer.

It doesn’t really seem to be a TTN or decoder issue…