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) |
int | filterPkts (Logger *plog) |
bool | synchOSPmsg (FILE *inFile) |
int | readOSPmsg (FILE *inFile) |
Contains the command line program to extract from a binary file containing SiRF receiver message packets their payload data, and store them into an OSP binary file.
Usage:
PacketToOSP.exe {options} [PacketsFilename]
Options are:
Copyright 2016 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/2016 |First release V1.1 |2/2018 |Reviewed to run on Linux
int filterPkts | ( | Logger * | plog | ) |
filterPkts read receiver message packets from the input file, verify them and extract payload data binary which are written into the binary OSP file.
plog | a pointer to a logger object |
6.1- Opens the messages binary input file;
6.2- Creates the output binary file
6.3- Reads packets from the input stream until end of file happen
int main | ( | int | argc, |
char ** | argv | ||
) |
main gets the command line arguments, set parameters accordingly and converts data.
From the input data file containing receiver message packets, the command extracts message packets, verifies them, and writes the payload data of the correct ones to the OSP binary file. See SiRF IV ICD for details on receiver messages.
The binary OSP output files containt 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.
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- Setups the default values for operators in the command line
4- Parses arguments in the command line extracting options and operators
5- Sets logging level stated in option
6- Filter input binary receiver packets generating output OSP messages
int readOSPmsg | ( | FILE * | inFile | ) |
readOSPmsg reads a OSP message from the input file and put ist payload data into a buffer.
inFile | the input binary FILE containing OSP packets |
bool synchOSPmsg | ( | FILE * | inFile | ) |
synchroOSPmsg skips bytes from input until start of OSP message is reached. Note that start of OSP message is preceded by the sequence of the two bytes START1 (A0) START2 (A2)
inFile | the input binary FILE containing OSP packets |