comparison Small_CPU/Src/GNSS.c @ 919:c0553dd70608 Evo_2_23

GNSS support for external UART interface: An ubox gps module may now be connected to the external UART. Per default the functionality is disabled using the compile switch ENABLE_GNSS_SUPPORT
author Ideenmodellierer
date Sun, 03 Nov 2024 15:43:04 +0100
parents 2225c467f1e9
children 5a9bc2e6112d
comparison
equal deleted inserted replaced
918:f72613a152dd 919:c0553dd70608
169 * Parse data to navigation position velocity time solution standard. 169 * Parse data to navigation position velocity time solution standard.
170 * Look at: 32.17.15.1 u-blox 8 Receiver description. 170 * Look at: 32.17.15.1 u-blox 8 Receiver description.
171 * @param GNSS Pointer to main GNSS structure. 171 * @param GNSS Pointer to main GNSS structure.
172 */ 172 */
173 void GNSS_ParsePVTData(GNSS_StateHandle *GNSS) { 173 void GNSS_ParsePVTData(GNSS_StateHandle *GNSS) {
174
175 static float searchCnt = 1.0;
176
174 uShort.bytes[0] = GNSS_Handle.uartWorkingBuffer[10]; 177 uShort.bytes[0] = GNSS_Handle.uartWorkingBuffer[10];
175 GNSS->yearBytes[0]=GNSS_Handle.uartWorkingBuffer[10]; 178 GNSS->yearBytes[0]=GNSS_Handle.uartWorkingBuffer[10];
176 uShort.bytes[1] = GNSS_Handle.uartWorkingBuffer[11]; 179 uShort.bytes[1] = GNSS_Handle.uartWorkingBuffer[11];
177 GNSS->yearBytes[1]=GNSS_Handle.uartWorkingBuffer[11]; 180 GNSS->yearBytes[1]=GNSS_Handle.uartWorkingBuffer[11];
178 GNSS->year = uShort.uShort; 181 GNSS->year = uShort.uShort;
224 227
225 for (int var = 0; var < 4; ++var) { 228 for (int var = 0; var < 4; ++var) {
226 iLong.bytes[var] = GNSS_Handle.uartWorkingBuffer[var + 70]; 229 iLong.bytes[var] = GNSS_Handle.uartWorkingBuffer[var + 70];
227 } 230 }
228 GNSS->headMot = iLong.iLong * 1e-5; // todo I'm not sure this good options. 231 GNSS->headMot = iLong.iLong * 1e-5; // todo I'm not sure this good options.
232
233 if((GNSS->fLat == 0.0) && (GNSS->fLon == 0.0))
234 {
235 GNSS->fLat = searchCnt++;
236 }
229 } 237 }
230 238
231 /*! 239 /*!
232 * Parse data to UTC time solution standard. 240 * Parse data to UTC time solution standard.
233 * Look at: 32.17.30.1 u-blox 8 Receiver description. 241 * Look at: 32.17.30.1 u-blox 8 Receiver description.