lora sensnode
Dependencies: libmDot mbed-rtos mbed
Fork of mDot_LoRa_Sensornode by
app/uBlox.h@0:f2815503561f, 2016-07-06 (annotated)
- Committer:
- mitea1
- Date:
- Wed Jul 06 20:40:36 2016 +0000
- Revision:
- 0:f2815503561f
initial commit;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mitea1 | 0:f2815503561f | 1 | /** |
mitea1 | 0:f2815503561f | 2 | * @file uBlox.h |
mitea1 | 0:f2815503561f | 3 | * |
mitea1 | 0:f2815503561f | 4 | * @author Adrian |
mitea1 | 0:f2815503561f | 5 | * @date 16.05.2016 |
mitea1 | 0:f2815503561f | 6 | * |
mitea1 | 0:f2815503561f | 7 | */ |
mitea1 | 0:f2815503561f | 8 | |
mitea1 | 0:f2815503561f | 9 | #include <RawSerial.h> |
mitea1 | 0:f2815503561f | 10 | #include <rtos.h> |
mitea1 | 0:f2815503561f | 11 | #include "Decoder.h" |
mitea1 | 0:f2815503561f | 12 | #include "uBloxConfig.h" |
mitea1 | 0:f2815503561f | 13 | |
mitea1 | 0:f2815503561f | 14 | #ifndef APP_UBLOX_H_ |
mitea1 | 0:f2815503561f | 15 | #define APP_UBLOX_H_ |
mitea1 | 0:f2815503561f | 16 | |
mitea1 | 0:f2815503561f | 17 | /** |
mitea1 | 0:f2815503561f | 18 | * @class uBlox |
mitea1 | 0:f2815503561f | 19 | * @brief Provides Functionality to control the uBlox |
mitea1 | 0:f2815503561f | 20 | */ |
mitea1 | 0:f2815503561f | 21 | class uBlox { |
mitea1 | 0:f2815503561f | 22 | public: |
mitea1 | 0:f2815503561f | 23 | uBlox(mbed::RawSerial*); |
mitea1 | 0:f2815503561f | 24 | virtual ~uBlox(); |
mitea1 | 0:f2815503561f | 25 | |
mitea1 | 0:f2815503561f | 26 | /** |
mitea1 | 0:f2815503561f | 27 | * @brief Initializes the uBlox according to the desired uBLOX_MODE |
mitea1 | 0:f2815503561f | 28 | * @param desiredMode the desired Mode depending on which the uBlox has to be |
mitea1 | 0:f2815503561f | 29 | * configured |
mitea1 | 0:f2815503561f | 30 | */ |
mitea1 | 0:f2815503561f | 31 | void init(uBLOX_MODE); |
mitea1 | 0:f2815503561f | 32 | |
mitea1 | 0:f2815503561f | 33 | /** |
mitea1 | 0:f2815503561f | 34 | * @brief Gets the GPS Time of Week in ms |
mitea1 | 0:f2815503561f | 35 | */ |
mitea1 | 0:f2815503561f | 36 | unsigned long getTimeOfWeekMs(); |
mitea1 | 0:f2815503561f | 37 | |
mitea1 | 0:f2815503561f | 38 | /** |
mitea1 | 0:f2815503561f | 39 | * @brief Gets the decoded Latitude of the GPS Coordinate |
mitea1 | 0:f2815503561f | 40 | * @return |
mitea1 | 0:f2815503561f | 41 | */ |
mitea1 | 0:f2815503561f | 42 | float getLatitude(); |
mitea1 | 0:f2815503561f | 43 | |
mitea1 | 0:f2815503561f | 44 | /** |
mitea1 | 0:f2815503561f | 45 | * @brief Gets the decoded Longitude of the GPS Coordinate |
mitea1 | 0:f2815503561f | 46 | * @return |
mitea1 | 0:f2815503561f | 47 | */ |
mitea1 | 0:f2815503561f | 48 | float getLongitude(); |
mitea1 | 0:f2815503561f | 49 | |
mitea1 | 0:f2815503561f | 50 | /** |
mitea1 | 0:f2815503561f | 51 | * @brief Gets the decoded height above ellipsoid of the GPS Coordinate |
mitea1 | 0:f2815503561f | 52 | * @return |
mitea1 | 0:f2815503561f | 53 | */ |
mitea1 | 0:f2815503561f | 54 | signed long getHeightAboveEllipsoid(); |
mitea1 | 0:f2815503561f | 55 | |
mitea1 | 0:f2815503561f | 56 | /** |
mitea1 | 0:f2815503561f | 57 | * @brief Gets the decoded height above mean sea level of the GPS Coordinate |
mitea1 | 0:f2815503561f | 58 | * @return |
mitea1 | 0:f2815503561f | 59 | */ |
mitea1 | 0:f2815503561f | 60 | signed long getHeightAboveMeanSeaLevel(); |
mitea1 | 0:f2815503561f | 61 | |
mitea1 | 0:f2815503561f | 62 | /** |
mitea1 | 0:f2815503561f | 63 | * @brief Gets the decoded horizontal accuracy of the GPS Coordinate measurement |
mitea1 | 0:f2815503561f | 64 | * @return |
mitea1 | 0:f2815503561f | 65 | */ |
mitea1 | 0:f2815503561f | 66 | unsigned long getHorizontalAccuracyEstimate(); |
mitea1 | 0:f2815503561f | 67 | |
mitea1 | 0:f2815503561f | 68 | /** |
mitea1 | 0:f2815503561f | 69 | * @brief Gets the decoded vertical accuracy of the GPS Coordinate measurment |
mitea1 | 0:f2815503561f | 70 | * @return |
mitea1 | 0:f2815503561f | 71 | */ |
mitea1 | 0:f2815503561f | 72 | unsigned long getVerticalAccuracyEstimate(); |
mitea1 | 0:f2815503561f | 73 | |
mitea1 | 0:f2815503561f | 74 | private: |
mitea1 | 0:f2815503561f | 75 | Decoder* decoder; |
mitea1 | 0:f2815503561f | 76 | mbed::RawSerial* serial; |
mitea1 | 0:f2815503561f | 77 | |
mitea1 | 0:f2815503561f | 78 | uBloxConfig* config; |
mitea1 | 0:f2815503561f | 79 | |
mitea1 | 0:f2815503561f | 80 | /** |
mitea1 | 0:f2815503561f | 81 | * @brief Sends a Configuration String via the uart interface of the uBlox |
mitea1 | 0:f2815503561f | 82 | * @param configurationString |
mitea1 | 0:f2815503561f | 83 | */ |
mitea1 | 0:f2815503561f | 84 | void sendConfigurationString(std::vector<uint8_t> configurationString); |
mitea1 | 0:f2815503561f | 85 | |
mitea1 | 0:f2815503561f | 86 | }; |
mitea1 | 0:f2815503561f | 87 | |
mitea1 | 0:f2815503561f | 88 | #endif /* APP_UBLOX_H_ */ |