Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: example-ublox-at-cellular-interface-ext example-low-power-sleep example-C030-out-of-box-demo example-C030-out-of-box-demo ... more
gnss_operations.h@25:f538f1dc4121, 2018-11-09 (annotated)
- Committer:
- fahim.alavi@u-blox.com
- Date:
- Fri Nov 09 15:00:05 2018 +0500
- Revision:
- 25:f538f1dc4121
- Parent:
- 22:d8cd4cf0fcc0
- Child:
- 26:2876ec28d223
NAV-SAT should be at 1Hz, cold start need to be added
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Bilal Qamar |
12:a04f7eeece23 | 1 | |
| Bilal Qamar |
12:a04f7eeece23 | 2 | #include "gnss.h" |
| Bilal Qamar |
12:a04f7eeece23 | 3 | |
| Bilal Qamar |
12:a04f7eeece23 | 4 | #define UBX_FRAME_SIZE 8 |
| Bilal Qamar |
12:a04f7eeece23 | 5 | #ifdef __cplusplus |
| Bilal Qamar |
12:a04f7eeece23 | 6 | extern "C" { |
| Bilal Qamar |
12:a04f7eeece23 | 7 | #endif |
| Bilal Qamar |
12:a04f7eeece23 | 8 | |
| Bilal Qamar |
12:a04f7eeece23 | 9 | /** Enums |
| Bilal Qamar |
12:a04f7eeece23 | 10 | */ |
| Bilal Qamar |
12:a04f7eeece23 | 11 | enum Command{ |
| Bilal Qamar |
12:a04f7eeece23 | 12 | POWER_ON, |
| Bilal Qamar |
12:a04f7eeece23 | 13 | POWER_OFF, |
| Bilal Qamar |
12:a04f7eeece23 | 14 | MON_VER, |
| Bilal Qamar |
12:a04f7eeece23 | 15 | ENABLE_UBX, |
| Bilal Qamar |
12:a04f7eeece23 | 16 | RESTART, // mbed conflict with RESET |
| Bilal Qamar |
12:a04f7eeece23 | 17 | CUSTOMER, |
| Bilal Qamar |
12:a04f7eeece23 | 18 | AVAILABLE_CONFIG |
| Bilal Qamar |
12:a04f7eeece23 | 19 | }; |
| Bilal Qamar |
12:a04f7eeece23 | 20 | /** The reset modes |
| Bilal Qamar |
12:a04f7eeece23 | 21 | */ |
| Bilal Qamar |
12:a04f7eeece23 | 22 | enum Start{ |
| Bilal Qamar |
12:a04f7eeece23 | 23 | HOT, |
| fahim.alavi@u-blox.com | 25:f538f1dc4121 | 24 | COLD, |
| Bilal Qamar |
12:a04f7eeece23 | 25 | WARM, |
| fahim.alavi@u-blox.com | 25:f538f1dc4121 | 26 | MAX_MODE |
| Bilal Qamar |
12:a04f7eeece23 | 27 | }; |
| Bilal Qamar |
12:a04f7eeece23 | 28 | |
| Bilal Qamar |
12:a04f7eeece23 | 29 | /** The operation modes |
| Bilal Qamar |
12:a04f7eeece23 | 30 | */ |
| Bilal Qamar |
12:a04f7eeece23 | 31 | enum Powermodes{ |
| fahim.alavi@u-blox.com | 16:cb9861f0f4d8 | 32 | |
| fahim.alavi@u-blox.com | 16:cb9861f0f4d8 | 33 | CONSERVATIVE_CONTINOUS, |
| fahim.alavi@u-blox.com | 16:cb9861f0f4d8 | 34 | AGGRESSIVE_CONTINUOS, |
| fahim.alavi@u-blox.com | 16:cb9861f0f4d8 | 35 | SEMI_CONTINOUS, |
| fahim.alavi@u-blox.com | 16:cb9861f0f4d8 | 36 | FULL_POWER, |
| bqam |
18:7adca4350499 | 37 | FULL_POWER_BLOCK_LEVEL, |
| bqam |
18:7adca4350499 | 38 | FULL_POWER_BUILDING_LEVEL, |
| fahim.alavi@u-blox.com | 16:cb9861f0f4d8 | 39 | AVAILABLE_OPERATION |
| fahim.alavi@u-blox.com | 16:cb9861f0f4d8 | 40 | }; |
| fahim.alavi@u-blox.com | 16:cb9861f0f4d8 | 41 | |
| Bilal Qamar |
12:a04f7eeece23 | 42 | |
| Bilal Qamar |
12:a04f7eeece23 | 43 | class GnssOperations : public GnssSerial{ |
| Bilal Qamar |
12:a04f7eeece23 | 44 | |
| Bilal Qamar |
12:a04f7eeece23 | 45 | //GnssSerial constructor can be called here to configure different baud rate |
| Bilal Qamar |
12:a04f7eeece23 | 46 | //Constructor not required at the moment |
| Bilal Qamar |
12:a04f7eeece23 | 47 | //GnssOperations(); |
| Bilal Qamar |
12:a04f7eeece23 | 48 | |
| Bilal Qamar |
12:a04f7eeece23 | 49 | public: |
| Bilal Qamar |
12:a04f7eeece23 | 50 | |
| Bilal Qamar |
12:a04f7eeece23 | 51 | int enable_ubx_nav_pvt(); |
| fahim.alavi@u-blox.com | 21:f91c0334d017 | 52 | int enable_ubx_nav_status(); |
| fahim.alavi@u-blox.com | 22:d8cd4cf0fcc0 | 53 | int enable_ubx_nav_sat(); |
| fahim.alavi@u-blox.com | 22:d8cd4cf0fcc0 | 54 | int enable_ubx_nav_sol(); |
| Bilal Qamar |
12:a04f7eeece23 | 55 | int disable_ubx_nav_pvt(); |
| Bilal Qamar |
12:a04f7eeece23 | 56 | int enable_ubx_nav5(unsigned int acc); |
| Bilal Qamar |
12:a04f7eeece23 | 57 | int enable_ubx_odo(); |
| Bilal Qamar |
12:a04f7eeece23 | 58 | int disable_ubx_odo(); |
| Bilal Qamar |
12:a04f7eeece23 | 59 | int enable_ubx_nav_odo(); |
| Bilal Qamar |
12:a04f7eeece23 | 60 | int disable_ubx_nav_odo(); |
| Bilal Qamar |
12:a04f7eeece23 | 61 | int enable_ubx_batch_feature(); |
| Bilal Qamar |
12:a04f7eeece23 | 62 | int disable_ubx_batch_feature(); |
| Bilal Qamar |
12:a04f7eeece23 | 63 | int cfg_batch_feature(tUBX_CFG_BATCH *obj); |
| fahim.alavi@u-blox.com | 16:cb9861f0f4d8 | 64 | int cfg_power_mode(Powermodes power_mode); |
| fahim.alavi@u-blox.com | 20:bc678f383db1 | 65 | bool verify_gnss_mode(); |
| Bilal Qamar |
12:a04f7eeece23 | 66 | int start_mode(int start_mode); |
| Bilal Qamar |
12:a04f7eeece23 | 67 | |
| bqam |
14:4b22bd505b93 | 68 | void send_to_gnss(char); |
| bqam |
14:4b22bd505b93 | 69 | void power_on_gnss(); |
| bqam |
14:4b22bd505b93 | 70 | |
| Bilal Qamar |
12:a04f7eeece23 | 71 | }; |
| Bilal Qamar |
12:a04f7eeece23 | 72 | #ifdef __cplusplus |
| Bilal Qamar |
12:a04f7eeece23 | 73 | } |
| Bilal Qamar |
12:a04f7eeece23 | 74 | #endif |