bitcraze / lps-node-firmware

GNU Lesser General Public License v3.0
82 stars 79 forks source link

Implement TDoA anchor protocol 2.0 #17

Closed ataffanel closed 6 years ago

ataffanel commented 7 years ago

The current TDoA protocol does not contain packet sequence number which makes it hard to verify TDoA integrity in case of lost packet on the tag side. A new TDoA protocol should then include packet sequence number.

Calculating the distance to other anchors and including it in the packet will also simplify a bit the tag implementation and could increase robustness to lost packet.

ataffanel commented 7 years ago

Proposed packet format:

typedef struct rangePacket_s {
  uint8_t type;
  uint8_t seqs[NSLOTS];  // Packet id of the timestamps
  uint8_t timestamps[NSLOTS][TS_TX_SIZE];  // Relevant time for anchors
  uint16_t distances[NSLOTS];
} __attribute__((packed)) rangePacket_t;

Assuming the current anchors is of ID anchor_id