altb_pmic / Mbed OS IndNav_QK3_T265

Dependencies:   Lib_Cntrl AHRS Lib_Misc

Committer:
Kiwicjam
Date:
Fri Nov 22 08:40:26 2019 +0000
Revision:
4:dc844fde64d7
Parent:
2:e7874762cc25
Workin set, not running,

Who changed what in which revision?

UserRevisionLine numberNew contents of line
altb2 2:e7874762cc25 1 #include "mbed.h"
altb2 2:e7874762cc25 2 #include "Signal.h"
altb2 2:e7874762cc25 3 #define buffer_size 255
altb2 2:e7874762cc25 4 #include "string"
altb2 2:e7874762cc25 5 #include "PID_Cntrl.h"
altb2 2:e7874762cc25 6 #define EARTH_RADIUS 6378137
altb2 2:e7874762cc25 7
altb2 2:e7874762cc25 8 class GPS{
altb2 2:e7874762cc25 9 public:
altb2 2:e7874762cc25 10 GPS(PinName,PinName,float);
altb2 2:e7874762cc25 11 virtual ~GPS();
altb2 2:e7874762cc25 12 void get_data(void);
altb2 2:e7874762cc25 13 double pos_xyz[3];
altb2 2:e7874762cc25 14 void get_position(void);
altb2 2:e7874762cc25 15 RawSerial logGPS;
altb2 2:e7874762cc25 16 void return_string(string *);
altb2 2:e7874762cc25 17 private:
altb2 2:e7874762cc25 18 Signal signal;
altb2 2:e7874762cc25 19 Thread thread;
altb2 2:e7874762cc25 20 Ticker ticker;
altb2 2:e7874762cc25 21 Mutex mutex; // mutex to lock critical sections
altb2 2:e7874762cc25 22 double pos0_xyz[3];
altb2 2:e7874762cc25 23 uint8_t rx_in;
altb2 2:e7874762cc25 24 char c;
altb2 2:e7874762cc25 25 bool buffer_filled;
altb2 2:e7874762cc25 26 void sendSignal();
altb2 2:e7874762cc25 27 void Rx_interrupt();
altb2 2:e7874762cc25 28 char buf[buffer_size];
altb2 2:e7874762cc25 29 string str;
altb2 2:e7874762cc25 30 double ph_th0[2];
altb2 2:e7874762cc25 31
altb2 2:e7874762cc25 32 };