UWB-Tracking
Loading...
Searching...
No Matches
tdoa-anchor.h
Go to the documentation of this file.
1#pragma once
2
8#include "tdoa-device.h"
9
13static uint64_t toa = 0;
14
18static uint64_t last_toa = 0;
19
23static int16_t pdoa = 0;
24
28static int16_t last_pdoa = 0;
29
35class TdoaAnchor : public TdoaDevice
36{
37public:
46
51
58 virtual void setup() override;
59
66 virtual void loop() override;
67
68private:
72 char pdoa_str[16] = {0};
73
77 char toa_str[50] = {0};
78
87 static void rx_ok_cb(const dwt_cb_data_t *cb_data);
88
97 static void rx_err_cb(const dwt_cb_data_t *cb_data);
98};
The TdoaAnchor class represents a TDOA anchor device.
Definition: tdoa-anchor.h:36
static void rx_err_cb(const dwt_cb_data_t *cb_data)
Callback function for RX error.
Definition: tdoa-anchor.cpp:73
~TdoaAnchor()
Destructor for the TdoaAnchor class.
Definition: tdoa-anchor.h:50
virtual void loop() override
Main loop for the TDOA anchor device.
Definition: tdoa-anchor.cpp:32
static void rx_ok_cb(const dwt_cb_data_t *cb_data)
Callback function for successful RX operation.
Definition: tdoa-anchor.cpp:50
char pdoa_str[16]
A character array to store the PdoA value as a string.
Definition: tdoa-anchor.h:72
virtual void setup() override
Initialize the TDOA anchor device.
Definition: tdoa-anchor.cpp:13
char toa_str[50]
A character array to store the ToA value as a string.
Definition: tdoa-anchor.h:77
The base class for TDOA (Time Difference of Arrival) devices.
Definition: tdoa-device.h:39
long long uwb_addr
Definition: datatypes.h:11
static int16_t pdoa
Measured Phase Difference of Arrival (PdoA).
Definition: tdoa-anchor.h:23
static uint64_t toa
Timestamp of frame-reception.
Definition: tdoa-anchor.h:13
static uint64_t last_toa
Last recorded timestamp of frame-reception.
Definition: tdoa-anchor.h:18
static int16_t last_pdoa
Last recorded PdoA value.
Definition: tdoa-anchor.h:28
Header file for the TDOADevice class, a superclass for TDOA tags and anchors.