Mercurial > public > ostc4
diff Small_CPU/Inc/GNSS.h @ 1000:c386ae6635e4 GasConsumption
Improve GNSS operation:
during OSTC 4/5 code merge a problem with the wakeup of the gnss module showed up which has been fixed with the new verion. In addition a compile switch has been added which activated the synchronization of time between OSTC and gnss module. This my cause problems if the time is not accurate => deactivated at the moment.
| author | Ideenmodellierer |
|---|---|
| date | Mon, 28 Apr 2025 19:51:36 +0200 |
| parents | 9b29995d6619 |
| children | efb7d18cc564 |
line wrap: on
line diff
--- a/Small_CPU/Inc/GNSS.h Mon Apr 28 19:47:41 2025 +0200 +++ b/Small_CPU/Inc/GNSS.h Mon Apr 28 19:51:36 2025 +0200 @@ -101,6 +101,30 @@ GNSS_StateHandle GNSS_Handle; +typedef struct { + uint8_t header1; + uint8_t header2; + uint8_t msgClass; + uint8_t msgID; + uint16_t length; + uint8_t type; + uint8_t version; + uint8_t ref; + uint8_t leapsec; + uint16_t year; + uint8_t month; + uint8_t day; + uint8_t hour; + uint8_t minute; + uint8_t second; + uint8_t flags; + uint32_t nanoseconds; + uint16_t accuracy_seconds; + uint16_t reserved; + uint32_t accuracy_nano; + +} __attribute__((packed)) UBX_MGA_INI_TIME_UTC_t; + enum GNSSMode{Portable=0, Stationary=1, Pedestrian=2, Automotiv=3, Airbone1G=5, Airbone2G=6,Airbone4G=7,Wirst=8,Bike=9}; @@ -125,11 +149,13 @@ static const uint8_t setPowerNormal[]={0xB5,0x62,0x06,0x86,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; +/* UBX-CFG-NAV5 */ static const uint8_t setPortableMode[]={0xB5,0x62,0x06,0x24,0x24,0x00,0xFF,0xFF,0x00,0x03,0x00,0x00,0x00,0x00,0x10,0x27,0x00,0x00,0x05,0x00,0xFA,0x00,0xFA,0x00,0x64,0x00,0x5E,0x01,0x00,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; - static const uint8_t setPedestrianMode[]={0xB5,0x62,0x06,0x24,0x24,0x00,0xFF,0xFF,0x03,0x03,0x00,0x00,0x00,0x00,0x10,0x27,0x00,0x00,0x05,0x00,0xFA,0x00,0xFA,0x00,0x64,0x00,0x5E,0x01,0x00,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; static const uint8_t setConfig[]={0xB5,0x62,0x06,0x09,0x0D,0x00, 0x00,0x00,0x00,0x00, 0x18,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x01}; +/* UBX-MGA-INI-TIME_UTC */ +static const uint8_t setDateTime[] = {0xB5,0x62,0x13,0x40,0x18,0x00,0x10,0x00,0x00,0x80,0x07,0xE9,0x01,0x02,0x03,0x04,0x05,0x00,0x01,0x02,0x03,0x04,0x00,0x3C,0x00,0x00,0x00,0x00,0x00,0x00}; static const uint8_t setPortableType[]={}; void GNSS_Init(GNSS_StateHandle *GNSS, UART_HandleTypeDef *huart);
