Hello guys, I’m working with Quectel MC-60 OPENCPU programming. While working with the GNSS section I’m getting the RMC or GLL NMEA code very easily. But I cannot convert that NMEA code to individual latitude and longitude. Like if the NMEA code is $GNRMC,164237.000,A,2362.2229,N,08921.3050,E,0.83,154.03,141221,A*70, then my desired output from any function will be “23.1037, 89.3550” as a string value.
Numerical Calculation to find out Lat and Lon:
x = 2362.2229
y = 8921.3050
x1 = x / 100 = 23.622229
y1 = y / 100 = 89.213050
taking the fractional part x2 = 622229 / 60 = 1037 and y2 = 213050 / 60 = 3550
so, the final Lat = 23.1037 and Lon = 89.3550