Simple way to converting large string to multiple float and int32 variables
Hello. Never had parcing string experience so maybe it is a simple question.
I will get from GPS module message like this:
+CGNSINF: 1,1,20190913183507.000,54.000000,25.000000,139.107,0.00,87.5,2,,0.6,1.1,0.9,,12,16,,,51,,
I need to extract data in correct order to get information about my location, like coordinates to float32 variable.
+CGNSINF: <GNSS run status>,<Fix status>, <UTC date & Time>,<Latitude>,<Longitude>,
<MSL Altitude>,<Speed Over Ground>, <Course Over Ground>, <Fix Mode>,<Reserved1>,<HDOP>,<PDOP>, <VDOP>,<Reserved2>,<GNSS Satellites in View>, <GNSS Satellites Used>,<GLONASS Satellites Used>,<Reserved3>,<C/N0 max>,<HPA>,<VPA>I could do it by brute force by counting comas, copying data between comas to arrays, and then by using sprintf converting it to float values. (bin there, done that, it takes a large program to decode it without any glitches)
But clearly it should be a easy way of doing this ? Could any one know how ?
