ImperialSpaceSociety / picotracker-Lora

This is the code base and hardware design files for the Lora pico tracker to be flown around the world
13 stars 3 forks source link

There are some packets received by gateways that have the wrong timestamp. #37

Closed MedadRufus closed 3 years ago

MedadRufus commented 3 years ago

These packets are repeat packets, with the same raw data. However, besides the same raw data, it appears like a new packet. It arrives a minute or two after the original one. An example is here:

Original:


{
  "app_id": "icss_lora_tracker",
  "dev_id": "icspace22",
  "hardware_serial": "00B76CF36C7CFA8A",
  "port": 99,
  "counter": 267,
  "payload_raw": "AHMJfwFn/1MCiAfMdwC5AhA3kAMCJycEAQ4=",
  "payload_fields": {
    "analog_in_3": 100.23,
    "barometric_pressure_0": 243.1,
    "digital_out_4": 14,
    "gps_2": {
      "altitude": 10628,
      "latitude": 51.1095,
      "longitude": 4.7362
    },
    "temperature_1": -17.3
  },
  "metadata": {
    "time": "2020-10-19T12:29:31.039467386Z",
    "frequency": 868.3,
    "modulation": "LORA",
    "data_rate": "SF8BW125",
    "airtime": 154112000,
    "coding_rate": "4/5",
    "gateways": [
      {
        "gtw_id": "eui-b827ebfffe6db3bd",
        "timestamp": 205982540,
        "time": "2020-10-19T12:29:30.024465Z",
        "channel": 1,
        "rssi": -114,
        "snr": -3,
        "rf_chain": 0,
        "latitude": 51.8014,
        "longitude": 4.68285,
        "altitude": 11
      },
      {
        "gtw_id": "eui-b827ebfffe53102e",
        "timestamp": 1879880300,
        "time": "2020-10-19T12:29:31.027671Z",
        "channel": 1,
        "rssi": -117,
        "snr": -9,
        "rf_chain": 0,
        "latitude": 51.88724,
        "longitude": 6.00133,
        "altitude": 13
      },
      {
        "gtw_id": "han_gateway_1",
        "timestamp": 202972836,
        "time": "2020-10-19T12:29:31Z",
        "channel": 0,
        "rssi": -107,
        "snr": 2,
        "rf_chain": 0,
        "latitude": 51.987885,
        "longitude": 5.951839,
        "altitude": 16
      },
      {
        "gtw_id": "eui-fcc23dfffe0f9843",
        "timestamp": 1151099324,
        "time": "2020-10-19T12:29:31.027172Z",
        "channel": 1,
        "rssi": -113,
        "snr": -4.5,
        "rf_chain": 0,
        "latitude": 51.9509,
        "longitude": 7.6384,
        "altitude": -1
      },
      {
        "gtw_id": "lorahil1",
        "timestamp": 3657876988,
        "time": "2020-10-19T12:29:31Z",
        "channel": 0,
        "rssi": -117,
        "snr": 1,
        "rf_chain": 0
      },
      {
        "gtw_id": "eui-b827ebfffeff3c5e",
        "timestamp": 3750551092,
        "time": "",
        "channel": 1,
        "rssi": -115,
        "snr": -8,
        "rf_chain": 0,
        "latitude": 51.58458,
        "longitude": 4.99626,
        "altitude": -262
      },
    ]
  }
}

Fake packet:

{
  "app_id": "icss_lora_tracker",
  "dev_id": "icspace22",
  "hardware_serial": "00B76CF36C7CFA8A",
  "port": 99,
  "counter": 267,
  "payload_raw": "AHMJfwFn/1MCiAfMdwC5AhA3kAMCJycEAQ4=",
  "payload_fields": {
    "analog_in_3": 100.23,
    "barometric_pressure_0": 243.1,
    "digital_out_4": 14,
    "gps_2": {
      "altitude": 10628,
      "latitude": 51.1095,
      "longitude": 4.7362
    },
    "temperature_1": -17.3
  },
  "metadata": {
    "time": "2020-10-19T12:31:41.858983771Z",
    "frequency": 868.3,
    "modulation": "LORA",
    "data_rate": "SF8BW125",
    "airtime": 154112000,
    "coding_rate": "4/5",
    "gateways": [
      {
        "gtw_id": "syntouchmobile",
        "timestamp": 11787932,
        "time": "2020-10-19T12:31:41Z",
        "channel": 0,
        "rssi": -111,
        "snr": 0.5,
        "rf_chain": 0
      }
    ]
  }
}
MedadRufus commented 3 years ago

I think the best way forward is to include the timestamp in the raw packet itself, based on GPS time, to get an unambiguous timestamp.

MedadRufus commented 3 years ago

I belive the gateway in question, syntouchmobile, has not been configured properly. It is a rogue gateway.

MedadRufus commented 3 years ago

Some gatways are rogue. Around 1 in 100. Not a high risk. Can be filtered out by checking if the raw packet is same as an earlier transmission.

MedadRufus commented 3 years ago

Not a issue for the tracker. Its an issue for ttnhabhub bridge