AnsweredAssumed Answered

Get string from NMEA sentence in serial control app

Question asked by Christian on Mar 8, 2020

Hi, I want to extract course and position date from the serial control app.

I receive the following example NMEA string:

 

$GPMDA,29.159,I,0.9874,B,,C,,C,,,,C,,T,,M,,N,,M*09
$IIMMB,29.159,I,0.9874,B*4D
$YXXDR,P,0.9874,B,Pressure*64
$GPRMC,202952,A,4813.6166,N,01539.84109,E,000.3,,080320,004.5,E,A*03
$GPGGA,202952,4813.6166,N,01539.84109,E,1,08,0.8,313.988,M,,M,,*69
$GNGSA,A,3,27,10,20,16,8,21,11,15,,,,,1.4,0.8,1.1*1F
$GNGSA,A,3,86,87,77,70,72,85,76,,,,,,1.4,1.3,2.0*26
$GNGSA,A,1,430,405,429,,,,,,,,,,2.4,1.3,2.0*11
$GNGSA,A,3,336,302,330,304,309,325,,,,,,,2.4,1.3,2.0*24
$GPGSV,2,1,8,27,76,305,30,10,63,142,26,20,56,074,25,16,45,206,25*44
$GPGSV,2,2,8,08,40,302,25,21,31,072,23,11,16,277,36,15,12,041,22*4C
$GLGSV,2,1,6,86,63,042,24,87,35,298,24,77,33,278,23,72,17,161,28*54
$GLGSV,2,2,6,85,16,088,20,76,14,224,38,,,,,,,,*50
$GBGSV,1,1,3,430,76,315,26,429,22,291,38,402,07,105,23,,,,*57
$GAGSV,2,1,6,336,78,329,27,302,38,241,25,330,30,304,30,304,29,071,20*5C
$GAGSV,2,2,6,309,25,130,20,325,11,193,21,,,,,,,,*5F
$HCHDG,282.1,,,004.5,E*21
$HCHDT,286.5,T*20

 

I want to extract the position and course marked bold inside this long string.

Is this possible? How?

Thank you

Christian

Outcomes