[teqc] helpful tip of week 1905

Lou Estey lou at unavco.org
Wed Jul 13 07:20:37 MDT 2016


This week's tip: using the '+bcf' option for cartesian-geodetic conversion

You probably have never used or even heard about the '+bcf' option, but '+bcf' may
be about to become your friend.  (And having a leading '+' on this option should by now
clue you in that there is a also '-bcf' option, but more about that some other time.)

Currently:
[1064] teqc +help | grep bcf
              +bcf                 output all known parameters as a BINEX configuration format to stdout

Ok, what does that mean?  Well, let's say you have an ordinary data file, like a Septentrio
.sbf file, and then do:

[1068] teqc +quiet +bcf -sep sbf ssrc1_rover.sbf
# BINEX 0x00: 2016 Jul  8 20:56:39.000 - 2016 Jul  8 20:56:39.000
-B.c[omment] "BIT 2 OF LLI FLAGS DATA COLLECTED UNDER A/S CONDITION"
-B.c[omment] " SNR is mapped to RINEX snr flag value [0-9]"
-B.c[omment] "  L1 & L2: min(max(int(snr_dBHz/6), 0), 9)"
-B.p_o[perator] "Lou Estey"
-B.ma[rker] "APS_"
-B.at[ype] "APS_APS-3"
-B.rt[ype] "SEPT -UNKNOWN-"
-B.rn[umber] "3003459"
-B.rf[irmware] "2.3-tst120919r36081"
-B.rdt[ype] "NONE"
-B.px[WGS84xyz,m] 4021401.9200 332714.5399 4923032.7377
-B.pg[eo,ddm] 50.848942702 4.729648971 104.2275
# note: IGS log format= +505056.1937 +44346.7363 104.2275
-B.pe[hEN,m] 0.1140 0.0000 0.0000

This reads the input file and creates for BINEX the '-B.*' options equivalent of the
'-O.*' options using whatever metadata was found in the input, plus some default stuff,
all output to stdout.

Instead of an ASCII header, BINEX uses one or more metadata records.  The '-B.*'
options are some of what can be used to create your own BINEX metadata record -- among
other uses, to prepend onto the beginning of a BINEX file, if need be.  The '+bcf'
output also has lines starting with the '#' character that are merely comment lines
of the BINEX configuration; any such line is not used if read by teqc in a BINEX config
file.

Unlike RINEX, BINEX can store the survey point position in either the ECEF XYZ cartesian
coordinate system, or in geodetic coordinates, or both.  In the above, note the two
equivalent lines:

-B.px[WGS84xyz,m] 4021401.9200 332714.5399 4923032.7377
-B.pg[eo,ddm] 50.848942702 4.729648971 104.2275

... the first in WGS84 ECEF XYZ cartesian (in meters) and the second in WGS84 geodetic
coordinates (latitude, longitude, elevation in decimal degrees and meters) assuming
the WGS84 ellipsoid model parameters.

And -- here's the beautiful part -- you can use either one of these two BINEX metadata
configuration options as input with the '+bcf' option and teqc creates the other one --
without any data file.  So:

[1069] teqc +bcf -B.px 4021401.9200 332714.5399 4923032.7377
# BINEX 0x00: 2016 Jul  8 21:08:08.000 - 1980 Jan 25 19:26:00.000
-B.px[WGS84xyz,m] 4021401.9200 332714.5399 4923032.7377
-B.pg[eo,ddm] 50.848942703 4.729648971 104.2275
# note: IGS log format= +505056.1937 +44346.7363 104.2275

... or conversely:

[1070] teqc +bcf -B.pg 50.848942702 4.729648971 104.2275
# BINEX 0x00: 2016 Jul  8 21:11:03.000 - 1980 Jan 25 19:26:00.000
-B.px[WGS84xyz,m] 4021401.9201 332714.5399 4923032.7377
-B.pg[eo,ddm] 50.848942702 4.729648971 104.2275
# note: IGS log format= +505056.1937 +44346.7363 104.2275

Notice that you get back a near-perfect conversion either way, down to the 0.1 millimeter
and 1e-9 degree level (i.e. the conversion should be identical or at most have a couple of
differences at ±0.1 millimeter or ±1e-9 degree).

This works pole to pole, for example for AMU2 (at Amundsen-Scott base) which is
only 124 meters from the geodetic South Pole:

[1071] teqc +bcf -B.px -43.9525 -115.9865 -6359575.3130
# BINEX 0x00: 2016 Jul 11 19:24:41.000 - 1980 Jan 25 19:26:00.000
-B.px[WGS84xyz,m] -43.9525 -115.9865 -6359575.3130
-B.pg[eo,ddm] -89.998890000 -110.753950825 2822.9999
# note: IGS log format= -895956.0040 -1104514.2230 2822.9999

[1072] teqc +bcf -B.pg -89.998890000 -110.753950825 2822.9999
# BINEX 0x00: 2016 Jul 11 19:25:03.000 - 1980 Jan 25 19:26:00.000
-B.px[WGS84xyz,m] -43.9525 -115.9865 -6359575.3129
-B.pg[eo,ddm] -89.998890000 -110.753950825 2822.9999
# note: IGS log format= -895956.0040 -1104514.2230 2822.9999

You also get back, for free, for any of those of you who need it, the geodetic coordinates
recast in the format used in IGS logs.  (I'll now let you ponder the notation used in IGS
logs for the latitude and longitude ...)  I added this little part of the '+bcf' output
for our NASA-supported engineers back in 2005 to help save their sanity.

Happy teqc-ing!

cheers,
--lou

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Louis H. Estey, Ph.D.              office:  [+001] 303-381-7456
UNAVCO, 6350 Nautilus Drive           FAX:  [+001] 303-381-7451
Boulder, CO  80301-5554            e-mail:  lou  unavco.org
      WWW:  http://www.unavco.org   http://jules.unavco.org

"If the universe is the answer, what is the question?"
                                                -- Leon Lederman
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Past helpful tips:

week 1894: using teqc config files - http://postal.unavco.org/pipermail/teqc/2016/002067.html
week 1895: qc of high-rate data - http://postal.unavco.org/pipermail/teqc/2016/002071.html
week 1896: UNIX/Linux shells for Windows - http://postal.unavco.org/pipermail/teqc/2016/002072.html
week 1897: '-' vs. '+' teqc options - http://postal.unavco.org/pipermail/teqc/2016/002076.html
week 1898: auto-identification of formats - http://postal.unavco.org/pipermail/teqc/2016/002092.html
week 1899: auto-identification vs. format flags - http://postal.unavco.org/pipermail/teqc/2016/002096.html
week 1900: square brackets in options - http://postal.unavco.org/pipermail/teqc/2016/002105.html
week 1901: using option '+mds' - http://postal.unavco.org/pipermail/teqc/2016/002108.html
week 1902: qc results w/ problematic nav messages - http://postal.unavco.org/pipermail/teqc/2016/002113.html
week 1903: '-no_orb[it]' and '-no_pos[ition]' options - http://postal.unavco.org/pipermail/teqc/2016/002115.html
week 1904: '-week' option - http://postal.unavco.org/pipermail/teqc/2016/002117.html




More information about the teqc mailing list