RXtoRINEX
V2.1
RXtoRINEX provides tools to collect data from GPS / GNSS receivers in mobile devices, convert them to RINEX or RTK formats, and process RINEX files.
|
Functions | |
int | main (int argc, char *argv[]) |
Contains the command line program to generate an OSP file with SiRF IV receiver messages from a GP2 debug file obtained from Android devices, like the smartphone Samsung Galaxy S2.
Usage:
GP2toOSP.exe {options}
Options are:
Copyright 2015 Francisco Cancillo
This file is part of the RXtoRINEX tool.
RXtoRINEX is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. RXtoRINEX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. A copy of the GNU General Public License can be found at http://www.gnu.org/licenses/.
Ver. |Date |Reason for change ---—+----—+---------------— V1.0 |2/2015 |First release V1.1 |2/2016 |Minor improvements for logging messages V1.2 |2/2016 |Reviewed to run on Linux
int main | ( | int | argc, |
char * | argv[] | ||
) |
main gets the command line arguments, set parameters accordingly and translates data from the input GP2 file format to the output OSP file. Input data are contained in a SCLog.gp2 debug file generated by Android OS when the option DEBUGGING_FILES=1 is set in the sirfgps.conf file of some devices, like the Samsung Galaxy S2 smartphone.
Each line in the GP2 file has a format as per the following example:
29/10/2014 20:31:08.942 (0) A0 A2 00 12 33 06 00 00 00 00 00 00 00 19 00 00 00 00 00 00 64 E1 01 97 B0 B3
Where:
The binary OSP output files contain messages where head, check and tail have been removed, that is, the data for each message consists of the two bytes of the payload length and the payload bytes.
Input data are processed according to the following criteria:
argc | the number of arguments passed from the command line |
argv | the array of arguments passed from the command line |
The main process sequence follows:
1- Defines and sets the error logger object
2- Setups the valid options in the command line. They will be used by the argument/option parser
3- Parses arguments in the command line extracting options and operators
4- Sets logging level stated in option
5- Sets the list of wanted messages
6- Sets start and end time of the time interval for messages wanted
7- Opens the SP2 input file
8- Creates the OSP binary output file
9- Extracts/verifies/filters line by line messages from the SP2 file and translate/write them into OSP format