@@ -51,7 +51,7 @@ wippersnapper_gps_GPSConfig *GPSModel::GetGPSConfigMsg() {
5151
5252/* !
5353 * @brief Creates a new GPSEvent message and initializes it.
54- * @NOTE: This function will clear an existing GPSEvent message. Only call when
54+ * This function will clear an existing GPSEvent message. Only call when
5555 * you are creating a NEW gps event, not modifying an existing one.
5656 */
5757void GPSModel::CreateGPSEvent () {
@@ -113,6 +113,21 @@ GPSModel::CreateGpsDatetime(uint8_t hour, uint8_t minute, uint8_t seconds,
113113 return datetime;
114114}
115115
116+ /* !
117+ * @brief Adds an RMC response to the GPSEvent message.
118+ * @param datetime A wippersnapper_gps_GPSDateTime message representing the
119+ * date and time.
120+ * @param fix_status The fix status (1 = valid, 0 = invalid).
121+ * @param lat Latitude in decimal degrees.
122+ * @param lat_dir Pointer to a string representing latitude direction ("N" or
123+ * "S").
124+ * @param lon Longitude in decimal degrees.
125+ * @param lon_dir Pointer to a string representing longitude direction ("E" or
126+ * "W").
127+ * @param speed Speed over ground in knots.
128+ * @param angle Course/heading angle in degrees.
129+ * @returns True if the RMC response was added successfully, False otherwise.
130+ */
116131bool GPSModel::AddGpsEventRMC (wippersnapper_gps_GPSDateTime datetime,
117132 uint8_t fix_status, float lat, char *lat_dir,
118133 float lon, char *lon_dir, float speed,
@@ -154,6 +169,23 @@ bool GPSModel::AddGpsEventRMC(wippersnapper_gps_GPSDateTime datetime,
154169 return true ;
155170}
156171
172+ /* !
173+ * @brief Adds a GGA response to the GPSEvent message.
174+ * @param datetime A wippersnapper_gps_GPSDateTime message representing the
175+ * date and time.
176+ * @param fix_status The fix status (1 = valid, 0 = invalid).
177+ * @param lat Latitude in decimal degrees.
178+ * @param lat_dir Pointer to a string representing latitude direction ("N" or
179+ * "S").
180+ * @param lon Longitude in decimal degrees.
181+ * @param lon_dir Pointer to a string representing longitude direction ("E" or
182+ * "W").
183+ * @param num_sats Number of satellites in use.
184+ * @param hdop Horizontal dilution of precision.
185+ * @param alt Altitude in meters above mean sea level.
186+ * @param geoid_height Geoid height in meters.
187+ * @returns True if the GGA response was added successfully, False otherwise.
188+ */
157189bool GPSModel::AddGpsEventGGA (wippersnapper_gps_GPSDateTime datetime,
158190 uint8_t fix_status, float lat, char *lat_dir,
159191 float lon, char *lon_dir, uint8_t num_sats,
@@ -194,6 +226,12 @@ bool GPSModel::AddGpsEventGGA(wippersnapper_gps_GPSDateTime datetime,
194226 return true ;
195227}
196228
229+ /* !
230+ * @brief Processes an NMEA sentence and adds it to the GPSEvent message.
231+ * @param sentence Pointer to the NMEA sentence string.
232+ * @param drv Pointer to the GPSHardware driver instance.
233+ * @returns True if the sentence was processed successfully, False otherwise.
234+ */
197235bool GPSModel::ProcessNMEASentence (char *sentence, GPSHardware *drv) {
198236 // Check for prefix: $GP or $GN
199237 if (strncmp (sentence, " $GP" , 3 ) != 0 && strncmp (sentence, " $GN" , 3 ) != 0 )
0 commit comments