This is the DW1000 driver and our self developed distance measurement application based on it. We do this as a semester thesis at ETH Zürich under the Automatic Control Laboratory in the Department of electrical engineering.

Dependencies:   mbed

Committer:
manumaet
Date:
Fri Nov 28 17:06:51 2014 +0000
Revision:
30:4ecc69d3cf8d
Parent:
28:a830131560e8
Child:
31:6f76f3d518ac
before starting with the real first ranging try

Who changed what in which revision?

UserRevisionLine numberNew contents of line
manumaet 27:71178fdb78e1 1 // by Matthias Grob & Manuel Stalder - ETH Zürich - 2015
manumaet 27:71178fdb78e1 2
manumaet 27:71178fdb78e1 3 #ifndef MMRANGING_H
manumaet 27:71178fdb78e1 4 #define MMRANGING_H
manumaet 27:71178fdb78e1 5
manumaet 27:71178fdb78e1 6 #include "mbed.h"
manumaet 27:71178fdb78e1 7 #include "DW1000.h"
manumaet 27:71178fdb78e1 8
manumaet 27:71178fdb78e1 9 #define MMRANGING_TIMEUNIT 1/(128*499.2) // conversion between LSB of TX and RX timestamps and microseconds
manumaet 27:71178fdb78e1 10
manumaet 27:71178fdb78e1 11 class MMRanging {
manumaet 28:a830131560e8 12 public:
manumaet 28:a830131560e8 13 MMRanging(DW1000& DW);
manumaet 28:a830131560e8 14 void requestRanging();
manumaet 28:a830131560e8 15 //private:
manumaet 28:a830131560e8 16 DW1000& dw;
manumaet 28:a830131560e8 17
manumaet 30:4ecc69d3cf8d 18 void callbackRX();
manumaet 30:4ecc69d3cf8d 19 void callbackTX();
manumaet 30:4ecc69d3cf8d 20
manumaet 28:a830131560e8 21 // draft for first test
manumaet 28:a830131560e8 22 bool receiver;
manumaet 28:a830131560e8 23 char message[1021];
manumaet 28:a830131560e8 24 char messageRX[1021];
manumaet 28:a830131560e8 25 uint64_t TX_timestamp;
manumaet 28:a830131560e8 26 uint64_t RX_timestamp;
manumaet 28:a830131560e8 27 int event_i;
manumaet 28:a830131560e8 28 char event[10][20];
manumaet 28:a830131560e8 29 uint64_t eventtimes[10];
manumaet 28:a830131560e8 30 uint8_t counter;
manumaet 27:71178fdb78e1 31 };
manumaet 27:71178fdb78e1 32
manumaet 27:71178fdb78e1 33 #endif