I must be missing something with the configuration of the library as I am not seeing any parsing. This is the received data after conversion from bytes to String.
$HCHDG,243.0,0.0,E,6.0,E*41
$GPGLL,6025.85797,N,02213.84769,E,044024.89,A*00
$GPRMC,044023.94,A,6025
$HCHDG,243.0,0.0,E,6.0,E*41
$GPGLL,6025.85797,N,02213.84769,E,044024.89,A*00
$GPRMC,044024.89,A,6025
And this is the code I am testing with.
telegramStr = System.Text.Encoding.UTF8.GetString(telegram);
Debug.WriteLine(telegramStr);
Parser.Parse(telegram);
if (Parser.GLLSentence.DataStatus == Parser.DataStatus.Valid)
{
temp = Parser.GLLSentence.Latitude;
if (Parser.GLLSentence.LatitudeHemisphere == 'S')
{
temp = -temp;
}
var latitude = temp;
temp = Parser.GLLSentence.Longitude;
if (Parser.GLLSentence.LongitudePosition == 'W')
{
temp = -temp;
}
var longitude = temp;
}
The DataStatus is always zero when it checks it but the lat and lon are always zero.
If I set DataStatus to DataStatus.Invalid it never gets a valid.
What am I doing wrong?