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
OSPtoRTK.cpp File Reference
#include "ArgParser.h"
#include "Logger.h"
#include "RTKobservation.h"
#include "GNSSdataFromOSP.h"
#include "OSPMessage.h"

Functions

void generateRTKobs (FILE *, FILE *, string, string, Logger *)
 
int main (int argc, char **argv)
 

Detailed Description

Contains the command line program to generate a RTK file with positioning data extracted from an OSP data file containing SiRF IV receiver messages.

Usage:

OSPtoRTK {options} [OSPfileName]

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/2018 |Reviewed to run on Linux

Function Documentation

void generateRTKobs ( FILE *  inFile,
FILE *  rtkFile,
string  inFileName,
string  prgName,
Logger plog 
)

generateRTKobs iterates over the input OSP file processing GNSS receiver messages to extract RTK positioning data, and prints them. Data are extracted first for the RTK file header and them epoch by epoch for each solution (one per line).

Parameters
inFilethe pointer to the input OSP binary FILE
rtkFilethe pointer to the output RTK FILE
inFileNamethe name of the input OSP binary FILE
prgNamethe program name
plogthe pointer to the logger

The generateRTKobs process sequence follows:

1- Setups the GNSSdataFromOSP object used to extract data from the binary file

2- Setups the RTKobservation object where extracted RTK data from the binary file will be placed

3- Acquire RTK header data located in the binary input file

4- Prints RTK file header

6- Iterates over the binary OSP file extracting epoch by epoch solution data and printing them

int main ( int  argc,
char **  argv 
)

main gets the command line arguments, set parameters accordingly and triggers the data acquisition to generate the RTK file. Input data are contained in a OSP binary file containing receiver messages (see SiRF IV ICD for details). The output is a RTK file with data formatted as per RTKLIB (http://www.rtklib.com/) for this kind of files.

Parameters
argcthe number of arguments passed from the command line
argvarray with argument values passed
Returns
the exit status according to the following values and meaning:
  • (0) no errors have been detected
  • (1) an error has been detected in arguments
  • (2) error when opening the input file
  • (3) error when creating output files, or no epoch data exist

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- Opens the OSP binary file

7- Creates the output RTK file

8- Generates RTK file calling generateRTKobs to extract data from messages in the binary OSP file and print them