U-blox driver rework, step 3

More sat info isolation
Flush input after changing baudrate to allow driver restart w/o GNSS
module restart
This commit is contained in:
Kynos
2014-06-08 14:05:35 +02:00
parent 9bad828bc0
commit 9f754e0e9a
4 changed files with 126 additions and 118 deletions
+10 -7
View File
@@ -53,14 +53,17 @@
/**
* GNSS Satellite Info.
*/
#define SAT_INFO_MAX_SATELLITES 20
struct satellite_info_s {
uint64_t timestamp; /**< Timestamp of satellite information */
uint8_t count; /**< Number of satellites in satellite_...[] arrays */
uint8_t svid[20]; /**< Space vehicle ID [1..255], see scheme below */
uint8_t used[20]; /**< 0: Satellite not used, 1: used for navigation */
uint8_t elevation[20]; /**< Elevation (0: right on top of receiver, 90: on the horizon) of satellite */
uint8_t azimuth[20]; /**< Direction of satellite, 0: 0 deg, 255: 360 deg. */
uint8_t snr[20]; /**< dBHz, Signal to noise ratio of satellite C/N0, range 0..99, zero when not tracking this satellite. */
uint64_t timestamp; /**< Timestamp of satellite info */
uint8_t count; /**< Number of satellites in satellite info */
uint8_t svid[SAT_INFO_MAX_SATELLITES]; /**< Space vehicle ID [1..255], see scheme below */
uint8_t used[SAT_INFO_MAX_SATELLITES]; /**< 0: Satellite not used, 1: used for navigation */
uint8_t elevation[SAT_INFO_MAX_SATELLITES]; /**< Elevation (0: right on top of receiver, 90: on the horizon) of satellite */
uint8_t azimuth[SAT_INFO_MAX_SATELLITES]; /**< Direction of satellite, 0: 0 deg, 255: 360 deg. */
uint8_t snr[SAT_INFO_MAX_SATELLITES]; /**< dBHz, Signal to noise ratio of satellite C/N0, range 0..99, zero when not tracking this satellite. */
};
/**