Activity Feed › Discussion Forums › Software, CAD & Mapping › Anyone do software for reading, modifying, and writing RINEX?
-
Anyone do software for reading, modifying, and writing RINEX?
Posted by bill93 on February 26, 2019 at 3:11 amI downloaded the files from here https://www.ngs.noaa.gov/gps-toolbox/rinex.htm
and made it compile and run as a “DOS” console program. My goal is to build on it to do some additional outputs. Has anyone else here tried it?
I’m using Visual Studio 6 C++. I had to add another “using namespace” line and increase the compiler name memory limit.
It is for Rinex 2.10 but I’m using teqc to get Rinex 2.11 (faked it for now), and need to research whether I’m open to problems from that difference.
It’s not as clean as one might hope. The output occasionally turns minutes and 00 seconds into minutees-1 and 60 seconds, or -0.00000 seconds. Not sure if OPUS will take those, so need to look into it.
The compiler says in 2 functions they are returning the address of a local variable, which I would think could give flaky results if something happened to overwrite that location (on the stack?) after it is freed by the function return.
But it may be save me some work if I can figure out the C++ stuff. I’m an old (!) programmer who’s done a whole bunch of old assembler and high-level languages including C, but my head has trouble with the C++ stuff with zillions of tiny pieces spread all over lots of files. I like 20- to 100-line functions that each accomplish some significant part of the processing.
geeoddmike replied 5 years, 7 months ago 9 Members · 18 Replies -
18 Replies
-
Check out these articles Peter Lazio wrote:
Chapter 9 Editing RINEX Files to Fix a Poor OPUS Run
Editing RINEX Observation Files for OPUS-RS
-
In the late 90’s I wrote software to capture a RT17 stream over serial from Trimble receivers and create both .dat and rinex files. I did this to serve the PA CORS stations, as the Trimble software at the time was terrible. Once Trimble started making better CORS software, I never updated it after about 2001 or so. As I recall it was quite straightforward to write the output to rinex format. I don’t remember any issues with anything, and the rinex and dat files processed with no problem in various software. I wrote it all in VB, but I don’t remember which version, maybe VB6?
-
Posted by: half bubble
Check out these articles Peter Lazio wrote:
Those sound very interesting but are expensive to fetch from the site.
. -
Posted by: Paul in PA
May I ask WHY?
A) I found the plotting tools at UNAVCO too hard to get running on my first try
B) and was thinking of a custom report to generate
C) and was considering how I might compare files from two receivers.
D) and why not?
. -
My post processing software has plotting and report tools. I used them somewhat in the beginning to get a feel for what was going on, but am now very satisfied with standard output and do not even output all the standard available data. So first check with your regular PP software capabilities.
Comparing files? in what sense? I did some file comparisons in the past but it is really only relevant on zero baseline files. A zero baseline file is when you use a single antenna at one location, then use a signal splitter, sending the downloaded observations to two or more different type receivers. You can notice significant differences in recorded data based on the various different internal receiver algorithms. I have done that in the past and would only consider it now if I were actually beta testing a new type receiver, which I highly doubt anyone would pay me to do. Besides a signal splitter itself you may need DC power blockers. Almost every receiver sends out DC power to feed the internal active antenna logic board. You do not want your antenna receiving power from multiple receivers. Even worst is for one receiver to backfeed power to another receiver. Some splitters may have internal DC blockers and the unblocked connections should be marked differently. Not all splitters need power blockers because some antennas are passive requiring no power and some receivers expecting a passive antenna send out no power. I have one older antenna that has an on/off switch and requires it’s own AA batteries to operate. You have some legwork to get properly set up.
I have found signal splitters and power blockers on ebay and depending on what you find you may need some antenna end gender or size changers or go to a commercial radio store and have them make you some custom antenna cables to the size and style you need. I have a very eclectic collection of antenna cables as I may do a job with one manufacturer’s antennas and another’s receivers, again check the power requirements. I have N, BNC and TNC, varied male and female ends, as well as some size changers N-TNC, N-BNC, TNC-BNC and sex changers. One of my first cables was a TNC—TNC, made from Radio Shack parts, good luck with that now.
Yes, it is interesting comparing files, if only to prove you do not have to do it. Based on which satellite the receiver fixes on to base the other math on, observations can vary from receiver to receiver. You can exaggerate that change by blocking different satellites in each receiver.
Paul in PA
-
Posted by: Bill93Posted by: Paul in PA
May I ask WHY?
A) I found the plotting tools at UNAVCO too hard to get running on my first try
B) and was thinking of a custom report to generate
C) and was considering how I might compare files from two receivers.
D) and why not?
Sometimes you have to pay to play.
Without paying for a Static Post Processing application, you will pay for it with the endless hours of trial and error, for minimal results. By writing your own software, you are reinventing the wheel.
You could install Topcon Tools and process up to 5 points in the demo for free. Or find someone who has an old USB toggle for cheap? Which I do have, trouble is I’m not sure if it still works. Haven’t used it in 6 years or more.
-
Since I’m not doing this for pay, but only as a hobby and education, I have more time than money to allocate.
I’ll check out the Topcon tools demo. That sounds like a great idea that I didn’t know about.
Edit: A quick search finds some old links for download, but they take me to Magnet, which has a time limit demo instead of a crippled demo. A page on Topcon’s site says Tools “formerly available.” And I doubt a dealer would be interested in helping me knowing there was no potential sale.
. -
I sent a One Drive link with the Topcon Tools file to the email in your profile
-
Thanks! Got it installed on an XP machine and found some guides and manuals. Now I’ve got a LOT of learning to do.
. -
I got Topcon Tools to import two simultaneous GPS sessions and give me much lower sigmas for the vector between them than for the points. Some further checking is in order, but that’s progress.
I have some questions about the GPS processing that would fit better in the other thread.
I am unable to manually input TS angles and distances, plus starting point coordinates and one backsight azimuth, and get the program to compute coordinates or adjust. Not sure what I’m doing wrong there, but that’s not my main purpose for using the program.
. -
I use teqc to convert the receiver files to Rinex and fix the 1024 week rollover, but I dont think it has the ability to do comparing of files.
. -
is theres a reference of some sort explaining how you converted to Rinex and fixed the rollover? Like a version for newbies? I have encountered that exact problem. Thanks.
-
If I don’t already know the GPS week number I run the .dat file through teqc with the +meta option, and it tells me the week and other info.
Then I run tecq again specifying as for instance -week 2042 and other options. The resulting RINEX works in OPUS.
. -
Why do it the easy way ???? ?
I subtract the start of GPS time and subtract it from the current doy and year. Multiply years by 52 divide diff in days by 7 then add one since the first GPS week was one.
But that’s just me…
-
Bad info in posting 4 March 2019.
My previous post on an easy way to compute the GPS week was wrong. Also, my statement that GPS time started 5 January 1980 is more correctly stated as ??GPS Time is a uniformly counting time scale beginning at the 1/5/1980 to 1/6/1980 midnight. ?? (4)
To atone, I provide the following algorithm (adapted from BW Remondi??s code at the NGS site). (3) It uses Modified Julian Days (MJD) as one should.(1) Note that my algorithm does not include the computation of the seconds of week in BWR??s code.
The algorithm does NOT include the ??((year – 1901)%4)*365? as I could not figure out why it was included as I think the leap days issues is already accounted for. Unfortunately my ancient lecture notes on the subject of gps time conversions have mouldered into dust (as has my memory). I shall attempt to NOT whip out answers without more thorough review.
Constants:
MJD_1Jan1901 = 15385
MJD_6Jan1980 = 44244 (start of GPS time)
Inputs:
Year
DOY
How the algorithm works
It computes the number of days based on the number of four-year intervals between the year of interest and year 1901. Multiply this value by 1461 (number of days in three regular and one leap year ). Add to this the day of year subtract one then add the MJD of 1 Jan 1901. This computes the MJD for the day of interest.
To calculate the GPS week we use the MJD computed above, subtract the MJD for Jan61980 then divide by seven.
MJD = ((year – 1901)/4 * 1461 + DOY -1 + MJD_1Jan1901
GPS_week = ( MJD – MJD_6Jan1980 ) / 7
A numeric example follows:
Year: 2019
DOY: 63
MJD = (2019-1901)/4 * 1461 + 063-1 + 15385 = 58546.5
GPS_WK = (58546.5 – 44244)/7 = 2043 (verified against NGS GPS Calendar)(2)
Note that BWR??s code includes another segment in the computation of MJD.
References:
- https://tycho.usno.navy.mil/mjd.html
- https://www.ngs.noaa.gov/CORS/Gpscal.shtml
- https://www.ngs.noaa.gov/gps-toolbox/bwr-c.txt
- https://www.oc.nps.edu/oc2902w/gps/timsys.html
C code function from reference (3) above.
/*————————————————————————
* ydhms_to_gps *
* *
* Input: year, yday, hour, minute, second *
* *
* Output: gps_week, sec_of_week *
* *
* Author: Benjamin W. Remondi Date: November 1999 *
*———————————————————————–*/
void ydhms_to_gps(long year, long yday, long hour, long minute, double second,
long *gps_week, double *sec_of_week)
{
long mjd;
double fmjd;
mjd = ((year – 1901)/4)*1461 + ((year – 1901)%4)*365 + yday – 1 + JAN11901;
fmjd = ((second/60.0 + minute)/60.0 + hour)/24.0;
*gps_week = (mjd – JAN61980)/7;
*sec_of_week = ( (mjd – JAN61980) – *gps_week*7 + fmjd )*SEC_PER_DAY;
}
/*
Log in to reply.