Garmin 16-HVS GPS Receiver4.1.4 SerialCloseThe SerialClose instruction is used to close the serial port. Once closed, theSerialOpen command must be used before more data can be read.4.2 Parsing and Data Storage OptionsThe CR1000, CR3000, CR800, and CR850 can store data as a string or as anumber. Every time the datalogger stores a string, the size of the stringdetermines the number of bytes used. If the string was declared to be 101bytes long, every time the string is written to memory, 101 bytes are used.Depending on the application, the entire GPGGA string can be stored tomemory or just specific parts. When storing specific parts, some numbers canbe converted to floating data points.To parse the GPGGA string, first read the entire string into 1 large string (seeSection 4.1). Next parse the string into a group of smaller strings (see Section4.2.1). Determine which of the smaller strings to keep and which to convert tofloating point number, then store the data.4.2.1 SplitStrUse the SplitStr instruction to parse the GPGGA string into an array of strings.Declare an array of 18 strings of 15 characters.Example: ParseStr(18) as string * 15The SplitStr instruction uses the result string, search string, filter string,number of splits and split option to parse the search string and store the resultsin the result string. The GPGGA string uses the comma character (chr(44))between each parameter. The comma makes a nice marker to parse on.Example: SplitStr (ParseStr(1),GPSData ,chr(44),18,5)4.2.2 Converting Strings to Floating Point NumbersStrings can be converted to floats with the simple assignment operator, butLatitude and Longitude require more precision than the CR1000, CR3000,CR800, or CR850 will store as a floating point number.' Sample CR1000 program to read GPS NMEA GPGGA stringPublic location, bytespublic GPSData as string * 101 ' $GPGGA string about 57 charactersPUBLIC ParseStr(18) as string * 15' Aliases allow proper labels in output data tables,' and when viewing public variablesalias ParseStr(1) = GPGGAalias ParseStr(2) = TIMEalias ParseStr(3) = LATalias ParseStr(4) = HEMINSalias ParseStr(5) = LONGIalias ParseStr(6) = HEMIEWalias ParseStr(7) = QUALalias ParseStr(8) = NUMSATSalias ParseStr(9) = HDPalias ParseStr(10) = ALTDE6