SELKIELogger  1.0.0
GPSMessages.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2023 Swansea University
3  *
4  * This file is part of the SELKIELogger suite of tools.
5  *
6  * SELKIELogger is free software: you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License as published by the Free
8  * Software Foundation, either version 3 of the License, or (at your option)
9  * any later version.
10  *
11  * SELKIELogger is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14  * more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this SELKIELogger product.
18  * If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 #ifndef SELKIELoggerGPS_Messages
22 #define SELKIELoggerGPS_Messages
23 
29 #include <stdbool.h>
30 #include <stddef.h>
31 #include <stdint.h>
32 
33 #include "GPSTypes.h"
34 
44 void ubx_calc_checksum(const ubx_message *msg, uint8_t *csA, uint8_t *csB);
45 
47 void ubx_set_checksum(ubx_message *msg);
48 
50 bool ubx_check_checksum(const ubx_message *msg);
51 
53 size_t ubx_flat_array(const ubx_message *msg, uint8_t **out);
54 
56 char *ubx_string_hex(const ubx_message *msg);
57 
59 void ubx_print_hex(const ubx_message *msg);
60 
62 bool ubx_decode_nav_pvt(const ubx_message *msg, ubx_nav_pvt *out);
63 
65 #endif
bool ubx_check_checksum(const ubx_message *msg)
Verify checksum bytes of UBX message.
Definition: GPSMessages.c:82
bool ubx_decode_nav_pvt(const ubx_message *msg, ubx_nav_pvt *out)
Decode UBX NAV-PVT message.
Definition: GPSMessages.c:175
void ubx_print_hex(const ubx_message *msg)
Print UBX message in hexadecimal form.
Definition: GPSMessages.c:158
void ubx_set_checksum(ubx_message *msg)
Set checksum bytes for UBX message.
Definition: GPSMessages.c:71
void ubx_calc_checksum(const ubx_message *msg, uint8_t *csA, uint8_t *csB)
Calculate checksum for UBX message.
Definition: GPSMessages.c:38
size_t ubx_flat_array(const ubx_message *msg, uint8_t **out)
Convert UBX message to flat array of bytes.
Definition: GPSMessages.c:100
char * ubx_string_hex(const ubx_message *msg)
Return UBX message as string of hexadecimal pairs.
Definition: GPSMessages.c:134
Internal representation of a UBX message.
Definition: GPSTypes.h:80
Represent decoded NAV-PVT message.
Definition: GPSTypes.h:101