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 14:40:03 2014 +0000
Revision:
28:a830131560e8
Parent:
27:71178fdb78e1
Child:
30:4ecc69d3cf8d
after setting up a test MMRanging class, problem with member function pointers

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 callbackRX();
manumaet 28:a830131560e8 15 void callbackTX();
manumaet 28:a830131560e8 16 void requestRanging();
manumaet 28:a830131560e8 17 //private:
manumaet 28:a830131560e8 18 DW1000& dw;
manumaet 28:a830131560e8 19
manumaet 28:a830131560e8 20 // draft for first test
manumaet 28:a830131560e8 21 bool receiver;
manumaet 28:a830131560e8 22 char message[1021];
manumaet 28:a830131560e8 23 char messageRX[1021];
manumaet 28:a830131560e8 24 uint64_t TX_timestamp;
manumaet 28:a830131560e8 25 uint64_t RX_timestamp;
manumaet 28:a830131560e8 26 int event_i;
manumaet 28:a830131560e8 27 char event[10][20];
manumaet 28:a830131560e8 28 uint64_t eventtimes[10];
manumaet 28:a830131560e8 29 uint8_t counter;
manumaet 27:71178fdb78e1 30 };
manumaet 27:71178fdb78e1 31
manumaet 27:71178fdb78e1 32 #endif