diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 085085475..000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** -- OS: [e.g. Widows, Linux, Mac + Version] -- Version of Ginan: -- Library used (Boost, Eigen, ...) - -**Additional context** -Add any other context about the problem here. diff --git a/.gitignore b/.gitignore deleted file mode 100644 index fb459f849..000000000 --- a/.gitignore +++ /dev/null @@ -1,151 +0,0 @@ -# These are some examples of commonly ignored file patterns. -# You should customize this list as applicable to your project. -# Learn more about .gitignore: -# https://www.atlassian.com/git/tutorials/saving-changes/gitignore - -src/src.kdev4 - -# GNSS solutions -*.sp3 -*.clk -*.snx - -# GNSS data -*.[cr]nx - -# data directories in examples -examples/* -examples/*.gz -examples/*.bz2 -# to be fixed in future release -examples/DE.430 -#symbolic links to yaml files (as yml) -examples/*.yml -#symbolic link to executables -examples/pea -examples/ginan -# pod output records -examples/*.out -examples/examples.zip - -examples/GinanYamlInspector.html - -Docs/ -# ignore cmake build and ide files -*.kdev4 -src/.kdev/ -src/build/ -bin/ -lib/ - -# ignore latex artifacts -docs/manual/*.log -docs/manual/*.aux -docs/manual/*.out -docs/manual/*.lot -docs/manual/*.pdf -docs/manual/*.idx -docs/manual/*.lof -docs/manual/*.gz -docs/manual/*.acn -docs/manual/*.acr -docs/manual/*.alg -docs/manual/*.bcf -docs/manual/*.glg -docs/manual/*.glo -docs/manual/*.gls -docs/manual/*.glsdefs -docs/manual/*.ist -docs/manual/*.run.xml -docs/manual/*.toc -docs/manual/main.ilg -docs/manual/main.ind -docs/manual/main.lol -docs/manual/*.fls -docs/manual/*.fdb* -docs/manual/*.fdb* -docs/manual/*.bbl -docs/manual/*.blg -docs/manual/build - -docs/html/ -docs/DoxygenLayout.xml -docs/Doxyfile - -Docs/codeDocs/* - -Docs/*.html - -*.kate-swp - - - -*.swp -# Node artifact files -node_modules/ -dist/ -package-lock.json -package.json - - -# Compiled Java class files -*.class - -# Compiled Python bytecode -*.py[cod] - -# gn_lib pip installation files -*.egg-info/ - -# Log files -*.log - -# Package files -*.jar - -# Maven -target/ -dist/ - -# JetBrains IDE -.idea/ - -# Unit test reports -TEST*.xml - -# Generated by MacOS -.DS_Store - -# Generated by Windows -Thumbs.db - -# Applications -*.app -*.exe -*.war - -# Large media files -*.mp4 -*.tiff -*.avi -*.flv -*.mov -*.wmv -*.png - -# vscode settings -.vscode/ -build/ -# visual studio file/settings -src/CMakeSettings.json -src/CMakeFiles/ -.vs/ - -# remove commitversion.h -src/cpp/pea/peaCommitVersion.h -src/build/ -src/cmake-* -src/build* - -# folder for test files (shouldn't be uploaded) -scratch diff --git a/CHANGELOG.md b/CHANGELOG.md index a97339a37..f3a2cf52d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,10 +3,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -# [2.0.0] 2023-05-18 +# [2.0.1] 2023-06-09 ### Added ### Changed -Many changes for v2.0, will be fully documented with v2.1 ... +Unified User and Network operation modes (One Observation Model & Filter) +More GNSS constellations – Full Multi-Constellation capability (Ex SBAS) +Better internal frequency indexing (complete Multi-Frequency capability) +UnDifferenced / UnCombined (UDUC) processing (v1 was Combined IF only) +CPP integrated and coupled Precise Orbit Determination (POD) capability +More robust data handling in filter cycle slip and outlier detection and removal +Complete RTCM3 phase 1 and Phase 2 message decoding and encoding +SLR data handling fully implemented +Model & Performance improvements ### Fixed ### Deprecated ### Removed diff --git a/Docs/GinanEDA_AWS_EC2_Instruction_v1.1.txt b/Docs/GinanEDA_AWS_EC2_Instruction_v1.1.txt new file mode 100644 index 000000000..02ebee8a9 --- /dev/null +++ b/Docs/GinanEDA_AWS_EC2_Instruction_v1.1.txt @@ -0,0 +1,131 @@ +=== Instructions to setup GinanEDA with AWS EC2 server === + Modified from Mark's (Ron's) and Simon's (DM via Discord) instructions + + +=== 1st time only === + +1. Create a key pair using EC2 + Go to https://console.aws.amazon.com/ec2/ + Go to 'Key Pairs' (under left pane, 'Network & Security') + 'Create key pair' (top right, orange) + Name: your choice + Key pair type: 'RSA' + Private key file format: '.pem' + 'Create key pair' + The private key (.pem file) will download locally through your browser - save this somewhere safe (e.g. ~/.ssh/mark_isg.pem) + + +2. Get public key + Open a terminal on your local machine: + $ cd ~/.ssh + $ chmod 600 mark_isg.pem + $ ssh-keygen -y -f mark_isg.pem > mark_isg.pub + $ cat mark_isg.pub + ^ This is your public key + Note: do not move the private key to a Windows partition (if you are on WSL) as the permissions will be altered so that the connection cannot be established + + + +=== For each server === + +3. On the EC2 instance, append your public key to ~/.ssh/authorized_keys + $ vim ~/.ssh/authorized_keys + + + +4. Change security settings for the EC2 instance + Go to https://console.aws.amazon.com/ec2/ + Go to 'Security Groups' (under left pane, 'Network & Security') + Search for the name of your EC2 server + 'Inbound rules', 'Edit inbound rules' + 'Add rule' + Type: SSH + Source: Anywhere-IPv4 + 'Save rules' + Note: need to double check 'Inbound rules' to make sure the added rule is saved + +5. Find the EC2's Public DNS + Go to https://ap-southeast-2.console.aws.amazon.com/cloud9/home# + Select the server, click 'View details', 'Go To Instance' + Click the Instance ID link (blue text) + Copy the Public IPv4 DNS (e.g. "ec2-13-55-168-85.ap-southeast-2.compute.amazonaws.com") + Note: this will change each time the server shuts down. To avoid this, see section on elastic IPs below + + + +=== On local machine - 1st time only === + +6. SSH into the EC2 instance + Make sure you can SSH from your local machine into your EC2 instance: + $ ssh -i "~/.ssh/mark_isg.pem" ubuntu@ec2-13-55-168-85.ap-southeast-2.compute.amazonaws.com + For elastic IPs: + $ ssh -i "~/.ssh/mark_isg.pem" ubuntu@13.55.168.85 + Once you know you can access your server, just exit SSH: + $ exit + + +=== every time you use === + +7. Create a tunnel between the remote and local machines + On your local machine, create a tunnel for port 8080 on the remote machine to 8081 on the local machine: + $ ssh -fN -i ~/.ssh/mark_isg.pem -L 8081:localhost:8080 ubuntu@ec2-13-55-168-85.ap-southeast-2.compute.amazonaws.com + For elastic IPs: + $ ssh -fN -i ~/.ssh/mark_isg.pem -L 8081:localhost:8080 ubuntu@13.55.168.85 + Note: you don't have to run this command again during a short period of time + + +8. SSH into your EC2 instance from your local machine (see step 6) + + +9. Start the EDA on your remote machine via SSH + Run scripts/GinanEDA/index.py under your Ginan directory + $ python3 /data/acs/ginan/scripts/GinanEDA/index.py + Note: you may need to 'pip3 install' some of the dependencies for the first time, just follow the prompts shown on the terminal + + +10. View the EDA on a web browser + On you local machine, open a browser and go to http://127.0.0.1:8081/dbinfo + Now you can run your test and view the results with GinanEDA on a web browser + + + +=== Optional === + +11. Create / re-use an elastic IP & associate with EC2 instance + Go to https://ap-southeast-2.console.aws.amazon.com/ec2/v2/home?region=ap-southeast-2#Addresses + 'Allocate Elastic IP Address' (top right, orange) + 'Allocate' + Copy down the allocated IP address + 'Actions' (top right), 'Associate Elastic IP address' + Resource type: 'Instance' + Instance: search for the name of your EC2 server + 'Associate' + This IP address can now be used instead of the Public DNS + + +12. Find the EC2's elastic IP address + Go to https://ap-southeast-2.console.aws.amazon.com/cloud9/home# + Select the server, click 'View details', 'Go To Instance' + Click the Instance ID link (blue text) + Copy the Public IPv4 address (e.g. "13.55.168.85") + + +13. Establish a tunnel between the remote and local machines automatically with an elastic IP + On your local machine, check your .bashrc file and verify it sources ~/.bash_aliases + $ vim ~/.bashrc + Check if following lines exist + +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi + + If not, add them to your .bashrc file + Create .bash_aliases if it does not exist under your home directory + $ touch ~/.bash_aliases + Add the command line in step 7 to .bash_aliases, i.e. + +ssh -fN -i ~/.ssh/mark_isg.pem -L 8081:localhost:8080 ubuntu@13.55.168.85 + + Now every time you open your terminal on your local machine, the tunnel will be established automatically + Note: you may need to switch to non-login shell if you use WSL: + $ bash diff --git a/Docs/css/general.css b/Docs/css/general.css index 8899df6a5..25e77136a 100644 --- a/Docs/css/general.css +++ b/Docs/css/general.css @@ -48,6 +48,15 @@ img.image-fluid { scroll-margin-top: 100px; margin-top: 1rem; } + + h6 + { + display:inline; + } + h6+p + { + display:inline; + } img { diff --git a/Docs/favicons/apple-touch-icon-114x114.png b/Docs/favicons/apple-touch-icon-114x114.png new file mode 100644 index 000000000..c29d4e6af Binary files /dev/null and b/Docs/favicons/apple-touch-icon-114x114.png differ diff --git a/Docs/favicons/apple-touch-icon-120x120.png b/Docs/favicons/apple-touch-icon-120x120.png new file mode 100644 index 000000000..053e1b85a Binary files /dev/null and b/Docs/favicons/apple-touch-icon-120x120.png differ diff --git a/Docs/favicons/apple-touch-icon-144x144.png b/Docs/favicons/apple-touch-icon-144x144.png new file mode 100644 index 000000000..88de17518 Binary files /dev/null and b/Docs/favicons/apple-touch-icon-144x144.png differ diff --git a/Docs/favicons/apple-touch-icon-152x152.png b/Docs/favicons/apple-touch-icon-152x152.png new file mode 100644 index 000000000..c3fa48032 Binary files /dev/null and b/Docs/favicons/apple-touch-icon-152x152.png differ diff --git a/Docs/favicons/apple-touch-icon-57x57.png b/Docs/favicons/apple-touch-icon-57x57.png new file mode 100644 index 000000000..c00d51c3e Binary files /dev/null and b/Docs/favicons/apple-touch-icon-57x57.png differ diff --git a/Docs/favicons/apple-touch-icon-60x60.png b/Docs/favicons/apple-touch-icon-60x60.png new file mode 100644 index 000000000..088d51cc4 Binary files /dev/null and b/Docs/favicons/apple-touch-icon-60x60.png differ diff --git a/Docs/favicons/apple-touch-icon-72x72.png b/Docs/favicons/apple-touch-icon-72x72.png new file mode 100644 index 000000000..fd75dd086 Binary files /dev/null and b/Docs/favicons/apple-touch-icon-72x72.png differ diff --git a/Docs/favicons/apple-touch-icon-76x76.png b/Docs/favicons/apple-touch-icon-76x76.png new file mode 100644 index 000000000..ffbf2c1c0 Binary files /dev/null and b/Docs/favicons/apple-touch-icon-76x76.png differ diff --git a/Docs/favicons/favicon-128.png b/Docs/favicons/favicon-128.png new file mode 100644 index 000000000..11af9fe33 Binary files /dev/null and b/Docs/favicons/favicon-128.png differ diff --git a/Docs/favicons/favicon-16x16.png b/Docs/favicons/favicon-16x16.png new file mode 100644 index 000000000..9137737b0 Binary files /dev/null and b/Docs/favicons/favicon-16x16.png differ diff --git a/Docs/favicons/favicon-196x196.png b/Docs/favicons/favicon-196x196.png new file mode 100644 index 000000000..58e4b7365 Binary files /dev/null and b/Docs/favicons/favicon-196x196.png differ diff --git a/Docs/favicons/favicon-32x32.png b/Docs/favicons/favicon-32x32.png new file mode 100644 index 000000000..af431276e Binary files /dev/null and b/Docs/favicons/favicon-32x32.png differ diff --git a/Docs/favicons/favicon-96x96.png b/Docs/favicons/favicon-96x96.png new file mode 100644 index 000000000..825c1862f Binary files /dev/null and b/Docs/favicons/favicon-96x96.png differ diff --git a/Docs/favicons/mstile-144x144.png b/Docs/favicons/mstile-144x144.png new file mode 100644 index 000000000..88de17518 Binary files /dev/null and b/Docs/favicons/mstile-144x144.png differ diff --git a/Docs/favicons/mstile-150x150.png b/Docs/favicons/mstile-150x150.png new file mode 100644 index 000000000..cb6d64fa7 Binary files /dev/null and b/Docs/favicons/mstile-150x150.png differ diff --git a/Docs/favicons/mstile-310x150.png b/Docs/favicons/mstile-310x150.png new file mode 100644 index 000000000..ef3a7f3de Binary files /dev/null and b/Docs/favicons/mstile-310x150.png differ diff --git a/Docs/favicons/mstile-310x310.png b/Docs/favicons/mstile-310x310.png new file mode 100644 index 000000000..eaf17e306 Binary files /dev/null and b/Docs/favicons/mstile-310x310.png differ diff --git a/Docs/favicons/mstile-70x70.png b/Docs/favicons/mstile-70x70.png new file mode 100644 index 000000000..11af9fe33 Binary files /dev/null and b/Docs/favicons/mstile-70x70.png differ diff --git a/Docs/images/Atmosphere-75pc.png b/Docs/images/Atmosphere-75pc.png new file mode 100644 index 000000000..8209650b1 Binary files /dev/null and b/Docs/images/Atmosphere-75pc.png differ diff --git a/Docs/images/BasicPosCalcs-75pcv01.png b/Docs/images/BasicPosCalcs-75pcv01.png new file mode 100644 index 000000000..7106b6b74 Binary files /dev/null and b/Docs/images/BasicPosCalcs-75pcv01.png differ diff --git a/Docs/images/CORSNetwork-75pc.png b/Docs/images/CORSNetwork-75pc.png new file mode 100644 index 000000000..61b29d30b Binary files /dev/null and b/Docs/images/CORSNetwork-75pc.png differ diff --git a/Docs/images/CalculateAPosition-75pc.png b/Docs/images/CalculateAPosition-75pc.png new file mode 100644 index 000000000..191bd0161 Binary files /dev/null and b/Docs/images/CalculateAPosition-75pc.png differ diff --git a/Docs/images/DefiningOrbitPosition-75pc.png b/Docs/images/DefiningOrbitPosition-75pc.png new file mode 100644 index 000000000..504ccff48 Binary files /dev/null and b/Docs/images/DefiningOrbitPosition-75pc.png differ diff --git a/Docs/images/GNSSComponents1-75pc.png b/Docs/images/GNSSComponents1-75pc.png new file mode 100644 index 000000000..21b3c5c76 Binary files /dev/null and b/Docs/images/GNSSComponents1-75pc.png differ diff --git a/Docs/images/GNSSConstellations-75pc.png b/Docs/images/GNSSConstellations-75pc.png new file mode 100644 index 000000000..37d6fea45 Binary files /dev/null and b/Docs/images/GNSSConstellations-75pc.png differ diff --git a/Docs/images/GNSSFrontSlide20210618v01.png b/Docs/images/GNSSFrontSlide20210618v01.png new file mode 100644 index 000000000..f14a95428 Binary files /dev/null and b/Docs/images/GNSSFrontSlide20210618v01.png differ diff --git a/Docs/images/GNSSLandscapeMiniv05.png b/Docs/images/GNSSLandscapeMiniv05.png new file mode 100644 index 000000000..3416b860b Binary files /dev/null and b/Docs/images/GNSSLandscapeMiniv05.png differ diff --git a/Docs/images/GNSSPositions-75pc.png b/Docs/images/GNSSPositions-75pc.png new file mode 100644 index 000000000..c71ea6cc2 Binary files /dev/null and b/Docs/images/GNSSPositions-75pc.png differ diff --git a/Docs/images/GNSSSatelliteInSpace-75pc.png b/Docs/images/GNSSSatelliteInSpace-75pc.png new file mode 100644 index 000000000..87f6f9068 Binary files /dev/null and b/Docs/images/GNSSSatelliteInSpace-75pc.png differ diff --git a/Docs/images/GPS_signal_modulation_scheme.png b/Docs/images/GPS_signal_modulation_scheme.png new file mode 100644 index 000000000..06d25b88c Binary files /dev/null and b/Docs/images/GPS_signal_modulation_scheme.png differ diff --git a/Docs/images/Galileo_Space_Segment-16pc.png b/Docs/images/Galileo_Space_Segment-16pc.png new file mode 100644 index 000000000..bcf9e5b32 Binary files /dev/null and b/Docs/images/Galileo_Space_Segment-16pc.png differ diff --git a/Docs/images/GinanLogo273.png b/Docs/images/GinanLogo273.png new file mode 100644 index 000000000..17e74e815 Binary files /dev/null and b/Docs/images/GinanLogo273.png differ diff --git a/Docs/images/GinanLogo60.png b/Docs/images/GinanLogo60.png new file mode 100644 index 000000000..72249880b Binary files /dev/null and b/Docs/images/GinanLogo60.png differ diff --git a/Docs/images/GinanLogo819.png b/Docs/images/GinanLogo819.png new file mode 100644 index 000000000..6a9678a73 Binary files /dev/null and b/Docs/images/GinanLogo819.png differ diff --git a/Docs/images/GinanLogo91.png b/Docs/images/GinanLogo91.png new file mode 100644 index 000000000..0adc4ad18 Binary files /dev/null and b/Docs/images/GinanLogo91.png differ diff --git a/Docs/images/GinanProjectOverviewFrontSlide20210902v01.png b/Docs/images/GinanProjectOverviewFrontSlide20210902v01.png new file mode 100644 index 000000000..3989fddf3 Binary files /dev/null and b/Docs/images/GinanProjectOverviewFrontSlide20210902v01.png differ diff --git a/Docs/images/GinanTechnologyFrontSlide20210902v01.png b/Docs/images/GinanTechnologyFrontSlide20210902v01.png new file mode 100644 index 000000000..4af3768d6 Binary files /dev/null and b/Docs/images/GinanTechnologyFrontSlide20210902v01.png differ diff --git a/Docs/images/ICRF-75pc.png b/Docs/images/ICRF-75pc.png new file mode 100644 index 000000000..dc91848cd Binary files /dev/null and b/Docs/images/ICRF-75pc.png differ diff --git a/Docs/images/ITRF-75pc.png b/Docs/images/ITRF-75pc.png new file mode 100644 index 000000000..c9fe11bd1 Binary files /dev/null and b/Docs/images/ITRF-75pc.png differ diff --git a/Docs/images/LatLongH-75pc.png b/Docs/images/LatLongH-75pc.png new file mode 100644 index 000000000..2844200b7 Binary files /dev/null and b/Docs/images/LatLongH-75pc.png differ diff --git a/Docs/images/LibraryBooksStrip.png b/Docs/images/LibraryBooksStrip.png new file mode 100644 index 000000000..cebf1b8a0 Binary files /dev/null and b/Docs/images/LibraryBooksStrip.png differ diff --git a/Docs/images/Multipath-780px.png b/Docs/images/Multipath-780px.png new file mode 100644 index 000000000..b43f6fd22 Binary files /dev/null and b/Docs/images/Multipath-780px.png differ diff --git a/Docs/images/PALogoB.png b/Docs/images/PALogoB.png new file mode 100644 index 000000000..c94f12ba6 Binary files /dev/null and b/Docs/images/PALogoB.png differ diff --git a/Docs/images/PPPFrontSlide20210625v01.png b/Docs/images/PPPFrontSlide20210625v01.png new file mode 100644 index 000000000..d749efaeb Binary files /dev/null and b/Docs/images/PPPFrontSlide20210625v01.png differ diff --git a/Docs/images/PositionOnEarth-75pc.png b/Docs/images/PositionOnEarth-75pc.png new file mode 100644 index 000000000..27da64a3c Binary files /dev/null and b/Docs/images/PositionOnEarth-75pc.png differ diff --git a/Docs/images/Pseudorange-75pc.png b/Docs/images/Pseudorange-75pc.png new file mode 100644 index 000000000..4b14d45a6 Binary files /dev/null and b/Docs/images/Pseudorange-75pc.png differ diff --git a/Docs/images/RTKDGNSS-75pc.png b/Docs/images/RTKDGNSS-75pc.png new file mode 100644 index 000000000..cafffe73c Binary files /dev/null and b/Docs/images/RTKDGNSS-75pc.png differ diff --git a/Docs/images/ReferenceFramesFrontSlide20210618v01.png b/Docs/images/ReferenceFramesFrontSlide20210618v01.png new file mode 100644 index 000000000..b67b4321c Binary files /dev/null and b/Docs/images/ReferenceFramesFrontSlide20210618v01.png differ diff --git a/Docs/images/SP3-dQuickReferenceFrontSlidev01.png b/Docs/images/SP3-dQuickReferenceFrontSlidev01.png new file mode 100644 index 000000000..66db5ddb7 Binary files /dev/null and b/Docs/images/SP3-dQuickReferenceFrontSlidev01.png differ diff --git a/Docs/images/SPSFrontSlide20210623v01.png b/Docs/images/SPSFrontSlide20210623v01.png new file mode 100644 index 000000000..4799aa7c1 Binary files /dev/null and b/Docs/images/SPSFrontSlide20210623v01.png differ diff --git a/Docs/images/SouthernCross.png b/Docs/images/SouthernCross.png new file mode 100644 index 000000000..c08a8b2e7 Binary files /dev/null and b/Docs/images/SouthernCross.png differ diff --git a/Docs/images/SpeedOfLight-75pc.png b/Docs/images/SpeedOfLight-75pc.png new file mode 100644 index 000000000..51131c038 Binary files /dev/null and b/Docs/images/SpeedOfLight-75pc.png differ diff --git a/Docs/images/WardamanCountry.png b/Docs/images/WardamanCountry.png new file mode 100644 index 000000000..95b479d8f Binary files /dev/null and b/Docs/images/WardamanCountry.png differ diff --git a/Docs/images/www-959px.png b/Docs/images/www-959px.png new file mode 100644 index 000000000..74bd642ae Binary files /dev/null and b/Docs/images/www-959px.png differ diff --git a/Docs/peaConfig.md b/Docs/peaConfig.md index 155c1d64f..661b56119 100644 --- a/Docs/peaConfig.md +++ b/Docs/peaConfig.md @@ -63,7 +63,7 @@ This is replaced with the id of the a given stream where appropriate. These are replaced with the (rounded) time of the epochs within the trace file. If trace file rotation is configured for 1 hour, the `` wildcard will be rounded down to the closest hour, and subsequently change value once per hour and generate a separate output file for each hour of processing. - + +## Pea Config Examples + +Example configurations for the different `pea` use-cases are included in the git repository in the `examples` directory. +These examples utilise a reference dataset from 2019, which demonstrate the majority of the features that are currently supported by Ginan. + +For descriptions of the specifics of those examples, refer to the code documentation's [Pea.Configuration.Examples](codeDocs/Pea_8Configuration_8Examples.html) page. + diff --git a/Docs/peaExamples.md b/Docs/peaExamples.md deleted file mode 100644 index fdb35c539..000000000 --- a/Docs/peaExamples.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# Pea Config Examples - -Example configurations for the different `pea` use-cases are included in the git repository in the `examples` directory. -These examples utilise a reference dataset from 2019, which demonstrate the majority of the features that are currently supported by Ginan. - -For descriptions of the specifics of those examples, refer to the code documentation's [Pea.Configuration.Examples](codeDocs/Pea_8Configuration_8Examples.html) page. - - - - - - diff --git a/Docs/peaUsage.index b/Docs/peaUsage.index index 1fdf67a4c..c8cfdbc35 100644 --- a/Docs/peaUsage.index +++ b/Docs/peaUsage.index @@ -1,5 +1,5 @@ usingThePea.md -peaConfig.md peaUser.md peaNetwork.md -peaExamples.md \ No newline at end of file +peaConfig.md +defaultConfiguration.md \ No newline at end of file diff --git a/README.md b/README.md index 9300ce164..944aea373 100755 --- a/README.md +++ b/README.md @@ -6,10 +6,10 @@ : You can run it by saving the raw markdown to disk, then `` chmod +x README.md``, then ``./README.md`` \ : It will execute all of the code blocks that finish with the `` :<<'```executable' `` tag. \ : This script will install all dependencies, and clone the Ginan repo into the current directory \(if required\) and build the Ginan toolkit. \ -: To check out the stable v1 branch from Github, append -b ginan-v1 to the clone command below to get the v1 branch source. +: To check out the stable v1 branch from Github, append "-b ginan-v1" to the clone command below to get the v1 branch source. -#### `Ginan v2.0-beta release` +#### `Ginan v2.0.1-beta release` ## Overview @@ -63,7 +63,7 @@ NB If you are using Ubuntu 22.04 and gcc11, you will need to make the the follow You can quickly download a ready-to-run Ginan environment using docker by running: - docker run -it -v /data:/data gnssanalysis/ginan:v2.0-beta bash + docker run -it -v /data:/data gnssanalysis/ginan:v2.0.1-beta bash This command connects the `/data` directory on the host (your pc), with the `/data` directory in the container, to allow file access between the two systems, and opens a command line (`bash`) for executing commands. @@ -72,8 +72,6 @@ You will need to have [docker](https://docs.docker.com/get-docker/) installed to To verify you have the Ginan executables available once at the Ginan command line, run: pea --help - - pod --help ## Dependencies @@ -83,8 +81,8 @@ If instead you wish to build Ginan from source, there are several software depen * BLAS and LAPACK linear algebra libraries. We use and recommend [OpenBlas](https://www.openblas.net/) as this contains both libraries required * CMAKE > 3.0 * YAML > 0.6 -* Boost >= 1.73 (tested on 1.73) -* Mongo_cxx >= 3.6.0 (and Mongo_C >= 1.17.1) +* Boost >= 1.73 (tested on 1.73). On Ubuntu 22.04 which uses gcc-11, you need Boost >= 1.74.0 +* Mongo_cxx >= 3.6.0 (and Mongo_C >= 1.17.1). On Ubuntu 22.04, you should use Mongo_cxx >= 3.6.7 (preferably 3.7.0) * Eigen3 > 3.4 (we have used 3.4.0) * netCDF4 * Python3 (tested on Python 3.7) @@ -108,6 +106,7 @@ sudo -H pip3 install wheel pandas boto3 unlzw tdqm scipy gnssanalysis ``` Ginan requires at least version 9 of both gcc and g++, so make sure to update the gcc/g++ alternatives prior to compilation: +(this is not required on Ubuntu 22.04) ```executable sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y @@ -162,6 +161,7 @@ rm -rf yaml-cpp ### Boost (PEA) PEA relies on a number of the utilities provided by [boost](https://www.boost.org/), such as their time and logging libraries. +NB for compilation on Ubuntu 22.04 and using gcc-11, you need to change this to boost_1_74_0 ```executable cd $dir/tmp @@ -215,6 +215,8 @@ Needed for json formatting and other self-descriptive markup. ```executable cd $dir/tmp +# for Ubuntu 22.04 changre this to 1.21.2 + wget https://github.com/mongodb/mongo-c-driver/releases/download/1.17.1/mongo-c-driver-1.17.1.tar.gz tar -xf mongo-c-driver-1.17.1.tar.gz @@ -233,6 +235,8 @@ sudo cmake --build . --target install -- -j 2 cd $dir/tmp +# for Ubuntu 22.04 change this to 3.7.0 + curl -OL https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.6.0/mongo-cxx-driver-r3.6.0.tar.gz tar -xf mongo-cxx-driver-r3.6.0.tar.gz @@ -338,7 +342,7 @@ fi Then download all of the example data using the python script provided (requires `gnssanalysis`): ```executable -python3 scripts/download_examples.py +python3 scripts/download_example_input_data.py :<<'```executable' ``` *** @@ -353,40 +357,20 @@ Upon installation, thie ginan directory should have the following structure: ├── aws/ ! Amazon Web Services config ├── bin/ ! Binary executables directory* ├── Docs/ ! Documentation directory - ├── examples/ ! Ginan examples directory + ├── inputData/ ! Input data for examples ** │ ├── data/ ! example dataset (rinex files)** - │ ├── products/ ! example products and aux files** - │ ├── solutions/ ! example solutions for QC** - │ --------------PEA examples-------------- - │ ├── ex11 ! PEA example 1 - │ ├── ex12 ! PEA example 2 - │ ├── ex13 ! PEA example 3 - │ ├── ex14 ! PEA example 4 - │ ├── ex15 ! PEA example 5 - │ ├── ex17 ! PEA example 7 - │ ├── ex18 ! PEA example 8 - │ --------------POD examples-------------- - │ ├── ex21 ! POD example 1 - │ ├── ex22 ! POD example 2 full GNSS pod fit example (5 constellations) - │ ├── ex22/gps ! POD example 2 US GPS constellation only - │ ├── ex22/glo ! POD example 2 Russian GLONASS constellation only - │ ├── ex22/gal ! POD example 2 European GALILEO constellation only - │ ├── ex22/bds ! POD example 2 Chinese BEIDOU constellation only - │ ├── ex22/qzss ! POD example 2 Japanese QZSS constellation only - │ ├── ex23 ! POD example 3 - │ ├── ex24 ! POD example 4 - │ ├── ex25 ! POD example 5 - │ └── ex26 ! POD example 6 - │ --------------long test examples-------------- - │ ├── ex31/pod_fit ! POD fit (ex31 stage 1) - │ ├── ex31/pea ! PEA re-estimate parameters - │ ├── ex31/pod_ic ! POD ic integrate + │ └── products/ ! example products and aux files** + │ + ├── exampleConfigs ! Example configuration files + │ ├── Ex02 ! + │ ├── Ex41 ! + │ ├── Ex42 ! + │ └── Ex48 ! │ ├── lib/ ! Compiled objectlibrary directory* ├── scripts/ ! Auxillary Python and Shell scripts and libraries └── src/ ! Source code directory - ├── cpp/ ! PEA source code - ├── fortran/ ! POD source code + ├── cpp/ ! Ginan source code ├── cmake/ ├── doc_templates/ ├── build/ ! Cmake build directory* @@ -394,7 +378,7 @@ Upon installation, thie ginan directory should have the following structure: *\*created during installation process* -*\*\*created by `download_examples.py` script* +*\*\*created by `download_example_input_data.py` script* *** ## Build Prepare a directory to build in - it's better practice to keep this separated from the source code. @@ -423,18 +407,16 @@ make -j2 :<<'```executable' ``` -Alternatively, to build only a specific package (e.g. PEA or POD), run as below: +Alternatively, to build only a specific package (e.g. PEA), run as below: make pea -j2 - - make pod -j2 This should create executables in the `bin` directory of Ginan. -Check to see if you can execute the PEA from the examples directory +Check to see if you can execute the PEA from the exampleConfigs directory ```executable -cd ../../examples +cd ../../exampleConfigs ../bin/pea --help :<<'```executable' @@ -458,69 +440,6 @@ and you should see something similar to: PEA finished -Similarly, check the POD: - -```executable -../bin/pod --help -:<<'```executable' -``` -This returns: - - Earth Radiation Model (ERM): 1 - - Default master POD config file = POD.in (old - no longer supported) - use a yaml config - - yaml config file options by default can be overridden on the command line - - Command line: ../bin/pod -m -s -o -a -p -r -t -n -i -u -q -k -w -y -h - - Where: - -m --podmode = POD Mode: - 1 - Orbit Determination (pseudo-observations; orbit fitting) - 2 - Orbit Determination and Prediction - 3 - Orbit Integration (Equation of Motion only) - 4 - Orbit Integration and Partials (Equation of Motion and Variational Equations) - 5 - Single satellite integration from pod_data section of yaml - -s --pobs = Pseudo observations orbit .sp3 file name (must be ITRF) - -o --cobs = Comparison orbit .sp3 file name - -a --arclen = Orbit Estimation Arc length (hours) - -p --predlen = Orbit Prediction Arc length (hours) - -r --eopf = Earth Orientation Paramaeter (EOP) values file - -t --eopsol = Earth Orientation Paramaeter file type: (1,2,3) - 1 - IERS C04 EOP - 2 - IERS RS/PC Daily EOP - 3 - IGS RP + IERS RS/PC Daily (dX,dY) - -n --nutpre = IAU Precession / Nutation model - 2000 - IAU2000A - 2006 - IAU2006/2000A - -i --estiter = Orbit Estimatimation Iterations (1 or greater) - -u --sp3vel = Output .sp3 file with velocities - 0 - Do not write Velocity vector to sp3 orbit - 1 - Write Velocity vector to sp3 orbit - -q --icmode = Initial condition from parameter estimation procedure - -k --srpmodel= 1: ECOM1, 2:ECOM2, 12:ECOM12, 3:SBOX - -w --empmodel= 1: activated, 0: no estimation - -d --verbosity = output verbosity level [Default: 0] - -y --config = yaml config file - -h --help. = Print program help - - Examples: - - ../bin/pod -m 1 -q 1 -k 1 -w 0 -s igs16403.sp3 -o igs16403.sp3 -y ex21.yaml - ../bin/pod -m 2 -q 1 -k 1 -w 0 -s igs16403.sp3 -p 12 -y exi22.yaml - - For orbit updates using Parameter Estimation Algorithm (PEA): - ../bin/pod -m 4 -q 2 -k 1 -w 0 -s igs16403.sp3 -o igs16403.sp3 -y ex23.yaml - - - - *** ## Documentation @@ -553,31 +472,24 @@ Note that documentation is also generated automatically if `make` is called with *** ## Ready! -Congratulations! You are now ready to trial the examples of PEA and POD from the examples directory. See Ginan's manual for detailed explanation of each example. Note that examples have relative paths to files in them and rely on the presence of `products`, `data` and `solutions` directories inside the `examples` directory. Make sure you've run `download_examples.py` from the **Download** step of this instruction. +Congratulations! You are now ready to trial the examples of PEA and POD from the exampleConfigs directory. See Ginan's manual for detailed explanation of each example. Note that examples have relative paths to files in them and rely on the presence of `products`, `data` and `solutions` directories inside the `inputData` directory. Make sure you've run `download_example_input_data.py` from the **Download** step of this instruction. -The paths are relative to the examples directory and hence all the examples must be run from the `examples` directory. +The paths are relative to the exampleConfigs directory and hence all the examples must be run from the `exampleConfigs` directory. -NB Examples may be configured to use mongoDB. If you have not installed it, please set `enable_mongo` to false in the pea config files +NB Examples may be configured to use mongoDB. If you have not installed it, please set `mongo: enable` to false in the pea config files To run the first example of the PEA: ``` -cd ../examples +cd ../exampleConfigs -../bin/pea --config ex11_pea_pp_user_gps.yaml +../bin/pea --config ex41_gin2_pp_user.yaml ``` -This should create `ex11` directory with `ex11-ALIC201919900.TRACE` and `ex1120624.snx` output files. You can remove the need for path specification to the executable by adding Ginan's bin directory to `~/.bachrc` file: +This should create `ex41` directory with `ex11-ALIC201919900.TRACE` and `ex1120624.snx` output files. You can remove the need for path specification to the executable by adding Ginan's bin directory to `~/.bachrc` file: PATH="path_to_ginan_bin:$PATH" -And an example of POD: - - ../bin/pod -y ex21_pod_fit_gps.yaml - -At the completion of the test run, `ex21` directory should be created. The `ex21_.sh` script will return any differences to the standard test resuts. - - *** ## Python Installation for Plotting, Processing, etc. Lastly, to run many of the included scripts for fast parsing of .`trace`/`.snx` files, plotting of results, automatic running of the PEA based on input date/times and stations, etc. then a number of python dependencies are needed. diff --git a/examples/GIN-206_Separate_Streams.yaml b/deleteExamples/GIN-206_Separate_Streams.yaml similarity index 100% rename from examples/GIN-206_Separate_Streams.yaml rename to deleteExamples/GIN-206_Separate_Streams.yaml diff --git a/examples/ex00.yaml b/deleteExamples/ex00.yaml similarity index 100% rename from examples/ex00.yaml rename to deleteExamples/ex00.yaml diff --git a/deleteExamples/ex001.yaml b/deleteExamples/ex001.yaml new file mode 100644 index 000000000..f9797a460 --- /dev/null +++ b/deleteExamples/ex001.yaml @@ -0,0 +1,183 @@ +# ex01 - Orbit Propagation Example + +inputs: + + root_directory: products/ + + atx_files: [ igs14_2045_plus.atx ] # required + snx_files: [ igs19P2062.snx ] # required + blq_files: [ OLOAD_GO.BLQ ] # required if ocean loading is applied + erp_files: [ igs96p02.erp, igs20627.erp ] + satellite_data: + sp3_files: [ "IGS*.SP3" ] + #clk_files: [ igs20624.clk_30s ] + + pseudo_observations: + inputs_root: "products/" + #sp3_inputs: [ IGS_Orbit_Test_sp3/esoc2_ecf_not_nst.sp3 ] + sp3_inputs: [ "IGS2R03FIN_20192000000_01D_05M_ORB.SP3" ] + + egm_files: [ tables/EGM2008.gfc ] # Earth gravity model coefficients file + jpl_files: [ tables/DE436.1950.2050 ] # JPL planetary and lunar ephemerides file + tide_files: [ tables/fes2014b_Cnm-Snm.dat] + + +outputs: + + root_directory: / + + trace: + output_stations: true + output_network: true + level: 2 + directory: ./ + station_filename: -.TRACE + network_filename: -.TRACE + output_residuals: true + output_config: true + + metadata: + + config_description: itrf + analysis_agency: GAA + analysis_center: Geoscience Australia + analysis_program: AUSACS + rinex_comment: AUSNETWORK1 + +mongo: + enable: true + output_measurements: true + output_states: true + output_rtcm_messages: false + output_test_stats: false + delete_history: true + uri: mongodb://127.0.0.1:27017 + suffix: "itrf" + +processing_options: + + epoch_control: + #start_epoch: 2007-04-12 00:15:00 + #end_epoch: 2007-04-15 00:00:00 + #max_epochs: 0 #5 #0 is infinite + epoch_interval: 900 #seconds + # wait_next_epoch: 100000 + # wait_all_stations: 1 + + + gnss_general: + + sys_options: + gps: + process: true + gal: + #process: true + + + gnss_models: + + ionospheric_component: + use_if_combo: false + + process_modes: + ppp: true + preprocessor: false + + orbit_propagation: + central_force: true + planetary_perturbation: true + indirect_J2: true + egm_field: true + solid_earth_tide: true + ocean_tide: true + general_relativity: true + pole_tide_ocean: true + pole_tide_solid: true + solar_pressure_radiation: true + + sat_mass: 1500 + sat_area: 15 + srp_cr: 1.25 + degree_max: 15 + + #itrf_pseudoobs: false + + filter_options: + #simulate_filter_only: true + + outlier_screening: + sigma_threshold: 4 + max_prefit_removals: 3 + + satellite_chunking: + enable: true + rts: + #enable: true + + model_error_checking: + orbit_errors: + orbit_pos_proc_noise: 900 + orbit_vel_proc_noise: 900 + orbit_vel_proc_noise_trail: 90 + orbit_vel_proc_noise_trail_tau: 0.2 + deweighting: + deweight_factor: 1000 + + minimum_constraints: + #enable: true + + translation: + estimated: [true] + rotation: + estimated: [true] + + + + inverter: ldlt + + #full_vcv: true + #scale_by_vcv: trueD + + station_noise: + + global: [1] + unconstrained: [-1] + XMPL: [2] + + #STN3: [20] + #DONT: [-1] + # BOAV: 100 #constrain weakly + + +satellite_options: + G06: {aliases: [estimated_sat]} + G23: {aliases: [estimated_sat]} + G03: {aliases: [estimated_sat]} + #G04: {aliases: [estimated_sat]} + #G12: {aliases: [estimated_sat]} + +estimation_parameters: + + satellites: + estimated_sat: + pos: + estimated: [true] + sigma: [1] + #proc_noise: [0.0001] + + pos_rate: + estimated: [true] + sigma: [100] + proc_noise: [0.000001] + + srp_scale_direct: + estimated: [true] + sigma: [1] + apriori_val: [1.774] + proc_noise: [0.00001] + proc_noise_dt: [hours] + + USN7: + pos: + estimated: [true] + diff --git a/examples/ex00_pod_test_g01.yaml b/deleteExamples/ex00_pod_test_g01.yaml similarity index 100% rename from examples/ex00_pod_test_g01.yaml rename to deleteExamples/ex00_pod_test_g01.yaml diff --git a/examples/ex01.yaml b/deleteExamples/ex01.yaml similarity index 100% rename from examples/ex01.yaml rename to deleteExamples/ex01.yaml diff --git a/deleteExamples/ex03.yaml b/deleteExamples/ex03.yaml new file mode 100644 index 000000000..7fc56a7c5 --- /dev/null +++ b/deleteExamples/ex03.yaml @@ -0,0 +1,144 @@ +# ex01 - Orbit Propagation Example + +inputs: + + root_directory: products/ + + atx_files: [ igs14_2045_plus.atx ] # required + snx_files: [ ../../../cddis/igs19P20342.snx ] # required + blq_files: [ OLOAD_GO.BLQ ] # required if ocean loading is applied + erp_files: [ igs96p02.erp ] + + pseudo_observations: + inputs_root: "products/" + snx_inputs: + - "../../../cddis/*0.snx" + #- "igs19P2062.snx" + #- "cod21620.snx" + #- "cod21621.snx" + #- "cod21622.snx" + #- "cod21623.snx" + #- "cod21624.snx" + #- "cod21625.snx" + + satellite_modeling: + egm_files: [ tables/EGM2008.gfc ] # Earth gravity model coefficients file + jpl_files: [ tables/DE436.1950.2050 ] # JPL planetary and lunar ephemerides file + tide_files: [ tables/fes2014b_Cnm-Snm.dat] + + +outputs: + + root_directory: / + + trace: + output_stations: true + output_network: true + level: 2 + directory: ./ + station_filename: -.TRACE + network_filename: -.TRACE + output_residuals: true + #output_config: true + + metadata: + + config_description: ex03 + analysis_agency: GAA + analysis_center: Geoscience Australia + analysis_program: AUSACS + rinex_comment: AUSNETWORK1 + +mongo: + enable: true + output_measurements: true + output_states: true + output_rtcm_messages: false + output_test_stats: false + delete_history: false + uri: mongodb://127.0.0.1:27017 + suffix: "KF" + +station_options: + ALIC: + aliases: [constrained] + SYDN: + aliases: [constrained] + ALBY: + aliases: [constrained] + PERT: + aliases: [constrained] + CEDU: + aliases: [constrained] + HOBA: + aliases: [constrained] + DARW: + aliases: [constrained] +processing_options: + + epoch_control: + #start_epoch: 2007-04-12 00:00:00 + #end_epoch: 2007-04-15 00:00:00 + #max_epochs: #5 #0 is infinite + #epoch_interval: 86400 #seconds + epoch_interval: 604800 #seconds + # wait_next_epoch: 100000 + # wait_all_stations: 1 + + + process_modes: + ppp: true + preprocessor: false + + filter_options: + outlier_screening: + sigma_threshold: 100 + + #chunking: + #enable: true + #size: 1 + + rts: + #enable: true + lag: -1 #-ve for full reverse, +ve for limited epochs + directory: ./ + filename: -Network.rts + + minimum_constraints: + enable: true + + translation: + estimated: [true] + rotation: + estimated: [true] + scale: + #estimated: [true] + + #full_vcv: true + #scale_by_vcv: true + #once_per_epoch: true + + station_noise: + + global: [-1] + unconstrained: [-1] + constrained: [1] + XMPL: [2] + + #STN3: [20] + #DONT: [-1] + # BOAV: 100 #constrain weakly + +estimation_parameters: + stations: + pos: + estimated: [true] + sigma: [1] + proc_noise: [0] + + strain_rate: + estimated: [true] + sigma: [100] + #proc_noise: [0.0001] + proc_noise_dt: years + diff --git a/examples/ex15_pea_rt_user_gnss_ar.yaml b/deleteExamples/ex15_pea_rt_user_gnss_ar.yaml similarity index 100% rename from examples/ex15_pea_rt_user_gnss_ar.yaml rename to deleteExamples/ex15_pea_rt_user_gnss_ar.yaml diff --git a/examples/ex18_pea_rt_netw_gnss_ar.yaml b/deleteExamples/ex18_pea_rt_netw_gnss_ar.yaml similarity index 100% rename from examples/ex18_pea_rt_netw_gnss_ar.yaml rename to deleteExamples/ex18_pea_rt_netw_gnss_ar.yaml diff --git a/examples/ex20_pod_template.yaml b/deleteExamples/ex20_pod_template.yaml similarity index 100% rename from examples/ex20_pod_template.yaml rename to deleteExamples/ex20_pod_template.yaml diff --git a/examples/ex21_.sh b/deleteExamples/ex21_.sh similarity index 100% rename from examples/ex21_.sh rename to deleteExamples/ex21_.sh diff --git a/examples/ex21_pod_fit_g23.yaml b/deleteExamples/ex21_pod_fit_g23.yaml similarity index 100% rename from examples/ex21_pod_fit_g23.yaml rename to deleteExamples/ex21_pod_fit_g23.yaml diff --git a/examples/ex22_.sh b/deleteExamples/ex22_.sh similarity index 100% rename from examples/ex22_.sh rename to deleteExamples/ex22_.sh diff --git a/examples/ex22_pod_fit_gnss.yaml b/deleteExamples/ex22_pod_fit_gnss.yaml similarity index 94% rename from examples/ex22_pod_fit_gnss.yaml rename to deleteExamples/ex22_pod_fit_gnss.yaml index f01da435e..bb90c4c90 100644 --- a/examples/ex22_pod_fit_gnss.yaml +++ b/deleteExamples/ex22_pod_fit_gnss.yaml @@ -31,7 +31,7 @@ pod_options: #--------------------------------------------------------------------------- # Observation Model - pseudobs_orbit_filename: products/COD0MGXFIN_20191990000_01D_05M_ORB.SP3 # Pseudo observations orbit filename + pseudobs_orbit_filename: ../inputData/products/COD0MGXFIN_20191990000_01D_05M_ORB.SP3 # Pseudo observations orbit filename pseudobs_interp_step: 900 # Interval (sec) of the interpolated orbit pseudobs_interp_points: 12 # Number of data points used in Lagrange interpolation @@ -49,7 +49,7 @@ pod_options: ext_orbit_type_kepler: false # Keplerian orbit ext_orbit_type_lagrange: false # 3-day Lagrange interpolation ext_orbit_type_position_sp3: false # Position and SP3 file - ext_orbit_filename: products/COD0MGXFIN_20191990000_01D_05M_ORB.SP3 # External (comparison) orbit filename + ext_orbit_filename: ../inputData/products/COD0MGXFIN_20191990000_01D_05M_ORB.SP3 # External (comparison) orbit filename ext_orbit_interp_step: 900 # Interval (sec) of the interpolated/Kepler orbit ext_orbit_interp_points: 12 # Number of data points used in Lagrange interpolation @@ -65,7 +65,7 @@ pod_options: EOP_soln_c04: true # IERS C04 solution : EOP_sol = 1 EOP_soln_rapid: false # IERS rapid service/prediction center (RS/PC) Daily : EOP_sol = 2 EOP_soln_igs: false # IGS ultra-rapid ERP + IERS RS/PC Daily (dX,dY) : EOP_sol = 3. Need both rapid_file AND igs_file - EOP_soln_c04_file: products/tables/EOP_14_C04_IAU2000A_one_file_1962-now.txt + EOP_soln_c04_file: ../inputData/products/tables/EOP_14_C04_IAU2000A_one_file_1962-now.txt EOP_soln_rapid_file: finals2000A.daily ERP_soln_igs_file: igu18543_12.erp EOP_soln_interp_points: 6 # EOP solution interpolation points @@ -77,24 +77,24 @@ pod_options: #--------------------------------------------------------------------------- # Gravity model file - gravity_model_file: products/tables/goco05s.gfc # goco05s.gfc, eigen-6s2.gfc, ITSG-Grace2014k.gfc + gravity_model_file: ../inputData/products/tables/goco05s.gfc # goco05s.gfc, eigen-6s2.gfc, ITSG-Grace2014k.gfc #--------------------------------------------------------------------------- # Planetary/Lunar ephemeris - JPL DE Ephemeris - DE_fname_header: products/tables/header.430_229 - DE_fname_data: products/tables/ascp1950.430 + DE_fname_header: ../inputData/products/tables/header.430_229 + DE_fname_data: ../inputData/products/tables/ascp1950.430 #--------------------------------------------------------------------------- # Ocean tide model file - ocean_tides_model_file: products/tables/fes2004_Cnm-Snm.dat # FES2004 ocean tide model + ocean_tides_model_file: ../inputData/products/tables/fes2004_Cnm-Snm.dat # FES2004 ocean tide model #---------------------------------------------------------------------- # Leap second filename - leapsec_filename: products/tables/leap.second + leapsec_filename: ../inputData/products/tables/leap.second #---------------------------------------------------------------------- # Satellite metadata SINEX - satsinex_filename: products/tables/igs_metadata_2063.snx + satsinex_filename: ../inputData/products/tables/igs_metadata_2063.snx #--------------------------------------------------------------------------- # Parameter Estimation diff --git a/examples/ex23_.sh b/deleteExamples/ex23_.sh similarity index 100% rename from examples/ex23_.sh rename to deleteExamples/ex23_.sh diff --git a/examples/ex24_.sh b/deleteExamples/ex24_.sh similarity index 100% rename from examples/ex24_.sh rename to deleteExamples/ex24_.sh diff --git a/examples/ex25_.sh b/deleteExamples/ex25_.sh similarity index 100% rename from examples/ex25_.sh rename to deleteExamples/ex25_.sh diff --git a/examples/ex26_.sh b/deleteExamples/ex26_.sh similarity index 100% rename from examples/ex26_.sh rename to deleteExamples/ex26_.sh diff --git a/deleteExamples/ex47_gin2_pp_netw.yaml b/deleteExamples/ex47_gin2_pp_netw.yaml new file mode 100644 index 000000000..4a676b09c --- /dev/null +++ b/deleteExamples/ex47_gin2_pp_netw.yaml @@ -0,0 +1,390 @@ +# Ginan v2 Network UCUD clock and bias estimation example +inputs: + + root_directory: products/ + + atx_files: [ M20.ATX ] # Antenna models for receivers and satellites in ANTEX format + snx_files: [ igs19P2062.snx, tables/igs_metadata_2063.snx ] # SINEX file for meta data and initial position + blq_files: [ OLOAD_GO.BLQ ] # ocean loading is applied + erp_files: [ TUG0R03FIN_20191990000_01D_01D_ERP.ERP ] + + satellite_data: + # nav_files: [ brdm1990.19p ] # broadcast navigation file + sp3_files: [ TUG0R03FIN_20191990000_01D_05M_ORB.SP3 ] # satellite orbit files in SP3 format + # clk_files: [ TUG0R03FIN_20191990000_01D_30S_CLK.CLK ] # Clk files + #bsx_files: [ TUG0R03FIN_20191990000_01D_01D_OSB.BIA ] # daily signal biases files + + egm_files: [ tables/EGM2008.gfc ] # Earth gravity model coefficients file + jpl_files: [ tables/DE436.1950.2050 ] # JPL planetary and lunar ephemerides file + tide_files: [ tables/fes2014b_Cnm-Snm.dat ] + + troposphere: + # orography_files: orography_ell_5x5 + gpt2grid_files: gpt_25.grd + # vmf_files: [ grid5/VMF3_20190718.H00, grid5/VMF3_20190718.H06, grid5/VMF3_20190718.H12, grid5/VMF3_20190718.H18, grid5/VMF3_20190719.H00 ] + + gnss_observations: + + inputs_root: data/ + rnx_inputs: + - "AREG*.rnx" + - "ASCG*.rnx" + - "BAKO*.rnx" + - "BOGT*.rnx" + - "CEDU*.rnx" + - "COCO*.rnx" + - "CPVG*.rnx" + - "CRO1*.rnx" + - "CUSV*.rnx" + - "DARW*.rnx" + - "DGAR*.rnx" + - "DJIG*.rnx" + - "FAIR*.rnx" + - "FFMJ*.rnx" + - "GANP*.rnx" + - "HERS*.rnx" + - "HOB2*.rnx" + - "IISC*.rnx" + - "JFNG*.rnx" + - "KARR*.rnx" + - "KIRI*.rnx" + - "KOKV*.rnx" + - "KZN2*.rnx" + - "LHAZ*.rnx" + - "LMMF*.rnx" + - "MAW1*.rnx" + - "MBAR*.rnx" + - "METG*.rnx" + - "MGUE*.rnx" + - "NICO*.rnx" + - "NKLG*.rnx" + - "OHI3*.rnx" + - "POAL*.rnx" + - "QUIN*.rnx" + - "REYK*.rnx" + - "RGDG*.rnx" + - "SAMO*.rnx" + - "SEY2*.rnx" + - "SOLO*.rnx" + - "STJ2*.rnx" + - "TONG*.rnx" + - "TOPL*.rnx" + - "TOW2*.rnx" + - "USN7*.rnx" + - "VACS*.rnx" + - "ZIM2*.rnx" + +outputs: + + root_directory: / + + trace: + output_stations: true + output_network: true + level: 2 + station_filename: _.TRACE + network_filename: _.TRACE + output_residuals: true + output_residual_chain: true + output_config: true + + ppp_sol: + output: false # (bool) + filename: _.POS + + output_rotation: + period: 1 # 6 + period_units: day # hours + + ionex: + output: false + directory: ./ + filename: AUSG0.I + + ionstec: + output: false + directory: ./ + filename: IONEX.stec + + bias_sinex: + output: true + code_output_interval: 900.0 + directory: ./ + # filename: -.BIA + filename: AUS0GINRAP_00_01D_15M_OSB.BIA + output_rec_bias: false + phase_output_interval: 900.0 + + clocks: + output: true + directory: ./ + filename: AUS0GINRAP_00_01D_30S_CLK.CLK + output_ar_clocks: true + + sinex: + output: true + + #erp: + #output: true + + trop_sinex: + output: true + sources: [KALMAN] + directory: ./ + filename: -.tro + + metadata: + config_description: "ex47" + analysis_agency: GAA + analysis_center: Geoscience Australia + ac_contact: Simon.McClusky@ga.gov.au + analysis_program: Ginan + rinex_comment: "Daily 30-sec observations from IGS stations" + +mongo: + enable: true + database: + output_measurements: true + output_components: true + output_states: true + output_rtcm_messages: true + output_test_stats: true + delete_history: true + uri: mongodb://127.0.0.1:27017 + suffix: "" + +processing_options: + epoch_control: + # start_epoch: 2022-03-12 00:00:00 + # end_epoch: 2022-03-14 00:00:00 + epoch_interval: 30 + #max_epochs: 1440 + wait_next_epoch: 3600 # Wait up to an hour for next data point - When processing RINEX causes PEA to wait a long as need for last epoch to be processed. + wait_all_stations: 1 + + process_modes: + ppp: true + + gnss_general: + elevation_mask: 10 # degrees + error_model: elevation_dependent # {uniform,elevation_dependent} + rec_reference_system: gps + + sys_options: + gps: + process: true + ambiguity_resolution: false + reject_eclipse: false + zero_receiver_dcb: true + # network_amb_pivot: true + code_priorities: [ L1W, L2W, L1C, L2L, L5Q, L2X, L5X ] + gal: + process: true + ambiguity_resolution: false + reject_eclipse: false + zero_receiver_dcb: true + zero_satellite_dcb: true + # network_amb_pivot: true + code_priorities: [ L1C, L5Q, L6C, L1X, L5X, L6X ] + # glo: + # process: true + # ambiguity_resolution: false + # reject_eclipse: true + # code_priorities: [ L1P, L1C, L2P, L2C ] + # qzs: + # process: true + # ambiguity_resolution: false + # reject_eclipse: true + # code_priorities: [ L1C, L2L, L2X ] + + gnss_models: + sat_attitude: + enable: true + sources: [model] + troposphere: + model: gpt2 + ionospheric_component: + common_ionosphere: true # Code and Phase measurment share the same ionosphere + use_if_combo: false + + model_error_checking: + deweighting: + deweight_factor: 10000 + + ambiguities: + #outage_reset_limit: 1 + phase_reject_limit: 2 + reinit_on_all_slips: true # (bool) Any detected slips cause removal and reinitialisation of ambiguities + + ambiguity_resolution: + elevation_mask: 15 + lambda_set_size: 200 + narrow_lane: + mode: lambda_bie # off, bootst, lambda, lambda_alt, lambda_al2, lambda_bie + success_rate_threshold: 0.99 + solution_ratio_threshold: 30 + + filter_options: + outlier_screening: + max_filter_iterations: 50 + max_prefit_removals: 3 + + rts: + enable: false + + minimum_constraints: + enable: true + + once_per_epoch: false # (bool) Perform minimum constraints on a temporary filter and output results once per epoch + + translation: + estimated: [true] + rotation: + estimated: [true] + scale: + estimated: [false] + #sigma: [1] + + inverter: ldlt + + #full_vcv: true + #scale_by_vcv: true + max_filter_iterations: 20 + max_prefit_removals: 3 # (int) Maximum number of measurements to exclude using prefit checks before attempting to filter + outlier_screening: + chi_square_mode: none # (enum) Chi-square test mode - innovation, measurement, state {NONE,INNOVATION,MEASUREMENT,STATE} + chi_square_test: false # (bool) Enable Chi-square test + sigma_check: true # (bool) Enable prefit and postfit sigma check + sigma_threshold: 3.000000 # (float) sigma threshold + w_test: false # (bool) Enable w-test + + #default_station_noise: [1] #constrain all by default + #default_station_noise: [0.01, 0.01, 0.01] #constrain all by default + + station_noise: + global: [0.01, 0.01, 0.01] + +estimation_parameters: + + stations: + error_model: elevation_dependent #uniform elevation_dependent + code_sigmas: [0.4] + phase_sigmas: [0.004] + + global: + pos: + estimated: [true] + sigma: [1] + proc_noise: [0.0] + proc_noise_dt: second + + clk: + estimated: [true] + sigma: [1000] + proc_noise: [100] + + amb: + estimated: [true] + sigma: [1000] + proc_noise: [0] + #proc_noise_dt: day + + trop: + estimated: [true] + sigma: [0.3] + proc_noise: [0.0001] + proc_noise_dt: second + + trop_grads: + estimated: [true] + sigma: [0.03] + proc_noise: [1.0E-6] + proc_noise_dt: second + + ion_stec: + estimated: [true] + sigma: [200] + proc_noise: [20] + + phase_bias: + estimated: [true] + sigma: [20] + proc_noise: [0] + + code_bias: + estimated: [true] + sigma: [20] + proc_noise: [0] + USN7: + clk: + estimated: [false] + code_bias: + estimated: [false] + phase_bias: + estimated: [false] + FFMJ: + L1X: + code_bias: + estimated: [false] + phase_bias: + estimated: [false] + L1W: + phase_bias: + estimated: [false] + L2X: + code_bias: + estimated: [false] + phase_bias: + estimated: [false] + + # L3X: + # code_bias: + # estimated: [false] + L5X: + code_bias: + estimated: [false] + phase_bias: + estimated: [false] + L6X: + code_bias: + estimated: [false] + phase_bias: + estimated: [false] + # L7X: + # code_bias: + # estimated: [false] + # L8X: + # code_bias: + # estimated: [false] + + satellites: + global: + clk: + estimated: [true] + sigma: [1000] + proc_noise: [1] + + phase_bias: + estimated: [true] + sigma: [20] + proc_noise: [0.01] + + code_bias: + estimated: [true] + sigma: [100] + proc_noise: [0] + + SYS_GPS: + L1W: + code_bias: + sigma: [1e-8] + L2W: + code_bias: + sigma: [1e-8] + SYS_GAL: + L1C: + code_bias: + sigma: [1e-8] + L5Q: + code_bias: + sigma: [1e-8] \ No newline at end of file diff --git a/deleteExamples/upload_nav_streams.yaml b/deleteExamples/upload_nav_streams.yaml new file mode 100644 index 000000000..f2a896d0f --- /dev/null +++ b/deleteExamples/upload_nav_streams.yaml @@ -0,0 +1,111 @@ +# Enocode and upload navigation streams + +inputs: + + gnss_observations: + root_stream_url: "https://:@ntrip.data.gnss.ga.gov.au/" + streams: + # - 8GRD00AUS0 + # - AREG00PER0 + # - BNDR00AUS0 + # - BRST00FRA0 + # - BRWN00AUS0 + # - CAMB00IDN0 + # - DUMG00ATA0 + # - FAA100PYF0 + # - HARB00ZAF0 + # - HIKB00NZL0 + # - KIT300UZB0 + # - KZN200RUS0 + # - LHAZ00CHN0 + # - MAO000USA0 + # - MAW100ATA0 + # - OHI300ATA0 + # - OWMG00NZL0 + # - REYK00ISL0 + # - SAVO00BRA0 + # - SCTB00ATA0 + # - SEYG00SYC0 + # - SGPO00USA0 + # - ULAB00MNG0 + # - UTQI00USA0 + # - YELL00CAN0 + + satellite_data: + root_stream_url: "https://:@ntrip.data.gnss.ga.gov.au/" + streams: + - BCEP00BKG0 + +outputs: + streams: + root_url: "http://:@ntrip.test-data.gnss.ga.gov.au/" + labels: + - BCEP + BCEP: + url: "BCEP00ISG0" + messages: + - "1042" + - "1045" + - "1046" + - "1019" + - "1044" + - "1020" + update_interval: 5 + + root_directory: uploadings + + rtcm_nav: + output: true + + rinex_nav: + output: true + + rtcm_obs: + output: false + + rinex_obs: + output: false + + decoded_rtcm: + output: true + filename: Pea_decoded_rtcm.json + + encoded_rtcm: + output: true + filename: Pea_encoded_rtcm.json + +mongo: + enable: true + output_measurements: false + output_states: false + #output_metadata: false + output_rtcm_messages: true + delete_history: false + uri: mongodb://127.0.0.1:27017 + suffix: + +processing_options: + + epoch_control: + max_epochs: 5 + epoch_interval: 5 #seconds + wait_next_epoch: 11 + wait_all_stations: 5 + require_obs: false + + process_modes: + preprocessor: false + + gnss_general: + delete_old_ephemerides: true + sys_options: + gps: + process: true + gal: + process: true + glo: + process: true + bds: + process: true + qzs: + process: true diff --git a/docker/Dockerfile b/docker/Dockerfile index b739d4254..fc378851f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -13,5 +13,5 @@ RUN mkdir -p src/build \ ENV PATH "/ginan/bin:${PATH}" # Here to update gnssanalysis for the pipeline if needed. -RUN pip3 install gnssanalysis==0.0.26 +RUN pip3 install gnssanalysis==0.0.36 diff --git a/docker/run-aux.sh b/docker/run-aux.sh index f95a1044f..3a511b317 100755 --- a/docker/run-aux.sh +++ b/docker/run-aux.sh @@ -16,11 +16,11 @@ function diffex() echo $file if [ ${file: -3} = 'snx' ] then - diffutil -i $file solutions/$file -a $ATOL --passthrough - diffutil -i $file solutions/$file --passthrough + diffutil -i $file ../inputData/solutions/$file -a $ATOL --passthrough + diffutil -i $file ../inputData/solutions/$file --passthrough else - diffutil -i $file solutions/$file -a $ATOL - diffutil -i $file solutions/$file + diffutil -i $file ../inputData/solutions/$file -a $ATOL + diffutil -i $file ../inputData/solutions/$file fi done } @@ -44,7 +44,7 @@ for file; echo %%%%%%%%%% Failure running $PROG on $file: echo %%%%%%%%%% Diffing $file and solutions/$file: echo %%%%%%%%%% - diff -W 300 -y -w --suppress-common-lines solutions/$file $file | head -n 600; + diff -W 300 -y -w --suppress-common-lines ../inputData/solutions/$file $file | head -n 600; echo %%%%%%%%%% echo %%%%%%%%%% ....... echo %%%%%%%%%% diff --git a/docker/run-tests-long.sh b/docker/run-tests-long.sh index 661af5d5e..dbff21645 100755 --- a/docker/run-tests-long.sh +++ b/docker/run-tests-long.sh @@ -13,12 +13,12 @@ mkdir /ginan/db /usr/bin/mongod --dbpath /ginan/db --bind_ip 127.0.0.1 & sleep 5 -/ginan/scripts/download_examples.py -d -p # tag is ignored for products and data tarballs +/ginan/scripts/download_example_input_data.py -d -p # tag is ignored for products and data tarballs # run example tests TEST_NUM=$1 -cd /ginan/examples +cd /ginan/pipelineTests ATOL=1E-4 @@ -32,8 +32,8 @@ case $TEST_NUM in mv pod.out ex31/pod_ic DIR="ex31" results2s3 $DIR - ../scripts/download_examples.py --push $DIR --tag $TAG - ../scripts/download_examples.py $DIR --tag $PEAPOD + ../scripts/download_example_input_data.py --push $DIR --tag $TAG + ../scripts/download_example_input_data.py $DIR --tag $PEAPOD runAllAndDiffOnFailure diffex $DIR/pod_fit/{*.sp3,pod.out} runAllAndDiffOnFailure diffex $DIR/pea/{*etwork*.TRACE,*.snx,*.clk*} # todo: add *.erp runAllAndDiffOnFailure diffex $DIR/pod_ic/{*.sp3,pod.out} diff --git a/docker/run-tests-other.sh b/docker/run-tests-other.sh index a809b5430..53b28a58a 100755 --- a/docker/run-tests-other.sh +++ b/docker/run-tests-other.sh @@ -9,7 +9,7 @@ source $GINAN/docker/tags source $GINAN/docker/run-aux.sh # /ginan/scripts/download_examples.py -d -p # tag is ignored for products and data tarballs -$GINAN/scripts/download_examples.py -d -p -l # tag is ignored for products and data tarballs +$GINAN/scripts/download_example_input_data.py -d -p -l # tag is ignored for products and data tarballs #ensure mongo is running mkdir -p $GINAN/db @@ -19,10 +19,10 @@ sleep 5 # run example tests TEST_NUM=$1 -cd $GINAN/examples +cd $GINAN/pipelineTests ATOL=1E-4 -# to add new examples one needs to add a dictionary to EX_GLOB_DICT so download_examples.py knows which files to push, otherwise it will fail. Also, make sure that example dir name starts with `ex` and has no more than 3 chars following (at least for now). If a group of examples is being created, e.g. ex9* - add an example type to get_example_type and a respective tag to the `tags` file. +# to add new examples one needs to add a dictionary to EX_GLOB_DICT so download_example_input_data.py knows which files to push, otherwise it will fail. Also, make sure that example dir name starts with `ex` and has no more than 3 chars following (at least for now). If a group of examples is being created, e.g. ex9* - add an example type to get_example_type and a respective tag to the `tags` file. case $TEST_NUM in 1) @@ -36,8 +36,8 @@ case $TEST_NUM in make_otl_blq --config ex51_otl_fes2014b_prem.yaml --input loading/sites_coastal50.csv --output $DIR/coastal50_PREM.blq results2s3 $DIR - ../scripts/download_examples.py --push $DIR --tag $TAG - ../scripts/download_examples.py $DIR --tag $OTHER + ../scripts/download_example_input_data.py --push $DIR --tag $TAG + ../scripts/download_example_input_data.py $DIR --tag $OTHER ATOL=1.3E-2 # BRST has diff of 1.23E-2 runAllAndDiffOnFailure diffex $DIR/*.blq diffutil -i $DIR/coastal50_PREM.blq loading/blq/C50_FES2014b_PREM_CE.blq -a $ATOL @@ -49,8 +49,8 @@ case $TEST_NUM in interpolate_loading --grid loading/grids/oceantide.nc --code 'BRO1 50176M003' --location 122.2090 -18.0039 --output $DIR/bro1.blq interpolate_loading --grid loading/grids/oceantide.nc --input loading/sites_coastal50.csv --output $DIR/coastal50.blq results2s3 $DIR - ../scripts/download_examples.py --push $DIR --tag $TAG - ../scripts/download_examples.py $DIR --tag $OTHER + ../scripts/download_example_input_data.py --push $DIR --tag $TAG + ../scripts/download_example_input_data.py $DIR --tag $OTHER ATOL=1E-2 runAllAndDiffOnFailure diffex $DIR/*.blq ;; @@ -60,12 +60,12 @@ case $TEST_NUM in pea --config ex43a_pea_pp_user_gps.yaml -v | tee pea43a.out # TODO which branch is this config in? Need to modify output dir DIR="ex43" # having ex11a or ex11 will download results with PEA TAG, not OTHER, if no TAG provided results2s3 $DIR - ../scripts/download_examples.py $DIR --tag $TAG --push - ../scripts/download_examples.py $DIR --tag $OTHER + ../scripts/download_example_input_data.py $DIR --tag $TAG --push + ../scripts/download_example_input_data.py $DIR --tag $OTHER DIR="ex43a" # having ex11a or ex11 will download results with PEA TAG, not OTHER, if no TAG provided results2s3 $DIR - ../scripts/download_examples.py $DIR --tag $TAG --push - ../scripts/download_examples.py $DIR --tag $OTHER + ../scripts/download_example_input_data.py $DIR --tag $TAG --push + ../scripts/download_example_input_data.py $DIR --tag $OTHER runAllAndDiffOnFailure diffex $DIR/{*snx,!(*Network*).TRACE} DIR="ex43" # having ex11a or ex11 will download results with PEA TAG, not OTHER, if no TAG provided runAllAndDiffOnFailure diffex $DIR/{*snx,!(*Network*).TRACE} @@ -78,16 +78,16 @@ case $TEST_NUM in pea --config ex41_gin2_pp_user.yaml DIR="ex41" results2s3 $DIR - ../scripts/download_examples.py $DIR --tag $TAG --push - ../scripts/download_examples.py $DIR --tag $OTHER + ../scripts/download_example_input_data.py $DIR --tag $TAG --push + ../scripts/download_example_input_data.py $DIR --tag $OTHER runAllAndDiffOnFailure diffex $DIR/*.TRACE ;; 10) pea --config ex42_gin2_pp_user_3freq.yaml DIR="ex42" results2s3 $DIR - ../scripts/download_examples.py $DIR --tag $TAG --push - ../scripts/download_examples.py $DIR --tag $OTHER + ../scripts/download_example_input_data.py $DIR --tag $TAG --push + ../scripts/download_example_input_data.py $DIR --tag $OTHER runAllAndDiffOnFailure diffex $DIR/*.TRACE ;; 8) @@ -95,8 +95,8 @@ case $TEST_NUM in pea -dex44 -l5 --config ex11_pea_pp_user_gps.yaml -v | tee pea44.out DIR="ex44" results2s3 $DIR - ../scripts/download_examples.py $DIR --tag $TAG --push - ../scripts/download_examples.py $DIR --tag $OTHER + ../scripts/download_example_input_data.py $DIR --tag $TAG --push + ../scripts/download_example_input_data.py $DIR --tag $OTHER #diffex $DIR/{*snx,*ALIC*.TRACE} # no need to check results - this is done in ex11 count=`grep "STARTING SPP LSQ" $DIR/*ALIC*.TRACE | wc -l` if [ $count -eq 0 ] diff --git a/docker/run-tests-pea.sh b/docker/run-tests-pea.sh index ae7fe68db..8492de3f5 100755 --- a/docker/run-tests-pea.sh +++ b/docker/run-tests-pea.sh @@ -6,7 +6,7 @@ set -euo pipefail source /ginan/docker/tags # PEA's tag as $PEA source /ginan/docker/run-aux.sh -/ginan/scripts/download_examples.py -d -p # tag is ignored for products and data tarballs +/ginan/scripts/download_example_input_data.py -d -p # tag is ignored for products and data tarballs # run example tests TEST_NUM=$1 @@ -18,7 +18,7 @@ mkdir /ginan/db /usr/bin/mongod --dbpath /ginan/db --bind_ip 127.0.0.1 & sleep 5 -cd /ginan/examples +cd /ginan/pipelineTests ATOL=1E-4 @@ -28,32 +28,32 @@ case $TEST_NUM in pea --config ex11_pea_pp_user_gps.yaml -v | tee pea11.out DIR="ex11" results2s3 $DIR - ../scripts/download_examples.py $DIR --tag $TAG --push - ../scripts/download_examples.py $DIR --tag $PEA + ../scripts/download_example_input_data.py $DIR --tag $TAG --push + ../scripts/download_example_input_data.py $DIR --tag $PEA runAllAndDiffOnFailure diffex $DIR/{*snx,!(*Network*).TRACE*} ;; 12) pea --config ex12_pea_pp_user_gnss.yaml | tee pea12.out DIR="ex12" results2s3 $DIR - ../scripts/download_examples.py $DIR --tag $TAG --push - ../scripts/download_examples.py $DIR --tag $PEA + ../scripts/download_example_input_data.py $DIR --tag $TAG --push + ../scripts/download_example_input_data.py $DIR --tag $PEA runAllAndDiffOnFailure diffex $DIR/{*snx,!(*Network*).TRACE} ;; 13) pea --config ex13_pea_pp_user_gps_sf.yaml | tee pea13.out DIR="ex13" results2s3 $DIR - ../scripts/download_examples.py $DIR --tag $TAG --push - ../scripts/download_examples.py $DIR --tag $PEA + ../scripts/download_example_input_data.py $DIR --tag $TAG --push + ../scripts/download_example_input_data.py $DIR --tag $PEA runAllAndDiffOnFailure diffex $DIR/{*snx,!(*Network*).TRACE} ;; 14) pea --config ex14_pea_pp_user_gnss_ar.yaml | tee pea14.out # ex14 run 5 DIR="ex14" results2s3 $DIR - ../scripts/download_examples.py $DIR --tag $TAG --push - ../scripts/download_examples.py $DIR --tag $PEA + ../scripts/download_example_input_data.py $DIR --tag $TAG --push + ../scripts/download_example_input_data.py $DIR --tag $PEA runAllAndDiffOnFailure diffex $DIR/{*snx,!(*Network*).TRACE} ;; 15) @@ -61,40 +61,40 @@ case $TEST_NUM in #pea --config ex15_pea_rt_user_gnss_ar.yaml | tee pea15.out #DIR="ex15" #results2s3 $DIR - #../scripts/download_examples.py $DIR --tag $TAG --push - #../scripts/download_examples.py $DIR --tag $PEA + #../scripts/download_example_input_data.py $DIR --tag $TAG --push + #../scripts/download_example_input_data.py $DIR --tag $PEA #runAllAndDiffOnFailure diffex $DIR/{*snx,!(*Network*).TRACE} ;; 16) pea --config ex16_pea_pp_ionosphere.yaml | tee pea16.out DIR="ex16" results2s3 $DIR - ../scripts/download_examples.py $DIR --tag $TAG --push - ../scripts/download_examples.py $DIR --tag $PEA + ../scripts/download_example_input_data.py $DIR --tag $TAG --push + ../scripts/download_example_input_data.py $DIR --tag $PEA runAllAndDiffOnFailure diffex $DIR/{*.INX*,*Network*.TRACE,*stec} ;; 17) pea --config ex17_pea_pp_netw_gnss_ar.yaml | tee pea17.out DIR="ex17" results2s3 $DIR - ../scripts/download_examples.py $DIR --tag $TAG --push - ../scripts/download_examples.py $DIR --tag $PEA + ../scripts/download_example_input_data.py $DIR --tag $TAG --push + ../scripts/download_example_input_data.py $DIR --tag $PEA runAllAndDiffOnFailure diffex $DIR/{*snx,*Network*.TRACE} ;; 41) pea --config ex41_gin2_pp_user.yaml -v | tee pea41.out DIR="ex41" results2s3 $DIR - ../scripts/download_examples.py $DIR --tag $TAG --push - ../scripts/download_examples.py $DIR --tag $PEA + ../scripts/download_example_input_data.py $DIR --tag $TAG --push + ../scripts/download_example_input_data.py $DIR --tag $PEA runAllAndDiffOnFailure diffex $DIR/{*.TRACE,*.TRACE} ;; 2) pea --config ex02_fit_sp3_pseudoobs.yaml -v | tee pea02.out DIR="ex02" results2s3 $DIR - ../scripts/download_examples.py $DIR --tag $TAG --push - ../scripts/download_examples.py $DIR --tag $PEA + ../scripts/download_example_input_data.py $DIR --tag $TAG --push + ../scripts/download_example_input_data.py $DIR --tag $PEA runAllAndDiffOnFailure diffex $DIR/{*.TRACE,*.TRACE} ;; esac diff --git a/docker/run-tests-pod.sh b/docker/run-tests-pod.sh index e4897eaa3..0eca9479a 100755 --- a/docker/run-tests-pod.sh +++ b/docker/run-tests-pod.sh @@ -6,12 +6,12 @@ set -euo pipefail source /ginan/docker/tags source /ginan/docker/run-aux.sh -/ginan/scripts/download_examples.py -d -p # tag is ignored for products and data tarballs +/ginan/scripts/download_example_input_data.py -d -p # tag is ignored for products and data tarballs # run example tests TEST_NUM=$1 -cd /ginan/examples +cd /ginan/pipelineTests ATOL=1E-4 @@ -21,8 +21,8 @@ case $TEST_NUM in mv pod21.out ex21/pod.out DIR="ex21" results2s3 $DIR - ../scripts/download_examples.py --push $DIR --tag $TAG - ../scripts/download_examples.py $DIR --tag $POD + ../scripts/download_example_input_data.py --push $DIR --tag $TAG + ../scripts/download_example_input_data.py $DIR --tag $POD diffex $DIR/{*.sp3,pod.out} ;; 2g) # ex22 GPS @@ -30,8 +30,8 @@ case $TEST_NUM in mv pod22g.out ex22g/pod.out DIR="ex22g" results2s3 $DIR - ../scripts/download_examples.py --push $DIR --tag $TAG - ../scripts/download_examples.py $DIR --tag $POD + ../scripts/download_example_input_data.py --push $DIR --tag $TAG + ../scripts/download_example_input_data.py $DIR --tag $POD diffex $DIR/{*.sp3,pod.out} ;; 2r) # ex22 GLONASS @@ -39,8 +39,8 @@ case $TEST_NUM in mv pod22r.out ex22r/pod.out DIR="ex22r" results2s3 $DIR - ../scripts/download_examples.py --push $DIR --tag $TAG - ../scripts/download_examples.py $DIR --tag $POD + ../scripts/download_example_input_data.py --push $DIR --tag $TAG + ../scripts/download_example_input_data.py $DIR --tag $POD diffex $DIR/{*.sp3,pod.out} ;; 2e) # ex22 GALILEO @@ -48,8 +48,8 @@ case $TEST_NUM in mv pod22e.out ex22e/pod.out DIR="ex22e" results2s3 $DIR - ../scripts/download_examples.py --push $DIR --tag $TAG - ../scripts/download_examples.py $DIR --tag $POD + ../scripts/download_example_input_data.py --push $DIR --tag $TAG + ../scripts/download_example_input_data.py $DIR --tag $POD diffex $DIR/{*.sp3,pod.out} ;; 2c) # ex22 BEIDOU @@ -57,8 +57,8 @@ case $TEST_NUM in mv pod22c.out ex22c/pod.out DIR="ex22c" results2s3 $DIR - ../scripts/download_examples.py --push $DIR --tag $TAG - ../scripts/download_examples.py $DIR --tag $POD + ../scripts/download_example_input_data.py --push $DIR --tag $TAG + ../scripts/download_example_input_data.py $DIR --tag $POD diffex $DIR/{*.sp3,pod.out} ;; 2j) # ex22 QZSS @@ -66,8 +66,8 @@ case $TEST_NUM in mv pod22j.out ex22j/pod.out DIR="ex22j" results2s3 $DIR - ../scripts/download_examples.py --push $DIR --tag $TAG - ../scripts/download_examples.py $DIR --tag $POD + ../scripts/download_example_input_data.py --push $DIR --tag $TAG + ../scripts/download_example_input_data.py $DIR --tag $POD diffex $DIR/{*.sp3,pod.out} ;; 3) @@ -75,8 +75,8 @@ case $TEST_NUM in mv pod23.out ex23/pod.out DIR="ex23" results2s3 $DIR - ../scripts/download_examples.py --push $DIR --tag $TAG - ../scripts/download_examples.py $DIR --tag $POD + ../scripts/download_example_input_data.py --push $DIR --tag $TAG + ../scripts/download_example_input_data.py $DIR --tag $POD diffex $DIR/{*.sp3,pod.out} ;; 4) @@ -84,8 +84,8 @@ case $TEST_NUM in mv pod24.out ex24/pod.out DIR="ex24" results2s3 $DIR - ../scripts/download_examples.py --push $DIR --tag $TAG - ../scripts/download_examples.py $DIR --tag $POD + ../scripts/download_example_input_data.py --push $DIR --tag $TAG + ../scripts/download_example_input_data.py $DIR --tag $POD diffex $DIR/{*.sp3,pod.out} ;; 5) @@ -93,8 +93,8 @@ case $TEST_NUM in mv pod25.out ex25/pod.out DIR="ex25" results2s3 $DIR - ../scripts/download_examples.py --push $DIR --tag $TAG - ../scripts/download_examples.py $DIR --tag $POD + ../scripts/download_example_input_data.py --push $DIR --tag $TAG + ../scripts/download_example_input_data.py $DIR --tag $POD diffex $DIR/{*.sp3,pod.out} ;; 6) @@ -102,8 +102,8 @@ case $TEST_NUM in mv pod26.out ex26/pod.out DIR="ex26" results2s3 $DIR - ../scripts/download_examples.py --push $DIR --tag $TAG - ../scripts/download_examples.py $DIR --tag $POD + ../scripts/download_example_input_data.py --push $DIR --tag $TAG + ../scripts/download_example_input_data.py $DIR --tag $POD diffex $DIR/{*.sp3,pod.out} ;; esac diff --git a/docker/tags b/docker/tags index 861dd3ff0..4547b19d7 100644 --- a/docker/tags +++ b/docker/tags @@ -1,4 +1,4 @@ -PEA="378e30e" +PEA="232ec68" POD="a03f60a" -PEAPOD="22d80b6" +PEAPOD="fa2b375" OTHER="9564eaa" diff --git a/exampleConfigs/README.md b/exampleConfigs/README.md new file mode 100644 index 000000000..bdc5ecf3a --- /dev/null +++ b/exampleConfigs/README.md @@ -0,0 +1,37 @@ +The folder contains example Ginan configuration files that showcase the various +capabilities of the Ginan software. +The configuration files use the industry standard Yet Another Markup Language +(yaml)format. + +Ginan is capable of accepting a single yaml file or multiple yaml files to +achieve the configuration and processing outcome required. + +Currently included examples configurations with this release include: + +1) ex201.yaml +Post Processed Static Receiver positioning usng dual frequency GPS and GAL +observations, using IGS REPRO3 final orbits clocks and biases. + +2) ex202.yaml +Real-Time Static Receiver positioning usng dual frequency GPS and GAL +observations, using the BKG SSRA00BKG0 correction stream + +3) ex203.yaml +Post processed Real-Time Kinemeatic Receiver (RTK) positioning using tri +frequencyGPS, GAL and BDS recorded RTCM3 observation and correction streams. +The recorded correction stream is from SSRA03IGS0. + +4) ex204.yaml +Post processed Network Clock and Bias estimation using dual frequency +L1C/L1W/L2W GPS observations, estimating L1W/L2W clocks and L1C bias. + +5) ex205.yaml +Post processed Network Orbits and Clock estimation using dual frequency +L1C/L2W ionosphere free linearly combined observations. + +6) ex02_fit_sp3_pseudoobs.yaml +Orbit fitting from Pseudo Observations using 3-day fit the IGS REPRO3 +final ECEF (ITRF) orbits in SP3 format. + +7) record_streams.yaml +Record RTCM Streams to Files diff --git a/exampleConfigs/brdc2sp3.yml b/exampleConfigs/brdc2sp3.yml new file mode 100644 index 000000000..e083ada1d --- /dev/null +++ b/exampleConfigs/brdc2sp3.yml @@ -0,0 +1,55 @@ + +inputs: + + root_directory: products/ + + atx_files: [ igs14_2045_plus.atx ] # Antenna models for receivers and satellites in ANTEX format + snx_files: [ igs19P2062.snx, tables/igs_satellite_metadata_2203_plus.snx ] # SINEX file for meta data and initial position + + satellite_data: + nav_files: [ brdm1990.19p ] # broadcast navigation file + +outputs: + + root_directory: outputs// + + sp3: + output: true + output_interval: 900 + output_velocities: true + #output_inertial: true + + metadata: + config_description: brdc2sp3 + analysis_agency: GAA + analysis_center: Geoscience Australia + analysis_program: AUSACS + rinex_comment: AUSNETWORK1 + +processing_options: + + epoch_control: + start_epoch: 2019-07-18 00:00:00 + end_epoch: 2019-07-19 00:00:00 + epoch_interval: 900 #seconds + + process_modes: + preprocessor: false + + gnss_general: + + elevation_mask: 7 #degrees + + raim: true + + max_gdop: 30 + sys_options: + gps: { process: true} + gal: { process: true} + glo: { process: true} + bds: { process: true} + + gnss_models: + sat_attitude: + sources: [model] + diff --git a/exampleConfigs/data b/exampleConfigs/data new file mode 120000 index 000000000..85479075e --- /dev/null +++ b/exampleConfigs/data @@ -0,0 +1 @@ +../inputData/data \ No newline at end of file diff --git a/exampleConfigs/dynamic_user_ppp.yaml b/exampleConfigs/dynamic_user_ppp.yaml new file mode 100644 index 000000000..3d0d8532a --- /dev/null +++ b/exampleConfigs/dynamic_user_ppp.yaml @@ -0,0 +1,179 @@ + +inputs: + root_directory: products/ + atx_files: [ igs20.atx ] + blq_files: [ OLOAD_GO.BLQ ] + snx_files: [ meta_gather_20210721.snx, tables/igs_satellite_metadata_2203_plus.snx ] + egm_files: [ tables/EGM2008.gfc ] + tide_files: [ tables/fes2014b_Cnm-Snm.dat ] + + satellite_data: + inputs_root: data/carData/ + rtcm_inputs: + - BCEP00BKG0.rtcm3 + - SSRA03IGS0.rtcm3 + + troposphere: + gpt2grid_files: gpt_25.grd + + gnss_observations: + inputs_root: data/carData/ + rtcm_inputs: + - CAR1.rtcm3 + - CAR2.rtcm3 + +outputs: + root_directory: outputs// + trace: + output_network: true + output_stations: true + output_residuals: true + output_config: true + level: 1 + + gpx: + output: true + +processing_options: + process_modes: + ppp: true + + ssr_inputs: + ssr_antenna_offset: APC + validity_interval_factor: 18.0 + + epoch_control: + epoch_interval: 1 + epoch_tolerance: 0.5 # 1Hz RTCM data rate + wait_next_epoch: 1 + wait_all_stations: 1 + assign_closest_epoch: true + # simulate_real_time: true + + gnss_general: + elevation_mask: 10 + rec_reference_system: gps + raim: true + max_gdop: 30 + + sys_options: + gps: + process: true + ambiguity_resolution: true + zero_receiver_dcb: true + clock_codes: [ L1C, L2W ] + code_priorities: [ L1C, L2W, L5Q ] + gal: + process: true + ambiguity_resolution: true + zero_receiver_dcb: true + code_priorities: [ L1C, L5Q, L1X, L5X, L7Q ] + bds: + process: true + ambiguity_resolution: true + zero_receiver_dcb: true + reject_eclipse: true + code_priorities: [ L2I, L6I ] + + + gnss_models: + troposphere: + model: gpt2 + + ionospheric_component: + automatic_def_codes: false + common_ionosphere: true + use_if_combo: true + + sat_pos: + sources: [ssr] + + model_error_checking: + ambiguities: + outage_reset_limit: 100 # Bug in V2.0.0 alpha + phase_reject_limit: 10 + reinit_on_all_slips: true + + deweighting: + deweight_factor: 10000 + + ambiguity_resolution: + elevation_mask: 10 + max_rounding_iterations: 3 + + wide_lane: + mode: iter_rnd + success_rate_threshold: 0.9999 + solution_ratio_threshold: 3 + process_noise_sat: 0.00001 + process_noise_rec: 0.0001 + + narrow_lane: + mode: lambda_bie + success_rate_threshold: 0.9999 + solution_ratio_threshold: 3 + + filter_options: + outlier_screening: + max_filter_iterations: 20 + max_prefit_removals: 2 + + rts: + enable: true + + station_chunking: + enable: true + +estimation_parameters: + stations: + error_model: elevation_dependent + code_sigmas: [0.35] + phase_sigmas: [0.0035] + + pos: # Position + estimated: [true] + sigma: [5] + proc_noise: [0] # Max speed in m/s (Highway speeds 100km/hr = 28 m/s) + proc_noise_dt: second + + pos_rate: # Velocity + estimated: [true] + sigma: [0.1] + proc_noise: [1] # Max acceleration in m/s2 - higher value equals more smoothing + + clk: # Clocks + estimated: [true] + sigma: [100] + proc_noise: [10] + + amb: # Integer phase ambiguities + estimated: [true] + sigma: [1000] + proc_noise: [0] + + trop: # Zenith wet delay + estimated: [true] + sigma: [0.3] + proc_noise: [0.0001] + proc_noise_dt: second + + trop_grads: # Azimuthal components of tropospheric mapping functions + estimated: [true] + sigma: [0.02] + proc_noise: [1.0E-6] + proc_noise_dt: second + + ion_stec: # Ionosphere + estimated: [true] + sigma: [100] + proc_noise: [-1] + + # phase_bias: # Phase bias + # estimated: [true] + # sigma: [1000] + # proc_noise: [0.0001] + + code_bias: # Code bias + estimated: [true] + sigma: [10] + proc_noise: [0] diff --git a/exampleConfigs/dynamic_user_rtk.yaml b/exampleConfigs/dynamic_user_rtk.yaml new file mode 100644 index 000000000..16ddd0e01 --- /dev/null +++ b/exampleConfigs/dynamic_user_rtk.yaml @@ -0,0 +1,187 @@ + +inputs: + root_directory: products/ + atx_files: [ igs20.atx ] + blq_files: [ OLOAD_GO.BLQ ] + snx_files: [ meta_gather_20210721.snx, tables/igs_satellite_metadata_2219_plus.snx ] + egm_files: [ tables/EGM2008.gfc ] + tide_files: [ tables/fes2014b_Cnm-Snm.dat ] + + satellite_data: + inputs_root: data/carData/ + rtcm_inputs: + - BCEP00BKG0.rtcm3 + - SSRA03IGS0.rtcm3 + + troposphere: + gpt2grid_files: gpt_25.grd + + gnss_observations: + inputs_root: data/carData/ + rtcm_inputs: + - CAR1.rtcm3 + - MOBS.rtcm3 + +outputs: + root_directory: outputs// + trace: + output_network: true + output_stations: true + output_residuals: true + output_config: true + level: 3 + + gpx: + output: true + +processing_options: + process_modes: + ppp: true + + ssr_inputs: + ssr_antenna_offset: APC + validity_interval_factor: 18.0 + + epoch_control: + epoch_interval: 1 + epoch_tolerance: 0.5 # 1Hz RTCM data rate + wait_next_epoch: 1 + wait_all_stations: 1 + assign_closest_epoch: true + simulate_real_time: true + + gnss_general: + elevation_mask: 10 + rec_reference_system: gps + raim: true + max_gdop: 30 + + sys_options: + gps: + process: true + ambiguity_resolution: true + zero_receiver_dcb: true + clock_codes: [ L1C, L2W ] + code_priorities: [ L1C, L2W, L5Q ] + gal: + process: true + ambiguity_resolution: true + zero_receiver_dcb: true + code_priorities: [ L1C, L5Q, L1X, L5X, L7Q ] + bds: + process: true + ambiguity_resolution: true + zero_receiver_dcb: true + reject_eclipse: true + code_priorities: [ L2I, L6I ] + common_atmosphere: true + + gnss_models: + troposphere: + model: gpt2 + + ionospheric_component: + automatic_def_codes: false + common_ionosphere: true + use_if_combo: true + + model_error_checking: + ambiguities: + outage_reset_limit: 100 + phase_reject_limit: 10 + reinit_on_all_slips: true + + deweighting: + deweight_factor: 10000 + + ambiguity_resolution: + elevation_mask: 10 + max_rounding_iterations: 3 + + wide_lane: + mode: iter_rnd + success_rate_threshold: 0.9999 + solution_ratio_threshold: 3 + process_noise_sat: 0.00001 + process_noise_rec: 0.0001 + + narrow_lane: + mode: lambda_bie + success_rate_threshold: 0.9999 + solution_ratio_threshold: 3 + + filter_options: + outlier_screening: + max_filter_iterations: 20 + max_prefit_removals: 2 + + rts: + enable: true + + +station_options: + MOBS: + aliases: [ base_station ] + +estimation_parameters: + stations: + error_model: elevation_dependent + code_sigmas: [0.35] + phase_sigmas: [0.0035] + + global: + + pos: # Position + estimated: [true] + sigma: [5] + proc_noise: [0] # Max speed in m/s (Highway speeds 100km/hr = 28 m/s) + proc_noise_dt: second + + pos_rate: # Velocity + estimated: [true] + sigma: [0.1] + proc_noise: [1] # Max acceleration in m/s2 - higher value equals more smoothing + + clk: # Clocks + estimated: [true] + sigma: [100] + proc_noise: [10] + + amb: # Integer phase ambiguities + estimated: [true] + sigma: [1000] + proc_noise: [0] + + trop: # Zenith wet delay + estimated: [true] + sigma: [0.3] + proc_noise: [0.0001] + proc_noise_dt: second + + trop_grads: # Azimuthal components of tropospheric mapping functions + estimated: [true] + sigma: [0.02] + proc_noise: [1.0E-6] + proc_noise_dt: second + + ion_stec: # Ionosphere + estimated: [true] + sigma: [100] + proc_noise: [-1] + + # phase_bias: # Phase bias + # estimated: [true] + # sigma: [1000] + # proc_noise: [0.0001] + + code_bias: # Code bias + estimated: [true] + sigma: [10] + proc_noise: [0] + + base_station: + pos: + estimated: [false] + + pos_rate: + estimated: [false] diff --git a/exampleConfigs/ex02_fit_sp3_pseudoobs.yaml b/exampleConfigs/ex02_fit_sp3_pseudoobs.yaml new file mode 100644 index 000000000..6c44d7574 --- /dev/null +++ b/exampleConfigs/ex02_fit_sp3_pseudoobs.yaml @@ -0,0 +1,177 @@ + +inputs: + + root_directory: products/ + + atx_files: [ igs20.atx ] + snx_files: [ IGS1R03SNX_20191950000_07D_07D_CRD.SNX, tables/igs_satellite_metadata_2203_plus.snx ] + blq_files: [ OLOAD_GO.BLQ ] + erp_files: [ igs96p02.erp ] + egm_files: [ tables/EGM2008.gfc ] # Earth gravity model coefficients file + jpl_files: [ tables/DE436.1950.2050 ] # JPL planetary and lunar ephemerides file + tide_files: [ tables/fes2014b_Cnm-Snm.dat ] + + satellite_data: + sp3_files: + - IGS2R03FIN_20191980000_01D_05M_ORB.SP3 + - IGS2R03FIN_20191990000_01D_05M_ORB.SP3 + - IGS2R03FIN_20192000000_01D_05M_ORB.SP3 + + + pseudo_observations: + inputs_root: "products/" + sp3_inputs: + - IGS2R03FIN_20191980000_01D_05M_ORB.SP3 + - IGS2R03FIN_20191990000_01D_05M_ORB.SP3 + - IGS2R03FIN_20192000000_01D_05M_ORB.SP3 + + +outputs: + + root_directory: outputs// + + trace: + output_stations: true + output_network: true + level: 3 + directory: ./ + station_filename: -.TRACE + network_filename: .TRACE + output_residuals: true + output_config: true + + orbit_ics: + output: true + + metadata: + config_description: "ex02" + +mongo: + enable: true + output_measurements: true + output_states: true + delete_history: true + predict_states: true + prediction_interval: 5 + interval_units: mins + reverse_prediction_duration: 70 + duration_units: hours + +processing_options: + + epoch_control: + start_epoch: 2019-07-17 01:00:00 + end_epoch: 2019-07-19 23:00:00 + epoch_interval: 300 #seconds + + process_modes: + preprocessor: false + spp: false + ppp: true + + gnss_general: + sys_options: + gps: + process: true + gal: + #process: true + glo: + #process: true + + orbit_propagation: + central_force: true + planetary_perturbation: true + indirect_J2: true + egm_field: true + solid_earth_tide: true + ocean_tide: true + general_relativity: true + pole_tide_ocean: true + pole_tide_solid: true + solar_pressure_radiation: true + antenna_thrust: true + empirical_dyb: true + albedo: true + + sat_mass: 1000 + sat_area: 15 + srp_cr: 1.50 + degree_max: 15 + + itrf_pseudoobs: true + + filter_options: + #simulate_filter_only: true + + outlier_screening: + sigma_check: true # (bool) Enable prefit and postfit sigma check + chi_square_mode: state # (enum) Chi-square test mode - innovation, measurement, state {none,innovation,measurement,state} + chi_square_test: false # (bool) Enable Chi-square test + max_filter_iterations: 5 + max_prefit_removals: 3 # (int) Maximum number of measurements to exclude using prefit checks before attempting to filter + sigma_threshold: 250.0000 # (float) sigma threshold + w_test: false # (bool) Enable w-test + + rts: + enable: true + + model_error_checking: + deweighting: + deweight_factor: 1000.0 # (float) Factor to downweight the variance of measurements with statistically detected errors + deweight_on_state_error: true # (bool) Any "state" errors cause deweighting of all measurements that reference the state + + +estimation_parameters: + + satellites: + + pseudo_sigmas: [1] + + #global: + G02: + orbit: + estimated: [true] + sigma: [1, 1, 1, 1000] + proc_noise: [0] + + srp_dyb_0: + comment: [constant] + estimated: [true, true, true] + sigma: [1e-5, 1e-5, 1e-5] + proc_noise: [0] + + srp_dyb_1c: + comment: [1 per rev cos] + estimated: [true, true, true] + sigma: [1e-6, 1e-6, 1e-6] + proc_noise: [0] + + srp_dyb_1s: + comment: [1 per rev sin] + estimated: [true, true, true] + sigma: [1e-6, 1e-6, 1e-6] + proc_noise: [0] + + srp_dyb_2c: + comment: [2 per rev cos] + estimated: [true, false, false] + sigma: [1e-6, 1e-6, 1e-6] + proc_noise: [0] + + srp_dyb_2s: + comment: [2 per rev sin] + estimated: [true, false, false] + sigma: [1e-6, 1e-6, 1e-6] + proc_noise: [0] + + srp_dyb_4c: + comment: [4 per rev cos] + estimated: [true, false, false] + sigma: [1e-7, 1e-7, 1e-7] + proc_noise: [0] + + srp_dyb_4s: + comment: [4 per rev sin] + estimated: [true, false, false] + sigma: [1e-7, 1e-7, 1e-7] + proc_noise: [0] diff --git a/exampleConfigs/ex201.yaml b/exampleConfigs/ex201.yaml new file mode 100644 index 000000000..44022ee7f --- /dev/null +++ b/exampleConfigs/ex201.yaml @@ -0,0 +1,11 @@ + +inputs: + include_yamls: + - tiny_post_network.yaml + - static_user.yaml + - mongo_outputs.yaml + - example_inputs.yaml + +outputs: + metadata: + config_description: "ex201" diff --git a/exampleConfigs/ex202.yaml b/exampleConfigs/ex202.yaml new file mode 100644 index 000000000..4149a4e41 --- /dev/null +++ b/exampleConfigs/ex202.yaml @@ -0,0 +1,11 @@ + +inputs: + include_yamls: + - tiny_realtime_network.yaml + - static_user.yaml + - mongo_outputs.yaml + - example_inputs.yaml + +outputs: + metadata: + config_description: "ex202" diff --git a/exampleConfigs/ex203.yaml b/exampleConfigs/ex203.yaml new file mode 100644 index 000000000..b6b3de631 --- /dev/null +++ b/exampleConfigs/ex203.yaml @@ -0,0 +1,9 @@ + +inputs: + include_yamls: + - dynamic_user_rtk.yaml + - mongo_outputs.yaml + +outputs: + metadata: + config_description: "ex203" diff --git a/exampleConfigs/ex204.yaml b/exampleConfigs/ex204.yaml new file mode 100644 index 000000000..70448222b --- /dev/null +++ b/exampleConfigs/ex204.yaml @@ -0,0 +1,11 @@ + +inputs: + include_yamls: + - large_post_network.yaml + - network_clocks_and_biases.yaml + - mongo_outputs.yaml + - example_inputs.yaml + +outputs: + metadata: + config_description: "ex204" diff --git a/exampleConfigs/ex205.yaml b/exampleConfigs/ex205.yaml new file mode 100644 index 000000000..33cbe4de0 --- /dev/null +++ b/exampleConfigs/ex205.yaml @@ -0,0 +1,11 @@ + +inputs: + include_yamls: + - large_post_network.yaml + - example_inputs.yaml + - network_orbits_clocks_and_biases.yaml + - mongo_outputs.yaml + +outputs: + metadata: + config_description: "ex205" diff --git a/exampleConfigs/ex206.yaml b/exampleConfigs/ex206.yaml new file mode 100644 index 000000000..b28842631 --- /dev/null +++ b/exampleConfigs/ex206.yaml @@ -0,0 +1,9 @@ + +inputs: + include_yamls: + - dynamic_user_ppp.yaml + - mongo_outputs.yaml + +outputs: + metadata: + config_description: "ex206" diff --git a/exampleConfigs/ex42_gin2_pp_user_3freq.yaml b/exampleConfigs/ex42_gin2_pp_user_3freq.yaml new file mode 100644 index 000000000..230aa4753 --- /dev/null +++ b/exampleConfigs/ex42_gin2_pp_user_3freq.yaml @@ -0,0 +1,169 @@ + +inputs: + + root_directory: products/ + + atx_files: [ M20.ATX ] # Antenna models for receivers and satellites in ANTEX format + snx_files: [ igs19P2062.snx, tables/igs_metadata_2063.snx ] # SINEX file for meta data and initial position + blq_files: [ OLOAD_GO.BLQ ] # ocean loading is applied + erp_files: [ TUG0R03FIN_20191990000_01D_01D_ERP.ERP ] + + satellite_data: + # nav_files: [ brdm1990.19p ] # broadcast navigation file + sp3_files: [ TUG0R03FIN_20191990000_01D_05M_ORB.SP3 ] # satellite orbit files in SP3 format + clk_files: [ TUG0R03FIN_20191990000_01D_30S_CLK.CLK ] # Clk files + bsx_files: [ TUG0R03FIN_20191990000_01D_01D_OSB.BIA ] # daily signal biases files + + egm_files: [ tables/EGM2008.gfc ] # Earth gravity model coefficients file + jpl_files: [ tables/DE436.1950.2050 ] # JPL planetary and lunar ephemerides file + tide_files: [ tables/fes2014b_Cnm-Snm.dat ] + + gnss_observations: + inputs_root: data/ + rnx_inputs: + - AGGO00ARG_R_20191990000_01D_30S_MO.rnx + - ALIC00AUS_R_20191990000_01D_30S_MO.rnx + - BAKO00IDN_R_20191990000_01D_30S_MO.rnx + - COCO00AUS_R_20191990000_01D_30S_MO.rnx + - DARW00AUS_R_20191990000_01D_30S_MO.rnx + + + troposphere: + gpt2grid_files: gpt_25.grd + +outputs: + + root_directory: outputs// + + trace: + output_stations: true + output_network: true + level: 2 + station_filename: _.TRACE + network_filename: _.TRACE + output_residuals: true + output_residual_chain: true + + ppp_sol: + output: true + filename: _.POS + + output_rotation: + period: 3 + period_units: hours + + metadata: + config_description: "ex42" + +processing_options: + epoch_control: + # start_epoch: 2022-03-12 00:00:00 + # end_epoch: 2022-03-14 00:00:00 + epoch_interval: 30 + max_epochs: 360 + + process_modes: + ppp: true + + gnss_general: + elevation_mask: 10 #degrees + sys_options: + gps: + process: true + ambiguity_resolution: true + reject_eclipse: true + code_priorities: [ L1C, L2W ] + gal: + process: true + ambiguity_resolution: false + reject_eclipse: true + code_priorities: [ L1C, L5Q, L1X, L5X ] + # glo: + # process: true + # ambiguity_resolution: false + # reject_eclipse: true + # code_priorities: [ L1P, L1C, L2P, L2C ] + # qzs: + # process: true + # ambiguity_resolution: false + # reject_eclipse: true + # code_priorities: [ L1C, L2L, L2X ] + + gnss_models: + sat_attitude: + enable: false + source: nominal + troposphere: + model: gpt2 + ionospheric_component: + common_ionosphere: true + use_if_combo: false + + # model_error_checking: + # cycle_slips: + # detect: + # lli: false + + ambiguity_resolution: + elevation_mask: 15 + lambda_set_size: 200 + narrow_lane: + mode: lambda_bie + success_rate_threshold: 0.99 + solution_ratio_threshold: 30 + + filter_options: + outlier_screening: + max_filter_iterations: 5 + max_prefit_removals: 3 + +estimation_parameters: + + stations: + error_model: elevation_dependent + code_sigmas: [0.3] + phase_sigmas: [0.003] + + pos: + estimated: [true] + sigma: [100.0] + proc_noise: [100.0] + proc_noise_dt: second + + clk: + estimated: [true] + sigma: [1000] + proc_noise: [100] + + amb: + estimated: [true] + sigma: [60.0] + proc_noise: [0] + #proc_noise_dt: day + + trop: + estimated: [true] + sigma: [0.1] + proc_noise: [0.0001] + proc_noise_dt: second + + trop_grads: + estimated: [true] + sigma: [0.02] + proc_noise: [1.0E-6] + proc_noise_dt: second + + ion_stec: + estimated: [true] + sigma: [200] + proc_noise: [0.1] + + phase_bias: + estimated: [true] + sigma: [10] + proc_noise: [0] + + code_bias: + estimated: [true] + sigma: [100.0] + proc_noise: [0] diff --git a/exampleConfigs/ex48_gin2_pp_network_orbits_uduc_120s.yaml b/exampleConfigs/ex48_gin2_pp_network_orbits_uduc_120s.yaml new file mode 100644 index 000000000..c5e7177b5 --- /dev/null +++ b/exampleConfigs/ex48_gin2_pp_network_orbits_uduc_120s.yaml @@ -0,0 +1,345 @@ + +inputs: + + root_directory: products/ + + atx_files: [ igs20.atx ] + snx_files: [ IGS1R03SNX_20191950000_07D_07D_CRD.SNX, tables/igs_satellite_metadata_2203_plus.snx ] + blq_files: [ OLOAD_GO.BLQ ] + erp_files: [ igs96p02.erp ] + egm_files: [ tables/EGM2008.gfc ] # Earth gravity model coefficients file + jpl_files: [ tables/DE436.1950.2050 ] # JPL planetary and lunar ephemerides file + tide_files: [ tables/fes2014b_Cnm-Snm.dat ] + + satellite_data: + sp3_files: + - IGS2R03FIN_20191980000_01D_05M_ORB.SP3 + - IGS2R03FIN_20191990000_01D_05M_ORB.SP3 + - IGS2R03FIN_20192000000_01D_05M_ORB.SP3 + nav_files: [ brdm1990.19p ] + + pseudo_observations: + inputs_root: "products/" + sp3_inputs: + #- IGS2R03FIN_20191980000_01D_05M_ORB.SP3 + - IGS2R03FIN_20191990000_01D_05M_ORB.SP3 + #- IGS2R03FIN_20192000000_01D_05M_ORB.SP3 + + gnss_observations: + inputs_root: data/ + rnx_inputs: + - "AGGO*.rnx" + - "CEDU*.rnx" + - "DGAR*.rnx" + - "FAIR*.rnx" + - "FFMJ*.rnx" + - "HERS*.rnx" + - "IISC*.rnx" + - "KIRI*.rnx" + - "METG*.rnx" + - "MGUE*.rnx" + - "POAL*.rnx" + - "QUIN*.rnx" + - "RGDG*.rnx" + - "SAMO*.rnx" + - "SEY2*.rnx" + - "SOLO*.rnx" + - "TONG*.rnx" + - "TOPL*.rnx" + - "TOW2*.rnx" + - "USN7*.rnx" + - "ZIM2*.rnx" + + troposphere: + orography_files: orography_ell_5x5 + gpt2grid_files: gpt_25.grd + vmf_files: + - grid5/VMF3_20190718.H00 + - grid5/VMF3_20190718.H06 + - grid5/VMF3_20190718.H12 + - grid5/VMF3_20190718.H18 + - grid5/VMF3_20190719.H00 + +outputs: + + root_directory: outputs// + + trace: + output_stations: true + #output_satellites: true + output_network: true + level: 4 + directory: ./ + station_filename: -.TRACE + network_filename: .TRACE + output_residuals: true + output_config: true + + #clocks: + #output: true + #directory: ./ + #filename: .clk + + #sinex: + #output: true + #directory: ./ + #filename: .snx + erp: + output: true + sp3: + output: true + output_predicted_orbits: true + output_interval: 1 + + orbit_ics: + output: true + + metadata: + config_description: "ex48" + analysis_agency: GAA + analysis_center: Geoscience Australia + analysis_program: AUSACS + rinex_comment: AUSNETWORK1 + +mongo: + database: + enable: true + output_measurements: true + output_components: true + output_states: true + delete_history: true + uri: mongodb://127.0.0.1:27017 + suffix: "" + #predict_states: true + prediction_interval: 5 + interval_units: mins + forward_prediction_duration: 5 + reverse_prediction_duration: 60 + duration_units: mins + + +processing_options: + + epoch_control: + #start_epoch: 2019-07-18 01:00:00 + end_epoch: 2019-07-18 23:00:00 + #max_epochs: 288 #5 #0 is infinite + epoch_interval: 300 #seconds + wait_next_epoch: 3600 # Wait up to an hour for next data point - When processing RINEX causes PEA to wait a long as need for last epoch to be processed. + wait_all_stations: 1 + #fatal_message_level: 1 + + process_modes: + preprocessor: true + spp: true + ppp: true + + gnss_general: + + elevation_mask: 10 #degrees + raim: true + + pivot_station: "USN7" #if not provided then will be selected automatically + + sys_options: + gps: + process: true + #ambiguity_resolution: true + reject_eclipse: false + code_priorities: [ L1C, L1P, L1Y, L1W, L1M, L1N, L1S, L1L, L1X, + L2W, L2P, L2Y, L2C, L2M, L2N, L2D, L2S, L2L, L2X, + L5I, L5Q, L5X] + gnss_models: + troposphere: + enable: true + model: vmf3 # gpt2 + + ionospheric_component: + #use_if_combo: true + + sat_attitude: + valid_var: 0 + invalid_var: 0 + sources: [MODEL] + + orbit_propagation: + central_force: true + planetary_perturbation: true + indirect_J2: true + egm_field: true + solid_earth_tide: true + ocean_tide: true + general_relativity: true + pole_tide_ocean: true + pole_tide_solid: true + solar_pressure_radiation: true + antenna_thrust: true + empirical_dyb: true #true/false => false/ecom/srf + albedo: true +# empirical_rtn: +# empirical_xyz: + + sat_mass: 1000 + sat_area: 15 + srp_cr: 1.50 + degree_max: 15 + + itrf_pseudoobs: true + + filter_options: + #simulate_filter_only: true + simulate_pseudos_only: true + + outlier_screening: + chi_square_mode: state # (enum) Chi-square test mode - innovation, measurement, state {none,innovation,measurement,state} + chi_square_test: true # (bool) Enable Chi-square test + max_filter_iterations: 5 + max_prefit_removals: 3 # (int) Maximum number of measurements to exclude using prefit checks before attempting to filter + sigma_check: true # (bool) Enable prefit and postfit sigma check + sigma_threshold: 5 # (float) sigma threshold + w_test: true # (bool) Enable w-test + + rts: + enable: true + + model_error_checking: + deweighting: + deweight_factor: 1000 # (float) Factor to downweight the variance of measurements with statistically detected errors + deweight_on_state_error: true # (bool) Any "state" errors cause deweighting of all measurements that reference the state + ambiguities: + outage_reset_limit: 1 + phase_reject_limit: 2 + + cycle_slips: + exclude_on: + lli: false + +estimation_parameters: + + eop: + #estimated: [true] + sigma: [100] + + stations: + error_model: elevation_dependent #uniform elevation_dependent + code_sigmas: [0.3] + phase_sigmas: [0.003] + + # pos: + # estimated: [true] + # sigma: [1.0] + # proc_noise: [0] + + clk: + estimated: [true] + sigma: [1000] + proc_noise: [10] + + amb: + estimated: [true] + sigma: [1000] + proc_noise: [0] + + trop: + estimated: [true] + sigma: [0.3] + proc_noise: [0.0001] #0.1 mm + + #trop_grads: + #estimated: [true] + #sigma: [0.03] + #proc_noise: [1.0E-6] + + ion_stec: + estimated: [true] + sigma: [100] + proc_noise: [100] + + satellites: + global: + clk: + estimated: [true] + sigma: [1e-6] + proc_noise: [1] + + #clk_rate: + ##estimated: [false, true] + #sigma: [0, 1] + #proc_noise: [0, 1e-16] + + + G02: + orbit: + estimated: [true] + sigma: [1, 1, 1, 0.1] + apriori_val: + - 6063304.543972121 + - -17840111.735546126 + - -18055493.330693304 + - 2440.670780127 + - 2589.183024622 + - -1697.074640944 + proc_noise: [0] + + emp_dyb_0: + estimated: [true, true, true] + sigma: [1e-9] + apriori_val: + - -8.3413056e-09 + - -1.1073229e-10 + - 2.5900915e-10 + proc_noise: [0] + + emp_dyb_1c: #1 per rev cos + estimated: [true, true, true] + sigma: [1e-9] + apriori_val: + - 5.4323237e-10 + - 8.3464082e-11 + - 9.7484823e-10 + proc_noise: [0] + + emp_dyb_1s: #1 per rev sin + estimated: [true, true, true] + sigma: [1e-9] + apriori_val: + - 3.7315600e-11 + - 2.0660660e-10 + - 3.1498323e-10 + proc_noise: [0] + + emp_dyb_2c: #1 per rev cos + estimated: [true, false, false] + sigma: [1e-9] + apriori_val: + - -2.7305429e-09 + - 0 + - 0 + proc_noise: [0] + + emp_dyb_2s: #1 per rev sin + estimated: [true, false, false] + sigma: [1e-9] + apriori_val: + - -2.4559484e-10 + - 0 + - 0 + proc_noise: [0] + + emp_dyb_4c: #1 per rev cos + estimated: [true, false, false] + sigma: [1e-8] + apriori_val: + - 1.1595918e-09 + - 0 + - 0 + proc_noise: [0] + + emp_dyb_4s: #1 per rev sin + estimated: [ true, false, false ] + sigma: [1e-9] + apriori_val: + - -3.3278514e-10 + - 0 + - 0 + proc_noise: [ 0] diff --git a/exampleConfigs/example_inputs.yaml b/exampleConfigs/example_inputs.yaml new file mode 100644 index 000000000..8d9b44552 --- /dev/null +++ b/exampleConfigs/example_inputs.yaml @@ -0,0 +1,32 @@ + +inputs: + + root_directory: products/ + + snx_files: [ igs19P2062.snx, tables/igs_satellite_metadata_2203_plus.snx, IGS1R03SNX_20191950000_07D_07D_CRD.SNX ] + atx_files: [ igs20.atx ] + blq_files: [ OLOAD_GO.BLQ ] + erp_files: [ igs19P2062.erp ] + egm_files: [ tables/EGM2008.gfc ] + jpl_files: [ tables/DE436.1950.2050 ] + tide_files: [ tables/fes2014b_Cnm-Snm.dat ] + + satellite_data: + nav_files: [ brdm1990.19p ] + clk_files: [ IGS2R03FIN_20191990000_01D_30S_CLK.CLK ] + bsx_files: [ IGS2R03FIN_20191990000_01D_01D_OSB.BIA ] + sp3_files: + - IGS2R03FIN_20191980000_01D_05M_ORB.SP3 + - IGS2R03FIN_20191990000_01D_05M_ORB.SP3 + - IGS2R03FIN_20192000000_01D_05M_ORB.SP3 + + troposphere: + orography_files: orography_ell_5x5 + gpt2grid_files: gpt_25.grd + vmf_files: + - grid5/VMF3_20190718.H00 + - grid5/VMF3_20190718.H06 + - grid5/VMF3_20190718.H12 + - grid5/VMF3_20190718.H18 + - grid5/VMF3_20190719.H00 + diff --git a/exampleConfigs/large_post_network.yaml b/exampleConfigs/large_post_network.yaml new file mode 100644 index 000000000..62eb75fea --- /dev/null +++ b/exampleConfigs/large_post_network.yaml @@ -0,0 +1,51 @@ + +inputs: + gnss_observations: + inputs_root: data/ + rnx_inputs: + - "AREG*.rnx" + - "ASCG*.rnx" + - "BAKO*.rnx" + - "BOGT*.rnx" + - "CEDU*.rnx" + - "COCO*.rnx" + - "CPVG*.rnx" + - "CRO1*.rnx" + - "CUSV*.rnx" + - "DARW*.rnx" + - "DGAR*.rnx" + - "DJIG*.rnx" + - "FAIR*.rnx" + - "FFMJ*.rnx" + - "GANP*.rnx" + - "HERS*.rnx" + - "HOB2*.rnx" + - "IISC*.rnx" + - "JFNG*.rnx" + - "KARR*.rnx" + - "KIRI*.rnx" + - "KOKV*.rnx" + - "KZN2*.rnx" + - "LHAZ*.rnx" + - "LMMF*.rnx" + - "MAW1*.rnx" + - "MBAR*.rnx" + - "METG*.rnx" + - "MGUE*.rnx" + - "NICO*.rnx" + - "NKLG*.rnx" + - "OHI3*.rnx" + - "POAL*.rnx" + - "QUIN*.rnx" + - "REYK*.rnx" + - "RGDG*.rnx" + - "SAMO*.rnx" + - "SEY2*.rnx" + - "SOLO*.rnx" + - "STJ2*.rnx" + - "TONG*.rnx" + - "TOPL*.rnx" + - "TOW2*.rnx" + - "USN7*.rnx" + - "VACS*.rnx" + - "ZIM2*.rnx" \ No newline at end of file diff --git a/exampleConfigs/medium_post_network.yaml b/exampleConfigs/medium_post_network.yaml new file mode 100644 index 000000000..496e3c2aa --- /dev/null +++ b/exampleConfigs/medium_post_network.yaml @@ -0,0 +1,26 @@ + +inputs: + gnss_observations: + inputs_root: data/ + rnx_inputs: + - "AGGO*.rnx" + - "CEDU*.rnx" + - "DGAR*.rnx" + - "FAIR*.rnx" + - "FFMJ*.rnx" + - "HERS*.rnx" + - "IISC*.rnx" + - "KIRI*.rnx" + - "METG*.rnx" + - "MGUE*.rnx" + - "POAL*.rnx" + - "QUIN*.rnx" + - "RGDG*.rnx" + - "SAMO*.rnx" + - "SEY2*.rnx" + - "SOLO*.rnx" + - "TONG*.rnx" + - "TOPL*.rnx" + - "TOW2*.rnx" + - "USN7*.rnx" + - "ZIM2*.rnx" \ No newline at end of file diff --git a/exampleConfigs/mongo_outputs.yaml b/exampleConfigs/mongo_outputs.yaml new file mode 100644 index 000000000..f28db6aa7 --- /dev/null +++ b/exampleConfigs/mongo_outputs.yaml @@ -0,0 +1,11 @@ + +mongo: + enable: true + database: + output_measurements: true + output_states: true + output_rtcm_messages: true + output_test_stats: true + delete_history: true + uri: mongodb://127.0.0.1:27017 + suffix: "" diff --git a/exampleConfigs/network_clocks_and_biases.yaml b/exampleConfigs/network_clocks_and_biases.yaml new file mode 100644 index 000000000..0320325a1 --- /dev/null +++ b/exampleConfigs/network_clocks_and_biases.yaml @@ -0,0 +1,311 @@ + +outputs: + + root_directory: outputs// + + trace: + output_stations: true + output_network: true + level: 3 + station_filename: _.TRACE + network_filename: _.TRACE + output_residuals: true + output_residual_chain: true + output_config: true + + ppp_sol: + output: true + + ionex: + output: false + directory: ./ + filename: AUSG0.I + + ionstec: + output: false + directory: ./ + filename: IONEX.stec + + bias_sinex: + output: true + output_rec_bias: false + code_output_interval: 900 + phase_output_interval: 900 + + clocks: + output: true + output_ar_clocks: true + + sinex: + output: true + + erp: + output: true + + trop_sinex: + output: true + sources: [KALMAN] + +processing_options: + + epoch_control: + epoch_interval: 60 + wait_next_epoch: 3600 # Wait up to an hour for next data point - When processing RINEX causes PEA to wait a long as need for last epoch to be processed. + wait_all_stations: 1 + fatal_message_level: 1 + + process_modes: + ppp: true + + gnss_general: + + elevation_mask: 10 # degrees + rec_reference_system: GPS + require_antenna_details: true # (bool) + require_apriori_positions: false # (bool) + + sys_options: + gps: + process: true + ambiguity_resolution: false # Do not turn on AR if using ppp: - use_if_combo: true + reject_eclipse: false + zero_receiver_dcb: true + #zero_satellite_dcb: true + network_amb_pivot: true + clock_codes: [ L1W, L2W ] + code_priorities: [ L1W, L1C, L2W ] + + # gal: + # process: true + # ambiguity_resolution: false + # reject_eclipse: false + # code_priorities: [ L1C, L5Q, L1X, L5X ] + + # glo: + # process: true + # ambiguity_resolution: false + # reject_eclipse: true + # code_priorities: [ L1P, L1C, L2P, L2C ] + # qzs: + + # process: true + # ambiguity_resolution: false + # reject_eclipse: true + # code_priorities: [ L1C, L2L, L2X ] + + gnss_models: + + sat_attitude: + sources: [MODEL] + + rec_attitude: + sources: [NOMINAL] + + troposphere: + model: vmf3 # gpt2 + + ionospheric_component: + common_ionosphere: true # Code and Phase measurment share the same ionosphere + use_if_combo: false + + model_error_checking: + + deweighting: + deweight_factor: 10000 + + ambiguities: + outage_reset_limit: 10 + phase_reject_limit: 2 + reinit_on_all_slips: true # (bool) Any detected slips cause removal and reinitialisation of ambiguities + + #ambiguity_resolution: + # elevation_mask: 15 + # lambda_set_size: 200 + # narrow_lane: + # mode: lambda_bie # off, bootst, lambda, lambda_alt, lambda_al2, lambda_bie + # success_rate_threshold: 0.99 + # solution_ratio_threshold: 30 + + filter_options: + + outlier_screening: + max_filter_iterations: 50 + max_prefit_removals: 3 + sigma_check: true + + rts: + enable: true + + minimum_constraints: + + enable: true + + once_per_epoch: false # (bool) Perform minimum constraints on a temporary filter and output results once per epoch + + translation: + estimated: [true] + + rotation: + estimated: [true] + + scale: + estimated: [false] + #sigma: [1] + + #full_vcv: true + #scale_by_vcv: true + max_filter_iterations: 20 + max_prefit_removals: 3 # (int) Maximum number of measurements to exclude using prefit checks before attempting to filter + outlier_screening: + chi_square_mode: none + chi_square_test: false + sigma_check: true + sigma_threshold: 3 + w_test: false + + station_noise: + global: [0.01, 0.01, 0.01] + +station_options: + RAEG: + receiver_type: "LEICA GR25" + antenna_type: "LEIAR20 NONE" + eccentricity: [0.0000, 0.0000, 0.5793] + DUMG: + receiver_type: "LEICA GR25" + antenna_type: "LEIAR25.R4 LEIT" + eccentricity: [0.0003, -0.0005, 0.4278] + GAMB: + receiver_type: "TRIMBLE NETR9" + antenna_type: "TRM59800.00 NONE" + eccentricity: [0.0000, 0.0000, 0.0000] + GLPS: + receiver_type: "JAVAD TRE_G3TH DELTA" + antenna_type: "ASH701945B_M SCIT" + eccentricity: [0.0000, 0.0000, 0.0083] + KITG: + receiver_type: "SEPT POLARX5" + antenna_type: "TRM59800.00 SCIS" + eccentricity: [0.0000, 0.0003, 2.0374] + + USN7: + aliases: [PIVOT] + + AGGO: + aliases: [ADD_CLOCK_RATES] + +estimation_parameters: + + stations: + error_model: elevation_dependent + code_sigmas: [0.3] + phase_sigmas: [0.002] + + global: + + pos: + estimated: [true] + sigma: [1] + proc_noise: [0] + + clk: + estimated: [true] + sigma: [1000] + proc_noise: [10] + + amb: + estimated: [true] + sigma: [100] + proc_noise: [0] + + trop: + estimated: [true] + sigma: [0.3] + proc_noise: [0.0001] + + trop_grads: + estimated: [true] + sigma: [0.03] + proc_noise: [1.0E-6] + + ion_stec: + estimated: [true] + sigma: [100] + proc_noise: [2] + + phase_bias: + estimated: [true] + sigma: [10] + proc_noise: [0] + + code_bias: + estimated: [true] + sigma: [20] + proc_noise: [0] + + #GPS: + # L2W: + # amb: + # estimated: [false] + # sigma: [1e-8] + # proc_noise: [0] + + PIVOT: + clk: + estimated: [false] # Set reference (pivot) station clock + + code_bias: + estimated: [false] + + phase_bias: + estimated: [false] + + ADD_CLOCK_RATES: + clk_rate: + estimated: [true] + sigma: [10] + proc_noise: [1e-8] + + satellites: + + global: + + clk: + estimated: [true] + sigma: [1000] + proc_noise: [1] + + clk_rate: + estimated: [true] + sigma: [10] + proc_noise: [1e-9] + + phase_bias: + estimated: [true] + sigma: [10] + proc_noise: [0] + + code_bias: + estimated: [true] + sigma: [10] + proc_noise: [0] + + GPS: + L1W: + code_bias: + sigma: [1e-8] # this implements B(s,GPS-L1W)=0 + process_noise: [0] + apriori_value: [0] + L2W: + code_bias: + sigma: [1e-8] # this implements B(s,GPS-L2W)=0 + process_noise: [0] + apriori_value: [0] + + eop: + estimated: [true] + sigma: [10] + + eop_rates: + estimated: [true] + sigma: [10] diff --git a/exampleConfigs/network_orbits_clocks_and_biases.yaml b/exampleConfigs/network_orbits_clocks_and_biases.yaml new file mode 100644 index 000000000..86ca04425 --- /dev/null +++ b/exampleConfigs/network_orbits_clocks_and_biases.yaml @@ -0,0 +1,479 @@ + +inputs: + + pseudo_observations: + inputs_root: products/ + sp3_inputs: + - IGS2R03FIN_20191980000_01D_05M_ORB.SP3 + - IGS2R03FIN_20191990000_01D_05M_ORB.SP3 + - IGS2R03FIN_20192000000_01D_05M_ORB.SP3 + +outputs: + + root_directory: outputs// + + trace: + output_stations: true + output_satellites: true + output_network: true + level: 3 + output_residuals: true + output_residual_chain: true + output_config: true + + ppp_sol: + output: true + + ionex: + output: false + + ionstec: + output: false + + bias_sinex: + output: true + code_output_interval: 900.0 + phase_output_interval: 900.0 + output_rec_bias: false + + clocks: + output: true + + sinex: + output: true + + erp: + output: true + + trop_sinex: + output: true + sources: [ KALMAN ] + + sp3: + output: true + output_inertial: false # (bool) Output the entries using inertial positions and velocities + output_interval: 300 # (int) Update interval for sp3 records + output_velocities: false + orbit_sources: [ KALMAN ] + clock_sources: [ KALMAN ] + + log: + output: true + + orbit_ics: + output: true + +#mongo: + #enable: true + #database: + #output_measurements: true + #output_states: true + #output_components: true + #output_rtcm_messages: true + #output_test_stats: true + #delete_history: true + #predict_states: true + #prediction_interval: 5 + #interval_units: mins + #forward_prediction_duration: 1440 # 1 hour ahead + #reverse_prediction_duration: 1440 # 25 hours backwards + #duration_units: mins + +processing_options: + epoch_control: + #start_epoch: 2019-07-18 10:30:00 + #end_epoch: 2019-07-19 00:00:00 + epoch_interval: 300 + max_epochs: 576 + wait_next_epoch: 3600 # Wait up to an hour for next data point - When processing RINEX causes PEA to wait a long as need for last epoch to be processed. + wait_all_stations: 1 + fatal_message_level: 1 + + process_modes: + ppp: true + + gnss_general: + elevation_mask: 10 #degrees + raim: true + error_model: elevation_dependent # {uniform,elevation_dependent} + rec_reference_system: gps + + sys_options: + gps: + process: true + ambiguity_resolution: false + reject_eclipse: false + clock_codes: [ L1C, L2W ] + code_priorities: [ L1C, L2W ] + #gal: + # process: true + # ambiguity_resolution: false + # reject_eclipse: false + # code_priorities: [ L1C, L5Q, L1X, L5X ] + # glo: + # process: true + # ambiguity_resolution: false + # reject_eclipse: true + # code_priorities: [ L1P, L1C, L2P, L2C ] + # qzs: + # process: true + # ambiguity_resolution: false + # reject_eclipse: true + # code_priorities: [ L1C, L2L, L2X ] + + gnss_models: + rec_attitude: + invalid_var: 1 # (double) Observation variance added when attitude is invalid + sources: [NOMINAL] # [E_Source] Attitude type (e.g. NOMINAL, MODEL, PRECISE) + valid_var: 0.01 # (double) Observation variance added when attitude is valid + + sat_attitude: + invalid_var: 1 # (double) Observation variance added when attitude is invalid + sources: [MODEL, NOMINAL] # [E_Source] Attitude type + valid_var: 0.01 # (double) Observation variance added when attitude is valid + + troposphere: + model: gpt2 # vmf3 or gpt2 + + ionospheric_component: + common_ionosphere: true # Code and Phase measurment share the same ionosphere + use_if_combo: true + + sat_pos: + sources: [KALMAN, PRECISE, BROADCAST] + + sat_clock: + sources: [KALMAN, PRECISE, BROADCAST] + + model_error_checking: + deweighting: + deweight_factor: 10000 + + ambiguities: + outage_reset_limit: 5 + phase_reject_limit: 2 + reinit_on_all_slips: true # (bool) Any detected slips cause removal and reinitialisation of ambiguities + + clocks: + reinit_on_clock_error: true # (bool) Any clock "state" errors cause removal and reinitialisation of the clocks and all associated ambiguities + + cycle_slips: + exclude_on: + gf: true # (bool) Exclude measurements that fail GF slip test in preprocessor + lli: true # (bool) Exclude measurements that fail LLI slip test in preprocessor + mw: true # (bool) Exclude measurements that fail MW slip test in preprocessor + scdia: true # (bool) Exclude measurements that fail SCDIA test in preprocessor + + reset_on: + gf: true # (bool) Reset ambiguities if GF test is detecting a slip + lli: true # (bool) Reset ambiguities if LLI test is detecting a slip + mw: true # (bool) Reset ambiguities if MW test is detecting a slip + scdia: true # (bool) Reset ambiguities if SCDIA test is detecting a slip + + slip_threshold: 0.05 + + mw_proc_noise: 0 + + ambiguity_resolution: + elevation_mask: 15 + lambda_set_size: 200 + narrow_lane: + mode: lambda_bie # off, bootst, lambda, lambda_alt, lambda_al2, lambda_bie + success_rate_threshold: 0.99 + solution_ratio_threshold: 30 + + filter_options: + + outlier_screening: + max_filter_iterations: 20 + max_prefit_removals: 3 + + rts: + enable: true + + minimum_constraints: + enable: true + + once_per_epoch: false # (bool) Perform minimum constraints on a temporary filter and output results once per epoch + + translation: + estimated: [true] + rotation: + estimated: [true] + scale: + estimated: [false] + + inverter: LDLT + + #full_vcv: true + #scale_by_vcv: true + max_filter_iterations: 20 + max_prefit_removals: 3 # (int) Maximum number of measurements to exclude using prefit checks before attempting to filter + outlier_screening: + chi_square_mode: none # (enum) Chi-square test mode - innovation, measurement, state {NONE,INNOVATION,MEASUREMENT,STATE} + chi_square_test: false # (bool) Enable Chi-square test + sigma_check: true # (bool) Enable prefit and postfit sigma check + sigma_threshold: 3.000000 # (float) sigma threshold + w_test: false # (bool) Enable w-test + + station_noise: + global: [0.005, 0.005, 0.01] + + orbit_propagation: + central_force: true + planetary_perturbation: true + indirect_J2: true + egm_field: true + solid_earth_tide: true + ocean_tide: true + general_relativity: true + pole_tide_ocean: true + pole_tide_solid: true + solar_pressure_radiation: true + antenna_thrust: true + empirical_dyb: true + albedo: true + + integrator_time_step: 60 + sat_mass: 1000 + sat_area: 15 + srp_cr: 1.75 + degree_max: 15 + + itrf_pseudoobs: true + +station_options: + + USN7: + aliases: [PIVOT] + +estimation_parameters: + + stations: + error_model: elevation_dependent #uniform elevation_dependent + code_sigmas: [0.4] + phase_sigmas: [0.002] + + global: + + pos: + estimated: [true] + sigma: [1] + proc_noise: [0.0] + proc_noise_dt: second + + clk: + estimated: [true] + sigma: [1000] + proc_noise: [10] + #proc_noise: [100] + + #clk_rate: + # estimated: [true] + # sigma: [10] + # proc_noise: [1e-9] + + amb: + estimated: [true] + sigma: [100] + proc_noise: [0] + #proc_noise_dt: day + + trop: + estimated: [true] + sigma: [0.3] + proc_noise: [0.0001] + proc_noise_dt: second + + trop_grads: + estimated: [true] + sigma: [0.03] + proc_noise: [1.0E-6] + proc_noise_dt: second + + ion_stec: + estimated: [true] + sigma: [100] + proc_noise: [-1] + + phase_bias: + estimated: [false] + sigma: [10] + proc_noise: [0] + + code_bias: + estimated: [false] + sigma: [20] + proc_noise: [0] + + PIVOT: + clk: + estimated: [false] # Set reference (pivot) station clock + + code_bias: + estimated: [false] + + satellites: + + pseudo_sigmas: [1e6] # [floats] Standard deviation of pseudo measurmeents + + global: + + clk: + estimated: [true] + sigma: [1000] + proc_noise: [10] + + #clk_rate: + # estimated: [true] + # sigma: [10] + # proc_noise: [1e-12] + + phase_bias: + estimated: [false] + sigma: [10] + #proc_noise: [0] + + code_bias: + estimated: [false] + sigma: [100] + #proc_noise: [0] + + orbit: + estimated: [true] + sigma: [0.5, 0.5, 0.5, 0.001] + proc_noise: [0, 0, 0, 1e-12, 1e-12, 1e-12] + + srp_dyb_0: + estimated: [true, true, true] + sigma: [1e-8, 1e-9, 1e-9] + proc_noise: [0] + + srp_dyb_1c: + estimated: [true, false, true] + sigma: [1e-9, 1e-9, 1e-9] + proc_noise: [0] + + srp_dyb_1s: + estimated: [true, false, true] + sigma: [1e-9, 1e-9, 1e-9] + proc_noise: [0] + + srp_dyb_2c: + estimated: [true, false, false] + sigma: [1e-9, 1e-9, 1e-9] + proc_noise: [0] + + srp_dyb_2s: + estimated: [true, false, false] + sigma: [1e-9, 1e-9, 1e-9] + proc_noise: [0] + + srp_dyb_3c: + estimated: [false, false, false] + sigma: [1e-9, 1e-9, 1e-9] + apriori_val: [0.0] + proc_noise: [0] + + srp_dyb_3s: + estimated: [false, false, false] + sigma: [1e-9, 1e-9, 1e-9] + proc_noise: [0] + + srp_dyb_4c: + estimated: [true, false, false] + sigma: [1e-9, 1e-9, 1e-9] + proc_noise: [0] + + srp_dyb_4s: + estimated: [true, false, false] + sigma: [1e-9, 1e-9, 1e-9] + proc_noise: [0] + + GPS-IIF: + srp_dyb_0: + apriori_val: [-3.44e-08, -4.32e-11, 3.07e-10] + srp_dyb_1c: + apriori_val: [+5.13e-10, 0, 6.85e-10] + srp_dyb_1s: + apriori_val: [-4.86e-13, 0, 2.51e-10] + srp_dyb_2c: + apriori_val: [-9.48e-10, 0, 0] + srp_dyb_2s: + apriori_val: [+3.29e-10, 0, 0] + srp_dyb_4c: + apriori_val: [+5.11e-10, 0, 0] + srp_dyb_4s: + apriori_val: [+3.95e-10, 0, 0] + + GPS-IIR-B: + srp_dyb_0: + apriori_val: [+7.97e-09, -8.94e-11, 2.25e-09] + srp_dyb_1c: + apriori_val: [-2.97e-09, 0, -8.82e-10] + srp_dyb_1s: + apriori_val: [+1.47e-11, 0, +4.28e-11] + srp_dyb_2c: + apriori_val: [-8.06e-10, 0, 0] + srp_dyb_2s: + apriori_val: [+7.33e-10, 0, 0] + srp_dyb_4c: + apriori_val: [+2.50e-09, 0, 0] + srp_dyb_4s: + apriori_val: [+4.37e-10, 0, 0] + + GPS-IIA: + srp_dyb_0: + apriori_val: [+1.79e-09, 3.40e-11, 5.19e-12] + srp_dyb_1c: + apriori_val: [-5.38e-13, 0, 1.93e-12] + srp_dyb_1s: + apriori_val: [+2.15e-11, 0, 3.69e-13] + srp_dyb_2c: + apriori_val: [-4.35e-12, 0, 0] + srp_dyb_2s: + apriori_val: [+1.16e-13, 0, 0] + srp_dyb_4c: + apriori_val: [-4.11e-13, 0, 0] + srp_dyb_4s: + apriori_val: [+7.15e-14, 0, 0] + + GPS-IIR-M: + srp_dyb_0: + apriori_val: [+1.15e-08, 6.01e-10, 1.82e-09] + srp_dyb_1c: + apriori_val: [-1.75e-09, 0, 1.33e-09] + srp_dyb_1s: + apriori_val: [+5.01e-11, 0, 4.60e-10] + srp_dyb_2c: + apriori_val: [-1.95e-09, 0, 0] + srp_dyb_2s: + apriori_val: [-6.13e-10, 0, 0] + srp_dyb_4c: + apriori_val: [+1.69e-09, 0, 0] + srp_dyb_4s: + apriori_val: [-9.45e-10, 0, 0] + + GPS-IIR-A: + srp_dyb_0: + apriori_val: [+8.53e-09, 8.97e-10, 1.5e-09] + srp_dyb_1c: + apriori_val: [-1.75e-09, 0, 8.02e-10] + srp_dyb_1s: + apriori_val: [-6.16e-11, 0, 1.42e-10] + srp_dyb_2c: + apriori_val: [-1.50e-09, 0, 0] + srp_dyb_2s: + apriori_val: [+2.20e-10, 0, 0] + srp_dyb_4c: + apriori_val: [+1.86e-09, 0, 0] + srp_dyb_4s: + apriori_val: [-5.52e-11, 0, 0] + + eop: + estimated: [true] + sigma: [10] + + eop_rates: + estimated: [true] + sigma: [10] diff --git a/exampleConfigs/pea b/exampleConfigs/pea new file mode 120000 index 000000000..64c880319 --- /dev/null +++ b/exampleConfigs/pea @@ -0,0 +1 @@ +../bin/pea \ No newline at end of file diff --git a/exampleConfigs/products b/exampleConfigs/products new file mode 120000 index 000000000..5450abd31 --- /dev/null +++ b/exampleConfigs/products @@ -0,0 +1 @@ +../inputData/products \ No newline at end of file diff --git a/exampleConfigs/record_streams.yaml b/exampleConfigs/record_streams.yaml new file mode 100644 index 000000000..9ec0d4efb --- /dev/null +++ b/exampleConfigs/record_streams.yaml @@ -0,0 +1,56 @@ + +inputs: + + gnss_observations: + + inputs_root: "https://:@ntrip.data.gnss.ga.gov.au/" + rtcm_inputs: + - "GATT00AUS0" + + satellite_data: + + inputs_root: "https://:@ntrip.data.gnss.ga.gov.au/" + rtcm_inputs: + - "BCEP00BKG0" + - "SSRA02IGS0" + +outputs: + + root_directory: outputs/recordings/ + + rtcm_nav: + output: true + + rinex_nav: + output: true + + rtcm_obs: + output: true + + rinex_obs: + output: true + + metadata: + config_description: "recording1" + +processing_options: + + epoch_control: + epoch_interval: 1 + wait_next_epoch: 10 + wait_all_stations: 1 + #max_epochs: 3600 + require_obs: false + + process_modes: + preprocessor: false + spp: false + + gnss_general: + delete_old_ephemerides: true + sys_options: + gps: + process: true + gal: + process: true + \ No newline at end of file diff --git a/exampleConfigs/static_user.yaml b/exampleConfigs/static_user.yaml new file mode 100644 index 000000000..bd1915cc7 --- /dev/null +++ b/exampleConfigs/static_user.yaml @@ -0,0 +1,165 @@ + +outputs: + + root_directory: outputs// + + trace: + output_stations: true + output_network: true + level: 2 + station_filename: _.TRACE + network_filename: _.TRACE + output_residuals: true + output_residual_chain: true + output_config: true + + ppp_sol: + output: true + filename: _.POS + + output_rotation: + period: 1 + period_units: day + + clocks: + output: true + directory: ./ + filename: .clk + output_ar_clocks: true + + sinex: + output: true + + trop_sinex: + output: true + sources: [KALMAN] + directory: ./ + filename: -.tro + + metadata: + config_description: "ex41" + +processing_options: + epoch_control: + epoch_interval: 30 + + process_modes: + ppp: true + + gnss_general: + + elevation_mask: 10 #degrees + rec_reference_system: GPS + sys_options: + gps: + process: true + # ambiguity_resolution: true + reject_eclipse: false + zero_receiver_dcb: true + clock_codes: [ L1C, L2W ] + code_priorities: [ L1C, L2W ] + gal: + process: true + # ambiguity_resolution: true + reject_eclipse: false + zero_receiver_dcb: true + code_priorities: [ L1C, L5Q, L1X, L5X ] + # glo: + # process: true + # ambiguity_resolution: false + # reject_eclipse: true + # code_priorities: [ L1P, L1C, L2P, L2C ] + # qzs: + # process: true + # ambiguity_resolution: false + # reject_eclipse: true + # code_priorities: [ L1C, L2L, L2X ] + + gnss_models: + + sat_attitude: + enable: true + sources: [model] + + troposphere: + model: gpt2 + + sat_clock: + sources: [KALMAN, PRECISE, SSR, BROADCAST] + + sat_pos: + sources: [KALMAN, PRECISE, SSR, BROADCAST] + + ionospheric_component: + common_ionosphere: true # Code and Phase measurment share the same ionosphere + use_if_combo: false + + model_error_checking: + + deweighting: + deweight_factor: 10000 + + ambiguities: + outage_reset_limit: 10 + phase_reject_limit: 2 + reinit_on_all_slips: true + + filter_options: + + outlier_screening: + max_filter_iterations: 5 + max_prefit_removals: 3 + + station_chunking: + enable: true + + rts: + enable: true + +estimation_parameters: + + stations: + error_model: elevation_dependent #uniform elevation_dependent + code_sigmas: [0.3] + phase_sigmas: [0.003] + + global: + pos: + estimated: [true] + sigma: [100] + proc_noise: [0] + + clk: + estimated: [true] + sigma: [1000] + proc_noise: [100] + + amb: + estimated: [true] + sigma: [1000] + proc_noise: [0] + + trop: + estimated: [true] + sigma: [0.3] + proc_noise: [0.0001] + + trop_grads: + estimated: [true] + sigma: [0.03] + proc_noise: [1.0E-6] + + ion_stec: + estimated: [true] + sigma: [200] + proc_noise: [10] + + phase_bias: + estimated: [true] + sigma: [10] + proc_noise: [0] + + code_bias: + estimated: [true] + sigma: [20] + proc_noise: [0] diff --git a/exampleConfigs/tiny_post_network.yaml b/exampleConfigs/tiny_post_network.yaml new file mode 100644 index 000000000..e9928efa0 --- /dev/null +++ b/exampleConfigs/tiny_post_network.yaml @@ -0,0 +1,11 @@ + +inputs: + gnss_observations: + inputs_root: data/ + rnx_inputs: + - "COCO00AUS_R_20191990000_01D_30S_MO.rnx" + - "LHAZ00CHN_R_20191990000_01D_30S_MO.rnx" + - "KZN200RUS_S_20191990000_01D_30S_MO.rnx" + - ALIC: + - "ALIC00AUS_R_20191990000_01D_30S_MO.rnx" + diff --git a/exampleConfigs/tiny_realtime_network.yaml b/exampleConfigs/tiny_realtime_network.yaml new file mode 100644 index 000000000..92707d072 --- /dev/null +++ b/exampleConfigs/tiny_realtime_network.yaml @@ -0,0 +1,21 @@ + +inputs: + + gnss_observations: + inputs_root: "https://:@ntrip.data.gnss.ga.gov.au/" + rtcm_inputs: + - "ALIC00AUS0" + - "COCO00AUS0" + - "LHAZ00CHN0" + - "KZN200RUS0" + + satellite_data: + inputs_root: "https://:@ntrip.data.gnss.ga.gov.au/" + rtcm_inputs: + - "BCEP00BKG0" + - "SSRA00BKG0" + +processing_options: + + ssr_inputs: + ssr_antenna_offset: APC diff --git a/examples/ex11_pea_pp_user_gps.yaml b/examples/ex11_pea_pp_user_gps.yaml deleted file mode 100644 index b4b208224..000000000 --- a/examples/ex11_pea_pp_user_gps.yaml +++ /dev/null @@ -1,252 +0,0 @@ -# ex11 - PPP Ionosphere-Free Observable Example -# Uses IGS orbit and clock products to produce kinematic PPP solition (GPS-only, float ambiguities) -# Total processing duration ~ 1.2 minutes on 2-cores - -inputs: - - root_directory: products/ - - atx_files: [ igs14_2045_plus.atx ] # Antenna models for receivers and satellites in ANTEX format - snx_files: [ igs19P2062.snx, tables/igs_satellite_metadata_2203_plus.snx ] # SINEX file for meta data and initial position - blq_files: [ OLOAD_GO.BLQ ] # ocean loading is applied - - troposphere: - vmf_files: [grid5/VMF3_20190718.H00, grid5/VMF3_20190718.H06, grid5/VMF3_20190718.H12, grid5/VMF3_20190718.H18] - orography_files: orography_ell_5x5 - # gpt2grid_files: gpt_25.grd - - egm_files: [ tables/EGM2008.gfc ] # Earth gravity model coefficients file - jpl_files: [ tables/DE436.1950.2050 ] # JPL planetary and lunar ephemerides file - tide_files: [ tables/fes2014b_Cnm-Snm.dat] - - satellite_data: - #nav_files: [ brdm1990.19p ] # broadcast navigation file - sp3_files: [ igs20624.sp3 ] # satellite orbit files in SP3 format - clk_files: [ igs20624.clk_30s ] # Clk files - bsx_files: [ TUG0R03FIN_20191990000_01D_01D_OSB.BIA ] # daily signal biases files - - #rtcm_inputs: - gnss_observations: - inputs_root: data/ - - ubx_inputs: - #- serial:///dev/ttyACM0 - rtcm_inputs: - #- https://:@ntrip.data.gnss.ga.gov.au/ALIC00AUS0 - rnx_inputs: - - "ALIC*.rnx" - #- "ANKO*.rnx" - -station_options: - XMPL: - #apriori_position: [120000,20000,40000] - #eccentricity: [1, 2, 3] - #antenna_type: LEICA - #receiver_type: UBLOX - -outputs: - - root_directory: / - - trace: - output_stations: true - output_network: true - level: 4 - directory: ./ - station_filename: -.TRACE - output_residuals: true - - sinex: - output: true - directory: ./ - - clocks: - output: true - - trop_sinex: - #output: true - sources: [KALMAN] - - cost: - #output: true - sources: [KALMAN] - directory: ./ - filename: cost_s_t__ga__.dat - time_interval: 300 - - gpx: - #output: true - - orbex: - #output: true - - metadata: - config_description: ex11 - analysis_agency: GAA - analysis_center: Geoscience Australia - analysis_program: AUSACS - rinex_comment: AUSNETWORK1 - - ppp_sol: - output: true - filename: _.POS - -mongo: - enable: true - output_measurements: true - output_states: true - output_test_stats: true - delete_history: true - uri: mongodb://127.0.0.1:27017 - #suffix: - - -debug: - #unit_tests: - #stop_on_done: true - #output_pass: false - -station_options: - - global: - rnx_code_conversions: - gps: - C1: L1C - C2: L2S - P2: L2W - C5: L5Q - rnx_phase_conversions: - gps: - L2: L2W - L5: L5Q - L1: L1C - - AGGO: - rnx_code_conversions: - gps: - C5: L5I - rnx_phase_conversions: - gps: - L5: L5I - - COCO: - rnx_code_conversions: - gps: - C5: L5I - rnx_phase_conversions: - gps: - L5: L5I - -processing_options: - - epoch_control: - #start_epoch: 2019-07-18 23:44:30 - #end_epoch: 2019-07-18 23:59:30 - epoch_interval: 30 #seconds - #max_epochs: 1 #0 is infinite - - process_modes: - #ppp: true - user: true - - gnss_general: - - #require_apriori_positions: true - - elevation_mask: 7 #degrees - - raim: true - - max_gdop: 30 - sys_options: - bds: - #process: true - gps: - process: true - reject_eclipse: true - code_priorities: [ L1C, L1P, L1Y, L1W, L1M, L1N, L1S, L1L, - L2W, L2P, L2Y, L2C, L2M, L2N, L2D, L2S, L2L, L2X, - L5I, L5Q, L5X] - - gnss_models: - - tides: - #solid: false - #pole: false - #otl: false - troposphere: - model: vmf3 #gpt2 - sat_pos: - #sources: [broadcast] - sat_clock: - #sources: [broadcast] - sat_attitude: - sources: [model] - - #reinit_on_all_slips: true - #reinit_on_clock_error: true - #deweight_on_state_error: true - - - - filter_options: - - outlier_screening: - max_filter_iterations: 5 #5 - max_prefit_removals: 3 #5 - - station_chunking: - #enable: true - - rts: - enable: true - lag: -1 #-ve for full reverse, +ve for limited epochs - directory: ./ - suffix: _smoothed - - inverter: LDLT #LLT LDLT INV - - -estimation_parameters: - - stations: - - error_model: elevation_dependent #uniform elevation_dependent - code_sigmas: [0.15] - phase_sigmas: [0.0015] - - pos: - estimated: [true] - sigma: [100] - proc_noise: [100] - proc_noise_dt: second - - clk: - estimated: [true] - sigma: [30] - proc_noise: [10] - proc_noise_dt: second - - clk_rate: - #estimated: [true] - sigma: [500] - proc_noise: [1e-4] - proc_noise_dt: second - - amb: - estimated: [true] - sigma: [60] - proc_noise: [0] - #proc_noise_dt: day - - trop: - estimated: [true] - sigma: [0.1] - proc_noise: [0.0001] #0.1 mm/sqrt(s) - proc_noise_dt: second - - trop_grads: - estimated: [true] - sigma: [0.005] - proc_noise: [1.0E-6] - proc_noise_dt: second diff --git a/examples/ex12_pea_pp_user_gnss.yaml b/examples/ex12_pea_pp_user_gnss.yaml deleted file mode 100644 index 4d96a05f4..000000000 --- a/examples/ex12_pea_pp_user_gnss.yaml +++ /dev/null @@ -1,173 +0,0 @@ -# ex12 - PPP Ionosphere-Free Observable Example GPS+GAL -# Uses TU GRAZ orbit and clock products to produce kinematic PPP solition (GPS+GAL, float ambiguities) -# Total processing duration ~ 2.5 minutes on 2-cores - -inputs: - - root_directory: products/ - - atx_files: [ igs14_2045_plus.atx ] # Antenna models for receivers and satellites in ANTEX format - snx_files: [ "igs*.snx", tables/igs_satellite_metadata_2203_plus.snx ] # SINEX file for meta data and initial position - blq_files: [ OLOAD_GO.BLQ ] # ocean loading is applied - - satellite_data: - nav_files: [ brdm1990.19p ] # broadcast navigation file - sp3_files: [ TUG0R03FIN_20191990000_01D_05M_ORB.SP3 ] # satellite orbit files in SP3 format - clk_files: [ TUG0R03FIN_20191990000_01D_30S_CLK.CLK ] # satellite clock files in RNX CLK format - bsx_files: [ TUG0R03FIN_20191990000_01D_01D_OSB.BIA ] # daily signal biases files - # obx_files: [ TUG0R03FIN_20191990000_01D_30S_ATT.OBX ] # satellite attitude files in orbex format - - troposphere: - vmf_files: [grid5/VMF3_20190718.H00, grid5/VMF3_20190718.H06, grid5/VMF3_20190718.H12, grid5/VMF3_20190718.H18] - orography_files: orography_ell_5x5 - # gpt2grid_files: gpt_25.grd - - egm_files: [ tables/EGM2008.gfc ] # Earth gravity model coefficients file - jpl_files: [ tables/DE436.1950.2050 ] # JPL planetary and lunar ephemerides file - tide_files: [ tables/fes2014b_Cnm-Snm.dat] - - gnss_observations: - inputs_root: data/ - rnx_inputs: - # Select files to run by: - - "ALIC*.rnx" # ALIC station rnx file will be found - # - "*.rnx" # - searching all in file_root directory - # - ALIC00AUS_R_20191990000_01D_30S_MO.rnx # - selecting them individually below, or - # - selecting one on the command line using the -rnxfiles option - - -outputs: - - root_directory: / - - trace: - output_stations: true - level: 3 - directory: ./ - station_filename: -.TRACE - output_residuals: true - - sinex: - output: true - directory: ./ - - log: - output: true - - metadata: - config_description: ex12 - analysis_agency: GAA - analysis_center: Geoscience Australia - analysis_program: AUSACS - rinex_comment: AUSNETWORK1 - - ppp_sol: - output: true - filename: _.POS - -mongo: - enable: false - output_measurements: false - output_states: false - #delete_history: true - uri: mongodb://127.0.0.1:27017 - - -processing_options: - - epoch_control: - start_epoch: 2019-07-18 00:00:00 - #end_epoch: 2019-07-18 23:59:30 - epoch_interval: 30 #seconds - #max_epochs: 2 #0 is infinite - - process_modes: - user: true - - gnss_general: - - elevation_mask: 7 #degrees - - raim: true - - max_gdop: 30 - sys_options: - gps: - process: true - reject_eclipse: false - code_priorities: [ L1C, L1P, L1Y, L1W, L1M, L1N, L1S, L1L, L1X, - L2W, L2P, L2Y, L2C, L2M, L2N, L2D, L2S, L2L, L2X, - L5I, L5Q, L5X] - gal: - process: true - reject_eclipse: false - code_priorities: [ L1C, L1P, L1Y, L1W, L1M, L1N, L1S, L1L, L1X, - L5I, L5Q, L5X] - - - gnss_models: - - troposphere: - model: vmf3 #gpt2 - - sat_attitude: - sources: [MODEL] - valid_var: 0.01 - invalid_var: 1 - - - filter_options: - - outlier_screening: - max_filter_iterations: 5 #5 - max_prefit_removals: 3 #5 - - rts: - enable: false - lag: -1 #-ve for full reverse, +ve for limited epochs - directory: ./ - filename: PPP--.rts - - inverter: LDLT #LLT LDLT INV - -estimation_parameters: - - stations: - - error_model: elevation_dependent #uniform elevation_dependent - code_sigmas: [0.15] - phase_sigmas: [0.0015] - - pos: - estimated: [true] - sigma: [0.1] - proc_noise: [0.00057] #0.57 mm/sqrt(s), Gipsy default value from slow-moving - proc_noise_dt: second - - clk: - estimated: [true] - sigma: [30] - proc_noise: [10] - - clk_rate: - #estimated: [true] - sigma: [500] - proc_noise: [1e-4] - - amb: - estimated: [true] - sigma: [60] - proc_noise: [0] - #proc_noise_dt: day - - trop: - estimated: [true] - sigma: [0.1] - proc_noise: [0.0001] #0.1 mm/sqrt(s) - proc_noise_dt: second - - trop_grads: - estimated: [true] - sigma: [0.02] - proc_noise: [1.0E-6] - proc_noise_dt: second diff --git a/examples/ex13_pea_pp_user_gps_sf.yaml b/examples/ex13_pea_pp_user_gps_sf.yaml deleted file mode 100644 index 5a06f6371..000000000 --- a/examples/ex13_pea_pp_user_gps_sf.yaml +++ /dev/null @@ -1,150 +0,0 @@ -# ex13 - GPS-only single frequency PPP Example -# Uses TU GRAZ orbit and clock products to produce kinematic PPP solition (GPS+GLONASS, float ambiguities) -# Total processing duration ~ 1.2 minutes on 2-cores - -inputs: - - root_directory: products/ - - atx_files: [ igs14_2045_plus.atx ] # Antenna models for receivers and satellites in ANTEX format - snx_files: [ "igs*.snx", tables/igs_satellite_metadata_2203_plus.snx ] # SINEX file for meta data and initial position - blq_files: [ OLOAD_GO.BLQ ] # ocean loading is applied - - troposphere: - gpt2grid_files: gpt_25.grd - - ionosphere: - ion_files: [ codg1990.19i ] # Ionospheric delay maps in IONEX format - - egm_files: [ tables/EGM2008.gfc ] # Earth gravity model coefficients file - jpl_files: [ tables/DE436.1950.2050 ] # JPL planetary and lunar ephemerides file - tide_files: [ tables/fes2014b_Cnm-Snm.dat] - - satellite_data: - nav_files: [ brdm1990.19p ] # broadcast navigation file - sp3_files: [ COD0MGXFIN_20191990000_01D_05M_ORB.SP3 ] # satellite orbit files in SP3 format - clk_files: [ COD0R03FIN_20191990000_01D_30S_CLK.CLK ] # satellite clock files in RNX CLK format - - gnss_observations: - - inputs_root: data/ - - rnx_inputs: - # Select files to run by: - #- "AGGO*.rnx" - - ALIC00AUS_R_20191990000_01D_30S_MO.rnx # - selecting them individually below, or - # - selecting one on the command line using the -rnxfiles option - -outputs: - - root_directory: / - - trace: - output_stations: true - level: 4 - directory: ./ - station_filename: -.TRACE - output_residuals: true - - sinex: - output: true - directory: ./ - - ppp_sol: - output: true - filename: _.POS - - - metadata: - - config_description: ex13 - analysis_agency: GAA - analysis_center: Geoscience Australia - analysis_program: AUSACS - rinex_comment: AUSNETWORK1 - -processing_options: - - epoch_control: - start_epoch: 2019-07-18 00:00:00 - # end_epoch: 2019-07-18 03:59:30 - epoch_interval: 30 #seconds - max_epochs: 360 #0 is infinite - - process_modes: - user: true - - gnss_general: - elevation_mask: 7 #degrees - - raim: true - - max_gdop: 30 - sys_options: - gps: - process: true - reject_eclipse: true - code_priorities: [ L1C ] - gnss_models: - - - - troposphere: - model: gpt2 #vmf3 - - ionospheric_component: - corr_mode: total_electron_content - - - filter_options: - - outlier_screening: - max_filter_iterations: 2 #5 - max_prefit_removals: 2 #5 - - rts: - lag: -1 #-ve for full reverse, +ve for limited epochs - directory: ./ - filename: PPP--.rts - - inverter: LDLT #LLT LDLT INV (default is INV) - -estimation_parameters: - - stations: - - error_model: elevation_dependent #uniform elevation_dependent - code_sigmas: [0.15] - phase_sigmas: [0.0015] - - pos: - estimated: [true] - sigma: [0.1] - proc_noise: [1000] - proc_noise_dt: second - - clk: - estimated: [true] - sigma: [1000] - proc_noise: [1] - - clk_rate: - #estimated: [true] - - amb: - estimated: [true] - sigma: [60] - proc_noise: [0] - #proc_noise_dt: day - - trop: - estimated: [true] - sigma: [0.1] - proc_noise: [0.000087] - proc_noise_dt: second - - trop_grads: - estimated: [true] - sigma: [1] - proc_noise: [0.01] - proc_noise_dt: second diff --git a/examples/ex14_pea_pp_user_gnss_ar.yaml b/examples/ex14_pea_pp_user_gnss_ar.yaml deleted file mode 100644 index f034f1b9f..000000000 --- a/examples/ex14_pea_pp_user_gnss_ar.yaml +++ /dev/null @@ -1,210 +0,0 @@ -inputs: - - root_directory: products/ - - atx_files: [ igs14_2045_plus.atx ] # Antenna models for receivers and satellites in ANTEX format - snx_files: [ igs19P2062.snx, tables/igs_satellite_metadata_2203_plus.snx ] # SINEX file for meta data and initial position - blq_files: [ OLOAD_GO.BLQ ] # ocean loading is applied - erp_files: [ COD0R03FIN_20191990000_01D_01D_ERP.ERP ] - - troposphere: - # vmf_files: [grid5/VMF20190718.H00, grid5/VMF20190718.H06, grid5/VMF20190718.H12, grid5/VMF20190718.H18] - # orography: orography_ell_5x5 - gpt2grid_files: gpt_25.grd - - egm_files: [ tables/EGM2008.gfc ] # Earth gravity model coefficients file - jpl_files: [ tables/DE436.1950.2050 ] # JPL planetary and lunar ephemerides file - tide_files: [ tables/fes2014b_Cnm-Snm.dat] - - satellite_data: - - nav_files: [ brdm1990.19p ] # broadcast navigation file - sp3_files: [ COD0MGXFIN_20191990000_01D_05M_ORB.SP3 ] # satellite orbit files in SP3 format - clk_files: [ COD0R03FIN_20191990000_01D_30S_CLK.CLK ] # satellite clock files in RNX CLK format - bsx_files: [ COD0R03FIN_20191990000_01D_01D_OSB.BIA ] # daily signal biases files - - gnss_observations: - inputs_root: data/ - rnx_inputs: - # Select files to run by: - - "AREQ00PER_R_20191990000_01D_30S_MO.rnx" # ALIC station rnx file will be found - - "AREG00PER_R_20191990000_01D_30S_MO.rnx" - # - ALIC00AUS_R_20191990000_01D_30S_MO.rnx # - selecting them individually below, or - # - selecting one on the command line using the -rnxfiles option - - -outputs: - - root_directory: / - - trace: - output_stations: true - output_network: true - level: 2 - directory: ./ - station_filename: .TRACE - network_filename: Network_trace.SUM - output_residuals: true - output_config: true - - sinex: - output: true - directory: ./ - - ppp_sol: - output: true - filename: _.POS - - log: - output: true - - metadata: - - config_description: ex14 - analysis_agency: GAA - analysis_center: Geoscience Australia - analysis_program: AUSACS - rinex_comment: AUSNETWORK1 - -mongo: - enable: false - output_measurements: false - output_states: false - delete_history: false - uri: mongodb://127.0.0.1:27017 - -debug: - unit_tests: - #stop_on_done: true - output_pass: false - -processing_options: - - epoch_control: - start_epoch: 2019-07-18 00:00:00 - end_epoch: 2019-07-18 06:00:00 - epoch_interval: 30 #seconds - #max_epochs: 80 #0 is infinite - - process_modes: - user: true - - gnss_general: - - elevation_mask: 10 #degrees - - raim: true - - max_gdop: 30 - - - sys_options: - gps: - process: true - ambiguity_resolution: true - reject_eclipse: true - code_priorities: [ L1C, L2W ] - gal: - process: true - ambiguity_resolution: false - reject_eclipse: true - code_priorities: [ L1C,L1X, L5Q, L5X] - - model_error_checking: - ambiguities: - reinit_on_all_slips: true - - gnss_models: - troposphere: - model: gpt2 - - ambiguity_resolution: - - elevation_mask: 15 - - wide_lane: - mode: iter_rnd # AR mode for WL: off, round, iter_rnd, bootst, lambda, lambda_alt, lambda_al2, lambda_bie - success_rate_threshold: 0.999 - solution_ratio_threshold: 3 - process_noise_sat: 0.00001 - process_noise_rec: 0.0001 - - narrow_lane: - mode: lambda_bie # AR mode for WL: off, round, iter_rnd, bootst, lambda, lambda_alt, lambda_al2, lambda_bie - success_rate_threshold: 0 - solution_ratio_threshold: 30 - - lambda_set_size: 200 - max_hold_epochs: 0 - max_rounding_iterations: 5 - - filter_options: - - outlier_screening: - max_filter_iterations: 5 #5 - max_prefit_removals: 3 #5 - - rts: - lag: -1 #-ve for full reverse, +ve for limited epochs - directory: ./ - filename: PPP--.rts - - inverter: LDLT #LLT LDLT INV - -estimation_parameters: - - stations: - - error_model: elevation_dependent #uniform elevation_dependent - code_sigmas: [0.15] - phase_sigmas: [0.0015] - - pos: - estimated: [true] - sigma: [100.0] - proc_noise: [100.0] #0.57 mm/sqrt(s), Gipsy default value from slow-moving - proc_noise_dt: second - - clk: - estimated: [true] - sigma: [30] - proc_noise: [10] - - clk_rate: - #estimated: [true] - sigma: [500] - proc_noise: [1e-4] - - amb: - estimated: [true] - sigma: [60] - proc_noise: [0] - #proc_noise_dt: day - - trop: - estimated: [true] - sigma: [0.1] - proc_noise: [0.0001] #0.1 mm/sqrt(s) - proc_noise_dt: second - - trop_grads: - estimated: [true] - sigma: [0.02] - proc_noise: [1.0E-6] - proc_noise_dt: second - - satellites: - - clk: - #estimated: [true] - # sigma: [0] - # proc_noise: [0.03651483716701108] - #proc_noise_dt: min - - clk_rate: - #estimated: [true] - # sigma: [500] - # proc_noise: [1e-4] - - orb: - #estimated: [true] diff --git a/examples/ex16_pea_pp_ionosphere.yaml b/examples/ex16_pea_pp_ionosphere.yaml deleted file mode 100644 index 4e6796318..000000000 --- a/examples/ex16_pea_pp_ionosphere.yaml +++ /dev/null @@ -1,207 +0,0 @@ - -inputs: - - root_directory: products/ - - atx_files: [ igs14_2045_plus.atx ] # required - snx_files: [ igs19P2062.snx, tables/igs_satellite_metadata_2203_plus.snx ] # required - blq_files: [ OLOAD_GO.BLQ ] # required if ocean loading is applied - erp_files: [ TUG0R03FIN_20191990000_01D_01D_ERP.ERP ] # config parser doesn't accept weekly files yet. - - satellite_data: - nav_files: [ brdm1990.19p ] # broadcast navigation file - sp3_files: [ TUG0R03FIN_20191990000_01D_05M_ORB.SP3 ] # satellite orbit files in SP3 format - clk_files: [ TUG0R03FIN_20191990000_01D_30S_CLK.CLK ] # satellite clock files in RNX CLK format - bsx_files: [ TUG0R03FIN_20191990000_01D_01D_OSB.BIA ] # satellite hardware biases in BSX format - - troposphere: - # vmf3dir: grid5/ - # orography: orography_ell_5x5 - gpt2grid_files: gpt_25.grd - - egm_files: [ tables/EGM2008.gfc ] # Earth gravity model coefficients file - jpl_files: [ tables/DE436.1950.2050 ] # JPL planetary and lunar ephemerides file - tide_files: [ tables/fes2014b_Cnm-Snm.dat] - - gnss_observations: - inputs_root: data/ - rnx_inputs: - - "*.rnx" # - searching all in file_root directory, or - -outputs: - - root_directory: / - - trace: - output_stations: true - output_network: true - level: 2 - directory: ./ - station_filename: _.TRACE - network_filename: _.TRACE - output_residuals: true - output_config: true - - ionex: - output: true - directory: ./ - filename: 0GINRPD00_02H_05M_GIM.INX - grid: - lat_center: 0 - lon_center: 2.5 - lat_width: 141 - lon_width: 356 - lat_resolution: 5 - lon_resolution: 5 - time_resolution: 300 - - ionstec: - output: true - directory: ./ - filename: _.stec - - bias_sinex: - output: true - directory: ./ - filename: 0GINRPD00_01D_01D_OSB.BIA - code_output_interval: 86400 - - sinex: - output: true - - metadata: - config_description: ex16 - analysis_agency: GAA - analysis_center: Geoscience Australia - analysis_program: GINAN - rinex_comment: IGS - - -processing_options: - - epoch_control: - start_epoch: 2019-07-18 00:00:00 - # end_epoch: 2019-07-18 23:59:30 - max_epochs: 241 #0 is infinite - epoch_interval: 30 #seconds - - process_modes: - # ppp: true - ionosphere: true - - gnss_general: - error_model: elevation_dependent - code_measurements: - sigmas: [1] - phase_measurements: - sigmas: [0.0015] - - elevation_mask: 10 #degrees - - raim: true - - max_gdop: 30 - pivot_station: "USN7" - sys_options: - gps: - process: true - reject_eclipse: true #reject observation during satellite eclipse periods - use_for_iono_model: true - code_priorities: [ L1C, L2W ] - - gnss_models: - troposphere: - model: gpt2 - - ionospheric_component: - common_ionosphere: true - use_if_combo: false - - ionospheric_model: - - model: spherical_harmonics # meas_out, spherical_harmonics - function_order: 8 - layer_heights: [450] - - - filter_options: - - inverter: ldlt #LLT LDLT INV - - outlier_screening: - max_filter_iterations: 10 - max_prefit_removals: 2 - - rts: - enable: true - lag: -1 #-ve for full reverse, +ve for limited epochs - directory: ./ - filename: -Network.rts - - -estimation_parameters: - - stations: - error_model: elevation_dependent #uniform elevation_dependent - code_sigmas: [0.3] - phase_sigmas: [0.003] - - pos: - estimated: [true] - sigma: [100.0] - proc_noise: [0] - proc_noise_dt: second - - clk: - estimated: [true] - sigma: [1000] - proc_noise: [100] - - amb: - estimated: [true] - sigma: [1000.0] - proc_noise: [0] - #proc_noise_dt: day - - trop: - estimated: [true] - sigma: [0.1] - proc_noise: [0.0001] - proc_noise_dt: second - - trop_grads: - estimated: [true] - sigma: [0.02] - proc_noise: [1.0E-6] - proc_noise_dt: second - - ion_stec: - estimated: [true] - sigma: [200] - proc_noise: [0.1] - - phase_bias: - estimated: [true] - sigma: [10] - proc_noise: [0] - - code_bias: - estimated: [true] - sigma: [100.0] - proc_noise: [0] - - ion: - estimated: [true] - sigma: [100] - proc_noise: [0.01] - - satellites: - code_bias: - estimated: [true] - sigma: [100.0] - proc_noise: [0] -debug: - unit_tests: - #enable: true - - diff --git a/examples/ex17_pea_pp_netw_gnss_ar.yaml b/examples/ex17_pea_pp_netw_gnss_ar.yaml deleted file mode 100644 index f91e9bb99..000000000 --- a/examples/ex17_pea_pp_netw_gnss_ar.yaml +++ /dev/null @@ -1,453 +0,0 @@ -# ex17 - Network Example -# Uses IGS final orbit to solve for satellite clocks (GPS-only, resolved ambiguities) -# Estimates clocks - -inputs: - - root_directory: products/ - - atx_files: [ igs20.atx ] # required - #atx_files: [ igsR3_2077.atx ] # required - #atx_files: [ igs14_2045_plus.atx ] # required - snx_files: [ IGS1R03SNX_20192000000_01D_01D_CRD.SNX, tables/igs_satellite_metadata_2203_plus.snx ] # required - #snx_files: [ igs19P2062.snx, tables/igs_satellite_metadata_2203_plus.snx ] # required - blq_files: [ OLOAD_GO.BLQ ] # required if ocean loading is applied - erp_files: [ IGS1R03SNX_20191950000_07D_01D_ERP.ERP ] - #erp_files: [ igs19P2062.erp ] - - satellite_data: - nav_files: [ brdm1990.19p ] - #sp3_files: [ igs20624.sp3 ] - #bsx_files: [ code_monthly.bia ] - #clk_files: [ igs20624.clk_30s ] - sp3_files: [ IGS2R03FIN_20191990000_01D_05M_ORB.SP3 ] - bsx_files: [ IGS2R03FIN_20191990000_01D_01D_OSB.BIA ] - #clk_files: [ IGS2R03FIN_20191990000_01D_30S_CLK.CLK ] - - egm_files: [ tables/EGM2008.gfc ] # Earth gravity model coefficients file - jpl_files: [ tables/DE436.1950.2050 ] # JPL planetary and lunar ephemerides file - tide_files: [ tables/fes2014b_Cnm-Snm.dat ] - - troposphere: - orography_files: orography_ell_5x5 - gpt2grid_files: gpt_25.grd - vmf_files: [ grid5/VMF3_20190718.H00, grid5/VMF3_20190718.H06, grid5/VMF3_20190718.H12, grid5/VMF3_20190718.H18, grid5/VMF3_20190719.H00 ] - - gnss_observations: - - inputs_root: data/ - - rnx_inputs: - - "CPVG*.rnx" - - "DJIG*.rnx" - - "DUMG*.rnx" - - "GAMB*.rnx" - - "GLPS*.rnx" - - "HARB*.rnx" - - "KOKV*.rnx" - - "NYA2*.rnx" - - "OHI3*.rnx" - - "NYA2*.rnx" - - "MAW1*.rnx" - - "STK2*.rnx" - - "URUM*.rnx" - - "COCO*.rnx" - - "KRGG*.rnx" - - "ASCG*.rnx" - - "PTGG*.rnx" - - "OUS2*.rnx" - - "KITG*.rnx" - - "ULAB*.rnx" - - "RAEG*.rnx" - - "BAKE*.rnx" - - "LHAZ*.rnx" - - "KZN2*.rnx" - - "MCIL*.rnx" - - "BSHM*.rnx" - - "REYK*.rnx" - - "LMMF*.rnx" - - "VACS*.rnx" - - "AREG*.rnx" - - "KARR*.rnx" - - "HOB2*.rnx" - - "PERT*.rnx" - - "RABT*.rnx" - - "DUBO*.rnx" - - "MDO1*.rnx" - - "MBAR*.rnx" - - "PERT*.rnx" - - "JFNG*.rnx" - - "NKLG*.rnx" - - "DARW*.rnx" - - "PNGM*.rnx" - - "MIKL*.rnx" - - "SYDN*.rnx" - - "YKRO*.rnx" - - "NRMG*.rnx" - - "CZTG*.rnx" - - "IQAL*.rnx" - #- "AGGO*.rnx" - #- "FFMJ*.rnx" - - "ZIM2*.rnx" - - "CEDU*.rnx" - - "DGAR*.rnx" - - "FAIR*.rnx" - - "HERS*.rnx" - - "IISC*.rnx" - - "KIRI*.rnx" - - "METG*.rnx" - - "MGUE*.rnx" - - "POAL*.rnx" - - "QUIN*.rnx" - - "RGDG*.rnx" - - "SAMO*.rnx" - - "SEY2*.rnx" - - "SOLO*.rnx" - - "TONG*.rnx" - - "TOPL*.rnx" - - "TOW2*.rnx" - - "USN7*.rnx" - -outputs: - - root_directory: / - - trace: - output_stations: true - output_network: true - level: 4 - directory: ./ - station_filename: --.TRACE - network_filename: --.TRACE - output_residuals: true - output_config: true - - output_rotation: - period: 1 - period_units: day - - ionex: - output: false - directory: ./ - filename: AUSG0.I - - ionstec: - output: false - directory: ./ - filename: IONEX.stec - - bias_sinex: - output: true - code_output_interval: 900.0 - directory: ./ - filename: -.BIA - #filename: AUS0ACSRAP_00_01D_01D_REL.BIA - output_rec_bias: false - phase_output_interval: 900.0 - - clocks: - output: true - directory: ./ - filename: .clk - output_ar_clocks: true - - sinex: - output: true - - erp: - output: true - - trop_sinex: - output: true - sources: [KALMAN] - directory: ./ - filename: -.tro - - cost: - output: true - sources: [KALMAN] - directory: ./ - filename: cost_s_t__ga__.dat - time_interval: 300 - - metadata: - - config_description: ex17 - analysis_agency: GAA - analysis_center: Geoscience Australia - analysis_program: AUSACS - rinex_comment: AUSNETWORK1 - -mongo: - enable: true - database: - output_measurements: true - output_states: true - output_rtcm_messages: true - output_test_stats: true - delete_history: true - uri: mongodb://127.0.0.1:27017 - suffix: "" - -processing_options: - - epoch_control: - #start_epoch: 2019-07-18 14:40:00 - #start_epoch: 2019-07-18 12:00:00 - end_epoch: 2019-07-18 15:10:00 - #max_epochs: 12 #0 is infinite # comment for full day run - epoch_interval: 60 #seconds - fatal_message_level: 1 - - model_error_checking: - deweighting: - deweight_factor: 1000 - - ambiguities: - outage_reset_limit: 1 - phase_reject_limit: 2 - #reinit_on_all_slips: true # (bool) Any detected slips cause removal and reinitialisation of ambiguities - - cycle_slips: - exclude: - lli: false - reset_on: - scdia: false - - process_modes: - network: true - #ppp: true - - gnss_general: - - max_gdop: 30 - elevation_mask: 10 #degrees - - raim: true - use_if_apc: true - - pivot_station: "USN7" #if not provided then will be selected automatically - - sys_options: - gps: - process: true - ambiguity_resolution: false - reject_eclipse: false - code_priorities: [ L1C, L1P, L1Y, L1W, L1M, L1N, L1S, L1L, L1X, - L2W, L2P, L2Y, L2C, L2M, L2N, L2D, L2S, L2L, L2X, - #L5I, L5Q, L5X - ] - - gnss_models: - - troposphere: - model: vmf3 #gpt2 - - ionospheric_component: - corr_mode: iono_free_linear_combo - iflc_freqs: l1l2_only - #use_if_combo: false - - sat_pos: - source: precise - - #ambiguity_resolution: - - #elevation_mask: 15 - - #wide_lane: - #mode: iter_rnd - #success_rate_threshold: 0.9999 - #solution_ratio_threshold: 3 - #process_noise_sat: 0.00001 - #process_noise_rec: 0.0001 - - #narrow_lane: - #mode: iter_rnd - #success_rate_threshold: 0.9999 - #solution_ratio_threshold: 3 - - - ##lambda_set_size: 10 - ##max_round_iterations: 3 - - ssr_corrections: - calculate_precursors: false - - minimum_constraints: - enable: true - - once_per_epoch: true # (bool) Perform minimum constraints on a temporary filter and output results once per epoch - - translation: - estimated: [true] - rotation: - estimated: [true] - scale: - estimated: [false] - #sigma: [1] - - inverter: ldlt - - #full_vcv: true - #scale_by_vcv: true - max_filter_iterations: 10 - max_prefit_removals: 5 # (int) Maximum number of measurements to exclude using prefit checks before attempting to filter - outlier_screening: - chi_square_mode: none # (enum) Chi-square test mode - innovation, measurement, state {NONE,INNOVATION,MEASUREMENT,STATE} - chi_square_test: false # (bool) Enable Chi-square test - sigma_check: true # (bool) Enable prefit and postfit sigma check - sigma_threshold: 3.000000 # (float) sigma threshold - w_test: false # (bool) Enable w-test - - #default_station_noise: [1] #constrain all by default - #default_station_noise: [0.01, 0.01, 0.01] #constrain all by default - - station_noise: - global: [0.01, 0.01, 0.01] - # ALIC: 0.001 #constrain strongly - # STN3: [20] - # DONT: [-1] - # BOAV: 100 #constrain weakly - - - filter_options: - - inverter: ldlt #LLT LDLT INV - - outlier_screening: - max_filter_iterations: 10 - max_prefit_removals: 2 - - rts: - #enable: true - lag: -1 #-ve for full reverse, +ve for limited epochs - directory: ./ - filename: -Netwuseork.rts - -estimation_parameters: - - stations: - - error_model: elevation_dependent - code_sigmas: [0.3333] - phase_sigmas: [0.0033] - - global: - pos: - estimated: [true] - sigma: [1.0] - proc_noise: [0] - - clk: - estimated: [true] - sigma: [1000] - proc_noise: [10] - proc_noise_dt: sqrt_second - - amb: - estimated: [true] - sigma: [1000] - proc_noise: [0] - - phase_bias: - estimated: [true] - sigma: [10] - proc_noise: [0] - - code_bias: - estimated: [true] - sigma: [10] - proc_noise: [0] - - trop: - estimated: [true] - sigma: [0.3] - proc_noise: [0.0001] #0.1 mm - proc_noise_dt: sqrt_second - - trop_grads: - estimated: [true] - sigma: [0.03] - proc_noise: [1.0E-6] - proc_noise_dt: sqrt_second - - ion_stec: - estimated: [true] - sigma: [70] - proc_noise: [-1] - - USN7: - clk: - #estimated: [false] # Set reference (pivot) station clock - #sigma: [10] - #proc_noise: [1e-8] - - AGGO: - clk_rate: - estimated: [true] - sigma: [10] - proc_noise: [1e-8] - - CEDU: - trop_gauss_markov: - estimated: [true] - sigma: [0.05] - proc_noise: [0.01] - tau: [12600] - proc_noise_dt: sqrt_second - - trop_grads_gauss_markov: - estimated: [true] - sigma: [0.01] - proc_noise: [0.00549] - tau: [9216] - proc_noise_dt: second - - satellites: - - global: - clk: - estimated: [true] - sigma: [1000] - proc_noise: [1] - #proc_noise_dt: min - - #clk_rate: - #estimated: [true] - #sigma: [10] - #proc_noise: [1e-5] - - #orb: - #estimated: [false] - - G01: - clk_rate: - estimated: [true] - sigma: [10] - proc_noise: [1e-5] - - G02: - clk_rate: - estimated: [true] - sigma: [0.1] - proc_noise: [1e-6] - - clk_rate_gauss_markov: - estimated: [true] - sigma: [0.05] - proc_noise: [1e-3] - proc_noise_dt: sqrt_second - tau: [86400] - - eop: - estimated: [true] - sigma: [30] - - eop_rates: - estimated: [true] - sigma: [30] - -debug: - unit_tests: - #enable: true diff --git a/examples/ex21_pod_fit_gps.yaml b/examples/ex21_pod_fit_gps.yaml deleted file mode 100644 index c3748333f..000000000 --- a/examples/ex21_pod_fit_gps.yaml +++ /dev/null @@ -1,340 +0,0 @@ -pod_options: - output_directory: ex21 -# can only choose one option here -#---------------------------------------------------------------------- - pod_mode_fit: true # pod_mode = 1 Orbit Determination (pseudo-observations; orbit fitting) - pod_mode_predict: false # pod_mode = 2 Orbit Determination and Prediction - pod_mode_eqm_int: false # pod_mode = 3 Orbit Integration (Equation of Motion only) - pod_mode_ic_int: false # pod_mode = 4 Orbit Integration and Partials (Equation of Motion and Variational Equations) - -# can only choose one option here -#---------------------------------------------------------------------- - time_scale: - TT_time: false - UTC_time: false - GPS_time: true - TAI_time: false - -# can only choose one option here -#---------------------------------------------------------------------- - ic_input_format: - sp3: true # Input a-priori orbit in sp3 format - icf: false # Input a-priori orbit in POD Initial Conditions File (ICF) format - ic_filename: some_file - -# can only choose one option here -#---------------------------------------------------------------------- - ic_input_refsys: - itrf: true # Initial Conditions Reference Frame: ITRF, ICRF - icrf: false # Initial Conditions Reference Frame: ITRF, ICRF - kepler: false - -#--------------------------------------------------------------------------- -# Observation Model - pseudobs_orbit_filename: products/igs19424.sp3 # Pseudo observations orbit filename - pseudobs_interp_step: 900 # Interval (sec) of the interpolated orbit - pseudobs_interp_points: 12 # Number of data points used in Lagrange interpolation - IC_time: 2017 3 30 0 0 0 - -#---------------------------------------------------------------------- -# Orbit arc length (in hours) - orbit_arc_determination: 24 # Orbit Estimation arc - orbit_arc_prediction: 12 # Orbit Prediction arc - orbit_arc_backwards: 2 # Orbit Propagation backwards arc - -#--------------------------------------------------------------------------- -# External Orbit Comparison - ext_orbit_enabled: true - ext_orbit_type_sp3: false # Orbit data in sp3 format (including position and velocity vectors) - ext_orbit_type_interp: true # Interpolated orbit based on Lagrange interpolation of sp3 file - ext_orbit_type_kepler: false # Keplerian orbit - ext_orbit_type_lagrange: false # 3-day Lagrange interpolation - ext_orbit_type_position_sp3: false # Position and SP3 file - ext_orbit_filename: products/igs19424.sp3 # External (comparison) orbit filename - ext_orbit_interp_step: 900 # Interval (sec) of the interpolated/Kepler orbit - ext_orbit_interp_points: 12 # Number of data points used in Lagrange interpolation - -# can only choose one option here -#---------------------------------------------------------------------- - ext_orbit_frame: - itrf: true # External orbit reference frame - ITRF - icrf: false # External orbit reference frame - ICRF - kepler: false - -#--------------------------------------------------------------------------- -# Earth Orientation - EOP solution options: - EOP_soln_c04: true # IERS C04 solution : EOP_sol = 1 - EOP_soln_rapid: false # IERS rapid service/prediction center (RS/PC) Daily : EOP_sol = 2 - EOP_soln_igs: false # IGS ultra-rapid ERP + IERS RS/PC Daily (dX,dY) : EOP_sol = 3. Need both rapid_file AND igs_file - EOP_soln_c04_file: products/tables/EOP_14_C04_IAU2000A_one_file_1962-now.txt - # EOP_soln_rapid_file: finals2000A.daily - # ERP_soln_igs_file: igu18543_12.erp - EOP_soln_interp_points: 4 # EOP solution interpolation points - -# --------------------------------------------------------------------------- -# IAU Precession-Nutation model: - iau_model_2000: true # IAU2000A: iau_pn_model = 2000 - iau_model_2006: false # IAU2006/2000A: iau_pn_model = 2006 - -#--------------------------------------------------------------------------- -# Gravity model file - gravity_model_file: products/tables/goco05s.gfc # goco05s.gfc, eigen-6s2.gfc, ITSG-Grace2014k.gfc - -#--------------------------------------------------------------------------- -# Planetary/Lunar ephemeris - JPL DE Ephemeris - DE_fname_header: products/tables/header.430_229 - DE_fname_data: products/tables/ascp1950.430 - -#--------------------------------------------------------------------------- -# Ocean tide model file - ocean_tides_model_file: products/tables/fes2004_Cnm-Snm.dat # FES2004 ocean tide model - -#---------------------------------------------------------------------- -# Leap second filename - leapsec_filename: products/tables/leap.second - -#---------------------------------------------------------------------- -# Satellite metadata SINEX - satsinex_filename: products/tables/igs_metadata_2063.snx - -#--------------------------------------------------------------------------- -# Parameter Estimation - estimator_procedure: 1 - estimator_iterations: 2 - -#--------------------------------------------------------------------------- -# Variational Equations - veq_integration: false - -#---------------------------------------------------------------------- -# Reference System for Variational Equations' - Partials & Parameter Estimation - veq_refsys: - itrs: true # ITRS: Terrestrial Reference System - icrs: false # ICRS: Celestial Reference System - kepler: false - -#---------------------------------------------------------------------- -# Write to sp3 orbit format: Option for write Satellite Velocity vector - sp3_velocity: false # Write Velocity vector to sp3 orbit - -#---------------------------------------------------------------------- -# Write partials of the velocity vector w.r.t. parameters into the orbits_partials output file: - partials_velocity: false # Write out velocity vector partials wrt orbital state vector elements - -#---------------------------------------------------------------------- -# SRP A priori model -# cannon_ball : use empirical cannonball f0 model - mode 1 -# simple_boxwing : use simple box-wing model - mode 2 -# full_boxwing : use full box-wing model from repro3 routines - mode 3 -# none : no a priori SRP model - mode 0 - srp_apriori_model: - no_model: false - cannon_ball_model: true - simple_boxwing_model: false - full_boxwing_model: false - # -#---------------------------------------------------------------------- -# SRP modes - Default srp_parameters = ECOM1 + EMP - srp_modes: - ECOM1: true - ECOM2: false - hybrid: false - SBOXW: false - EMPirical: false - - gravity_model: - central_force: false # Central force gravity field : gravity_model = 0 - static_gravity_model: false # Static global gravity field model : gravity_model = 1 - time_variable_model: true # Time-variable global gravity field model : gravity_model = 2 - iers_geopotential_model: false # IERS conventional geopotential model : gravity_model = 3 - - pulse: - enabled: false - epoch_number: 1 # number of epochs to apply pulses - offset: 43200 # since the start of day - interval: 43200 # repeat every N seconds - directions: - x_direction: true - y_direction: true - z_direction: true - r_direction: false - t_direction: false - n_direction: false - reference_frame: - icrf: true - orbital: false - -eqm_options: -#--------------------------------------------------------------------------- -# Numerical integration method -# Runge-Kutta-Nystrom 7th order RKN7(6): RKN7, Runge-Kutta 4th order: RK4, Runge-Kutta 8th order RK8(7)13: RK8 - integration_options: - RK4_integrator_method: false - RKN7_integrator_method: true - RK8_integrator_method: false - integrator_step: 900 # Integrator stepsize in seconds - -#--------------------------------------------------------------------------- -# Gravitational Forces - gravity_field: - enabled: true - gravity_degree_max: 15 # Gravity model maximum degree/order (d/o) - timevar_degree_max: 15 # Time-variable coefficients maximum d/o - -#--------------------------------------------------------------------------- -# Planetary Gravitational Forces - planetary_perturbations: - enabled: true - -#--------------------------------------------------------------------------- - tidal_effects: - enabled: true - solid_tides_nonfreq: true # Solid Earth Tides frequency-independent terms - solid_tides_freq: true # Solid Earth Tides frequency-dependent terms - ocean_tides: true # Ocean Tides - solid_earth_pole_tides: true # Solid Earth Pole Tide - ocean_pole_tide: true # Ocean Pole Tide - ocean_tides_degree_max: 15 # Ocean Tides model maximum degree/order - -#--------------------------------------------------------------------------- -# Relativistic effects - relativistic_effects: - enabled: true - -#--------------------------------------------------------------------------- -# Non-gravitational Effects - non_gravitational_effects: - enabled: true - solar_radiation: true - earth_radiation: true - antenna_thrust: true - - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - EMP_R_bias: true - EMP_T_bias: true - EMP_N_bias: true - ECOM_D_cpr: true - ECOM_Y_cpr: true - ECOM_B_cpr: true - ECOM_D_2_cpr: false - ECOM_D_4_cpr: false - EMP_R_cpr: true - EMP_T_cpr: true - EMP_N_cpr: true - cpr_count: 1 - -veq_options: -#--------------------------------------------------------------------------- -# Numerical integration method -# Runge-Kutta-Nystrom 7th order RKN7(6): RKN7, Runge-Kutta 4th order: RK4, Runge-Kutta 8th order RK8(7)13: RK8 -# NB for VEQ, only RK7 is supported. Do not select any other value - integration_options: - RK4_integrator_method: false - RKN7_integrator_method: true - RK8_integrator_method: false - integrator_step: 900 # Integrator stepsize in seconds - -#--------------------------------------------------------------------------- -# Gravitational Forces - gravity_field: - enabled: true - gravity_degree_max: 5 # Gravity model maximum degree/order (d/o) - timevar_degree_max: 5 # Time-variable coefficients maximum d/o - -#--------------------------------------------------------------------------- -# Planetary Gravitational Forces - planetary_perturbations: - enabled: true - -#--------------------------------------------------------------------------- - tidal_effects: - enabled: false - solid_tides_nonfreq: true # Solid Earth Tides frequency-independent terms - solid_tides_freq: true # Solid Earth Tides frequency-dependent terms - ocean_tides: true # Ocean Tides - solid_earth_pole_tides: true # Solid Earth Pole Tide - ocean_pole_tide: true # Ocean Pole Tide - ocean_tides_degree_max: 15 # Ocean Tides model maximum degree/order - -#--------------------------------------------------------------------------- -# Relativistic effects - relativistic_effects: - enabled: false - -#--------------------------------------------------------------------------- -# Non-gravitational Effects - non_gravitational_effects: - enabled: true - solar_radiation: true - earth_radiation: true - antenna_thrust: true - - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - EMP_R_bias: true - EMP_T_bias: true - EMP_N_bias: true - ECOM_D_cpr: true - ECOM_Y_cpr: true - ECOM_B_cpr: true - ECOM_D_2_cpr: false - ECOM_D_4_cpr: false - EMP_R_cpr: true - EMP_T_cpr: true - EMP_N_cpr: true - cpr_count: 1 - -# put any system, block or PRN overrides here -overrides: - system: - GPS: - srp_apriori_model: - no_model: false - cannon_ball_model: true - simple_boxwing_model: false - full_boxwing_model: false - GAL: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: false - full_boxwing_model: true - GLO: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false - BDS: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false - block: - GPS-IIF: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false -# GPS BLK IIF use ECOM2 parameters - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - ECOM_D_2_cpr: false - ECOM_D_4_cpr: false - ECOM_B_cpr: true - prn: - G01: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: false - full_boxwing_model: true diff --git a/examples/ex22_pod_fit_bds.yaml b/examples/ex22_pod_fit_bds.yaml deleted file mode 100644 index 429a8de50..000000000 --- a/examples/ex22_pod_fit_bds.yaml +++ /dev/null @@ -1,347 +0,0 @@ -pod_options: - output_directory: ex22c -# can only choose one option here -#---------------------------------------------------------------------- - pod_mode_fit: true # pod_mode = 1 Orbit Determination (pseudo-observations; orbit fitting) - pod_mode_predict: false # pod_mode = 2 Orbit Determination and Prediction - pod_mode_eqm_int: false # pod_mode = 3 Orbit Integration (Equation of Motion only) - pod_mode_ic_int: false # pod_mode = 4 Orbit Integration and Partials (Equation of Motion and Variational Equations) - -# can only choose one option here -#---------------------------------------------------------------------- - time_scale: - TT_time: false - UTC_time: false - GPS_time: true - TAI_time: false - -# can only choose one option here -#---------------------------------------------------------------------- - ic_input_format: - sp3: true # Input a-priori orbit in sp3 format - icf: false # Input a-priori orbit in POD Initial Conditions File (ICF) format - ic_filename: some_file - -# can only choose one option here -#---------------------------------------------------------------------- - ic_input_refsys: - itrf: false # Initial Conditions Reference Frame: ITRF, ICRF - icrf: true # Initial Conditions Reference Frame: ITRF, ICRF - kepler: false - -# optional limiting to constellations -#---------------------------------------------------------------------- - constellations: - GPS: false - GALILEO: false - GLONASS: false - BEIDOU: true - QZSS: false - -#--------------------------------------------------------------------------- -# Observation Model - pseudobs_orbit_filename: products/COD0MGXFIN_20191990000_01D_05M_ORB.SP3 # Pseudo observations orbit filename - pseudobs_interp_step: 900 # Interval (sec) of the interpolated orbit - pseudobs_interp_points: 12 # Number of data points used in Lagrange interpolation - -#---------------------------------------------------------------------- -# Orbit arc length (in hours) - orbit_arc_determination: 24 # Orbit Estimation arc - orbit_arc_prediction: 2 # Orbit Prediction arc - orbit_arc_backwards: 2 # Orbit Propagation backwards arc - -#--------------------------------------------------------------------------- -# External Orbit Comparison - ext_orbit_enabled: true - ext_orbit_type_sp3: false # Orbit data in sp3 format (including position and velocity vectors) - ext_orbit_type_interp: true # Interpolated orbit based on Lagrange interpolation of sp3 file - ext_orbit_type_kepler: false # Keplerian orbit - ext_orbit_type_lagrange: false # 3-day Lagrange interpolation - ext_orbit_type_position_sp3: false # Position and SP3 file - ext_orbit_filename: products/COD0MGXFIN_20191990000_01D_05M_ORB.SP3 # External (comparison) orbit filename - ext_orbit_interp_step: 900 # Interval (sec) of the interpolated/Kepler orbit - ext_orbit_interp_points: 12 # Number of data points used in Lagrange interpolation - -# can only choose one option here -#---------------------------------------------------------------------- - ext_orbit_frame: - itrf: true # External orbit reference frame - ITRF - icrf: false # External orbit reference frame - ICRF - kepler: false - -#--------------------------------------------------------------------------- -# Earth Orientation - EOP solution options: - EOP_soln_c04: true # IERS C04 solution : EOP_sol = 1 - EOP_soln_rapid: false # IERS rapid service/prediction center (RS/PC) Daily : EOP_sol = 2 - EOP_soln_igs: false # IGS ultra-rapid ERP + IERS RS/PC Daily (dX,dY) : EOP_sol = 3. Need both rapid_file AND igs_file - EOP_soln_c04_file: products/tables/EOP_14_C04_IAU2000A_one_file_1962-now.txt - EOP_soln_rapid_file: finals2000A.daily - ERP_soln_igs_file: igu18543_12.erp - EOP_soln_interp_points: 6 # EOP solution interpolation points - -# --------------------------------------------------------------------------- -# IAU Precession-Nutation model: - iau_model_2000: true # IAU2000A: iau_pn_model = 2000 - iau_model_2006: false # IAU2006/2000A: iau_pn_model = 2006 - -#--------------------------------------------------------------------------- -# Gravity model file - gravity_model_file: products/tables/goco05s.gfc # goco05s.gfc, eigen-6s2.gfc, ITSG-Grace2014k.gfc - -#--------------------------------------------------------------------------- -# Planetary/Lunar ephemeris - JPL DE Ephemeris - DE_fname_header: products/tables/header.430_229 - DE_fname_data: products/tables/ascp1950.430 - -#--------------------------------------------------------------------------- -# Ocean tide model file - ocean_tides_model_file: products/tables/fes2004_Cnm-Snm.dat # FES2004 ocean tide model - -#---------------------------------------------------------------------- -# Leap second filename - leapsec_filename: products/tables/leap.second - -#---------------------------------------------------------------------- -# Satellite metadata SINEX - satsinex_filename: products/tables/igs_metadata_2063.snx - -#--------------------------------------------------------------------------- -# Parameter Estimation - estimator_procedure: 1 - estimator_iterations: 2 - -#--------------------------------------------------------------------------- -# Variational Equations - veq_integration: false - -#---------------------------------------------------------------------- -# Reference System for Variational Equations' - Partials & Parameter Estimation - veq_refsys: - itrs: true # ITRS: Terrestrial Reference System - icrs: false # ICRS: Celestial Reference System - -#---------------------------------------------------------------------- -# Write to sp3 orbit format: Option for write Satellite Velocity vector - sp3_velocity: false # Write Velocity vector to sp3 orbit - -#---------------------------------------------------------------------- -# Write partials of the velocity vector w.r.t. parameters into the orbits_partials output file: - partials_velocity: false # Write out velocity vector partials wrt orbital state vector elements - -#---------------------------------------------------------------------- -# SRP A priori model -# cannon_ball : use empirical cannonball f0 model - mode 1 -# simple_boxwing : use simple box-wing model - mode 2 -# full_boxwing : use full box-wing model from repro3 routines - mode 3 -# none : no a priori SRP model - mode 0 - srp_apriori_model: - no_model: false - cannon_ball_model: true - simple_boxwing_model: false - full_boxwing_model: false - # -#---------------------------------------------------------------------- -# SRP modes - Default srp_parameters = ECOM1 + EMP - srp_modes: - ECOM1: false - ECOM2: true - hybrid: false - SBOXW: false - EMPirical: false - - gravity_model: - central_force: false # Central force gravity field : gravity_model = 0 - static_gravity_model: false # Static global gravity field model : gravity_model = 1 - time_variable_model: true # Time-variable global gravity field model : gravity_model = 2 - iers_geopotential_model: false # IERS conventional geopotential model : gravity_model = 3 - - pulse: - enabled: false - epoch_number: 1 # number of epochs to apply pulses - offset: 43200 # since the start of day - interval: 43200 # repeat every N seconds - directions: - x_direction: true - y_direction: true - z_direction: true - r_direction: false - t_direction: false - n_direction: false - reference_frame: - icrf: true - orbital: false - -eqm_options: -#--------------------------------------------------------------------------- -# Numerical integration method -# Runge-Kutta-Nystrom 7th order RKN7(6): RKN7, Runge-Kutta 4th order: RK4, Runge-Kutta 8th order RK8(7)13: RK8 - integration_options: - RK4_integrator_method: false - RKN7_integrator_method: true - RK8_integrator_method: false - integrator_step: 300 # Integrator stepsize in seconds - -#--------------------------------------------------------------------------- -# Gravitational Forces - gravity_field: - enabled: true - gravity_degree_max: 15 # Gravity model maximum degree/order (d/o) - timevar_degree_max: 15 # Time-variable coefficients maximum d/o - -#--------------------------------------------------------------------------- -# Planetary Gravitational Forces - planetary_perturbations: - enabled: true - -#--------------------------------------------------------------------------- - tidal_effects: - enabled: true - solid_tides_nonfreq: true # Solid Earth Tides frequency-independent terms - solid_tides_freq: true # Solid Earth Tides frequency-dependent terms - ocean_tides: true # Ocean Tides - solid_earth_pole_tides: false # Solid Earth Pole Tide - ocean_pole_tide: false # Ocean Pole Tide - ocean_tides_degree_max: 15 # Ocean Tides model maximum degree/order - -#--------------------------------------------------------------------------- -# Relativistic effects - relativistic_effects: - enabled: true - -#--------------------------------------------------------------------------- -# Non-gravitational Effects - non_gravitational_effects: - enabled: true - solar_radiation: true - earth_radiation: true - antenna_thrust: true - - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - EMP_R_bias: true - EMP_T_bias: true - EMP_N_bias: true - ECOM_D_cpr: false - ECOM_Y_cpr: false - ECOM_B_cpr: true - ECOM_D_2_cpr: true - ECOM_D_4_cpr: true - EMP_R_cpr: true - EMP_T_cpr: true - EMP_N_cpr: true - cpr_count: 1 - -veq_options: -#--------------------------------------------------------------------------- -# Numerical integration method -# Runge-Kutta-Nystrom 7th order RKN7(6): RKN7, Runge-Kutta 4th order: RK4, Runge-Kutta 8th order RK8(7)13: RK8 -# NB for VEQ, only RK7 is supported. Do not select any other value - integration_options: - RK4_integrator_method: false - RKN7_integrator_method: true - RK8_integrator_method: false - integrator_step: 300 # Integrator stepsize in seconds - -#--------------------------------------------------------------------------- -# Gravitational Forces - gravity_field: - enabled: true - gravity_degree_max: 5 # Gravity model maximum degree/order (d/o) - timevar_degree_max: 5 # Time-variable coefficients maximum d/o - -#--------------------------------------------------------------------------- -# Planetary Gravitational Forces - planetary_perturbations: - enabled: true - -#--------------------------------------------------------------------------- - tidal_effects: - enabled: false - solid_tides_nonfreq: true # Solid Earth Tides frequency-independent terms - solid_tides_freq: true # Solid Earth Tides frequency-dependent terms - ocean_tides: true # Ocean Tides - solid_earth_pole_tides: false # Solid Earth Pole Tide - ocean_pole_tide: false # Ocean Pole Tide - ocean_tides_degree_max: 15 # Ocean Tides model maximum degree/order - -#--------------------------------------------------------------------------- -# Relativistic effects - relativistic_effects: - enabled: false - -#--------------------------------------------------------------------------- -# Non-gravitational Effects - non_gravitational_effects: - enabled: true - solar_radiation: true - earth_radiation: false - antenna_thrust: false - - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - EMP_R_bias: true - EMP_T_bias: true - EMP_N_bias: true - ECOM_D_cpr: false - ECOM_Y_cpr: false - ECOM_B_cpr: true - ECOM_D_2_cpr: true - ECOM_D_4_cpr: true - EMP_R_cpr: true - EMP_T_cpr: true - EMP_N_cpr: true - cpr_count: 1 - -# put any system, block or PRN overrides here -overrides: - system: - GPS: - srp_apriori_model: - no_model: false - cannon_ball_model: true - simple_boxwing_model: false - full_boxwing_model: false - GAL: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: false - full_boxwing_model: true - GLO: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false - BDS: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false - block: - GPS-IIF: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false -# GPS BLK IIF use ECOM2 parameters - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - ECOM_D_2_cpr: false - ECOM_D_4_cpr: false - ECOM_B_cpr: true - prn: - G01: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: false - full_boxwing_model: true diff --git a/examples/ex22_pod_fit_gal.yaml b/examples/ex22_pod_fit_gal.yaml deleted file mode 100644 index 20c684d74..000000000 --- a/examples/ex22_pod_fit_gal.yaml +++ /dev/null @@ -1,347 +0,0 @@ -pod_options: - output_directory: ex22e -# can only choose one option here -#---------------------------------------------------------------------- - pod_mode_fit: true # pod_mode = 1 Orbit Determination (pseudo-observations; orbit fitting) - pod_mode_predict: false # pod_mode = 2 Orbit Determination and Prediction - pod_mode_eqm_int: false # pod_mode = 3 Orbit Integration (Equation of Motion only) - pod_mode_ic_int: false # pod_mode = 4 Orbit Integration and Partials (Equation of Motion and Variational Equations) - -# can only choose one option here -#---------------------------------------------------------------------- - time_scale: - TT_time: false - UTC_time: false - GPS_time: true - TAI_time: false - -# can only choose one option here -#---------------------------------------------------------------------- - ic_input_format: - sp3: true # Input a-priori orbit in sp3 format - icf: false # Input a-priori orbit in POD Initial Conditions File (ICF) format - ic_filename: some_file - -# can only choose one option here -#---------------------------------------------------------------------- - ic_input_refsys: - itrf: false # Initial Conditions Reference Frame: ITRF, ICRF - icrf: true # Initial Conditions Reference Frame: ITRF, ICRF - kepler: false - -# optional limiting to constellations -#---------------------------------------------------------------------- - constellations: - GPS: false - GALILEO: true - GLONASS: false - BEIDOU: false - QZSS: false - -#--------------------------------------------------------------------------- -# Observation Model - pseudobs_orbit_filename: products/COD0MGXFIN_20191990000_01D_05M_ORB.SP3 # Pseudo observations orbit filename - pseudobs_interp_step: 900 # Interval (sec) of the interpolated orbit - pseudobs_interp_points: 12 # Number of data points used in Lagrange interpolation - -#---------------------------------------------------------------------- -# Orbit arc length (in hours) - orbit_arc_determination: 24 # Orbit Estimation arc - orbit_arc_prediction: 2 # Orbit Prediction arc - orbit_arc_backwards: 2 # Orbit Propagation backwards arc - -#--------------------------------------------------------------------------- -# External Orbit Comparison - ext_orbit_enabled: true - ext_orbit_type_sp3: false # Orbit data in sp3 format (including position and velocity vectors) - ext_orbit_type_interp: true # Interpolated orbit based on Lagrange interpolation of sp3 file - ext_orbit_type_kepler: false # Keplerian orbit - ext_orbit_type_lagrange: false # 3-day Lagrange interpolation - ext_orbit_type_position_sp3: false # Position and SP3 file - ext_orbit_filename: products/COD0MGXFIN_20191990000_01D_05M_ORB.SP3 # External (comparison) orbit filename - ext_orbit_interp_step: 900 # Interval (sec) of the interpolated/Kepler orbit - ext_orbit_interp_points: 12 # Number of data points used in Lagrange interpolation - -# can only choose one option here -#---------------------------------------------------------------------- - ext_orbit_frame: - itrf: true # External orbit reference frame - ITRF - icrf: false # External orbit reference frame - ICRF - kepler: false - -#--------------------------------------------------------------------------- -# Earth Orientation - EOP solution options: - EOP_soln_c04: true # IERS C04 solution : EOP_sol = 1 - EOP_soln_rapid: false # IERS rapid service/prediction center (RS/PC) Daily : EOP_sol = 2 - EOP_soln_igs: false # IGS ultra-rapid ERP + IERS RS/PC Daily (dX,dY) : EOP_sol = 3. Need both rapid_file AND igs_file - EOP_soln_c04_file: products/tables/EOP_14_C04_IAU2000A_one_file_1962-now.txt - EOP_soln_rapid_file: finals2000A.daily - ERP_soln_igs_file: igu18543_12.erp - EOP_soln_interp_points: 6 # EOP solution interpolation points - -# --------------------------------------------------------------------------- -# IAU Precession-Nutation model: - iau_model_2000: true # IAU2000A: iau_pn_model = 2000 - iau_model_2006: false # IAU2006/2000A: iau_pn_model = 2006 - -#--------------------------------------------------------------------------- -# Gravity model file - gravity_model_file: products/tables/goco05s.gfc # goco05s.gfc, eigen-6s2.gfc, ITSG-Grace2014k.gfc - -#--------------------------------------------------------------------------- -# Planetary/Lunar ephemeris - JPL DE Ephemeris - DE_fname_header: products/tables/header.430_229 - DE_fname_data: products/tables/ascp1950.430 - -#--------------------------------------------------------------------------- -# Ocean tide model file - ocean_tides_model_file: products/tables/fes2004_Cnm-Snm.dat # FES2004 ocean tide model - -#---------------------------------------------------------------------- -# Leap second filename - leapsec_filename: products/tables/leap.second - -#---------------------------------------------------------------------- -# Satellite metadata SINEX - satsinex_filename: products/tables/igs_metadata_2063.snx - -#--------------------------------------------------------------------------- -# Parameter Estimation - estimator_procedure: 1 - estimator_iterations: 2 - -#--------------------------------------------------------------------------- -# Variational Equations - veq_integration: false - -#---------------------------------------------------------------------- -# Reference System for Variational Equations' - Partials & Parameter Estimation - veq_refsys: - itrs: true # ITRS: Terrestrial Reference System - icrs: false # ICRS: Celestial Reference System - -#---------------------------------------------------------------------- -# Write to sp3 orbit format: Option for write Satellite Velocity vector - sp3_velocity: false # Write Velocity vector to sp3 orbit - -#---------------------------------------------------------------------- -# Write partials of the velocity vector w.r.t. parameters into the orbits_partials output file: - partials_velocity: false # Write out velocity vector partials wrt orbital state vector elements - -#---------------------------------------------------------------------- -# SRP A priori model -# cannon_ball : use empirical cannonball f0 model - mode 1 -# simple_boxwing : use simple box-wing model - mode 2 -# full_boxwing : use full box-wing model from repro3 routines - mode 3 -# none : no a priori SRP model - mode 0 - srp_apriori_model: - no_model: false - cannon_ball_model: true - simple_boxwing_model: false - full_boxwing_model: false - # -#---------------------------------------------------------------------- -# SRP modes - Default srp_parameters = ECOM1 + EMP - srp_modes: - ECOM1: false - ECOM2: true - hybrid: false - SBOXW: false - EMPirical: false - - gravity_model: - central_force: false # Central force gravity field : gravity_model = 0 - static_gravity_model: false # Static global gravity field model : gravity_model = 1 - time_variable_model: true # Time-variable global gravity field model : gravity_model = 2 - iers_geopotential_model: false # IERS conventional geopotential model : gravity_model = 3 - - pulse: - enabled: false - epoch_number: 1 # number of epochs to apply pulses - offset: 43200 # since the start of day - interval: 43200 # repeat every N seconds - directions: - x_direction: true - y_direction: true - z_direction: true - r_direction: false - t_direction: false - n_direction: false - reference_frame: - icrf: true - orbital: false - -eqm_options: -#--------------------------------------------------------------------------- -# Numerical integration method -# Runge-Kutta-Nystrom 7th order RKN7(6): RKN7, Runge-Kutta 4th order: RK4, Runge-Kutta 8th order RK8(7)13: RK8 - integration_options: - RK4_integrator_method: false - RKN7_integrator_method: true - RK8_integrator_method: false - integrator_step: 300 # Integrator stepsize in seconds - -#--------------------------------------------------------------------------- -# Gravitational Forces - gravity_field: - enabled: true - gravity_degree_max: 15 # Gravity model maximum degree/order (d/o) - timevar_degree_max: 15 # Time-variable coefficients maximum d/o - -#--------------------------------------------------------------------------- -# Planetary Gravitational Forces - planetary_perturbations: - enabled: true - -#--------------------------------------------------------------------------- - tidal_effects: - enabled: true - solid_tides_nonfreq: true # Solid Earth Tides frequency-independent terms - solid_tides_freq: true # Solid Earth Tides frequency-dependent terms - ocean_tides: true # Ocean Tides - solid_earth_pole_tides: false # Solid Earth Pole Tide - ocean_pole_tide: false # Ocean Pole Tide - ocean_tides_degree_max: 15 # Ocean Tides model maximum degree/order - -#--------------------------------------------------------------------------- -# Relativistic effects - relativistic_effects: - enabled: true - -#--------------------------------------------------------------------------- -# Non-gravitational Effects - non_gravitational_effects: - enabled: true - solar_radiation: true - earth_radiation: true - antenna_thrust: true - - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - EMP_R_bias: true - EMP_T_bias: true - EMP_N_bias: true - ECOM_D_cpr: false - ECOM_Y_cpr: false - ECOM_B_cpr: true - ECOM_D_2_cpr: true - ECOM_D_4_cpr: true - EMP_R_cpr: true - EMP_T_cpr: true - EMP_N_cpr: true - cpr_count: 1 - -veq_options: -#--------------------------------------------------------------------------- -# Numerical integration method -# Runge-Kutta-Nystrom 7th order RKN7(6): RKN7, Runge-Kutta 4th order: RK4, Runge-Kutta 8th order RK8(7)13: RK8 -# NB for VEQ, only RK7 is supported. Do not select any other value - integration_options: - RK4_integrator_method: false - RKN7_integrator_method: true - RK8_integrator_method: false - integrator_step: 300 # Integrator stepsize in seconds - -#--------------------------------------------------------------------------- -# Gravitational Forces - gravity_field: - enabled: true - gravity_degree_max: 5 # Gravity model maximum degree/order (d/o) - timevar_degree_max: 5 # Time-variable coefficients maximum d/o - -#--------------------------------------------------------------------------- -# Planetary Gravitational Forces - planetary_perturbations: - enabled: true - -#--------------------------------------------------------------------------- - tidal_effects: - enabled: false - solid_tides_nonfreq: true # Solid Earth Tides frequency-independent terms - solid_tides_freq: true # Solid Earth Tides frequency-dependent terms - ocean_tides: true # Ocean Tides - solid_earth_pole_tides: false # Solid Earth Pole Tide - ocean_pole_tide: false # Ocean Pole Tide - ocean_tides_degree_max: 15 # Ocean Tides model maximum degree/order - -#--------------------------------------------------------------------------- -# Relativistic effects - relativistic_effects: - enabled: false - -#--------------------------------------------------------------------------- -# Non-gravitational Effects - non_gravitational_effects: - enabled: true - solar_radiation: true - earth_radiation: false - antenna_thrust: false - - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - EMP_R_bias: true - EMP_T_bias: true - EMP_N_bias: true - ECOM_D_cpr: false - ECOM_Y_cpr: false - ECOM_B_cpr: true - ECOM_D_2_cpr: true - ECOM_D_4_cpr: true - EMP_R_cpr: true - EMP_T_cpr: true - EMP_N_cpr: true - cpr_count: 1 - -# put any system, block or PRN overrides here -overrides: - system: - GPS: - srp_apriori_model: - no_model: false - cannon_ball_model: true - simple_boxwing_model: false - full_boxwing_model: false - GAL: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: false - full_boxwing_model: true - GLO: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false - BDS: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false - block: - GPS-IIF: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false -# GPS BLK IIF use ECOM2 parameters - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - ECOM_D_2_cpr: false - ECOM_D_4_cpr: false - ECOM_B_cpr: true - prn: - G01: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: false - full_boxwing_model: true diff --git a/examples/ex22_pod_fit_glo.yaml b/examples/ex22_pod_fit_glo.yaml deleted file mode 100644 index a0d3cb01c..000000000 --- a/examples/ex22_pod_fit_glo.yaml +++ /dev/null @@ -1,347 +0,0 @@ -pod_options: - output_directory: ex22r -# can only choose one option here -#---------------------------------------------------------------------- - pod_mode_fit: true # pod_mode = 1 Orbit Determination (pseudo-observations; orbit fitting) - pod_mode_predict: false # pod_mode = 2 Orbit Determination and Prediction - pod_mode_eqm_int: false # pod_mode = 3 Orbit Integration (Equation of Motion only) - pod_mode_ic_int: false # pod_mode = 4 Orbit Integration and Partials (Equation of Motion and Variational Equations) - -# can only choose one option here -#---------------------------------------------------------------------- - time_scale: - TT_time: false - UTC_time: false - GPS_time: true - TAI_time: false - -# can only choose one option here -#---------------------------------------------------------------------- - ic_input_format: - sp3: true # Input a-priori orbit in sp3 format - icf: false # Input a-priori orbit in POD Initial Conditions File (ICF) format - ic_filename: some_file - -# can only choose one option here -#---------------------------------------------------------------------- - ic_input_refsys: - itrf: false # Initial Conditions Reference Frame: ITRF, ICRF - icrf: true # Initial Conditions Reference Frame: ITRF, ICRF - kepler: false - -# optional limiting to constellations -#---------------------------------------------------------------------- - constellations: - GPS: false - GALILEO: false - GLONASS: true - BEIDOU: false - QZSS: false - -#--------------------------------------------------------------------------- -# Observation Model - pseudobs_orbit_filename: products/COD0MGXFIN_20191990000_01D_05M_ORB.SP3 # Pseudo observations orbit filename - pseudobs_interp_step: 900 # Interval (sec) of the interpolated orbit - pseudobs_interp_points: 12 # Number of data points used in Lagrange interpolation - -#---------------------------------------------------------------------- -# Orbit arc length (in hours) - orbit_arc_determination: 24 # Orbit Estimation arc - orbit_arc_prediction: 2 # Orbit Prediction arc - orbit_arc_backwards: 2 # Orbit Propagation backwards arc - -#--------------------------------------------------------------------------- -# External Orbit Comparison - ext_orbit_enabled: true - ext_orbit_type_sp3: false # Orbit data in sp3 format (including position and velocity vectors) - ext_orbit_type_interp: true # Interpolated orbit based on Lagrange interpolation of sp3 file - ext_orbit_type_kepler: false # Keplerian orbit - ext_orbit_type_lagrange: false # 3-day Lagrange interpolation - ext_orbit_type_position_sp3: false # Position and SP3 file - ext_orbit_filename: products/COD0MGXFIN_20191990000_01D_05M_ORB.SP3 # External (comparison) orbit filename - ext_orbit_interp_step: 900 # Interval (sec) of the interpolated/Kepler orbit - ext_orbit_interp_points: 12 # Number of data points used in Lagrange interpolation - -# can only choose one option here -#---------------------------------------------------------------------- - ext_orbit_frame: - itrf: true # External orbit reference frame - ITRF - icrf: false # External orbit reference frame - ICRF - kepler: false - -#--------------------------------------------------------------------------- -# Earth Orientation - EOP solution options: - EOP_soln_c04: true # IERS C04 solution : EOP_sol = 1 - EOP_soln_rapid: false # IERS rapid service/prediction center (RS/PC) Daily : EOP_sol = 2 - EOP_soln_igs: false # IGS ultra-rapid ERP + IERS RS/PC Daily (dX,dY) : EOP_sol = 3. Need both rapid_file AND igs_file - EOP_soln_c04_file: products/tables/EOP_14_C04_IAU2000A_one_file_1962-now.txt - EOP_soln_rapid_file: finals2000A.daily - ERP_soln_igs_file: igu18543_12.erp - EOP_soln_interp_points: 6 # EOP solution interpolation points - -# --------------------------------------------------------------------------- -# IAU Precession-Nutation model: - iau_model_2000: true # IAU2000A: iau_pn_model = 2000 - iau_model_2006: false # IAU2006/2000A: iau_pn_model = 2006 - -#--------------------------------------------------------------------------- -# Gravity model file - gravity_model_file: products/tables/goco05s.gfc # goco05s.gfc, eigen-6s2.gfc, ITSG-Grace2014k.gfc - -#--------------------------------------------------------------------------- -# Planetary/Lunar ephemeris - JPL DE Ephemeris - DE_fname_header: products/tables/header.430_229 - DE_fname_data: products/tables/ascp1950.430 - -#--------------------------------------------------------------------------- -# Ocean tide model file - ocean_tides_model_file: products/tables/fes2004_Cnm-Snm.dat # FES2004 ocean tide model - -#---------------------------------------------------------------------- -# Leap second filename - leapsec_filename: products/tables/leap.second - -#---------------------------------------------------------------------- -# Satellite metadata SINEX - satsinex_filename: products/tables/igs_metadata_2063.snx - -#--------------------------------------------------------------------------- -# Parameter Estimation - estimator_procedure: 1 - estimator_iterations: 2 - -#--------------------------------------------------------------------------- -# Variational Equations - veq_integration: false - -#---------------------------------------------------------------------- -# Reference System for Variational Equations' - Partials & Parameter Estimation - veq_refsys: - itrs: true # ITRS: Terrestrial Reference System - icrs: false # ICRS: Celestial Reference System - -#---------------------------------------------------------------------- -# Write to sp3 orbit format: Option for write Satellite Velocity vector - sp3_velocity: false # Write Velocity vector to sp3 orbit - -#---------------------------------------------------------------------- -# Write partials of the velocity vector w.r.t. parameters into the orbits_partials output file: - partials_velocity: false # Write out velocity vector partials wrt orbital state vector elements - -#---------------------------------------------------------------------- -# SRP A priori model -# cannon_ball : use empirical cannonball f0 model - mode 1 -# simple_boxwing : use simple box-wing model - mode 2 -# full_boxwing : use full box-wing model from repro3 routines - mode 3 -# none : no a priori SRP model - mode 0 - srp_apriori_model: - no_model: false - cannon_ball_model: true - simple_boxwing_model: false - full_boxwing_model: false - # -#---------------------------------------------------------------------- -# SRP modes - Default srp_parameters = ECOM1 + EMP - srp_modes: - ECOM1: false - ECOM2: true - hybrid: false - SBOXW: false - EMPirical: false - - gravity_model: - central_force: false # Central force gravity field : gravity_model = 0 - static_gravity_model: false # Static global gravity field model : gravity_model = 1 - time_variable_model: true # Time-variable global gravity field model : gravity_model = 2 - iers_geopotential_model: false # IERS conventional geopotential model : gravity_model = 3 - - pulse: - enabled: false - epoch_number: 1 # number of epochs to apply pulses - offset: 43200 # since the start of day - interval: 43200 # repeat every N seconds - directions: - x_direction: true - y_direction: true - z_direction: true - r_direction: false - t_direction: false - n_direction: false - reference_frame: - icrf: true - orbital: false - -eqm_options: -#--------------------------------------------------------------------------- -# Numerical integration method -# Runge-Kutta-Nystrom 7th order RKN7(6): RKN7, Runge-Kutta 4th order: RK4, Runge-Kutta 8th order RK8(7)13: RK8 - integration_options: - RK4_integrator_method: false - RKN7_integrator_method: true - RK8_integrator_method: false - integrator_step: 300 # Integrator stepsize in seconds - -#--------------------------------------------------------------------------- -# Gravitational Forces - gravity_field: - enabled: true - gravity_degree_max: 15 # Gravity model maximum degree/order (d/o) - timevar_degree_max: 15 # Time-variable coefficients maximum d/o - -#--------------------------------------------------------------------------- -# Planetary Gravitational Forces - planetary_perturbations: - enabled: true - -#--------------------------------------------------------------------------- - tidal_effects: - enabled: true - solid_tides_nonfreq: true # Solid Earth Tides frequency-independent terms - solid_tides_freq: true # Solid Earth Tides frequency-dependent terms - ocean_tides: true # Ocean Tides - solid_earth_pole_tides: false # Solid Earth Pole Tide - ocean_pole_tide: false # Ocean Pole Tide - ocean_tides_degree_max: 15 # Ocean Tides model maximum degree/order - -#--------------------------------------------------------------------------- -# Relativistic effects - relativistic_effects: - enabled: true - -#--------------------------------------------------------------------------- -# Non-gravitational Effects - non_gravitational_effects: - enabled: true - solar_radiation: true - earth_radiation: true - antenna_thrust: true - - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - EMP_R_bias: true - EMP_T_bias: true - EMP_N_bias: true - ECOM_D_cpr: false - ECOM_Y_cpr: false - ECOM_B_cpr: true - ECOM_D_2_cpr: true - ECOM_D_4_cpr: true - EMP_R_cpr: true - EMP_T_cpr: true - EMP_N_cpr: true - cpr_count: 1 - -veq_options: -#--------------------------------------------------------------------------- -# Numerical integration method -# Runge-Kutta-Nystrom 7th order RKN7(6): RKN7, Runge-Kutta 4th order: RK4, Runge-Kutta 8th order RK8(7)13: RK8 -# NB for VEQ, only RK7 is supported. Do not select any other value - integration_options: - RK4_integrator_method: false - RKN7_integrator_method: true - RK8_integrator_method: false - integrator_step: 300 # Integrator stepsize in seconds - -#--------------------------------------------------------------------------- -# Gravitational Forces - gravity_field: - enabled: true - gravity_degree_max: 5 # Gravity model maximum degree/order (d/o) - timevar_degree_max: 5 # Time-variable coefficients maximum d/o - -#--------------------------------------------------------------------------- -# Planetary Gravitational Forces - planetary_perturbations: - enabled: true - -#--------------------------------------------------------------------------- - tidal_effects: - enabled: false - solid_tides_nonfreq: true # Solid Earth Tides frequency-independent terms - solid_tides_freq: true # Solid Earth Tides frequency-dependent terms - ocean_tides: true # Ocean Tides - solid_earth_pole_tides: false # Solid Earth Pole Tide - ocean_pole_tide: false # Ocean Pole Tide - ocean_tides_degree_max: 15 # Ocean Tides model maximum degree/order - -#--------------------------------------------------------------------------- -# Relativistic effects - relativistic_effects: - enabled: false - -#--------------------------------------------------------------------------- -# Non-gravitational Effects - non_gravitational_effects: - enabled: true - solar_radiation: true - earth_radiation: false - antenna_thrust: false - - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - EMP_R_bias: true - EMP_T_bias: true - EMP_N_bias: true - ECOM_D_cpr: false - ECOM_Y_cpr: false - ECOM_B_cpr: true - ECOM_D_2_cpr: true - ECOM_D_4_cpr: true - EMP_R_cpr: true - EMP_T_cpr: true - EMP_N_cpr: true - cpr_count: 1 - -# put any system, block or PRN overrides here -overrides: - system: - GPS: - srp_apriori_model: - no_model: false - cannon_ball_model: true - simple_boxwing_model: false - full_boxwing_model: false - GAL: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: false - full_boxwing_model: true - GLO: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false - BDS: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false - block: - GPS-IIF: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false -# GPS BLK IIF use ECOM2 parameters - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - ECOM_D_2_cpr: false - ECOM_D_4_cpr: false - ECOM_B_cpr: true - prn: - G01: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: false - full_boxwing_model: true diff --git a/examples/ex22_pod_fit_gps.yaml b/examples/ex22_pod_fit_gps.yaml deleted file mode 100644 index ce5d92fc1..000000000 --- a/examples/ex22_pod_fit_gps.yaml +++ /dev/null @@ -1,347 +0,0 @@ -pod_options: - output_directory: ex22g -# can only choose one option here -#---------------------------------------------------------------------- - pod_mode_fit: true # pod_mode = 1 Orbit Determination (pseudo-observations; orbit fitting) - pod_mode_predict: false # pod_mode = 2 Orbit Determination and Prediction - pod_mode_eqm_int: false # pod_mode = 3 Orbit Integration (Equation of Motion only) - pod_mode_ic_int: false # pod_mode = 4 Orbit Integration and Partials (Equation of Motion and Variational Equations) - -# can only choose one option here -#---------------------------------------------------------------------- - time_scale: - TT_time: false - UTC_time: false - GPS_time: true - TAI_time: false - -# can only choose one option here -#---------------------------------------------------------------------- - ic_input_format: - sp3: true # Input a-priori orbit in sp3 format - icf: false # Input a-priori orbit in POD Initial Conditions File (ICF) format - ic_filename: some_file - -# can only choose one option here -#---------------------------------------------------------------------- - ic_input_refsys: - itrf: false # Initial Conditions Reference Frame: ITRF, ICRF - icrf: true # Initial Conditions Reference Frame: ITRF, ICRF - kepler: false - -# optional limiting to constellations -#---------------------------------------------------------------------- - constellations: - GPS: true - GALILEO: false - GLONASS: false - BEIDOU: false - QZSS: false - -#--------------------------------------------------------------------------- -# Observation Model - pseudobs_orbit_filename: products/COD0MGXFIN_20191990000_01D_05M_ORB.SP3 # Pseudo observations orbit filename - pseudobs_interp_step: 900 # Interval (sec) of the interpolated orbit - pseudobs_interp_points: 12 # Number of data points used in Lagrange interpolation - -#---------------------------------------------------------------------- -# Orbit arc length (in hours) - orbit_arc_determination: 24 # Orbit Estimation arc - orbit_arc_prediction: 2 # Orbit Prediction arc - orbit_arc_backwards: 2 # Orbit Propagation backwards arc - -#--------------------------------------------------------------------------- -# External Orbit Comparison - ext_orbit_enabled: true - ext_orbit_type_sp3: false # Orbit data in sp3 format (including position and velocity vectors) - ext_orbit_type_interp: true # Interpolated orbit based on Lagrange interpolation of sp3 file - ext_orbit_type_kepler: false # Keplerian orbit - ext_orbit_type_lagrange: false # 3-day Lagrange interpolation - ext_orbit_type_position_sp3: false # Position and SP3 file - ext_orbit_filename: products/COD0MGXFIN_20191990000_01D_05M_ORB.SP3 # External (comparison) orbit filename - ext_orbit_interp_step: 900 # Interval (sec) of the interpolated/Kepler orbit - ext_orbit_interp_points: 12 # Number of data points used in Lagrange interpolation - -# can only choose one option here -#---------------------------------------------------------------------- - ext_orbit_frame: - itrf: true # External orbit reference frame - ITRF - icrf: false # External orbit reference frame - ICRF - kepler: false - -#--------------------------------------------------------------------------- -# Earth Orientation - EOP solution options: - EOP_soln_c04: true # IERS C04 solution : EOP_sol = 1 - EOP_soln_rapid: false # IERS rapid service/prediction center (RS/PC) Daily : EOP_sol = 2 - EOP_soln_igs: false # IGS ultra-rapid ERP + IERS RS/PC Daily (dX,dY) : EOP_sol = 3. Need both rapid_file AND igs_file - EOP_soln_c04_file: products/tables/EOP_14_C04_IAU2000A_one_file_1962-now.txt - EOP_soln_rapid_file: finals2000A.daily - ERP_soln_igs_file: igu18543_12.erp - EOP_soln_interp_points: 6 # EOP solution interpolation points - -# --------------------------------------------------------------------------- -# IAU Precession-Nutation model: - iau_model_2000: true # IAU2000A: iau_pn_model = 2000 - iau_model_2006: false # IAU2006/2000A: iau_pn_model = 2006 - -#--------------------------------------------------------------------------- -# Gravity model file - gravity_model_file: products/tables/goco05s.gfc # goco05s.gfc, eigen-6s2.gfc, ITSG-Grace2014k.gfc - -#--------------------------------------------------------------------------- -# Planetary/Lunar ephemeris - JPL DE Ephemeris - DE_fname_header: products/tables/header.430_229 - DE_fname_data: products/tables/ascp1950.430 - -#--------------------------------------------------------------------------- -# Ocean tide model file - ocean_tides_model_file: products/tables/fes2004_Cnm-Snm.dat # FES2004 ocean tide model - -#---------------------------------------------------------------------- -# Leap second filename - leapsec_filename: products/tables/leap.second - -#---------------------------------------------------------------------- -# Satellite metadata SINEX - satsinex_filename: products/tables/igs_metadata_2063.snx - -#--------------------------------------------------------------------------- -# Parameter Estimation - estimator_procedure: 1 - estimator_iterations: 2 - -#--------------------------------------------------------------------------- -# Variational Equations - veq_integration: false - -#---------------------------------------------------------------------- -# Reference System for Variational Equations' - Partials & Parameter Estimation - veq_refsys: - itrs: true # ITRS: Terrestrial Reference System - icrs: false # ICRS: Celestial Reference System - -#---------------------------------------------------------------------- -# Write to sp3 orbit format: Option for write Satellite Velocity vector - sp3_velocity: false # Write Velocity vector to sp3 orbit - -#---------------------------------------------------------------------- -# Write partials of the velocity vector w.r.t. parameters into the orbits_partials output file: - partials_velocity: false # Write out velocity vector partials wrt orbital state vector elements - -#---------------------------------------------------------------------- -# SRP A priori model -# cannon_ball : use empirical cannonball f0 model - mode 1 -# simple_boxwing : use simple box-wing model - mode 2 -# full_boxwing : use full box-wing model from repro3 routines - mode 3 -# none : no a priori SRP model - mode 0 - srp_apriori_model: - no_model: false - cannon_ball_model: true - simple_boxwing_model: false - full_boxwing_model: false - # -#---------------------------------------------------------------------- -# SRP modes - Default srp_parameters = ECOM1 + EMP - srp_modes: - ECOM1: false - ECOM2: true - hybrid: false - SBOXW: false - EMPirical: false - - gravity_model: - central_force: false # Central force gravity field : gravity_model = 0 - static_gravity_model: false # Static global gravity field model : gravity_model = 1 - time_variable_model: true # Time-variable global gravity field model : gravity_model = 2 - iers_geopotential_model: false # IERS conventional geopotential model : gravity_model = 3 - - pulse: - enabled: false - epoch_number: 1 # number of epochs to apply pulses - offset: 43200 # since the start of day - interval: 43200 # repeat every N seconds - directions: - x_direction: true - y_direction: true - z_direction: true - r_direction: false - t_direction: false - n_direction: false - reference_frame: - icrf: true - orbital: false - -eqm_options: -#--------------------------------------------------------------------------- -# Numerical integration method -# Runge-Kutta-Nystrom 7th order RKN7(6): RKN7, Runge-Kutta 4th order: RK4, Runge-Kutta 8th order RK8(7)13: RK8 - integration_options: - RK4_integrator_method: false - RKN7_integrator_method: true - RK8_integrator_method: false - integrator_step: 300 # Integrator stepsize in seconds - -#--------------------------------------------------------------------------- -# Gravitational Forces - gravity_field: - enabled: true - gravity_degree_max: 15 # Gravity model maximum degree/order (d/o) - timevar_degree_max: 15 # Time-variable coefficients maximum d/o - -#--------------------------------------------------------------------------- -# Planetary Gravitational Forces - planetary_perturbations: - enabled: true - -#--------------------------------------------------------------------------- - tidal_effects: - enabled: true - solid_tides_nonfreq: true # Solid Earth Tides frequency-independent terms - solid_tides_freq: true # Solid Earth Tides frequency-dependent terms - ocean_tides: true # Ocean Tides - solid_earth_pole_tides: false # Solid Earth Pole Tide - ocean_pole_tide: false # Ocean Pole Tide - ocean_tides_degree_max: 15 # Ocean Tides model maximum degree/order - -#--------------------------------------------------------------------------- -# Relativistic effects - relativistic_effects: - enabled: true - -#--------------------------------------------------------------------------- -# Non-gravitational Effects - non_gravitational_effects: - enabled: true - solar_radiation: true - earth_radiation: true - antenna_thrust: true - - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - EMP_R_bias: true - EMP_T_bias: true - EMP_N_bias: true - ECOM_D_cpr: false - ECOM_Y_cpr: false - ECOM_B_cpr: true - ECOM_D_2_cpr: true - ECOM_D_4_cpr: true - EMP_R_cpr: true - EMP_T_cpr: true - EMP_N_cpr: true - cpr_count: 1 - -veq_options: -#--------------------------------------------------------------------------- -# Numerical integration method -# Runge-Kutta-Nystrom 7th order RKN7(6): RKN7, Runge-Kutta 4th order: RK4, Runge-Kutta 8th order RK8(7)13: RK8 -# NB for VEQ, only RK7 is supported. Do not select any other value - integration_options: - RK4_integrator_method: false - RKN7_integrator_method: true - RK8_integrator_method: false - integrator_step: 300 # Integrator stepsize in seconds - -#--------------------------------------------------------------------------- -# Gravitational Forces - gravity_field: - enabled: true - gravity_degree_max: 5 # Gravity model maximum degree/order (d/o) - timevar_degree_max: 5 # Time-variable coefficients maximum d/o - -#--------------------------------------------------------------------------- -# Planetary Gravitational Forces - planetary_perturbations: - enabled: true - -#--------------------------------------------------------------------------- - tidal_effects: - enabled: false - solid_tides_nonfreq: true # Solid Earth Tides frequency-independent terms - solid_tides_freq: true # Solid Earth Tides frequency-dependent terms - ocean_tides: true # Ocean Tides - solid_earth_pole_tides: false # Solid Earth Pole Tide - ocean_pole_tide: false # Ocean Pole Tide - ocean_tides_degree_max: 15 # Ocean Tides model maximum degree/order - -#--------------------------------------------------------------------------- -# Relativistic effects - relativistic_effects: - enabled: false - -#--------------------------------------------------------------------------- -# Non-gravitational Effects - non_gravitational_effects: - enabled: true - solar_radiation: true - earth_radiation: false - antenna_thrust: false - - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - EMP_R_bias: true - EMP_T_bias: true - EMP_N_bias: true - ECOM_D_cpr: false - ECOM_Y_cpr: false - ECOM_B_cpr: true - ECOM_D_2_cpr: true - ECOM_D_4_cpr: true - EMP_R_cpr: true - EMP_T_cpr: true - EMP_N_cpr: true - cpr_count: 1 - -# put any system, block or PRN overrides here -overrides: - system: - GPS: - srp_apriori_model: - no_model: false - cannon_ball_model: true - simple_boxwing_model: false - full_boxwing_model: false - GAL: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: false - full_boxwing_model: true - GLO: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false - BDS: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false - block: - GPS-IIF: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false -# GPS BLK IIF use ECOM2 parameters - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - ECOM_D_2_cpr: false - ECOM_D_4_cpr: false - ECOM_B_cpr: true - prn: - G01: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: false - full_boxwing_model: true diff --git a/examples/ex22_pod_fit_qzss.yaml b/examples/ex22_pod_fit_qzss.yaml deleted file mode 100644 index 8eca3a83a..000000000 --- a/examples/ex22_pod_fit_qzss.yaml +++ /dev/null @@ -1,347 +0,0 @@ -pod_options: - output_directory: ex22j -# can only choose one option here -#---------------------------------------------------------------------- - pod_mode_fit: true # pod_mode = 1 Orbit Determination (pseudo-observations; orbit fitting) - pod_mode_predict: false # pod_mode = 2 Orbit Determination and Prediction - pod_mode_eqm_int: false # pod_mode = 3 Orbit Integration (Equation of Motion only) - pod_mode_ic_int: false # pod_mode = 4 Orbit Integration and Partials (Equation of Motion and Variational Equations) - -# can only choose one option here -#---------------------------------------------------------------------- - time_scale: - TT_time: false - UTC_time: false - GPS_time: true - TAI_time: false - -# can only choose one option here -#---------------------------------------------------------------------- - ic_input_format: - sp3: true # Input a-priori orbit in sp3 format - icf: false # Input a-priori orbit in POD Initial Conditions File (ICF) format - ic_filename: some_file - -# can only choose one option here -#---------------------------------------------------------------------- - ic_input_refsys: - itrf: false # Initial Conditions Reference Frame: ITRF, ICRF - icrf: true # Initial Conditions Reference Frame: ITRF, ICRF - kepler: false - -# optional limiting to constellations -#---------------------------------------------------------------------- - constellations: - GPS: false - GALILEO: false - GLONASS: false - BEIDOU: false - QZSS: true - -#--------------------------------------------------------------------------- -# Observation Model - pseudobs_orbit_filename: products/COD0MGXFIN_20191990000_01D_05M_ORB.SP3 # Pseudo observations orbit filename - pseudobs_interp_step: 900 # Interval (sec) of the interpolated orbit - pseudobs_interp_points: 12 # Number of data points used in Lagrange interpolation - -#---------------------------------------------------------------------- -# Orbit arc length (in hours) - orbit_arc_determination: 24 # Orbit Estimation arc - orbit_arc_prediction: 2 # Orbit Prediction arc - orbit_arc_backwards: 2 # Orbit Propagation backwards arc - -#--------------------------------------------------------------------------- -# External Orbit Comparison - ext_orbit_enabled: true - ext_orbit_type_sp3: false # Orbit data in sp3 format (including position and velocity vectors) - ext_orbit_type_interp: true # Interpolated orbit based on Lagrange interpolation of sp3 file - ext_orbit_type_kepler: false # Keplerian orbit - ext_orbit_type_lagrange: false # 3-day Lagrange interpolation - ext_orbit_type_position_sp3: false # Position and SP3 file - ext_orbit_filename: products/COD0MGXFIN_20191990000_01D_05M_ORB.SP3 # External (comparison) orbit filename - ext_orbit_interp_step: 900 # Interval (sec) of the interpolated/Kepler orbit - ext_orbit_interp_points: 12 # Number of data points used in Lagrange interpolation - -# can only choose one option here -#---------------------------------------------------------------------- - ext_orbit_frame: - itrf: true # External orbit reference frame - ITRF - icrf: false # External orbit reference frame - ICRF - kepler: false - -#--------------------------------------------------------------------------- -# Earth Orientation - EOP solution options: - EOP_soln_c04: true # IERS C04 solution : EOP_sol = 1 - EOP_soln_rapid: false # IERS rapid service/prediction center (RS/PC) Daily : EOP_sol = 2 - EOP_soln_igs: false # IGS ultra-rapid ERP + IERS RS/PC Daily (dX,dY) : EOP_sol = 3. Need both rapid_file AND igs_file - EOP_soln_c04_file: products/tables/EOP_14_C04_IAU2000A_one_file_1962-now.txt - EOP_soln_rapid_file: finals2000A.daily - ERP_soln_igs_file: igu18543_12.erp - EOP_soln_interp_points: 6 # EOP solution interpolation points - -# --------------------------------------------------------------------------- -# IAU Precession-Nutation model: - iau_model_2000: true # IAU2000A: iau_pn_model = 2000 - iau_model_2006: false # IAU2006/2000A: iau_pn_model = 2006 - -#--------------------------------------------------------------------------- -# Gravity model file - gravity_model_file: products/tables/goco05s.gfc # goco05s.gfc, eigen-6s2.gfc, ITSG-Grace2014k.gfc - -#--------------------------------------------------------------------------- -# Planetary/Lunar ephemeris - JPL DE Ephemeris - DE_fname_header: products/tables/header.430_229 - DE_fname_data: products/tables/ascp1950.430 - -#--------------------------------------------------------------------------- -# Ocean tide model file - ocean_tides_model_file: products/tables/fes2004_Cnm-Snm.dat # FES2004 ocean tide model - -#---------------------------------------------------------------------- -# Leap second filename - leapsec_filename: products/tables/leap.second - -#---------------------------------------------------------------------- -# Satellite metadata SINEX - satsinex_filename: products/tables/igs_metadata_2063.snx - -#--------------------------------------------------------------------------- -# Parameter Estimation - estimator_procedure: 1 - estimator_iterations: 2 - -#--------------------------------------------------------------------------- -# Variational Equations - veq_integration: false - -#---------------------------------------------------------------------- -# Reference System for Variational Equations' - Partials & Parameter Estimation - veq_refsys: - itrs: true # ITRS: Terrestrial Reference System - icrs: false # ICRS: Celestial Reference System - -#---------------------------------------------------------------------- -# Write to sp3 orbit format: Option for write Satellite Velocity vector - sp3_velocity: false # Write Velocity vector to sp3 orbit - -#---------------------------------------------------------------------- -# Write partials of the velocity vector w.r.t. parameters into the orbits_partials output file: - partials_velocity: false # Write out velocity vector partials wrt orbital state vector elements - -#---------------------------------------------------------------------- -# SRP A priori model -# cannon_ball : use empirical cannonball f0 model - mode 1 -# simple_boxwing : use simple box-wing model - mode 2 -# full_boxwing : use full box-wing model from repro3 routines - mode 3 -# none : no a priori SRP model - mode 0 - srp_apriori_model: - no_model: false - cannon_ball_model: true - simple_boxwing_model: false - full_boxwing_model: false - # -#---------------------------------------------------------------------- -# SRP modes - Default srp_parameters = ECOM1 + EMP - srp_modes: - ECOM1: false - ECOM2: true - hybrid: false - SBOXW: false - EMPirical: false - - gravity_model: - central_force: false # Central force gravity field : gravity_model = 0 - static_gravity_model: false # Static global gravity field model : gravity_model = 1 - time_variable_model: true # Time-variable global gravity field model : gravity_model = 2 - iers_geopotential_model: false # IERS conventional geopotential model : gravity_model = 3 - - pulse: - enabled: false - epoch_number: 1 # number of epochs to apply pulses - offset: 43200 # since the start of day - interval: 43200 # repeat every N seconds - directions: - x_direction: true - y_direction: true - z_direction: true - r_direction: false - t_direction: false - n_direction: false - reference_frame: - icrf: true - orbital: false - -eqm_options: -#--------------------------------------------------------------------------- -# Numerical integration method -# Runge-Kutta-Nystrom 7th order RKN7(6): RKN7, Runge-Kutta 4th order: RK4, Runge-Kutta 8th order RK8(7)13: RK8 - integration_options: - RK4_integrator_method: false - RKN7_integrator_method: true - RK8_integrator_method: false - integrator_step: 300 # Integrator stepsize in seconds - -#--------------------------------------------------------------------------- -# Gravitational Forces - gravity_field: - enabled: true - gravity_degree_max: 15 # Gravity model maximum degree/order (d/o) - timevar_degree_max: 15 # Time-variable coefficients maximum d/o - -#--------------------------------------------------------------------------- -# Planetary Gravitational Forces - planetary_perturbations: - enabled: true - -#--------------------------------------------------------------------------- - tidal_effects: - enabled: true - solid_tides_nonfreq: true # Solid Earth Tides frequency-independent terms - solid_tides_freq: true # Solid Earth Tides frequency-dependent terms - ocean_tides: true # Ocean Tides - solid_earth_pole_tides: false # Solid Earth Pole Tide - ocean_pole_tide: false # Ocean Pole Tide - ocean_tides_degree_max: 15 # Ocean Tides model maximum degree/order - -#--------------------------------------------------------------------------- -# Relativistic effects - relativistic_effects: - enabled: true - -#--------------------------------------------------------------------------- -# Non-gravitational Effects - non_gravitational_effects: - enabled: true - solar_radiation: true - earth_radiation: true - antenna_thrust: true - - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - EMP_R_bias: true - EMP_T_bias: true - EMP_N_bias: true - ECOM_D_cpr: false - ECOM_Y_cpr: false - ECOM_B_cpr: true - ECOM_D_2_cpr: true - ECOM_D_4_cpr: true - EMP_R_cpr: true - EMP_T_cpr: true - EMP_N_cpr: true - cpr_count: 1 - -veq_options: -#--------------------------------------------------------------------------- -# Numerical integration method -# Runge-Kutta-Nystrom 7th order RKN7(6): RKN7, Runge-Kutta 4th order: RK4, Runge-Kutta 8th order RK8(7)13: RK8 -# NB for VEQ, only RK7 is supported. Do not select any other value - integration_options: - RK4_integrator_method: false - RKN7_integrator_method: true - RK8_integrator_method: false - integrator_step: 300 # Integrator stepsize in seconds - -#--------------------------------------------------------------------------- -# Gravitational Forces - gravity_field: - enabled: true - gravity_degree_max: 5 # Gravity model maximum degree/order (d/o) - timevar_degree_max: 5 # Time-variable coefficients maximum d/o - -#--------------------------------------------------------------------------- -# Planetary Gravitational Forces - planetary_perturbations: - enabled: true - -#--------------------------------------------------------------------------- - tidal_effects: - enabled: false - solid_tides_nonfreq: true # Solid Earth Tides frequency-independent terms - solid_tides_freq: true # Solid Earth Tides frequency-dependent terms - ocean_tides: true # Ocean Tides - solid_earth_pole_tides: false # Solid Earth Pole Tide - ocean_pole_tide: false # Ocean Pole Tide - ocean_tides_degree_max: 15 # Ocean Tides model maximum degree/order - -#--------------------------------------------------------------------------- -# Relativistic effects - relativistic_effects: - enabled: false - -#--------------------------------------------------------------------------- -# Non-gravitational Effects - non_gravitational_effects: - enabled: true - solar_radiation: true - earth_radiation: false - antenna_thrust: false - - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - EMP_R_bias: true - EMP_T_bias: true - EMP_N_bias: true - ECOM_D_cpr: false - ECOM_Y_cpr: false - ECOM_B_cpr: true - ECOM_D_2_cpr: true - ECOM_D_4_cpr: true - EMP_R_cpr: true - EMP_T_cpr: true - EMP_N_cpr: true - cpr_count: 1 - -# put any system, block or PRN overrides here -overrides: - system: - GPS: - srp_apriori_model: - no_model: false - cannon_ball_model: true - simple_boxwing_model: false - full_boxwing_model: false - GAL: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: false - full_boxwing_model: true - GLO: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false - BDS: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false - block: - GPS-IIF: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false -# GPS BLK IIF use ECOM2 parameters - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - ECOM_D_2_cpr: false - ECOM_D_4_cpr: false - ECOM_B_cpr: true - prn: - G01: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: false - full_boxwing_model: true diff --git a/examples/ex23_pod_prd_gps.yaml b/examples/ex23_pod_prd_gps.yaml deleted file mode 100644 index 27be19049..000000000 --- a/examples/ex23_pod_prd_gps.yaml +++ /dev/null @@ -1,339 +0,0 @@ -pod_options: - output_directory: ex23 -# can only choose one option here -#---------------------------------------------------------------------- - pod_mode_fit: false # pod_mode = 1 Orbit Determination (pseudo-observations; orbit fitting) - pod_mode_predict: true # pod_mode = 2 Orbit Determination and Prediction - pod_mode_eqm_int: false # pod_mode = 3 Orbit Integration (Equation of Motion only) - pod_mode_ic_int: false # pod_mode = 4 Orbit Integration and Partials (Equation of Motion and Variational Equations) - -# can only choose one option here -#---------------------------------------------------------------------- - time_scale: - TT_time: false - UTC_time: false - GPS_time: true - TAI_time: false - -# can only choose one option here -#---------------------------------------------------------------------- - ic_input_format: - sp3: true # Input a-priori orbit in sp3 format - icf: false # Input a-priori orbit in POD Initial Conditions File (ICF) format - ic_filename: orb_pea.out - -# can only choose one option here -#---------------------------------------------------------------------- - ic_input_refsys: - itrf: false # Initial Conditions Reference Frame: ITRF, ICRF - icrf: true # Initial Conditions Reference Frame: ITRF, ICRF - kepler: false - -#--------------------------------------------------------------------------- -# Observation Model - pseudobs_orbit_filename: products/igs20010.sp3 # Pseudo observations orbit filename - pseudobs_interp_step: 900 # Interval (sec) of the interpolated orbit - pseudobs_interp_points: 12 # Number of data points used in Lagrange interpolation - -#---------------------------------------------------------------------- -# Orbit arc length (in hours) - orbit_arc_determination: 24 # Orbit Estimation arc - orbit_arc_prediction: 26 # Orbit Prediction arc - orbit_arc_backwards: 2 # Orbit Propagation backwards arc - -#--------------------------------------------------------------------------- -# External Orbit Comparison - ext_orbit_enabled: true - ext_orbit_type_sp3: false # Orbit data in sp3 format (including position and velocity vectors) - ext_orbit_type_interp: true # Interpolated orbit based on Lagrange interpolation of sp3 file - ext_orbit_type_kepler: false # Keplerian orbit - ext_orbit_type_lagrange: false # 3-day Lagrange interpolation - ext_orbit_type_position_sp3: false # Position and SP3 file - ext_orbit_filename: products/igs20011.sp3 # External (comparison) orbit filename - ext_orbit_interp_step: 900 # Interval (sec) of the interpolated/Kepler orbit - ext_orbit_interp_points: 12 # Number of data points used in Lagrange interpolation - -# can only choose one option here -#---------------------------------------------------------------------- - ext_orbit_frame: - itrf: true # External orbit reference frame - ITRF - icrf: false # External orbit reference frame - ICRF - kepler: false - -#--------------------------------------------------------------------------- -# Earth Orientation - EOP solution options: - EOP_soln_c04: true # IERS C04 solution : EOP_sol = 1 - EOP_soln_rapid: false # IERS rapid service/prediction center (RS/PC) Daily : EOP_sol = 2 - EOP_soln_igs: false # IGS ultra-rapid ERP + IERS RS/PC Daily (dX,dY) : EOP_sol = 3. Need both rapid_file AND igs_file - EOP_soln_c04_file: products/tables/EOP_14_C04_IAU2000A_one_file_1962-now.txt - EOP_soln_rapid_file: finals2000A.daily - ERP_soln_igs_file: igu18543_12.erp - EOP_soln_interp_points: 4 # EOP solution interpolation points - -# --------------------------------------------------------------------------- -# IAU Precession-Nutation model: - iau_model_2000: true # IAU2000A: iau_pn_model = 2000 - iau_model_2006: false # IAU2006/2000A: iau_pn_model = 2006 - -#--------------------------------------------------------------------------- -# Gravity model file - gravity_model_file: products/tables/goco05s.gfc # goco05s.gfc, eigen-6s2.gfc, ITSG-Grace2014k.gfc - -#--------------------------------------------------------------------------- -# Planetary/Lunar ephemeris - JPL DE Ephemeris - DE_fname_header: products/tables/header.430_229 - DE_fname_data: products/tables/ascp1950.430 - -#--------------------------------------------------------------------------- -# Ocean tide model file - ocean_tides_model_file: products/tables/fes2004_Cnm-Snm.dat # FES2004 ocean tide model - -#---------------------------------------------------------------------- -# Leap second filename - leapsec_filename: products/tables/leap.second - -#---------------------------------------------------------------------- -# Satellite metadata SINEX - satsinex_filename: products/tables/igs_metadata_2063.snx - -#--------------------------------------------------------------------------- -# Parameter Estimation - estimator_procedure: 1 - estimator_iterations: 2 - -#--------------------------------------------------------------------------- -# Variational Equations - veq_integration: false - -#---------------------------------------------------------------------- -# Reference System for Variational Equations' - Partials & Parameter Estimation - veq_refsys: - itrs: true # ITRS: Terrestrial Reference System - icrs: false # ICRS: Celestial Reference System - kepler: false - -#---------------------------------------------------------------------- -# Write to sp3 orbit format: Option for write Satellite Velocity vector - sp3_velocity: false # Write Velocity vector to sp3 orbit - -#---------------------------------------------------------------------- -# Write partials of the velocity vector w.r.t. parameters into the orbits_partials output file: - partials_velocity: false # Write out velocity vector partials wrt orbital state vector elements - -#---------------------------------------------------------------------- -# SRP A priori model -# cannon_ball : use empirical cannonball f0 model - mode 1 -# simple_boxwing : use simple box-wing model - mode 2 -# full_boxwing : use full box-wing model from repro3 routines - mode 3 -# none : no a priori SRP model - mode 0 - srp_apriori_model: - no_model: false - cannon_ball_model: true - simple_boxwing_model: false - full_boxwing_model: false - # -#---------------------------------------------------------------------- -# SRP modes - Default srp_parameters = ECOM1 + EMP - srp_modes: - ECOM1: true - ECOM2: false - hybrid: false - SBOXW: false - EMPirical: false - - gravity_model: - central_force: false # Central force gravity field : gravity_model = 0 - static_gravity_model: false # Static global gravity field model : gravity_model = 1 - time_variable_model: true # Time-variable global gravity field model : gravity_model = 2 - iers_geopotential_model: false # IERS conventional geopotential model : gravity_model = 3 - - pulse: - enabled: false - epoch_number: 1 # number of epochs to apply pulses - offset: 43200 # since the start of day - interval: 43200 # repeat every N seconds - directions: - x_direction: true - y_direction: true - z_direction: true - r_direction: false - t_direction: false - n_direction: false - reference_frame: - icrf: true - orbital: false - -eqm_options: -#--------------------------------------------------------------------------- -# Numerical integration method -# Runge-Kutta-Nystrom 7th order RKN7(6): RKN7, Runge-Kutta 4th order: RK4, Runge-Kutta 8th order RK8(7)13: RK8 - integration_options: - RK4_integrator_method: false - RKN7_integrator_method: true - RK8_integrator_method: false - integrator_step: 900 # Integrator stepsize in seconds - -#--------------------------------------------------------------------------- -# Gravitational Forces - gravity_field: - enabled: true - gravity_degree_max: 15 # Gravity model maximum degree/order (d/o) - timevar_degree_max: 15 # Time-variable coefficients maximum d/o - -#--------------------------------------------------------------------------- -# Planetary Gravitational Forces - planetary_perturbations: - enabled: true - -#--------------------------------------------------------------------------- - tidal_effects: - enabled: true - solid_tides_nonfreq: true # Solid Earth Tides frequency-independent terms - solid_tides_freq: true # Solid Earth Tides frequency-dependent terms - ocean_tides: true # Ocean Tides - solid_earth_pole_tides: true # Solid Earth Pole Tide - ocean_pole_tide: true # Ocean Pole Tide - ocean_tides_degree_max: 15 # Ocean Tides model maximum degree/order - -#--------------------------------------------------------------------------- -# Relativistic effects - relativistic_effects: - enabled: true - -#--------------------------------------------------------------------------- -# Non-gravitational Effects - non_gravitational_effects: - enabled: true - solar_radiation: true - earth_radiation: true - antenna_thrust: true - - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - EMP_R_bias: true - EMP_T_bias: true - EMP_N_bias: true - ECOM_D_cpr: true - ECOM_Y_cpr: true - ECOM_B_cpr: true - ECOM_D_2_cpr: false - ECOM_D_4_cpr: false - EMP_R_cpr: true - EMP_T_cpr: true - EMP_N_cpr: true - cpr_count: 1 - -veq_options: -#--------------------------------------------------------------------------- -# Numerical integration method -# Runge-Kutta-Nystrom 7th order RKN7(6): RKN7, Runge-Kutta 4th order: RK4, Runge-Kutta 8th order RK8(7)13: RK8 -# NB for VEQ, only RK7 is supported. Do not select any other value - integration_options: - RK4_integrator_method: false - RKN7_integrator_method: true - RK8_integrator_method: false - integrator_step: 900 # Integrator stepsize in seconds - -#--------------------------------------------------------------------------- -# Gravitational Forces - gravity_field: - enabled: true - gravity_degree_max: 5 # Gravity model maximum degree/order (d/o) - timevar_degree_max: 5 # Time-variable coefficients maximum d/o - -#--------------------------------------------------------------------------- -# Planetary Gravitational Forces - planetary_perturbations: - enabled: true - -#--------------------------------------------------------------------------- - tidal_effects: - enabled: false - solid_tides_nonfreq: true # Solid Earth Tides frequency-independent terms - solid_tides_freq: true # Solid Earth Tides frequency-dependent terms - ocean_tides: true # Ocean Tides - solid_earth_pole_tides: true # Solid Earth Pole Tide - ocean_pole_tide: true # Ocean Pole Tide - ocean_tides_degree_max: 15 # Ocean Tides model maximum degree/order - -#--------------------------------------------------------------------------- -# Relativistic effects - relativistic_effects: - enabled: false - -#--------------------------------------------------------------------------- -# Non-gravitational Effects - non_gravitational_effects: - enabled: true - solar_radiation: true - earth_radiation: false - antenna_thrust: false - - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - EMP_R_bias: true - EMP_T_bias: true - EMP_N_bias: true - ECOM_D_cpr: true - ECOM_Y_cpr: true - ECOM_B_cpr: true - ECOM_D_2_cpr: false - ECOM_D_4_cpr: false - EMP_R_cpr: true - EMP_T_cpr: true - EMP_N_cpr: true - cpr_count: 1 - -# put any system, block or PRN overrides here -overrides: - system: - GPS: - srp_apriori_model: - no_model: false - cannon_ball_model: true - simple_boxwing_model: false - full_boxwing_model: false - GAL: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: false - full_boxwing_model: true - GLO: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false - BDS: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false - block: - GPS-IIF: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false -# GPS BLK IIF use ECOM2 parameters - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - ECOM_D_2_cpr: false - ECOM_D_4_cpr: false - ECOM_B_cpr: true - prn: - G01: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: false - full_boxwing_model: true diff --git a/examples/ex24_pod_ic_gps.yaml b/examples/ex24_pod_ic_gps.yaml deleted file mode 100644 index ee5aee15e..000000000 --- a/examples/ex24_pod_ic_gps.yaml +++ /dev/null @@ -1,339 +0,0 @@ -pod_options: - output_directory: ex24 -# can only choose one option here -#---------------------------------------------------------------------- - pod_mode_fit: false # pod_mode = 1 Orbit Determination (pseudo-observations; orbit fitting) - pod_mode_predict: false # pod_mode = 2 Orbit Determination and Prediction - pod_mode_eqm_int: false # pod_mode = 3 Orbit Integration (Equation of Motion only) - pod_mode_ic_int: true # pod_mode = 4 Orbit Integration and Partials (Equation of Motion and Variational Equations) - -# can only choose one option here -#---------------------------------------------------------------------- - time_scale: - TT_time: false - UTC_time: false - GPS_time: true - TAI_time: false - -# can only choose one option here -#---------------------------------------------------------------------- - ic_input_refsys: - itrf: false # Initial Conditions Reference Frame: ITRF, ICRF - icrf: true # Initial Conditions Reference Frame: ITRF, ICRF - kepler: false - -# can only choose one option here -#---------------------------------------------------------------------- - ic_input_format: - sp3: false # Input a-priori orbit in sp3 format - icf: true # Input a-priori orbit in POD Initial Conditions File (ICF) format - ic_filename: products/orb_partials/gag20624_orbits_partials.out.ecom2_pea - -#---------------------------------------------------------------------- -# Orbit arc length (in hours) - orbit_arc_determination: 24 # Orbit Estimation arc - orbit_arc_prediction: 2 # Orbit Prediction arc - orbit_arc_backwards: 2 # Orbit Propagation backwards arc - -#--------------------------------------------------------------------------- -# Earth Orientation - EOP solution options: - EOP_soln_c04: true # IERS C04 solution : EOP_sol = 1 - EOP_soln_rapid: false # IERS rapid service/prediction center (RS/PC) Daily : EOP_sol = 2 - EOP_soln_igs: false # IGS ultra-rapid ERP + IERS RS/PC Daily (dX,dY) : EOP_sol = 3. Need both rapid_file AND igs_file - EOP_soln_c04_file: products/tables/EOP_14_C04_IAU2000A_one_file_1962-now.txt - EOP_soln_rapid_file: products/tables/finals.data.iau2000.txt - ERP_soln_igs_file: igu18543_12.erp - EOP_soln_interp_points: 4 # EOP solution interpolation points - -# --------------------------------------------------------------------------- -# IAU Precession-Nutation model: - iau_model_2000: true # IAU2000A: iau_pn_model = 2000 - iau_model_2006: false # IAU2006/2000A: iau_pn_model = 2006 - -#--------------------------------------------------------------------------- -# Parameter Estimation - estimator_procedure: 1 - estimator_iterations: 2 - -#--------------------------------------------------------------------------- -# Observation Model - pseudobs_orbit_filename: products/igs20624.sp3 # Pseudo observations orbit filename - pseudobs_interp_step: 900 # Interval (sec) of the interpolated orbit - pseudobs_interp_points: 12 # Number of data points used in Lagrange interpolation - -#--------------------------------------------------------------------------- -# External Orbit Comparison - ext_orbit_enabled: true - ext_orbit_type_sp3: false # Orbit data in sp3 format (including position and velocity vectors) - ext_orbit_type_interp: true # Interpolated orbit based on Lagrange interpolation of sp3 file - ext_orbit_type_kepler: false # Keplerian orbit - ext_orbit_type_lagrange: false # 3-day Lagrange interpolation - ext_orbit_type_position_sp3: false # Position and SP3 file - ext_orbit_filename: products/igs20624.sp3 # External (comparison) orbit filename - ext_orbit_interp_step: 900 # Interval (sec) of the interpolated/Kepler orbit - ext_orbit_interp_points: 12 # Number of data points used in Lagrange interpolation - -# can only choose one option here -#---------------------------------------------------------------------- - ext_orbit_frame: - itrf: true # External orbit reference frame - ITRF - icrf: false # External orbit reference frame - ICRF - kepler: false - -#---------------------------------------------------------------------- -# Reference System for Variational Equations' - Partials & Parameter Estimation - veq_refsys: - itrs: true # ITRS: Terrestrial Reference System - icrs: false # ICRS: Celestial Reference System - kepler: false - -#---------------------------------------------------------------------- -# Write to sp3 orbit format: Option for write Satellite Velocity vector - sp3_velocity: false # Write Velocity vector to sp3 orbit - -#---------------------------------------------------------------------- -# Write partials of the velocity vector w.r.t. parameters into the orbits_partials output file: - partials_velocity: false # Write out velocity vector partials wrt orbital state vector elements - -#---------------------------------------------------------------------- -# Leap second filename - leapsec_filename: products/tables/leap.second - -#---------------------------------------------------------------------- -# Satellite metadata SINEX - satsinex_filename: products/tables/igs_metadata_2063.snx - -#---------------------------------------------------------------------- -# SRP A priori model -# cannon_ball : use empirical cannonball f0 model - mode 1 -# simple_boxwing : use simple box-wing model - mode 2 -# full_boxwing : use full box-wing model from repro3 routines - mode 3 -# none : no a priori SRP model - mode 0 - srp_apriori_model: - no_model: false - cannon_ball_model: true - simple_boxwing_model: false - full_boxwing_model: false - -#---------------------------------------------------------------------- -# SRP modes - Default srp_parameters = ECOM1 + EMP - srp_modes: - ECOM1: false - ECOM2: true - hybrid: false - SBOXW: false - EMPirical: false - -#--------------------------------------------------------------------------- -# Variational Equations - veq_integration: false - -#--------------------------------------------------------------------------- -# Gravity model file - gravity_model_file: products/tables/goco05s.gfc # goco05s.gfc, eigen-6s2.gfc, ITSG-Grace2014k.gfc - -#--------------------------------------------------------------------------- -# Planetary/Lunar ephemeris - JPL DE Ephemeris - DE_fname_header: products/tables/header.430_229 - DE_fname_data: products/tables/ascp1950.430 - -#--------------------------------------------------------------------------- -# Ocean tide model file - ocean_tides_model_file: products/tables/fes2004_Cnm-Snm.dat # FES2004 ocean tide model - - gravity_model: - central_force: false # Central force gravity field : gravity_model = 0 - static_gravity_model: false # Static global gravity field model : gravity_model = 1 - time_variable_model: true # Time-variable global gravity field model : gravity_model = 2 - iers_geopotential_model: false # IERS conventional geopotential model : gravity_model = 3 - - pulse: - enabled: false - epoch_number: 1 # number of epochs to apply pulses - offset: 43200 # since the start of day - interval: 43200 # repeat every N seconds - directions: - x_direction: true - y_direction: true - z_direction: true - r_direction: false - t_direction: false - n_direction: false - reference_frame: - icrf: true - orbital: false - -eqm_options: -#--------------------------------------------------------------------------- -# Numerical integration method -# Runge-Kutta-Nystrom 7th order RKN7(6): RKN7, Runge-Kutta 4th order: RK4, Runge-Kutta 8th order RK8(7)13: RK8 - integration_options: - RK4_integrator_method: false - RKN7_integrator_method: true - RK8_integrator_method: false - integrator_step: 900 # Integrator stepsize in seconds - -#--------------------------------------------------------------------------- -# Gravitational Forces - gravity_field: - enabled: true - gravity_degree_max: 15 # Gravity model maximum degree/order (d/o) - timevar_degree_max: 15 # Time-variable coefficients maximum d/o - -#--------------------------------------------------------------------------- -# Planetary Gravitational Forces - planetary_perturbations: - enabled: true - -#--------------------------------------------------------------------------- - tidal_effects: - enabled: true - solid_tides_nonfreq: true # Solid Earth Tides frequency-independent terms - solid_tides_freq: true # Solid Earth Tides frequency-dependent terms - ocean_tides: true # Ocean Tides - solid_earth_pole_tides: true # Solid Earth Pole Tide - ocean_pole_tide: true # Ocean Pole Tide - ocean_tides_degree_max: 15 # Ocean Tides model maximum degree/order - -#--------------------------------------------------------------------------- -# Relativistic effects - relativistic_effects: - enabled: true - -#--------------------------------------------------------------------------- -# Non-gravitational Effects - non_gravitational_effects: - enabled: true - solar_radiation: true - earth_radiation: true - antenna_thrust: true - - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - EMP_R_bias: true - EMP_T_bias: true - EMP_N_bias: true - ECOM_D_cpr: false - ECOM_Y_cpr: false - ECOM_B_cpr: true - ECOM_D_2_cpr: true - ECOM_D_4_cpr: true - EMP_R_cpr: true - EMP_T_cpr: true - EMP_N_cpr: true - cpr_count: 1 - -veq_options: -#--------------------------------------------------------------------------- -# Numerical integration method -# Runge-Kutta-Nystrom 7th order RKN7(6): RKN7, Runge-Kutta 4th order: RK4, Runge-Kutta 8th order RK8(7)13: RK8 -# NB for VEQ, only RK7 is supported. Do not select any other value - integration_options: - RK4_integrator_method: false - RKN7_integrator_method: true - RK8_integrator_method: false - integrator_step: 900 # Integrator stepsize in seconds - -#--------------------------------------------------------------------------- -# Gravitational Forces - gravity_field: - enabled: true - gravity_degree_max: 5 # Gravity model maximum degree/order (d/o) - timevar_degree_max: 5 # Time-variable coefficients maximum d/o - -#--------------------------------------------------------------------------- -# Planetary Gravitational Forces - planetary_perturbations: - enabled: true - -#--------------------------------------------------------------------------- - tidal_effects: - enabled: false - solid_tides_nonfreq: true # Solid Earth Tides frequency-independent terms - solid_tides_freq: true # Solid Earth Tides frequency-dependent terms - ocean_tides: true # Ocean Tides - solid_earth_pole_tides: true # Solid Earth Pole Tide - ocean_pole_tide: true # Ocean Pole Tide - ocean_tides_degree_max: 15 # Ocean Tides model maximum degree/order - -#--------------------------------------------------------------------------- -# Relativistic effects - relativistic_effects: - enabled: false - -#--------------------------------------------------------------------------- -# Non-gravitational Effects - non_gravitational_effects: - enabled: true - solar_radiation: true - earth_radiation: false - antenna_thrust: false - - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - EMP_R_bias: true - EMP_T_bias: true - EMP_N_bias: true - ECOM_D_cpr: false - ECOM_Y_cpr: false - ECOM_B_cpr: true - ECOM_D_2_cpr: true - ECOM_D_4_cpr: true - EMP_R_cpr: true - EMP_T_cpr: true - EMP_N_cpr: true - cpr_count: 1 - -# put any system, block or PRN overrides here -overrides: - system: - GPS: - srp_apriori_model: - no_model: false - cannon_ball_model: true - simple_boxwing_model: false - full_boxwing_model: false - GAL: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: false - full_boxwing_model: true - GLO: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false - BDS: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false - block: - GPS-IIF: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false -# GPS BLK IIF use ECOM2 parameters - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - ECOM_D_2_cpr: false - ECOM_D_4_cpr: false - ECOM_B_cpr: true - prn: - G01: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: false - full_boxwing_model: true diff --git a/examples/ex25_pod_fit_gps.yaml b/examples/ex25_pod_fit_gps.yaml deleted file mode 100644 index 9a8805600..000000000 --- a/examples/ex25_pod_fit_gps.yaml +++ /dev/null @@ -1,336 +0,0 @@ -pod_options: - output_directory: ex25 -# can only choose one option here -#---------------------------------------------------------------------- - pod_mode_fit: true # pod_mode = 1 Orbit Determination (pseudo-observations; orbit fitting) - pod_mode_predict: false # pod_mode = 2 Orbit Determination and Prediction - pod_mode_eqm_int: false # pod_mode = 3 Orbit Integration (Equation of Motion only) - pod_mode_ic_int: false # pod_mode = 4 Orbit Integration and Partials (Equation of Motion and Variational Equations) - -# can only choose one option here -#---------------------------------------------------------------------- - time_scale: - TT_time: false - UTC_time: false - GPS_time: true - TAI_time: false - -# can only choose one option here -#---------------------------------------------------------------------- - ic_input_refsys: - itrf: true # Initial Conditions Reference Frame: ITRF, ICRF - icrf: false # Initial Conditions Reference Frame: ITRF, ICRF - kepler: false - -# can only choose one option here -#---------------------------------------------------------------------- - ic_input_format: - sp3: true # Input a-priori orbit in sp3 format - icf: false # Input a-priori orbit in POD Initial Conditions File (ICF) format - # ic_filename: products/orb_partials/gag20624_orbits_partials.out.ecom2_pea - -#---------------------------------------------------------------------- -# Orbit arc length (in hours) - orbit_arc_determination: 24 # Orbit Estimation arc - orbit_arc_prediction: 12 # Orbit Prediction arc - orbit_arc_backwards: 2 # Orbit Propagation backwards arc - -#--------------------------------------------------------------------------- -# Earth Orientation - EOP solution options: - EOP_soln_c04: true # IERS C04 solution : EOP_sol = 1 - EOP_soln_rapid: false # IERS rapid service/prediction center (RS/PC) Daily : EOP_sol = 2 - EOP_soln_igs: false # IGS ultra-rapid ERP + IERS RS/PC Daily (dX,dY) : EOP_sol = 3. Need both rapid_file AND igs_file - EOP_soln_c04_file: products/tables/EOP_14_C04_IAU2000A_one_file_1962-now.txt - EOP_soln_rapid_file: finals2000A.daily - ERP_soln_igs_file: igu18543_12.erp - EOP_soln_interp_points: 4 # EOP solution interpolation points - -# --------------------------------------------------------------------------- -# IAU Precession-Nutation model: - iau_model_2000: true # IAU2000A: iau_pn_model = 2000 - iau_model_2006: false # IAU2006/2000A: iau_pn_model = 2006 - -#--------------------------------------------------------------------------- -# Parameter Estimation - estimator_procedure: 1 - estimator_iterations: 2 - -#--------------------------------------------------------------------------- -# Observation Model - pseudobs_orbit_filename: products/igs19424.sp3 # Pseudo observations orbit filename - pseudobs_interp_step: 900 # Interval (sec) of the interpolated orbit - pseudobs_interp_points: 12 # Number of data points used in Lagrange interpolation - -#--------------------------------------------------------------------------- -# External Orbit Comparison - ext_orbit_enabled: true - ext_orbit_type_sp3: false # Orbit data in sp3 format (including position and velocity vectors) - ext_orbit_type_interp: true # Interpolated orbit based on Lagrange interpolation of sp3 file - ext_orbit_type_kepler: false # Keplerian orbit - ext_orbit_type_lagrange: false # 3-day Lagrange interpolation - ext_orbit_type_position_sp3: false # Position and SP3 file - ext_orbit_filename: products/igs19424.sp3 # External (comparison) orbit filename - ext_orbit_interp_step: 900 # Interval (sec) of the interpolated/Kepler orbit - ext_orbit_interp_points: 12 # Number of data points used in Lagrange interpolation - -# can only choose one option here -#---------------------------------------------------------------------- - ext_orbit_frame: - itrf: true # External orbit reference frame - ITRF - icrf: false # External orbit reference frame - ICRF - kepler: false - -#---------------------------------------------------------------------- -# Reference System for Variational Equations' - Partials & Parameter Estimation - veq_refsys: - itrs: true # ITRS: Terrestrial Reference System - icrs: false # ICRS: Celestial Reference System - kepler: false - -#---------------------------------------------------------------------- -# Write to sp3 orbit format: Option for write Satellite Velocity vector - sp3_velocity: false # Write Velocity vector to sp3 orbit - -#---------------------------------------------------------------------- -# Write partials of the velocity vector w.r.t. parameters into the orbits_partials output file: - partials_velocity: false # Write out velocity vector partials wrt orbital state vector elements - -#---------------------------------------------------------------------- -# Leap second filename - leapsec_filename: products/tables/leap.second - -#---------------------------------------------------------------------- -# Satellite metadata SINEX - satsinex_filename: products/tables/igs_metadata_2063.snx - -#---------------------------------------------------------------------- -# SRP A priori model -# cannon_ball : use empirical cannonball f0 model - mode 1 -# simple_boxwing : use simple box-wing model - mode 2 -# full_boxwing : use full box-wing model from repro3 routines - mode 3 -# none : no a priori SRP model - mode 0 - srp_apriori_model: - no_model: false - cannon_ball_model: true - simple_boxwing_model: false - full_boxwing_model: false - -#---------------------------------------------------------------------- -# SRP modes - Default srp_parameters = ECOM1 + EMP - srp_modes: - ECOM1: false - ECOM2: false - hybrid: true - SBOXW: false - EMPirical: false - -#--------------------------------------------------------------------------- -# Variational Equations - veq_integration: false - -#--------------------------------------------------------------------------- -# Gravity model file - gravity_model_file: products/tables/goco05s.gfc # goco05s.gfc, eigen-6s2.gfc, ITSG-Grace2014k.gfc - -#--------------------------------------------------------------------------- -# Planetary/Lunar ephemeris - JPL DE Ephemeris - DE_fname_header: products/tables/header.430_229 - DE_fname_data: products/tables/ascp1950.430 - -#--------------------------------------------------------------------------- -# Ocean tide model file - ocean_tides_model_file: products/tables/fes2004_Cnm-Snm.dat # FES2004 ocean tide model - - gravity_model: - central_force: false # Central force gravity field : gravity_model = 0 - static_gravity_model: false # Static global gravity field model : gravity_model = 1 - time_variable_model: true # Time-variable global gravity field model : gravity_model = 2 - iers_geopotential_model: false # IERS conventional geopotential model : gravity_model = 3 - - pulse: - enabled: false - epoch_number: 1 # number of epochs to apply pulses - offset: 43200 # since the start of day - interval: 43200 # repeat every N seconds - directions: - x_direction: true - y_direction: true - z_direction: true - r_direction: false - t_direction: false - n_direction: false - reference_frame: - icrf: true - orbital: false - -eqm_options: -#--------------------------------------------------------------------------- -# Numerical integration method -# Runge-Kutta-Nystrom 7th order RKN7(6): RKN7, Runge-Kutta 4th order: RK4, Runge-Kutta 8th order RK8(7)13: RK8 - integration_options: - RK4_integrator_method: false - RKN7_integrator_method: true - RK8_integrator_method: false - integrator_step: 900 # Integrator stepsize in seconds - -#--------------------------------------------------------------------------- -# Gravitational Forces - gravity_field: - enabled: true - gravity_degree_max: 15 # Gravity model maximum degree/order (d/o) - timevar_degree_max: 15 # Time-variable coefficients maximum d/o - -#--------------------------------------------------------------------------- -# Planetary Gravitational Forces - planetary_perturbations: - enabled: true - -#--------------------------------------------------------------------------- - tidal_effects: - enabled: true - solid_tides_nonfreq: true # Solid Earth Tides frequency-independent terms - solid_tides_freq: true # Solid Earth Tides frequency-dependent terms - ocean_tides: true # Ocean Tides - solid_earth_pole_tides: true # Solid Earth Pole Tide - ocean_pole_tide: true # Ocean Pole Tide - ocean_tides_degree_max: 15 # Ocean Tides model maximum degree/order - -#--------------------------------------------------------------------------- -# Relativistic effects - relativistic_effects: - enabled: true - -#--------------------------------------------------------------------------- -# Non-gravitational Effects - non_gravitational_effects: - enabled: true - solar_radiation: true - earth_radiation: true - antenna_thrust: true - - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - EMP_R_bias: false - EMP_T_bias: false - EMP_N_bias: false - ECOM_D_cpr: true - ECOM_Y_cpr: true - ECOM_B_cpr: true - ECOM_D_2_cpr: true - ECOM_D_4_cpr: true - EMP_R_cpr: false - EMP_T_cpr: false - EMP_N_cpr: false - cpr_count: 1 - -veq_options: -#--------------------------------------------------------------------------- -# Numerical integration method -# Runge-Kutta-Nystrom 7th order RKN7(6): RKN7, Runge-Kutta 4th order: RK4, Runge-Kutta 8th order RK8(7)13: RK8 -# NB for VEQ, only RK7 is supported. Do not select any other value - integration_options: - RK4_integrator_method: false - RKN7_integrator_method: true - RK8_integrator_method: false - integrator_step: 900 # Integrator stepsize in seconds - -#--------------------------------------------------------------------------- -# Gravitational Forces - gravity_field: - enabled: true - gravity_degree_max: 5 # Gravity model maximum degree/order (d/o) - timevar_degree_max: 5 # Time-variable coefficients maximum d/o - -#--------------------------------------------------------------------------- -# Planetary Gravitational Forces - planetary_perturbations: - enabled: true - -#--------------------------------------------------------------------------- - tidal_effects: - enabled: false - solid_tides_nonfreq: true # Solid Earth Tides frequency-independent terms - solid_tides_freq: true # Solid Earth Tides frequency-dependent terms - ocean_tides: true # Ocean Tides - solid_earth_pole_tides: true # Solid Earth Pole Tide - ocean_pole_tide: true # Ocean Pole Tide - ocean_tides_degree_max: 15 # Ocean Tides model maximum degree/order - -#--------------------------------------------------------------------------- -# Relativistic effects - relativistic_effects: - enabled: false - -#--------------------------------------------------------------------------- -# Non-gravitational Effects - non_gravitational_effects: - enabled: true - solar_radiation: true - earth_radiation: false - antenna_thrust: false - - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - EMP_R_bias: false - EMP_T_bias: false - EMP_N_bias: false - ECOM_D_cpr: true - ECOM_Y_cpr: true - ECOM_B_cpr: true - ECOM_D_2_cpr: true - ECOM_D_4_cpr: true - EMP_R_cpr: false - EMP_T_cpr: false - EMP_N_cpr: false - cpr_count: 1 - system: - GPS: - srp_apriori_model: - no_model: false - cannon_ball_model: true - simple_boxwing_model: false - full_boxwing_model: false - GAL: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: false - full_boxwing_model: true - GLO: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false - BDS: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false - block: - GPS-IIF: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false -# GPS BLK IIF use ECOM2 parameters - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - ECOM_D_2_cpr: false - ECOM_D_4_cpr: false - ECOM_B_cpr: true - prn: - G01: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: false - full_boxwing_model: true diff --git a/examples/ex26_pod_fit_meo.yaml b/examples/ex26_pod_fit_meo.yaml deleted file mode 100644 index f65d077f4..000000000 --- a/examples/ex26_pod_fit_meo.yaml +++ /dev/null @@ -1,290 +0,0 @@ -pod_options: - output_directory: ex26 -# can only choose one option here -#---------------------------------------------------------------------- - pod_mode_fit: true # pod_mode = 1 Orbit Determination (pseudo-observations; orbit fitting) - pod_mode_predict: false # pod_mode = 2 Orbit Determination and Prediction - pod_mode_eqm_int: false # pod_mode = 3 Orbit Integration (Equation of Motion only) - pod_mode_ic_int: false # pod_mode = 4 Orbit Integration and Partials (Equation of Motion and Variational Equations) - -# can only choose one option here -#---------------------------------------------------------------------- - time_scale: - TT_time: false - UTC_time: true - GPS_time: false - TAI_time: false - -# can only choose one option here -#---------------------------------------------------------------------- - ic_input_refsys: - itrf: true # Initial Conditions Reference Frame: ITRF, ICRF - # icrf: false # Initial Conditions Reference Frame: ITRF, ICRF - # kepler: false - -# can only choose one option here -#---------------------------------------------------------------------- - ic_input_format: - sp3: true # Input a-priori orbit in sp3 format - # icf: false # Input a-priori orbit in POD Initial Conditions File (ICF) format - # ic_filename: products/orb_partials/gag20624_orbits_partials.out.ecom2_pea - -#---------------------------------------------------------------------- -# Orbit arc length (in hours) - orbit_arc_determination: 168 # Orbit Estimation arc - orbit_arc_prediction: 2 # Orbit Prediction arc - orbit_arc_backwards: 2 # Orbit Propagation backwards arc - -#--------------------------------------------------------------------------- -# Earth Orientation - EOP solution options: - EOP_soln_c04: true # IERS C04 solution : EOP_sol = 1 - EOP_soln_rapid: false # IERS rapid service/prediction center (RS/PC) Daily : EOP_sol = 2 - EOP_soln_igs: false # IGS ultra-rapid ERP + IERS RS/PC Daily (dX,dY) : EOP_sol = 3. Need both rapid_file AND igs_file - EOP_soln_c04_file: products/tables/EOP_14_C04_IAU2000A_one_file_1962-now.txt - # EOP_soln_rapid_file: finals2000A.daily - # ERP_soln_igs_file: igu18543_12.erp - EOP_soln_interp_points: 4 # EOP solution interpolation points - -# --------------------------------------------------------------------------- -# IAU Precession-Nutation model: - iau_model_2000: true # IAU2000A: iau_pn_model = 2000 - iau_model_2006: false # IAU2006/2000A: iau_pn_model = 2006 - -#--------------------------------------------------------------------------- -# Parameter Estimation - estimator_procedure: 1 - estimator_iterations: 2 - -#--------------------------------------------------------------------------- -# Observation Model - pseudobs_orbit_filename: products/ilrsa.orb.lageos1.201128.v70.sp3 # Pseudo observations orbit filename - pseudobs_interp_step: 120 # Interval (sec) of the interpolated orbit - pseudobs_interp_points: 12 # Number of data points used in Lagrange interpolation - -#--------------------------------------------------------------------------- -# External Orbit Comparison - ext_orbit_enabled: true - ext_orbit_type_sp3: false # Orbit data in sp3 format (including position and velocity vectors) - ext_orbit_type_interp: true # Interpolated orbit based on Lagrange interpolation of sp3 file - ext_orbit_type_kepler: false # Keplerian orbit - ext_orbit_type_lagrange: false # 3-day Lagrange interpolation - ext_orbit_type_position_sp3: false # Position and SP3 file - ext_orbit_filename: products/ilrsa.orb.lageos1.201128.v70.sp3 # External (comparison) orbit filename - ext_orbit_interp_step: 120 # Interval (sec) of the interpolated/Kepler orbit - ext_orbit_interp_points: 12 # Number of data points used in Lagrange interpolation - -# can only choose one option here -#---------------------------------------------------------------------- - ext_orbit_frame: - itrf: true # External orbit reference frame - ITRF - # icrf: false # External orbit reference frame - ICRF - # kepler: false - -#---------------------------------------------------------------------- -# Reference System for Variational Equations' - Partials & Parameter Estimation - veq_refsys: - itrs: true # ITRS: Terrestrial Reference System - # icrs: false # ICRS: Celestial Reference System - # kepler: false - -#---------------------------------------------------------------------- -# Write to sp3 orbit format: Option for write Satellite Velocity vector - sp3_velocity: false # Write Velocity vector to sp3 orbit - -#---------------------------------------------------------------------- -# Write partials of the velocity vector w.r.t. parameters into the orbits_partials output file: - partials_velocity: false # Write out velocity vector partials wrt orbital state vector elements - -#---------------------------------------------------------------------- -# Leap second filename - leapsec_filename: products/tables/leap.second - -#---------------------------------------------------------------------- -# Satellite metadata SINEX - satsinex_filename: products/tables/igs_metadata_2063.snx - -#---------------------------------------------------------------------- -# SRP A priori model -# cannon_ball : use empirical cannonball f0 model - mode 1 -# simple_boxwing : use simple box-wing model - mode 2 -# full_boxwing : use full box-wing model from repro3 routines - mode 3 -# none : no a priori SRP model - mode 0 - srp_apriori_model: - no_model: true - cannon_ball_model: false - simple_boxwing_model: false - full_boxwing_model: false - -#---------------------------------------------------------------------- -# SRP modes - Default srp_parameters = ECOM1 + EMP - srp_modes: - ECOM1: true - ECOM2: false - hybrid: false - SBOXW: false - EMPirical: true - -#--------------------------------------------------------------------------- -# Variational Equations - veq_integration: false - -#--------------------------------------------------------------------------- -# Gravity model file - gravity_model_file: products/tables/goco05s.gfc # goco05s.gfc, eigen-6s2.gfc, ITSG-Grace2014k.gfc - -#--------------------------------------------------------------------------- -# Planetary/Lunar ephemeris - JPL DE Ephemeris - DE_fname_header: products/tables/header.430_229 - DE_fname_data: products/tables/ascp1950.430 - -#--------------------------------------------------------------------------- -# Ocean tide model file - ocean_tides_model_file: products/tables/fes2004_Cnm-Snm.dat # FES2004 ocean tide model - - gravity_model: - central_force: false # Central force gravity field : gravity_model = 0 - static_gravity_model: false # Static global gravity field model : gravity_model = 1 - time_variable_model: true # Time-variable global gravity field model : gravity_model = 2 - iers_geopotential_model: false # IERS conventional geopotential model : gravity_model = 3 - - pulse: - enabled: false - epoch_number: 1 # number of epochs to apply pulses - offset: 43200 # since the start of day - interval: 43200 # repeat every N seconds - directions: - x_direction: true - y_direction: true - z_direction: true - r_direction: false - t_direction: false - n_direction: false - reference_frame: - icrf: true - orbital: false - -eqm_options: -#--------------------------------------------------------------------------- -# Numerical integration method -# Runge-Kutta-Nystrom 7th order RKN7(6): RKN7, Runge-Kutta 4th order: RK4, Runge-Kutta 8th order RK8(7)13: RK8 - integration_options: - RK4_integrator_method: false - RKN7_integrator_method: true - RK8_integrator_method: false - integrator_step: 240 # Integrator stepsize in seconds - -#--------------------------------------------------------------------------- -# Gravitational Forces - gravity_field: - enabled: true - gravity_degree_max: 15 # Gravity model maximum degree/order (d/o) - timevar_degree_max: 15 # Time-variable coefficients maximum d/o - -#--------------------------------------------------------------------------- -# Planetary Gravitational Forces - planetary_perturbations: - enabled: true - -#--------------------------------------------------------------------------- - tidal_effects: - enabled: true - solid_tides_nonfreq: true # Solid Earth Tides frequency-independent terms - solid_tides_freq: true # Solid Earth Tides frequency-dependent terms - ocean_tides: true # Ocean Tides - solid_earth_pole_tides: true # Solid Earth Pole Tide - ocean_pole_tide: true # Ocean Pole Tide - ocean_tides_degree_max: 15 # Ocean Tides model maximum degree/order - -#--------------------------------------------------------------------------- -# Relativistic effects - relativistic_effects: - enabled: true - -#--------------------------------------------------------------------------- -# Non-gravitational Effects - non_gravitational_effects: - enabled: true - solar_radiation: true - earth_radiation: false - antenna_thrust: false - - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: false - ECOM_B_bias: false - EMP_R_bias: true - EMP_T_bias: true - EMP_N_bias: true - ECOM_D_cpr: false - ECOM_Y_cpr: false - ECOM_B_cpr: false - ECOM_D_2_cpr: false - ECOM_D_4_cpr: false - EMP_R_cpr: true - EMP_T_cpr: true - EMP_N_cpr: true - cpr_count: 0 - -veq_options: -#--------------------------------------------------------------------------- -# Numerical integration method -# Runge-Kutta-Nystrom 7th order RKN7(6): RKN7, Runge-Kutta 4th order: RK4, Runge-Kutta 8th order RK8(7)13: RK8 -# NB for VEQ, only RK7 is supported. Do not select any other value - integration_options: - RK4_integrator_method: false - RKN7_integrator_method: true - RK8_integrator_method: false - integrator_step: 240 # Integrator stepsize in seconds - -#--------------------------------------------------------------------------- -# Gravitational Forces - gravity_field: - enabled: true - gravity_degree_max: 5 # Gravity model maximum degree/order (d/o) - timevar_degree_max: 5 # Time-variable coefficients maximum d/o - -#--------------------------------------------------------------------------- -# Planetary Gravitational Forces - planetary_perturbations: - enabled: true - -#--------------------------------------------------------------------------- - tidal_effects: - enabled: false - solid_tides_nonfreq: true # Solid Earth Tides frequency-independent terms - solid_tides_freq: true # Solid Earth Tides frequency-dependent terms - ocean_tides: true # Ocean Tides - solid_earth_pole_tides: true # Solid Earth Pole Tide - ocean_pole_tide: true # Ocean Pole Tide - ocean_tides_degree_max: 15 # Ocean Tides model maximum degree/order - -#--------------------------------------------------------------------------- -# Relativistic effects - relativistic_effects: - enabled: false - -#--------------------------------------------------------------------------- -# Non-gravitational Effects - non_gravitational_effects: - enabled: true - solar_radiation: true - earth_radiation: false - antenna_thrust: false - - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: false - ECOM_B_bias: false - EMP_R_bias: true - EMP_T_bias: true - EMP_N_bias: true - ECOM_D_cpr: false - ECOM_Y_cpr: false - ECOM_B_cpr: false - ECOM_D_2_cpr: false - ECOM_D_4_cpr: false - EMP_R_cpr: true - EMP_T_cpr: true - EMP_N_cpr: true - cpr_count: 0 - diff --git a/examples/ex31_pea_pp_netw_gnss_orb_ar.yaml b/examples/ex31_pea_pp_netw_gnss_orb_ar.yaml deleted file mode 100644 index 541a4af90..000000000 --- a/examples/ex31_pea_pp_netw_gnss_orb_ar.yaml +++ /dev/null @@ -1,454 +0,0 @@ -# ex31 - Network Example Orbit, Clock, EOP estimation -# Uses POD integrated orbit to solve for station positions, satellite orbits,clocks and EOP solution (GPS-only, resolved ambiguities) -# Total processing duration ~ 2.25 hours on 4 corses -# Estimates station positions, satellite orbits, clocks and EOP -# Uses minimum constriants and run a full RTS back smoothing of states. - -inputs: - - root_directory: products/ - - atx_files: [ igs14.atx ] # required - snx_files: [ igs19P2062.snx, tables/igs_satellite_metadata_2203_plus.snx ] # required - blq_files: [ OLOAD_GO.BLQ ] # required if ocean loading is applied - erp_files: [ ../ex31/pod_fit/gag20624.erp ] #config parser doesn't accept weekly files yet. - - satellite_data: - # dcb_files: # monthly DCB file - bsx_files: [ code_monthly.bia ] - clk_files: [ igs20624.clk_30s ] # Clk file - orb_files: [ ../ex31/pod_fit/gag20624_orbits_partials.out ] # only need this if we are estimating orbits - nav_files: [ brdm1990.19p ] # broadcast navigation file - #sp3_files: [ igs20624.sp3 ] - - gnss_observations: - - inputs_root: data/ - - rnx_inputs: - # Select files to run by: - # - selecting one on the command line using the -rnxfiles option - - "*.rnx" # - searching all in file_root directory, or - # - "A*.rnx" # - searching all in file_root directory, or - - troposphere: - vmf_files: [ "grid5/*.H00","grid5/*.H06","grid5/*.H12","grid5/*.H18" ] - orography_files: orography_ell_5x5 - # gpt2grid: EX03/general/gpt_25.grd - - -outputs: - - root_directory: /pea/ - - trace: - output_stations: true - output_network: true - level: 3 - directory: ./ - station_filename: --.TRACE - network_filename: -network--.TRACE - output_residuals: true - output_config: true - - output_rotation: - #period: 6 - #period_units: hours - - ionex: - output: false - directory: ./ - filename: AUSG0.I - - ionstec: - output: false - directory: ./ - filename: IONEX.stec - - bias_sinex: - output: false - directory: ./ - filename: AUS0ACSRAP_00_01D_01D_REL.BIA - phase_output_interval: 900 - code_output_interval: 900.0 - - clocks: - output: true - directory: ./ - filename: .clk - #output_ar_clocks: true - - sinex: - output: true - directory: ./ - filename: .snx - - erp: - output: true - directory: ./ - filename: .erp - - trop_sinex: - output: true - source: KALMAN - directory: ./ - filename: -.tro - - metadata: - config_description: ex31 - analysis_agency: GAA - analysis_center: Geoscience Australia - analysis_program: Ginan - rinex_comment: AUSNETWORK1 - -mongo: - enable: false - output_measurements: true - output_states: true - output_rtcm_messages: true - output_test_stats: true - #delete_history: true - uri: mongodb://127.0.0.1:27017 - - -debug: - mincon_only: false - - -processing_options: - - epoch_control: - #start_epoch: 2019-07-18 16:00:00 - #end_epoch: 2019-07-18 23:59:30 - #max_epochs: 20 #0 is infinite - epoch_interval: 180 #seconds - wait_next_epoch: 3600 # Wait up to an hour for next data point - When processing RINEX causes PEA to wait a long as need for last epoch to be processed. - wait_all_stations: 1 - fatal_message_level: 1 - - model_error_checking: - deweighting: - deweight_factor: 1000 - - ambiguities: - outage_reset_limit: 1 - phase_reject_limit: 2 - - cycle_slips: - exclude: - lli: false - - process_modes: - - preprocessor: true # Perform preprocessing for quality checks - network: true - ionosphere: false - network: false # Compute PPP corrections for a network of stations and satellites - ppp: false # Perform PPP on a network of stations and satellites - user: false # Compute PPP for separate stations using provided satellite data - - gnss_general: - - max_gdop: 30 - elevation_mask: 10 #degrees - - raim: true - - pivot_station: "USN7" #if not provided then will be selected automatically - - sys_options: - gps: - process: true - ambiguity_resolution: false - reject_eclipse: true - code_priorities: [ L1C, L1P, L1Y, L1W, L1M, L1N, L1S, L1L, L1X, - L2W, L2P, L2Y, L2C, L2M, L2N, L2D, L2S, L2L, L2X, - L5I, L5Q, L5X] - - gnss_models: - - phase_windup: - enable: true - range: - enable: true - rec_ant_delta: - enable: true - rec_clock: - enable: true - rec_code_bias: - enable: true - rec_pco: - enable: true - rec_pcv: - enable: true - rec_phase_bias: - enable: true - rec_pos: - enable: true - relativity2: - enable: true - relativity: - enable: true - sagnac: - enable: true - sat_clock: - enable: true - source: PRECISE # {none,precise,ssr,kalman,broadcast} - sat_code_bias: - enable: true - sat_pco: - enable: true - sat_pcv: - enable: true - sat_phase_bias: - enable: true - sat_pos: - enable: true - source: PRECISE # {none,precise,ssr,kalman,broadcast} - tides: - enable: true - otl: true - pole: true - solid: true - troposphere: - enable: true - model: vmf3 # gpt2 - - ionospheric_component: - enable: true - corr_mode: iono_free_linear_combo - iflc_freqs: l1l2_only # any l1l2_only l1l5_only - - #ambiguity_resolution: - - #elevation_mask: 15 - - #wide_lane: - #mode: iter_rnd # AR mode for WL: off, round, iter_rnd, bootst, lambda, lambda_alt, lambda_al2, lambda_bie - #success_rate_threshold: 0.9999 - #solution_ratio_threshold: 3 - #process_noise_sat: 0.00001 - #process_noise_rec: 0.0001 - - #narrow_lane: - #mode: iter_rnd # AR mode for WL: off, round, iter_rnd, bootst, lambda, lambda_alt, lambda_al2, lambda_bie - #success_rate_threshold: 0.9999 - #solution_ratio_threshold: 3 - - - #lambda_set_size: 10 - #max_round_iterations: 3 - - ssr_corrections: - calculate_precursors: false - - minimum_constraints: - enable: true - - translation: - estimated: [true] - #sigma: [1] - rotation: - estimated: [true] - #sigma: [40] - scale: - estimated: [false] - #sigma: [1] - - inverter: ldlt #LLT LDLT INV - #full_vcv: true - #scale_by_vcv: true - max_filter_iterations: 10 - max_prefit_removals: 5 # (int) Maximum number of measurements to exclude using prefit checks before attempting to filter - outlier_screening: - chi_square_mode: none # (enum) Chi-square test mode - innovation, measurement, state {NONE,INNOVATION,MEASUREMENT,STATE} - chi_square_test: false # (bool) Enable Chi-square test - sigma_check: true # (bool) Enable prefit and postfit sigma check - sigma_threshold: 3.000000 # (float) sigma threshold - w_test: false # (bool) Enable w-test - - #default_station_noise: [1,1,1] #constrain all by defaul. [-1] to unconstrain all stations - # default_station_noise: [0.003, 0.004, 0.007] - - #station_noise: - # ALIC: 0.001 # constrain strongly - # STN3: [20] - # DONT: [-1] # unconstrained - # BOAV: 100 # constrain weakly - station_noise: - ASCG: [-1] - BOGT: [-1] - CPVG: [-1] - FFMJ: [-1] - JFNG: [-1] - KERG: [-1] - LAUT: [-1] - MARS: [-1] - NIUM: [-1] - SAMO: [-1] - TOPL: [-1] - USUD: [-1] - ZIM2: [-1] - - filter_options: - - inverter: ldlt #LLT LDLT INV - - outlier_screening: - max_filter_iterations: 10 - max_prefit_removals: 5 - - rts: - enable: true - lag: -1 #-ve for full reverse, +ve for limited epochs 1 epoch? - directory: ./ - filename: -Network.rts - -estimation_parameters: - - stations: - - error_model: elevation_dependent #uniform elevation_dependent - code_sigmas: [0.3] - phase_sigmas: [0.003] - - pos: - estimated: [true] - sigma: [1.0] - proc_noise: [0] - - clk: - estimated: [true] - sigma: [1000] - proc_noise: [10] - proc_noise_dt: sqrt_second - #proc_noise_model: Gaussian - - amb: - estimated: [true] - sigma: [100] - proc_noise: [0] - #proc_noise_dt: day - - trop: - estimated: [true] - sigma: [0.3] - proc_noise: [0.0001] #0.1 mm - proc_noise_dt: sqrt_second - #proc_noise_dt: hour - - #trop_gauss_markov: - # estimated: [true] - # sigma: [0.05] - # proc_noise: [1.00E-02] # steady-state sigma - # tau: [12600] # correlation time (units set by proc_noise_dt) - # proc_noise_dt: second - # proc_noise_model: GaussMarkov - - trop_grads: - estimated: [true] - sigma: [0.03] - proc_noise: [1.0E-6] - proc_noise_dt: sqrt_second - - #trop_grads_gauss_markov: - # estimated: [true] - # sigma: [0.01] - # proc_noise: [5.49E-03] - # tau: [9216] - # proc_noise_dt: second - # proc_noise_model: GaussMarkov - - - satellites: - - clk: - estimated: [true] - sigma: [1000] - proc_noise: [1] - #proc_noise_dt: min - - # clk_rate: - # estimated: [true] - # sigma: [10] - # proc_noise: [1e-5] - - orb: - estimated: [true] - #sigma: [5e-1, 5e-1, 5e-1, 5e-3, 5e-3, 5e-3, 5e-1] - sigma: [5e-1, 5e-1, 5e-1, 5e-3, 5e-3, 5e-3, 5e-2, 1e-2, 1e-2, 1e-3] - - eop: - estimated: [true] - sigma: [30] - - eop_rates: - estimated: [true] - sigma: [30] - - # overrides: - - #stations: - #AGGO: - #clk_rate: - #estimated: [true] - #sigma: [10] - #proc_noise: [1e-8] - - #CEDU: - #trop_gauss_markov: - #estimated: [true] - #sigma: [0.05] - #proc_noise: [0.01] - #tau: [12600] - #proc_noise_dt: sqrt_second - - #trop_grads_gauss_markov: - #estimated: [true] - #sigma: [0.01] - #proc_noise: [0.00549] - #tau: [9216] - #proc_noise_dt: second - - #satellites: - - ### Constellation Overrides - #SYS_GPS: - #srp: - #sigma: [0.01] - #proc_noise: [0.001] - - #SYS_GAL: - #clk: - #sigma: [1.0] - #proc_noise: [0.01] - - ### Block Type Overrides - #GPS-IIR-A: - - ### PRN Overrides - - #PRN_G01: - #clk_rate: - #estimated: [true] - #sigma: [10] - #proc_noise: [1e-5] - - #PRN_G02: - - #clk_rate: - #estimated: [true] - #sigma: [0.1] - #proc_noise: [1e-6] - - #clk_rate_gauss_markov: - #estimated: [true] - #sigma: [0.05] - #proc_noise: [1e-3] - #proc_noise_dt: sqrt_second - #tau: [86400] - - ### SVN Overrides - #SVN_G265: - #pos: {sigma: [10.0] } - #vel: {sigma: [0.1] } diff --git a/examples/ex31_pod_fit_gps.yaml b/examples/ex31_pod_fit_gps.yaml deleted file mode 100644 index b13f81889..000000000 --- a/examples/ex31_pod_fit_gps.yaml +++ /dev/null @@ -1,350 +0,0 @@ -pod_data: # Use initial condition input data below -#--------------------------------------------------------------------------- - satellite_PRN: G23 - reference_frame: - itrf: true - icrf: false - kepler: false - orbit_arc_length: 86400 - initial_epoch: 2015-04-12-00.0000 # YYYY-MM-DD-SEC.DSEC - state_vector: 6804571.8859999999, -15232535.475000001, -20431678.779000003, 1697.1661907155067, 2026.6151679363102, -982.28787769004703 # X, Y, Z, VX, VY, VZ - -pod_options: - output_directory: ex31/pod_fit/ -# can only choose one option here -#---------------------------------------------------------------------- - pod_mode_fit: true # pod_mode = 1 Orbit Determination (pseudo-observations; orbit fitting) - pod_mode_predict: false # pod_mode = 2 Orbit Determination and Prediction - pod_mode_eqm_int: false # pod_mode = 3 Orbit Integration (Equation of Motion only) - pod_mode_ic_int: false # pod_mode = 4 Orbit Integration and Partials (Equation of Motion and Variational Equations) - -# can only choose one option here -#---------------------------------------------------------------------- - time_scale: - TT_time: false - UTC_time: false - GPS_time: true - TAI_time: false - -# can only choose one option here -#---------------------------------------------------------------------- - ic_input_format: - sp3: true # Input a-priori orbit in sp3 format - icf: false # Input a-priori orbit in POD Initial Conditions File (ICF) format - ic_filename: some_file - -# can only choose one option here -#---------------------------------------------------------------------- - ic_input_refsys: - itrf: true # Initial Conditions Reference Frame: ITRF, ICRF - icrf: false # Initial Conditions Reference Frame: ITRF, ICRF - kepler: false - -#--------------------------------------------------------------------------- -# Observation Model - pseudobs_orbit_filename: products/igs20624.sp3 # Pseudo observations orbit filename - pseudobs_interp_step: 300 # Interval (sec) of the interpolated orbit - pseudobs_interp_points: 12 # Number of data points used in Lagrange interpolation - -#---------------------------------------------------------------------- -# Orbit arc length (in hours) - orbit_arc_determination: 26 # Orbit Estimation arc - orbit_arc_prediction: 0 # Orbit Prediction arc - orbit_arc_backwards: 2 # Orbit Propagation backwards arc - -#--------------------------------------------------------------------------- -# External Orbit Comparison - ext_orbit_enabled: true - ext_orbit_type_sp3: false # Orbit data in sp3 format (including position and velocity vectors) - ext_orbit_type_interp: true # Interpolated orbit based on Lagrange interpolation of sp3 file - ext_orbit_type_kepler: false # Keplerian orbit - ext_orbit_type_lagrange: false # 3-day Lagrange interpolation - ext_orbit_type_position_sp3: false # Position and SP3 file - ext_orbit_filename: products/igs20624.sp3 # External (comparison) orbit filename - ext_orbit_interp_step: 300 # Interval (sec) of the interpolated/Kepler orbit - ext_orbit_interp_points: 12 # Number of data points used in Lagrange interpolation - -# can only choose one option here -#---------------------------------------------------------------------- - ext_orbit_frame: - itrf: true # External orbit reference frame - ITRF - icrf: false # External orbit reference frame - ICRF - kepler: false - -#--------------------------------------------------------------------------- -# Earth Orientation - EOP solution options: - EOP_soln_c04: true # IERS C04 solution : EOP_sol = 1 - EOP_soln_rapid: false # IERS rapid service/prediction center (RS/PC) Daily : EOP_sol = 2 - EOP_soln_igs: false # IGS ultra-rapid ERP + IERS RS/PC Daily (dX,dY) : EOP_sol = 3. Need both rapid_file AND igs_file - EOP_soln_interp_points: 4 # EOP solution interpolation points - EOP_soln_c04_file: products/tables/EOP_14_C04_IAU2000A_one_file_1962-now.txt - #EOP_soln_rapid_file: finals2000A.daily - #ERP_soln_igs_file: igu18543_12.erp - -# --------------------------------------------------------------------------- -# IAU Precession-Nutation model: - iau_model_2000: true # IAU2000A: iau_pn_model = 2000 - iau_model_2006: false # IAU2006/2000A: iau_pn_model = 2006 - -#--------------------------------------------------------------------------- -# Gravity model file - gravity_model_file: products/tables/goco05s.gfc # goco05s.gfc, eigen-6s2.gfc, ITSG-Grace2014k.gfc - -#--------------------------------------------------------------------------- -# Planetary/Lunar ephemeris - JPL DE Ephemeris - DE_fname_header: products/tables/header.430_229 - DE_fname_data: products/tables/ascp1950.430 - -#--------------------------------------------------------------------------- -# Ocean tide model file - ocean_tides_model_file: products/tables/fes2004_Cnm-Snm.dat # FES2004 ocean tide model - -#---------------------------------------------------------------------- -# Leap second filename - leapsec_filename: products/tables/leap.second - -#---------------------------------------------------------------------- -# Satellite metadata SINEX - satsinex_filename: products/tables/igs_metadata_2081.snx - -#--------------------------------------------------------------------------- -# Parameter Estimation - estimator_procedure: 1 - estimator_iterations: 2 - -#--------------------------------------------------------------------------- -# Variational Equations - veq_integration: true - -#---------------------------------------------------------------------- -# Reference System for Variational Equations' - Partials & Parameter Estimation - veq_refsys: - itrs: true # ITRS: Terrestrial Reference System - icrs: false # ICRS: Celestial Reference System - kepler: false - -#---------------------------------------------------------------------- -# Write to sp3 orbit format: Option for write Satellite Velocity vector - sp3_velocity: false # Write Velocity vector to sp3 orbit - -#---------------------------------------------------------------------- -# Write partials of the velocity vector w.r.t. parameters into the orbits_partials output file: - partials_velocity: false # Write out velocity vector partials wrt orbital state vector elements - -#---------------------------------------------------------------------- -# SRP A priori model -# cannon_ball : use empirical cannonball f0 model - mode 1 -# simple_boxwing : use simple box-wing model - mode 2 -# full_boxwing : use full box-wing model from repro3 routines - mode 3 -# none : no a priori SRP model - mode 0 - srp_apriori_model: - no_model: false - cannon_ball_model: true - simple_boxwing_model: false - full_boxwing_model: false - -#---------------------------------------------------------------------- -# SRP modes - Default srp_parameters = ECOM1 + EMP - srp_modes: - ECOM1: false - ECOM2: true - hybrid: false - SBOXW: false - EMPirical: false - - gravity_model: - central_force: false # Central force gravity field : gravity_model = 0 - static_gravity_model: false # Static global gravity field model : gravity_model = 1 - time_variable_model: true # Time-variable global gravity field model : gravity_model = 2 - iers_geopotential_model: false # IERS conventional geopotential model : gravity_model = 3 - - pulse: - enabled: false - epoch_number: 1 # number of epochs to apply pulses - offset: 43200 # since the start of day - interval: 43200 # repeat every N seconds - directions: - x_direction: true - y_direction: true - z_direction: true - r_direction: false - t_direction: false - n_direction: false - reference_frame: - icrf: true - orbital: false - -eqm_options: -#--------------------------------------------------------------------------- -# Numerical integration method -# Runge-Kutta-Nystrom 7th order RKN7(6): RKN7, Runge-Kutta 4th order: RK4, Runge-Kutta 8th order RK8(7)13: RK8 - integration_options: - RK4_integrator_method: false - RKN7_integrator_method: true - RK8_integrator_method: false - integrator_step: 300 # Integrator stepsize in seconds - -#--------------------------------------------------------------------------- -# Gravitational Forces - gravity_field: - enabled: true - gravity_degree_max: 15 # Gravity model maximum degree/order (d/o) - timevar_degree_max: 15 # Time-variable coefficients maximum d/o - -#--------------------------------------------------------------------------- -# Planetary Gravitational Forces - planetary_perturbations: - enabled: true - -#--------------------------------------------------------------------------- - tidal_effects: - enabled: true - solid_tides_nonfreq: true # Solid Earth Tides frequency-independent terms - solid_tides_freq: true # Solid Earth Tides frequency-dependent terms - ocean_tides: true # Ocean Tides - solid_earth_pole_tides: true # Solid Earth Pole Tide - ocean_pole_tide: true # Ocean Pole Tide - ocean_tides_degree_max: 15 # Ocean Tides model maximum degree/order - -#--------------------------------------------------------------------------- -# Relativistic effects - relativistic_effects: - enabled: true - -#--------------------------------------------------------------------------- -# Non-gravitational Effects - non_gravitational_effects: - enabled: true - solar_radiation: true - earth_radiation: true - antenna_thrust: true - - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - EMP_R_bias: false - EMP_T_bias: false - EMP_N_bias: false - ECOM_D_cpr: false - ECOM_Y_cpr: false - ECOM_B_cpr: true - ECOM_D_2_cpr: true - ECOM_D_4_cpr: false - EMP_R_cpr: false - EMP_T_cpr: false - EMP_N_cpr: false - cpr_count: 1 - -veq_options: -#--------------------------------------------------------------------------- -# Numerical integration method -# Runge-Kutta-Nystrom 7th order RKN7(6): RKN7, Runge-Kutta 4th order: RK4, Runge-Kutta 8th order RK8(7)13: RK8 -# NB for VEQ, only RK7 is supported. Do not select any other value - integration_options: - RK4_integrator_method: false - RKN7_integrator_method: true - RK8_integrator_method: false - integrator_step: 300 # Integrator stepsize in seconds - -#--------------------------------------------------------------------------- -# Gravitational Forces - gravity_field: - enabled: true - gravity_degree_max: 5 # Gravity model maximum degree/order (d/o) - timevar_degree_max: 5 # Time-variable coefficients maximum d/o - -#--------------------------------------------------------------------------- -# Planetary Gravitational Forces - planetary_perturbations: - enabled: true - -#--------------------------------------------------------------------------- - tidal_effects: - enabled: false - solid_tides_nonfreq: true # Solid Earth Tides frequency-independent terms - solid_tides_freq: true # Solid Earth Tides frequency-dependent terms - ocean_tides: true # Ocean Tides - solid_earth_pole_tides: true # Solid Earth Pole Tide - ocean_pole_tide: true # Ocean Pole Tide - ocean_tides_degree_max: 15 # Ocean Tides model maximum degree/order - -#--------------------------------------------------------------------------- -# Relativistic effects - relativistic_effects: - enabled: false - -#--------------------------------------------------------------------------- -# Non-gravitational Effects - non_gravitational_effects: - enabled: true - solar_radiation: true - earth_radiation: true - antenna_thrust: true - - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - EMP_R_bias: false - EMP_T_bias: false - EMP_N_bias: false - ECOM_D_cpr: false - ECOM_Y_cpr: false - ECOM_B_cpr: true - ECOM_D_2_cpr: true - ECOM_D_4_cpr: false - EMP_R_cpr: false - EMP_T_cpr: false - EMP_N_cpr: false - cpr_count: 1 - -# put any system, block or PRN overrides here -overrides: - system: - GPS: - srp_apriori_model: - no_model: false - cannon_ball_model: true - simple_boxwing_model: false - full_boxwing_model: false - GAL: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: false - full_boxwing_model: true - GLO: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false - BDS: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false - block: - GPS-IIF: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false -# GPS BLK IIF use ECOM2 parameters - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - ECOM_D_2_cpr: false - ECOM_D_4_cpr: false - ECOM_B_cpr: true - prn: - G01: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: false - full_boxwing_model: true diff --git a/examples/ex31_pod_ic_gps.yaml b/examples/ex31_pod_ic_gps.yaml deleted file mode 100644 index 60dc06dcb..000000000 --- a/examples/ex31_pod_ic_gps.yaml +++ /dev/null @@ -1,351 +0,0 @@ -pod_data: # Use initial condition input data below -#--------------------------------------------------------------------------- - satellite_PRN: G23 - reference_frame: - itrf: true - icrf: false - kepler: false - orbit_arc_length: 86400 - initial_epoch: 2015-04-12-00.0000 # YYYY-MM-DD-SEC.DSEC - state_vector: 6804571.8859999999, -15232535.475000001, -20431678.779000003, 1697.1661907155067, 2026.6151679363102, -982.28787769004703 # X, Y, Z, VX, VY, VZ - -pod_options: - output_directory: ex31/pod_ic/ -# can only choose one option here -#---------------------------------------------------------------------- - pod_mode_fit: false # pod_mode = 1 Orbit Determination (pseudo-observations; orbit fitting) - pod_mode_predict: false # pod_mode = 2 Orbit Determination and Prediction - pod_mode_eqm_int: false # pod_mode = 3 Orbit Integration (Equation of Motion only) - pod_mode_ic_int: true # pod_mode = 4 Orbit Integration and Partials (Equation of Motion and Variational Equations) - -# can only choose one option here -#---------------------------------------------------------------------- - time_scale: - TT_time: false - UTC_time: false - GPS_time: true - TAI_time: false - -# can only choose one option here -#---------------------------------------------------------------------- - ic_input_format: - sp3: false # Input a-priori orbit in sp3 format - icf: true # Input a-priori orbit in POD Initial Conditions File (ICF) format - ic_filename: ex31/pod_fit/gag20624_orbits_partials.out_pea - -# can only choose one option here -#---------------------------------------------------------------------- - ic_input_refsys: - itrf: false # Initial Conditions Reference Frame: ITRF, ICRF - icrf: true # Initial Conditions Reference Frame: ITRF, ICRF - kepler: false - -#--------------------------------------------------------------------------- -# Observation Model - pseudobs_orbit_filename: products/igs20624.sp3 # Pseudo observations orbit filename - pseudobs_interp_step: 300 # Interval (sec) of the interpolated orbit - pseudobs_interp_points: 12 # Number of data points used in Lagrange interpolation - -#---------------------------------------------------------------------- -# Orbit arc length (in hours) - orbit_arc_determination: 24 # Orbit Estimation arc - orbit_arc_prediction: 2 # Orbit Prediction arc - orbit_arc_backwards: 2 # Orbit Propagation backwards arc - -#--------------------------------------------------------------------------- -# External Orbit Comparison - ext_orbit_enabled: true - ext_orbit_type_sp3: false # Orbit data in sp3 format (including position and velocity vectors) - ext_orbit_type_interp: true # Interpolated orbit based on Lagrange interpolation of sp3 file - ext_orbit_type_kepler: false # Keplerian orbit - ext_orbit_type_lagrange: false # 3-day Lagrange interpolation - ext_orbit_type_position_sp3: false # Position and SP3 file - ext_orbit_filename: products/igs20624.sp3 # External (comparison) orbit filename - ext_orbit_interp_step: 300 # Interval (sec) of the interpolated/Kepler orbit - ext_orbit_interp_points: 12 # Number of data points used in Lagrange interpolation - -# can only choose one option here -#---------------------------------------------------------------------- - ext_orbit_frame: - itrf: true # External orbit reference frame - ITRF - icrf: false # External orbit reference frame - ICRF - kepler: false - -#--------------------------------------------------------------------------- -# Earth Orientation - EOP solution options: - EOP_soln_c04: false # IERS C04 solution : EOP_sol = 1 - EOP_soln_rapid: false # IERS rapid service/prediction center (RS/PC) Daily : EOP_sol = 2 - EOP_soln_igs: true # IGS ultra-rapid ERP + IERS RS/PC Daily (dX,dY) : EOP_sol = 3. Need both rapid_file AND igs_file - EOP_soln_interp_points: 4 # EOP solution interpolation points - ERP_soln_igs_file: ex31/pea/ex3120624.erp_smoothed - #EOP_soln_c04_file: products/tables/EOP_14_C04_IAU2000A_one_file_1962-now.txt - #EOP_soln_rapid_file: finals2000A.daily - #ERP_soln_igs_file: igu18543_12.erp - -# --------------------------------------------------------------------------- -# IAU Precession-Nutation model: - iau_model_2000: true # IAU2000A: iau_pn_model = 2000 - iau_model_2006: false # IAU2006/2000A: iau_pn_model = 2006 - -#--------------------------------------------------------------------------- -# Gravity model file - gravity_model_file: products/tables/goco05s.gfc # goco05s.gfc, eigen-6s2.gfc, ITSG-Grace2014k.gfc - -#--------------------------------------------------------------------------- -# Planetary/Lunar ephemeris - JPL DE Ephemeris - DE_fname_header: products/tables/header.430_229 - DE_fname_data: products/tables/ascp1950.430 - -#--------------------------------------------------------------------------- -# Ocean tide model file - ocean_tides_model_file: products/tables/fes2004_Cnm-Snm.dat # FES2004 ocean tide model - -#---------------------------------------------------------------------- -# Leap second filename - leapsec_filename: products/tables/leap.second - -#---------------------------------------------------------------------- -# Satellite metadata SINEX - satsinex_filename: products/tables/igs_metadata_2081.snx - -#--------------------------------------------------------------------------- -# Parameter Estimation - estimator_procedure: 1 - estimator_iterations: 2 - -#--------------------------------------------------------------------------- -# Variational Equations - veq_integration: true - -#---------------------------------------------------------------------- -# Reference System for Variational Equations' - Partials & Parameter Estimation - veq_refsys: - itrs: true # ITRS: Terrestrial Reference System - icrs: false # ICRS: Celestial Reference System - kepler: false - -#---------------------------------------------------------------------- -# Write to sp3 orbit format: Option for write Satellite Velocity vector - sp3_velocity: false # Write Velocity vector to sp3 orbit - -#---------------------------------------------------------------------- -# Write partials of the velocity vector w.r.t. parameters into the orbits_partials output file: - partials_velocity: false # Write out velocity vector partials wrt orbital state vector elements - -#---------------------------------------------------------------------- -# SRP A priori model -# cannon_ball : use empirical cannonball f0 model - mode 1 -# simple_boxwing : use simple box-wing model - mode 2 -# full_boxwing : use full box-wing model from repro3 routines - mode 3 -# none : no a priori SRP model - mode 0 - srp_apriori_model: - no_model: false - cannon_ball_model: true - simple_boxwing_model: false - full_boxwing_model: false - # -#---------------------------------------------------------------------- -# SRP modes - Default srp_parameters = ECOM1 + EMP - srp_modes: - ECOM1: false - ECOM2: true - hybrid: false - SBOXW: false - EMPirical: false - - gravity_model: - central_force: false # Central force gravity field : gravity_model = 0 - static_gravity_model: false # Static global gravity field model : gravity_model = 1 - time_variable_model: true # Time-variable global gravity field model : gravity_model = 2 - iers_geopotential_model: false # IERS conventional geopotential model : gravity_model = 3 - - pulse: - enabled: false - epoch_number: 1 # number of epochs to apply pulses - offset: 43200 # since the start of day - interval: 43200 # repeat every N seconds - directions: - x_direction: true - y_direction: true - z_direction: true - r_direction: false - t_direction: false - n_direction: false - reference_frame: - icrf: true - orbital: false - -eqm_options: -#--------------------------------------------------------------------------- -# Numerical integration method -# Runge-Kutta-Nystrom 7th order RKN7(6): RKN7, Runge-Kutta 4th order: RK4, Runge-Kutta 8th order RK8(7)13: RK8 - integration_options: - RK4_integrator_method: false - RKN7_integrator_method: true - RK8_integrator_method: false - integrator_step: 300 # Integrator stepsize in seconds - -#--------------------------------------------------------------------------- -# Gravitational Forces - gravity_field: - enabled: true - gravity_degree_max: 15 # Gravity model maximum degree/order (d/o) - timevar_degree_max: 15 # Time-variable coefficients maximum d/o - -#--------------------------------------------------------------------------- -# Planetary Gravitational Forces - planetary_perturbations: - enabled: true - -#--------------------------------------------------------------------------- - tidal_effects: - enabled: true - solid_tides_nonfreq: true # Solid Earth Tides frequency-independent terms - solid_tides_freq: true # Solid Earth Tides frequency-dependent terms - ocean_tides: true # Ocean Tides - solid_earth_pole_tides: true # Solid Earth Pole Tide - ocean_pole_tide: true # Ocean Pole Tide - ocean_tides_degree_max: 15 # Ocean Tides model maximum degree/order - -#--------------------------------------------------------------------------- -# Relativistic effects - relativistic_effects: - enabled: true - -#--------------------------------------------------------------------------- -# Non-gravitational Effects - non_gravitational_effects: - enabled: true - solar_radiation: true - earth_radiation: true - antenna_thrust: true - - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - EMP_R_bias: false - EMP_T_bias: false - EMP_N_bias: false - ECOM_D_cpr: false - ECOM_Y_cpr: false - ECOM_B_cpr: true - ECOM_D_2_cpr: true - ECOM_D_4_cpr: false - EMP_R_cpr: false - EMP_T_cpr: false - EMP_N_cpr: false - cpr_count: 1 - -veq_options: -#--------------------------------------------------------------------------- -# Numerical integration method -# Runge-Kutta-Nystrom 7th order RKN7(6): RKN7, Runge-Kutta 4th order: RK4, Runge-Kutta 8th order RK8(7)13: RK8 -# NB for VEQ, only RK7 is supported. Do not select any other value - integration_options: - RK4_integrator_method: false - RKN7_integrator_method: true - RK8_integrator_method: false - integrator_step: 300 # Integrator stepsize in seconds - -#--------------------------------------------------------------------------- -# Gravitational Forces - gravity_field: - enabled: true - gravity_degree_max: 5 # Gravity model maximum degree/order (d/o) - timevar_degree_max: 5 # Time-variable coefficients maximum d/o - -#--------------------------------------------------------------------------- -# Planetary Gravitational Forces - planetary_perturbations: - enabled: true - -#--------------------------------------------------------------------------- - tidal_effects: - enabled: false - solid_tides_nonfreq: true # Solid Earth Tides frequency-independent terms - solid_tides_freq: true # Solid Earth Tides frequency-dependent terms - ocean_tides: true # Ocean Tides - solid_earth_pole_tides: true # Solid Earth Pole Tide - ocean_pole_tide: true # Ocean Pole Tide - ocean_tides_degree_max: 15 # Ocean Tides model maximum degree/order - -#--------------------------------------------------------------------------- -# Relativistic effects - relativistic_effects: - enabled: false - -#--------------------------------------------------------------------------- -# Non-gravitational Effects - non_gravitational_effects: - enabled: true - solar_radiation: true - earth_radiation: true - antenna_thrust: true - - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - EMP_R_bias: false - EMP_T_bias: false - EMP_N_bias: false - ECOM_D_cpr: false - ECOM_Y_cpr: false - ECOM_B_cpr: true - ECOM_D_2_cpr: true - ECOM_D_4_cpr: false - EMP_R_cpr: false - EMP_T_cpr: false - EMP_N_cpr: false - cpr_count: 1 - -# put any system, block or PRN overrides here -overrides: - system: - GPS: - srp_apriori_model: - no_model: false - cannon_ball_model: true - simple_boxwing_model: false - full_boxwing_model: false - GAL: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: false - full_boxwing_model: true - GLO: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false - BDS: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false - block: - GPS-IIF: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: true - full_boxwing_model: false -# GPS BLK IIF use ECOM2 parameters - srp_parameters: - ECOM_D_bias: true - ECOM_Y_bias: true - ECOM_B_bias: true - ECOM_D_2_cpr: false - ECOM_D_4_cpr: false - ECOM_B_cpr: true - prn: - G01: - srp_apriori_model: - no_model: false - cannon_ball_model: false - simple_boxwing_model: false - full_boxwing_model: true diff --git a/examples/record_streams.yaml b/examples/record_streams.yaml deleted file mode 100644 index 14b420a08..000000000 --- a/examples/record_streams.yaml +++ /dev/null @@ -1,82 +0,0 @@ - -inputs: - - root_directory: products - - - gnss_observations: - - inputs_root: "https://:@ntrip.data.gnss.ga.gov.au/" - rtcm_inputs: - - GATT00AUS0 - - #rtcm_inputs: - #- "recordings/*.rtcm" - - satellite_data: - - inputs_root: "https://:@ntrip.data.gnss.ga.gov.au/" - #rtcm_inputs: - #- GATT00AUS0 - rtcm_inputs: - - "BCEP00DLR0" - - "SSRA02IGS0" - - - #sp3_files: [blah.sp3] - -outputs: - - root_directory: recordings - - rtcm_nav: - output: true - - rinex_nav: - #output: true - - rtcm_obs: - output: true - - rinex_obs: - #output: true - - orbex: - output: true - -processing_options: - - epoch_control: - epoch_interval: 1 #seconds - wait_next_epoch: 10 - wait_all_stations: 1 - #max_epochs: 3600 - require_obs: false - simulate_real_time: true - - process_modes: - preprocessor: false - - gnss_general: - delete_old_ephemerides: true - sys_options: - gps: - process: true - gal: - process: true - - gnss_models: - - tides: - #solid: false - #pole: false - #otl: false - troposphere: - model: vmf3 #gpt2 - sat_pos: - #source: broadcast - sat_clock: - #source: broadcast - sat_attitude: - source: model - diff --git a/scripts/GinanEDA/ginaneda/apps/clock.py b/scripts/GinanEDA/ginaneda/apps/clock.py index 6109c82f1..de7226c54 100644 --- a/scripts/GinanEDA/ginaneda/apps/clock.py +++ b/scripts/GinanEDA/ginaneda/apps/clock.py @@ -91,6 +91,19 @@ def dropdown_serie(sim_list): style={"width": "5%", "display": "inline-block"}, ) +def dropdown_satsys(sat_list): + # syschar = list(['ALL']) + syschar = ['ALL'] + list(set(s[0] for s in sat_list if len(s) > 1)) + p = util.named_dropdown( + None, + id="cl_dropdown_sys", + options=[{"label": i, "value": i} for i in syschar], + placeholder="SysChar", + value='ALL', + multi=False, + ) + p.style = {"width": "20%", "display": "inline-block"} + return p @app.callback( Output("plot4", "figure"), @@ -99,10 +112,11 @@ def dropdown_serie(sim_list): State("cl_dropdown_type", "value"), State("cl_dropdown_serie1", "value"), State("cl_dropdown_serie", "value"), + State("cl_dropdown_sys", "value") # State("checklist", "value"), # State("exclude_npt", "value") ) -def update_graph_pos(click, data_dict, graph_type, serie, serie1): +def update_graph_pos(click, data_dict, graph_type, serie, serie1, syssat): """Update the new graph """ if graph_type is None: @@ -113,14 +127,20 @@ def update_graph_pos(click, data_dict, graph_type, serie, serie1): trace = [] logger.info("Request done") if graph_type == "SAT": - list_serie = data_dict['DB_SAT']#[1:] + if syssat == "ALL": + list_serie = data_dict['DB_SAT']#[1:] + else: + list_serie = [] + for sat in data_dict['DB_SAT']: + if len(sat) > 1 and sat[0] == syssat: + list_serie.append(sat) dd = db.get_series2(data_dict, "States", "SAT_CLOCK", [""], list_serie, serie, "Epoch", "x", x3=None) dd1 = db.get_series2(data_dict, "States", "SAT_CLOCK", [""], list_serie, serie1, "Epoch", "x", x3=None) key = "sat" elif graph_type == "SITE": list_serie = data_dict['DB_SITE']#[1:] - dd = db.get_series2(data_dict, "States", "REC_CLOCK", list_serie, [""], serie, "Epoch", "x", x3=None) - dd1 = db.get_series2(data_dict, "States", "REC_CLOCK", list_serie, ["G00"], serie1, "Epoch", "x", x3=None) + dd = db.get_series2(data_dict, "States", "REC_CLOCK", list_serie, ["G--"], serie, "Epoch", "x", x3=None) + dd1 = db.get_series2(data_dict, "States", "REC_CLOCK", list_serie, [""], serie1, "Epoch", "x", x3=None) key = "site" data_ =[] @@ -186,6 +206,7 @@ def layout(data_dict): dropdown_type, dropdown_serie(data_dict['Series']), dropdown_serie1(data_dict['Series']), + dropdown_satsys(data_dict['DB_SAT']), # exclude_start(), update_button, dcc.Graph( diff --git a/scripts/GinanEDA/ginaneda/apps/state.py b/scripts/GinanEDA/ginaneda/apps/state.py index 8cf6aff3c..ec4d9ee65 100644 --- a/scripts/GinanEDA/ginaneda/apps/state.py +++ b/scripts/GinanEDA/ginaneda/apps/state.py @@ -42,7 +42,7 @@ def exclude_start(): ) -possible_plot = ["Line", "Scatter", "HistogramX", "HistogramY"] +possible_plot = ["Line", "Scatter", "HistogramX", "HistogramY", "Fourier"] def dropdown_type(): diff --git a/scripts/GinanEDA/ginaneda/apps/utilities.py b/scripts/GinanEDA/ginaneda/apps/utilities.py index 6df525aec..8a47a77c2 100644 --- a/scripts/GinanEDA/ginaneda/apps/utilities.py +++ b/scripts/GinanEDA/ginaneda/apps/utilities.py @@ -1,5 +1,6 @@ """Generic utilites for the EDA """ +import numpy as np from dash import dcc from dash import html import plotly.graph_objs as go @@ -61,9 +62,22 @@ def generate_trace(graph_type, x_array, y_array, label): """ if graph_type == "Line" or graph_type == "Scatter": mode = "lines" if graph_type == "Line" else "markers" - trace = go.Scatter(x=x_array, y=y_array, mode=mode, name=label) + trace = go.Scatter(x=x_array, y=y_array, mode=mode, name=label, + hovertemplate = + 'y: %{y:.2f}'+ + '
x: %{x}
'+ + f'{label}' + ) elif graph_type == "POLAR": trace = go.Scatterpolar(r=y_array, theta=x_array, mode="markers", name=label) + elif graph_type == "Fourier": + transformed = np.absolute(np.fft.fft(y_array)) + trace = go.Scatter(y=transformed, mode="lines", name=label, + hovertemplate = + 'y: %{y:.2f}'+ + '
x: %{x}
'+ + f'{label}' + ) elif graph_type == "HistogramX": trace = go.Histogram(x=y_array, name=label) elif graph_type == "HistogramY": diff --git a/scripts/GinanEDA/ginaneda/datasets/db.py b/scripts/GinanEDA/ginaneda/datasets/db.py index 7ce4d8bb8..eb6504d3b 100644 --- a/scripts/GinanEDA/ginaneda/datasets/db.py +++ b/scripts/GinanEDA/ginaneda/datasets/db.py @@ -170,11 +170,7 @@ def get_series(data, collection, state, site, sat, db, serie, x1, x2, x3): for cursor in mongo_cl["Geometry"].aggregate(pipeline): req2[db+"_"+cursor['_id']['series']+suffix+"_"+cursor['_id']['site']+"_"+cursor['_id']['sat']] = cursor - for r in req2: - print(r) - print("=====") - for r in req: - print(r) + if len(req2)!=0: for r in req: if r in req2: diff --git a/scripts/auto_generate_yaml.py b/scripts/auto_generate_yaml.py index 45df90b6f..8222df6c5 100644 --- a/scripts/auto_generate_yaml.py +++ b/scripts/auto_generate_yaml.py @@ -364,7 +364,7 @@ def edit_config_template_pea( @click.command() @click.option("--target-dir", required=True, help="Directory to place the final config / YAML file, e.g. /var/config") -@click.option("--template-path", required=True, help="Path to the YAML template to use, e.g. /var/ginan/examples/ex12") +@click.option("--template-path", required=True, help="Path to the YAML template to use, e.g. /var/ginan/exampleConfigs/ex12") @click.option("--product-dir", required=True, help="Directory to input products, e.g. /var/product") @click.option("--data-dir", help="Directory to input data, e.g. /var/data. If missing same as product-dir") @click.option("--output-dir", help="Directory to output data, e.g. /var/output. If missing same as product-dir") diff --git a/scripts/auto_run_PPP.py b/scripts/auto_run_PPP.py index fcaf96cd2..50d35369c 100644 --- a/scripts/auto_run_PPP.py +++ b/scripts/auto_run_PPP.py @@ -109,7 +109,7 @@ def auto_run_main( "Please provide path to ginan directory with the ginan-path option\n" ) - template_path = next((ginan_path / "examples").glob(template_example + "*.yaml")) + template_path = next((ginan_path / "exampleConfigs").glob(template_example + "*.yaml")) if run_mode == "igs-station": atx = True diff --git a/scripts/download_examples.py b/scripts/download_example_input_data.py similarity index 81% rename from scripts/download_examples.py rename to scripts/download_example_input_data.py index f45687650..24f6e2636 100755 --- a/scripts/download_examples.py +++ b/scripts/download_example_input_data.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -"""Downloads/Uploads auxiliary examples files to/from examples dir""" +"""Downloads/Uploads auxiliary example_input_data files to/from example_input_data dir""" import logging as _logging from pathlib import Path as _Path from shutil import copy as _copy @@ -16,7 +16,6 @@ "ex12": ["*.TRACE", "*.snx"], "ex13": ["*.TRACE", "*.snx"], "ex14": ["*.TRACE", "*.snx"], - "ex15": ["*.TRACE", "*.snx"], "ex16": ["*Network*.TRACE", "*.*I", "*.stec", "*.snx", "*.BIA", "*.INX*"], "ex17": ["*Network*.TRACE", "*.snx", "*.clk*"], "ex21": ["pod*.out", "*.sp3"], @@ -80,11 +79,11 @@ def get_example_type(name: str) -> _Union[str, bool]: return False -def update_solutions_dict(examples_dir: _Path, directory: str, ex_glob_dict: dict, tag: str = ""): +def update_solutions_dict(example_input_data_dir: _Path, directory: str, ex_glob_dict: dict, tag: str = ""): """ """ if get_example_type(directory): # room for five-symbol name - ex22g - example_dir = examples_dir / directory - ref_sol_dir = examples_dir / "solutions" / tag / directory + example_dir = example_input_data_dir / directory + ref_sol_dir = example_input_data_dir / "solutions" / tag / directory if example_dir.exists() and ref_sol_dir.exists(): _rmtree(ref_sol_dir) _logging.info( @@ -111,8 +110,8 @@ def update_solutions_dict(examples_dir: _Path, directory: str, ex_glob_dict: dic ) -def upload_examples_tar( - examples_path: _Union[_Path, str], +def upload_example_input_data_tar( + example_output_data_path: _Union[_Path, str], bucket: str, target: str, dirs: _Union[list, tuple] = ("products", "data", "loading", "solutions"), @@ -122,7 +121,7 @@ def upload_examples_tar( push_no_tar: bool = False, ): __doc__ = ( - "tars selected aux dirs from ginan/examples and compares their checksums with" + "tars selected aux dirs from ginan/inputData and compares their checksums with" " the ones from s3 bucket. If checksums different - upload, else log info" " message and do nothing. Default paths are [bucket] s3://peanpod/aux/ ->" " [html] https://peanpod.s3.ap-southeast-2.amazonaws.com/aux/" @@ -134,11 +133,11 @@ def upload_examples_tar( if example_type: directory = "solutions/" + (f"{tag}/" if tag != "" else "") + directory tarname = directory + ".tar." + compression - destpath_targz = examples_path / tarname + destpath_targz = example_output_data_path / tarname dest_url = base_url + "/" + tarname if not push_no_tar: ga.gn_io.common.tar_comp( - srcpath=examples_path / directory, + srcpath=example_output_data_path / directory, destpath=destpath_targz, reset_info=example_type, # reset timestamp etc for examples only compression=compression, @@ -160,8 +159,8 @@ def upload_examples_tar( _logging.info(f"------------------------------") -def download_examples_tar( - examples_path: _Union[_Path, str], +def download_example_input_data_tar( + example_input_data_path: _Union[_Path, str], bucket: str, target: str, dirs: _Union[list, tuple] = ("products", "data", "solutions", "loading"), @@ -172,7 +171,7 @@ def download_examples_tar( ): __doc__ = ( "Downloads compressed selected tarballs from ap-southeast-2 s3 bucket, untars" - " them to ginan/examples dir. If tarball is available locally then checksums" + " them to ginan/inputData dir. If tarball is available locally then checksums" " are compared at first. If the same - nothing is downloaded, local tarball" " gets uncompressed" ) @@ -195,10 +194,10 @@ def download_examples_tar( else: directory = dir_url = f"{directory}.tar.{compression}" - destpath_targz = examples_path / directory + destpath_targz = example_input_data_path / directory dest_url = base_url + "/" + dir_url md5_checksum_aws = ga.gn_download.request_metadata(dest_url) - destpath = examples_path / directory + destpath = example_input_data_path / directory if not destpath_targz.exists(): _logging.info(msg=f"{directory} not found on disk ['{md5_checksum_aws}'].") destpath_targz.parent.mkdir(parents=True, exist_ok=True) @@ -227,7 +226,7 @@ def download_examples_tar( @_click.option( "--path", default=None, - help="custom path to examples dir, a dir that stores products/data etc, default is ginan/examples", + help="custom path to inputData dir, a dir that stores products/data etc, default is ginan/inputData", ) @_click.option("--tag", type=str, default="") @_click.option( @@ -241,15 +240,15 @@ def download_examples_tar( there is no need to overwrite the files.""" ), ) -@_click.option("-s", "--solutions", is_flag=True, help="download/upload solutions only") -@_click.option("-d", "--data", is_flag=True, help="download/upload data only") -@_click.option("-p", "--products", is_flag=True, help="download/upload products only") -@_click.option("-l", "--loading", is_flag=True, help="download/upload loadings only") +@_click.option("-s", "--solutions", is_flag=True, help="download/upload solutions") +@_click.option("-d", "--data", is_flag=True, help="download/upload data") +@_click.option("-p", "--products", is_flag=True, help="download/upload products") +@_click.option("-l", "--loading", is_flag=True, help="download/upload loadings") @_click.option("--push", is_flag=True, help="tar dirs and push them to aws with checksum metadata and public read") @_click.option("--push_no_tar", is_flag=True, help="push tar archive which is present on disk") -def download_examples(dirs, bucket, target, path, tag, skip_extract, solutions, data, products, loading, push, push_no_tar): +def download_example_input_data(dirs, bucket, target, path, tag, skip_extract, solutions, data, products, loading, push, push_no_tar): """Downloads 'products', 'data', and 'solutions' tarballs from s3 bucket and - extracts the content into examples dir. The list of tarballs can be + extracts the content into inputData dir. The list of tarballs can be changed with the combination of [-p/-d/-s] options. Similar tarballs upload functionality is available - can be activated with '--push' key To configure the utility for --push functionality it is enough to create @@ -259,11 +258,18 @@ def download_examples(dirs, bucket, target, path, tag, skip_extract, solutions, _logging.getLogger().setLevel(_logging.INFO) script_path = _Path(__file__).resolve().parent if path is None: - examples_path = (script_path.parent / "examples").resolve() - _logging.info(f"default path relative to script location selected: {examples_path}") + example_input_data_path = (script_path.parent / "inputData").resolve() + _logging.info(f"default input path relative to script location selected: {example_input_data_path}") else: - examples_path = _Path(path) - _logging.info(f"custom path selected: {examples_path}") + example_input_data_path = _Path(path) + _logging.info(f"custom input path selected: {example_input_data_path}") + + if path is None: + example_output_data_path = _Path("./") + _logging.info(f"default output path relative to script location selected: {example_output_data_path}") + else: + example_output_data_path = _Path(path) + _logging.info(f"custom output path selected: {example_output_data_path}") if not dirs: if products: @@ -272,35 +278,36 @@ def download_examples(dirs, bucket, target, path, tag, skip_extract, solutions, dirs += ("loading",) if data: dirs += ("data",) - if solutions: + if solutions or push or push_no_tar: dirs += tuple(EX_GLOB_DICT.keys()) if not dirs: # if nothing has been selected - dirs = ("products", "data") + tuple(EX_GLOB_DICT.keys()) + dirs = ("products", "data") + _logging.info(f"{dirs} selected") if push or push_no_tar: # copy over the required files if exist - if solutions/blah -> rm blah, copy from ../blah to solutions/blah _logging.info(msg="updating solutions") [ - update_solutions_dict(examples_dir=examples_path, directory=directory, ex_glob_dict=EX_GLOB_DICT, tag=tag) + update_solutions_dict(example_input_data_dir=example_output_data_path, directory=directory, ex_glob_dict=EX_GLOB_DICT, tag=tag) for directory in dirs ] - upload_examples_tar( + upload_example_input_data_tar( dirs=dirs, compression="bz2", tag=tag, - examples_path=examples_path, + example_output_data_path=example_output_data_path, bucket=bucket, target=target, show_progress=False, push_no_tar=push_no_tar, ) else: - download_examples_tar( + download_example_input_data_tar( dirs=dirs, compression="bz2", tag=tag, - examples_path=examples_path, + example_input_data_path=example_input_data_path, skip_extract=skip_extract, bucket=bucket, target=target, @@ -309,4 +316,4 @@ def download_examples(dirs, bucket, target, path, tag, skip_extract, solutions, if __name__ == "__main__": - download_examples() + download_example_input_data() diff --git a/scripts/download_slr_data.py b/scripts/download_slr_data.py index af0ec95ef..9dbf9995a 100755 --- a/scripts/download_slr_data.py +++ b/scripts/download_slr_data.py @@ -9,7 +9,7 @@ import os import re -write_loc = "../examples/slr/downloaded" +write_loc = "../inputData/slr/downloaded" data_url = "https://cddis.nasa.gov/archive/slr/data/npt_crd" orbits_url = "https://cddis.nasa.gov/archive/slr/products/orbits" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e301f54c4..dfdf684b8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -54,6 +54,8 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format-truncation") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-extern-c-compat") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format-zero-length") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -save-temps") + set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g") set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -frecursive") set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fall-intrinsics") @@ -122,7 +124,7 @@ if (BUILD_DOC) set(DOXYGEN_LAYOUT DoxygenLayout.xml) # note the option ALL which allows to build the docs together with the application - add_custom_target( docs + add_custom_target(docs ALL COMMAND ${CMAKE_COMMAND} -DIN=${DOXYGEN_IN} -DOUT=${DOXYGEN_OUT} -P "../cmake/Configure.cmake" COMMAND ${CMAKE_COMMAND} -DIN=${DOXYGEN_LAYIN} -DOUT=${DOXYGEN_LAYOUT} -P "../cmake/Configure.cmake" @@ -130,7 +132,17 @@ if (BUILD_DOC) WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/build COMMENT "Generating API documentation with Doxygen" VERBATIM ) - + + add_custom_target(generateConfigMd + COMMAND pea -Y 1 + COMMAND mkdir -p ${CMAKE_CURRENT_SOURCE_DIR}/../Docs + COMMAND cp defaultConfiguration.md ${CMAKE_CURRENT_SOURCE_DIR}/../Docs + COMMENT "Generating config markdown file" + VERBATIM ) + + add_dependencies(docs + generateConfigMd) + list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION ".*warning: ignoring loop annotation.*" ".*warning: .*Consider increasing DOT_GRAPH_MAX_NODES." diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt index e7ffd8af6..08d4cb250 100644 --- a/src/cpp/CMakeLists.txt +++ b/src/cpp/CMakeLists.txt @@ -3,7 +3,6 @@ add_subdirectory(3rdparty/sofa) - add_library(ginan_core 3rdparty/enum.h 3rdparty/EigenDenseBaseAddons.h @@ -26,6 +25,7 @@ add_library(ginan_core pea/minimumConstraints.hpp pea/networkEstimator.cpp pea/networkEstimator.hpp + pea/peaCommitStrings.cpp pea/pea_snx.cpp pea/ppp.cpp pea/ppppp.cpp @@ -214,6 +214,7 @@ add_library(ginan_core common/acsConfig.hpp common/acsConfig.cpp + common/acsConfigDocs.cpp ) target_include_directories(ginan_core PUBLIC diff --git a/src/cpp/ambres/GinAR_main.cpp b/src/cpp/ambres/GinAR_main.cpp index 6c0d88f67..c8b29ccb6 100644 --- a/src/cpp/ambres/GinAR_main.cpp +++ b/src/cpp/ambres/GinAR_main.cpp @@ -8,12 +8,16 @@ #define SMP2RESET 20 KFState ARcopy; -map sys_solve; -map> sys_activ; + GinAR_opt defAR_WL; GinAR_opt defAR_NL; -map > defCodesChecked; -bool FIXREADY = false; /* network ambiguity resolution rate */ + +map sys_solve; + +map> sys_activ; +map> defCodesChecked; + +bool fixReady = false; /* network ambiguity resolution rate */ map ARstations; map ARsatellites; @@ -407,7 +411,7 @@ int LoadFromFlt( double rawNL = 0, NLvar = 0; kfState.getKFValue(key, rawNL, &NLvar); rawNL = (rawNL - defAR_NL.wlfact[sys] * WLamb)/lamNL; - NLvar/= lamNL*lamNL; + NLvar/= SQR(lamNL); E_AmbTyp typ = E_AmbTyp::NL12; if ( defAR_NL.ionmod == +E_IonoMode::ESTIMATE ) @@ -416,10 +420,10 @@ int LoadFromFlt( if (key.num == frq2) typ = E_AmbTyp::UCL2; if (key.num == frq3) typ = E_AmbTyp::UCL3; } - if (AmbTyplist.find(typ) == AmbTyplist.end()) AmbTyplist[typ] = 1; - else AmbTyplist[typ]+= 1; - key2.num=typ; + AmbTyplist[typ]++; + + key2.num = typ; if (AR_mealist.find(key2) == AR_mealist.end()) { AR_mealist[key2].sec_ini = time; @@ -641,8 +645,8 @@ int networkAmbigResl( nfix = apply_ambigt(trace, kfState, opt); - if (nfix > 0.6 * namb) FIXREADY = true; - if (nfix < 0.4 * namb) FIXREADY = false; + if (nfix > 0.6 * namb) fixReady = true; + if (nfix < 0.4 * namb) fixReady = false; artrcout(trace, kfState.time, opt); @@ -798,8 +802,8 @@ int smoothdAmbigResl( for (auto& [typ,nmeas] : ARstations[recv].AmbTypMap) { opt.type = typ; - if (defAR_WL.endu) updt_usr_pivot(trace,kfState.time,opt); - else updt_net_pivot(trace,kfState.time,opt); + if (defAR_WL.endu) updt_usr_pivot(trace, kfState.time, opt); + else updt_net_pivot(trace, kfState.time, opt); } int nfix = updat_ambigt( trace, kfState, opt ); @@ -810,8 +814,8 @@ int smoothdAmbigResl( tracepdeex(ARTRCLVL, trace, "\n#ARES_MAIN %5d fixed from %5d ambiguities", nfix, namb); nfix = apply_ambigt( trace, kfState, opt ); - if (nfix > 0.6 * namb) FIXREADY = true; - if (nfix < 0.4 * namb) FIXREADY = false; + if (nfix > 0.6 * namb) fixReady = true; + if (nfix < 0.4 * namb) fixReady = false; artrcout(trace, kfState.time, opt); @@ -826,7 +830,7 @@ int smoothdAmbigResl( /** Indicate if the AR solution is available/stable (60% of ambiguities solved) */ bool ARsol_ready() { - return FIXREADY; + return fixReady; } /** Retrieved the last ambiguity resolved Kalman filter state */ diff --git a/src/cpp/ambres/GinARoutpt.cpp b/src/cpp/ambres/GinARoutpt.cpp index 656622af8..24843a83a 100644 --- a/src/cpp/ambres/GinARoutpt.cpp +++ b/src/cpp/ambres/GinARoutpt.cpp @@ -199,7 +199,7 @@ int arionout( wlvari = satbias.outvari + recbias.outvari; } - double alpha = SQR(CLIGHT)/40.30E16; + double alpha = SQR(CLIGHT) / TEC_CONSTANT; double c2 = alpha/(lam1-lam2); double c1 = -c2/(lam1+lam2); double c3 = alpha/lam1/lam2; diff --git a/src/cpp/common/acsConfig.cpp b/src/cpp/common/acsConfig.cpp index c1b1cf84f..ac7481f0f 100644 --- a/src/cpp/common/acsConfig.cpp +++ b/src/cpp/common/acsConfig.cpp @@ -26,16 +26,20 @@ using std::map; #include -#include "peaCommitVersion.h" +#include "peaCommitStrings.hpp" #include "constants.hpp" #include "acsConfig.hpp" #include "debug.hpp" ACSConfig acsConfig = {}; +struct EnumDetails +{ + vector usingOptions; + vector enums; +}; - - +map enumDetailsMap; typedef tuple NodeStack; @@ -143,6 +147,18 @@ void tryAddRootToPath( } } +/** Add a root to paths that are not already absolutely defined +*/ +void tryAddRootToPath( + string& root, ///< Root path + map>& paths) ///< Filename to prepend root path to +{ + for (auto& [id, path] : paths) + { + tryAddRootToPath(root, path); + } +} + bool checkGlob( string str1, string str2) @@ -236,10 +252,18 @@ void globber( newFiles.insert(newFiles.end(), globFiles.begin(), globFiles.end()); } - files = newFiles; } +void globber( + map>& files) +{ + for (auto& [id, file] : files) + { + globber(file); + } +} + void tryPatchPaths( string& rootDir, string& fileDir, @@ -308,6 +332,7 @@ string stringify( string nonNumericStack( string stack, + string& cutstr, bool colon = true) { string token; @@ -317,9 +342,10 @@ string nonNumericStack( while (getline(ss, token, ':')) { - size_t found = token.find_first_not_of("0123456789: "); + size_t found = token.find_first_not_of("0123456789!@#: "); if (found != std::string::npos) { + cutstr = token.substr(0, found); token = token.substr(found); newStack += token; if (colon) @@ -332,24 +358,35 @@ string nonNumericStack( struct Indentor { - int indentation = 0; + int indentation = 0; + int width; + char indent; + + Indentor( + char c = ' ', + int width = 4) + : width {width}, + indent {c} + { + + } Indentor operator++(int) { Indentor old = *this; - indentation += 4; + indentation += width; return old; } Indentor& operator--() { - indentation -= 4; + indentation -= width; return *this; } operator string() const { - return string(indentation, ' '); + return string(indentation, indent); } friend std::ostream& operator<<(std::ostream& os, const Indentor& dt); @@ -357,24 +394,55 @@ struct Indentor std::ostream& operator<<(std::ostream& os, const Indentor& indentor) { - os << string(indentor.indentation, ' '); + os << string(indentor.indentation, indentor.indent); return os; } +struct TempStreamDisabler +{ + std::ostream& stream; + bool disabled = false; + + TempStreamDisabler( + std::ostream& stream) + : stream {stream} + { + + } + + void disable() + { + if (stream.fail() == false) + { + stream.setstate(std::ios_base::failbit); + disabled = true; + } + } + + ~TempStreamDisabler() + { + if (disabled) + stream.clear(); + } +}; + /** Recursive function to output the default values of all siblings with a common root. */ template void outputDefaultSiblings( + int level, std::ostream& html, ///< Html file stream to output configurator to + std::ostream& md, ///< Markdown file stream to output configurator to TYPE& it, ///< Iterator over the default values map Indentor& indentor, ///< Helper to maintain and output indentation for default yaml output Indentor& htmlIndentor, ///< Helper to maintain and output indentation for internal html output + Indentor& mdIndentor, ///< Helper to maintain and output indentation for markdown output string root = "") ///< Common root to determine extent of siblings relationship { //keep going until the end of the file, or this function returns due to the next iterator not being a sibling while (it != acsConfig.yamlDefaults.end()) { - auto& [itStack, dummy] = *it; + auto& [itStack, defaults] = *it; // Check the name of this parameter against the root bool itIsSibling = (itStack.substr(0, root.length()) == root); @@ -387,6 +455,10 @@ void outputDefaultSiblings( //do this one, and bump the iterator { + TempStreamDisabler disableCout (std::cout); + TempStreamDisabler disableHtml (html); + TempStreamDisabler disableMd (md); + auto& [stack, defaultVals] = *it; auto& defaultVal = defaultVals.defaultValue; auto& comment = defaultVals.comment; @@ -413,8 +485,21 @@ void outputDefaultSiblings( { token = stack.substr(pos_start, pos_end - pos_start); pos_start = pos_end + 1; - token = nonNumericStack(token); + string cutstr; + token = nonNumericStack(token, cutstr); flatStack += token; + + int optionLevel = 4; + if (cutstr.find('!') != string::npos) optionLevel = 1; + else if (cutstr.find('@') != string::npos) optionLevel = 2; + else if (cutstr.find('#') != string::npos) optionLevel = 3; + + if (optionLevel > level) + { + disableCout .disable(); + disableHtml .disable(); + disableMd .disable(); + } } //output the boilerplate of the name, and comment up to the point where the children are nested @@ -426,14 +511,47 @@ void outputDefaultSiblings( << (nextIsChild ? "" : "") << token << (nextIsChild ? " ⯆" : ""); + mdIndentor++; + if (mdIndentor.indentation == 2) + { + md << std::endl << mdIndentor << " " << token << std::endl; + } + + string link; + + if (defaults.enumName.empty() == false) + { + string linkName = defaults.enumName; + + if (defaultVal.find('[') == string::npos) link += "[`" + linkName + "`]"; + else link += "[`[" + linkName + "]`]"; + + link += "(#" + boost::algorithm::to_lower_copy(linkName) + ") "; + + } + + md << std::endl << "###### **`" << flatStack << "`**"; + + md << std::endl << " " << link << "`" << defaultVal << " `" << std::endl; + if (comment.empty() == false) { - std::cout << "\t# " << comment; + std::cout << "\t# " << comment.substr(0, comment.find('.')); html << std::endl << htmlIndentor << "# " << comment << ""; + + auto period = comment.find('.'); + md << std::endl << std::endl << "> " << comment.substr(0, period); + if ( period != string::npos + &&period + 2 < comment.size()) + { + md << std::endl << std::endl << comment.substr(period + 2); + } } html << std::endl << -- htmlIndentor << ""; - + + + md << std::endl << std::endl << "---" << std::endl; // bool firstChild = false; @@ -449,7 +567,7 @@ void outputDefaultSiblings( // recurse to do children of this node indentor++; - outputDefaultSiblings(html, it, indentor, htmlIndentor, stack); + outputDefaultSiblings(level, html, md, it, indentor, htmlIndentor, mdIndentor, stack); --indentor; } @@ -514,7 +632,9 @@ void outputDefaultSiblings( } } - html << std::endl << -- htmlIndentor << ""; + html << std::endl << --htmlIndentor << ""; + + --mdIndentor; } } } @@ -523,11 +643,13 @@ void outputDefaultSiblings( * The default values, and descriptions of each parameter configured is output to the command line. * A configurator is generated that can be used to edit the default configuration via interactive html scripts */ -void ACSConfig::outputDefaultConfiguration() +void ACSConfig::outputDefaultConfiguration( + int level) { std::cout << std::endl << "Default configuration values:\n\n"; - std::ofstream html("GinanYamlInspector.html"); + std::ofstream html ("GinanYamlInspector.html"); + std::ofstream md ("defaultConfiguration.md"); html << #include "htmlHeaderTemplate.html" @@ -537,12 +659,42 @@ void ACSConfig::outputDefaultConfiguration() Indentor indentor; Indentor htmlIndentor; + Indentor mdIndentor('#', 1); + mdIndentor++; + md << std::endl << mdIndentor << " Default Configuration" << std::endl; - outputDefaultSiblings(html, it, indentor, htmlIndentor); + outputDefaultSiblings(level, html, md, it, indentor, htmlIndentor, mdIndentor); + std::cout << std::endl << std::endl; + html << #include "htmlFooterTemplate.html" << std::endl; + + md << std::endl << mdIndentor << " Enum Details" << std::endl; + + for (auto& [enumName, details] : enumDetailsMap) + { + md << std::endl << "---"; + + md << std::endl << std::endl << "### " + enumName; + + md << std::endl << std::endl << "Valid enum values are:"; + for (auto& value : details.enums) + { + md << std::endl << "- `" << value << "`"; + + if (docs[value].empty() == false) + md << " : " << docs[value]; + } + + md << std::endl << std::endl << "For options:" << std::endl; + for (auto& caller : details.usingOptions) + { + string dummy; + md << std::endl << "- [`" << caller << "`](#" << nonNumericStack(caller, dummy, false) << ")"; + } + } } /** Prepare the configuration of the program @@ -561,7 +713,7 @@ bool configure( ("quiet,q", "Less output") ("verbose,v", "More output") ("very-verbose,V", "Much more output") - ("yaml-defaults,Y", "Print complete set of parsed parameters and their default values, and generate configurator.html for visual editing of yaml files") + ("yaml-defaults,Y", boost::program_options::value(), "Print set of parsed parameters and their default values according to their priority level (1-3), and generate configurator.html for visual editing of yaml files") ("config_description,d", boost::program_options::value(), "Configuration description") ("level,l", boost::program_options::value(), "Trace level") ("fatal_message_level,L", boost::program_options::value(), "Fatal error level") @@ -584,9 +736,9 @@ bool configure( ("orb_files", boost::program_options::value>()->multitoken(), "Orbits (POD) files") ("blq_files", boost::program_options::value>()->multitoken(), "BLQ (Ocean loading) files") ("erp_files", boost::program_options::value>()->multitoken(), "ERP files") - ("rnx_inputs,r", boost::program_options::value>()->multitoken(), "RINEX station inputs") - ("ubx_inputs", boost::program_options::value>()->multitoken(), "UBX station inputs") - ("rtcm_inputs", boost::program_options::value>()->multitoken(), "RTCM station inputs") +// ("rnx_inputs,r", boost::program_options::value>()->multitoken(), "RINEX station inputs") +// ("ubx_inputs", boost::program_options::value>()->multitoken(), "UBX station inputs") +// ("rtcm_inputs", boost::program_options::value>()->multitoken(), "RTCM station inputs") ("egm_files", boost::program_options::value>()->multitoken(), "Earth gravity model coefficients file") ("crd_files", boost::program_options::value>()->multitoken(), "SLR CRD file") // ("slr_inputs", boost::program_options::value>()->multitoken(), "Tabular SLR OBS station file") @@ -699,36 +851,36 @@ bool configure( void ACSConfig::info( Trace& ss) ///< Trace file to output to { - ss << "\n"; + ss << "\n\n"; ss << "===============================\n"; ss << "Configuration...\n"; ss << "===============================\n"; ss << "Inputs:\n"; - if (!nav_files .empty()) { ss << "\tnav_files: "; for (auto& a : nav_files) ss << a << " "; ss << "\n"; } - if (!snx_files .empty()) { ss << "\tsnx_files: "; for (auto& a : snx_files) ss << a << " "; ss << "\n"; } - if (!atx_files .empty()) { ss << "\tatx_files: "; for (auto& a : atx_files) ss << a << " "; ss << "\n"; } - if (!dcb_files .empty()) { ss << "\tdcb_files: "; for (auto& a : dcb_files) ss << a << " "; ss << "\n"; } - if (!clk_files .empty()) { ss << "\tclk_files: "; for (auto& a : clk_files) ss << a << " "; ss << "\n"; } - if (!bsx_files .empty()) { ss << "\tbsx_files: "; for (auto& a : bsx_files) ss << a << " "; ss << "\n"; } - if (!ion_files .empty()) { ss << "\tion_files: "; for (auto& a : ion_files) ss << a << " "; ss << "\n"; } - if (!igrf_files .empty()) { ss << "\tigrf_files: "; for (auto& a : igrf_files) ss << a << " "; ss << "\n"; } - if (!blq_files .empty()) { ss << "\tblq_files: "; for (auto& a : blq_files) ss << a << " "; ss << "\n"; } - if (!erp_files .empty()) { ss << "\terp_files: "; for (auto& a : erp_files) ss << a << " "; ss << "\n"; } - if (!sp3_files .empty()) { ss << "\tsp3_files: "; for (auto& a : sp3_files) ss << a << " "; ss << "\n"; } - if (!obx_files .empty()) { ss << "\tobx_files: "; for (auto& a : obx_files) ss << a << " "; ss << "\n"; } - if (!orb_files .empty()) { ss << "\torb_files: "; for (auto& a : orb_files) ss << a << " "; ss << "\n"; } - if (!egm_files .empty()) { ss << "\tegm_files: "; for (auto& a : egm_files) ss << a << " "; ss << "\n"; } - if (!jpl_files .empty()) { ss << "\tjpl_files: "; for (auto& a : jpl_files) ss << a << " "; ss << "\n"; } - if (!tide_files .empty()) { ss << "\ttide_files: "; for (auto& a : tide_files) ss << a << " "; ss << "\n"; } - if (!sid_files .empty()) { ss << "\tsid_files: "; for (auto& a : sid_files) ss << a << " "; ss << "\n"; } - if (!vmf_files .empty()) { ss << "\tvmf_files: "; for (auto& a : vmf_files) ss << a << " "; ss << "\n"; } - if (!com_files .empty()) { ss << "\tcom_files: "; for (auto& a : com_files) ss << a << " "; ss << "\n"; } - if (!crd_files .empty()) { ss << "\tcrd_files: "; for (auto& a : crd_files) ss << a << " "; ss << "\n"; } - if (!rnx_inputs .empty()) { ss << "\trnx_inputs: "; for (auto& a : rnx_inputs) ss << a << " "; ss << "\n"; } - if (!pseudo_sp3_inputs .empty()) { ss << "\tsp3_inputs: "; for (auto& a : pseudo_sp3_inputs) ss << a << " "; ss << "\n"; } - if (!pseudo_snx_inputs .empty()) { ss << "\tsnx_inputs: "; for (auto& a : pseudo_snx_inputs) ss << a << " "; ss << "\n"; } - if (!obs_rtcm_inputs .empty()) { ss << "\trtcm_inputs: "; for (auto& a : obs_rtcm_inputs) ss << a << " "; ss << "\n"; } - if (!nav_rtcm_inputs .empty()) { ss << "\trtcm_inputs: "; for (auto& a : nav_rtcm_inputs) ss << a << " "; ss << "\n"; } + if (!nav_files .empty()) { ss << "\tnav_files: "; for (auto& a : nav_files) ss << a << " "; ss << "\n"; } + if (!snx_files .empty()) { ss << "\tsnx_files: "; for (auto& a : snx_files) ss << a << " "; ss << "\n"; } + if (!atx_files .empty()) { ss << "\tatx_files: "; for (auto& a : atx_files) ss << a << " "; ss << "\n"; } + if (!dcb_files .empty()) { ss << "\tdcb_files: "; for (auto& a : dcb_files) ss << a << " "; ss << "\n"; } + if (!clk_files .empty()) { ss << "\tclk_files: "; for (auto& a : clk_files) ss << a << " "; ss << "\n"; } + if (!bsx_files .empty()) { ss << "\tbsx_files: "; for (auto& a : bsx_files) ss << a << " "; ss << "\n"; } + if (!ion_files .empty()) { ss << "\tion_files: "; for (auto& a : ion_files) ss << a << " "; ss << "\n"; } + if (!igrf_files .empty()) { ss << "\tigrf_files: "; for (auto& a : igrf_files) ss << a << " "; ss << "\n"; } + if (!blq_files .empty()) { ss << "\tblq_files: "; for (auto& a : blq_files) ss << a << " "; ss << "\n"; } + if (!erp_files .empty()) { ss << "\terp_files: "; for (auto& a : erp_files) ss << a << " "; ss << "\n"; } + if (!sp3_files .empty()) { ss << "\tsp3_files: "; for (auto& a : sp3_files) ss << a << " "; ss << "\n"; } + if (!obx_files .empty()) { ss << "\tobx_files: "; for (auto& a : obx_files) ss << a << " "; ss << "\n"; } + if (!orb_files .empty()) { ss << "\torb_files: "; for (auto& a : orb_files) ss << a << " "; ss << "\n"; } + if (!egm_files .empty()) { ss << "\tegm_files: "; for (auto& a : egm_files) ss << a << " "; ss << "\n"; } + if (!jpl_files .empty()) { ss << "\tjpl_files: "; for (auto& a : jpl_files) ss << a << " "; ss << "\n"; } + if (!tide_files .empty()) { ss << "\ttide_files: "; for (auto& a : tide_files) ss << a << " "; ss << "\n"; } + if (!sid_files .empty()) { ss << "\tsid_files: "; for (auto& a : sid_files) ss << a << " "; ss << "\n"; } + if (!vmf_files .empty()) { ss << "\tvmf_files: "; for (auto& a : vmf_files) ss << a << " "; ss << "\n"; } + if (!com_files .empty()) { ss << "\tcom_files: "; for (auto& a : com_files) ss << a << " "; ss << "\n"; } + if (!crd_files .empty()) { ss << "\tcrd_files: "; for (auto& a : crd_files) ss << a << " "; ss << "\n"; } + if (!nav_rtcm_inputs .empty()) { ss << "\trtcm_inputs: "; for (auto& a : nav_rtcm_inputs) ss << a << " "; ss << "\n"; } + if (!rnx_inputs .empty()) { ss << "\trnx_inputs: "; for (auto& [z, A] : rnx_inputs) for (auto& a : A) ss << a << " "; ss << "\n"; } + if (!pseudo_sp3_inputs .empty()) { ss << "\tsp3_inputs: "; for (auto& [z, A] : pseudo_sp3_inputs) for (auto& a : A) ss << a << " "; ss << "\n"; } + if (!pseudo_snx_inputs .empty()) { ss << "\tsnx_inputs: "; for (auto& [z, A] : pseudo_snx_inputs) for (auto& a : A) ss << a << " "; ss << "\n"; } + if (!obs_rtcm_inputs .empty()) { ss << "\trtcm_inputs: "; for (auto& [z, A] : obs_rtcm_inputs) for (auto& a : A) ss << a << " "; ss << "\n"; } if (!model.trop.orography .empty()) ss << "\torography: " << model.trop.orography << "\n"; if (!model.trop.gpt2grid .empty()) ss << "\tgrid: " << model.trop.gpt2grid << "\n"; @@ -756,12 +908,10 @@ void ACSConfig::info( ss << "Process Modes:\n"; ss << "\tPreprocessor: " << process_preprocessor << "\n"; ss << "\tSPP " << process_spp << "\n"; - ss << "\tUser: " << process_user << "\n"; - ss << "\tNetwork: " << process_network << "\n"; + ss << "\tPPP: " << process_ppp << "\n"; ss << "\tMinimum Constraints: " << process_minimum_constraints << "\n"; ss << "\tIonospheric: " << process_ionosphere << "\n"; ss << "\tRTS Smoothing: " << process_rts << "\n"; - ss << "\tPPP: " << process_ppp << "\n"; ss << "\n"; ss << "Systems:\n"; @@ -795,7 +945,8 @@ void ACSConfig::info( void addAvailableOptions( string stack) { - auto& available = acsConfig.availableOptions[nonNumericStack(stack)]; + string dummy; + auto& available = acsConfig.availableOptions[nonNumericStack(stack, dummy)]; if (available) { @@ -842,7 +993,8 @@ NodeStack stringsToYamlObject( continue; } - string shortDesc = nonNumericStack(desc, false); + string dummy; + string shortDesc = nonNumericStack(desc, dummy, false); bool test = false; if (currentNode[shortDesc]) @@ -910,8 +1062,9 @@ bool trySetFromOpts( boost::program_options::variables_map& commandOpts, ///< Command line object to search within vector nodeDescriptor) ///< List of strings of keys to trace hierarcy { + string dummy; string name = nodeDescriptor.back(); - name = nonNumericStack(name, false); + name = nonNumericStack(name, dummy, false); if (commandOpts.count(name)) { try @@ -940,6 +1093,27 @@ bool trySetFromAny( return found; } +template +void addEnumDetails( + string& stack) +{ + string enumName = ENUM::_name(); + + auto names = ENUM::_names(); + + if (enumDetailsMap.find(enumName) == enumDetailsMap.end()) + for (int i = 0; i < ENUM::_size(); i++) + { + string enumOption = boost::algorithm::to_lower_copy((string) names[i]); + enumDetailsMap[enumName].enums.push_back(enumOption); + } + + string dummy; + + enumDetailsMap[enumName].usingOptions.push_back(nonNumericStack(stack, dummy)); + acsConfig.yamlDefaults[stack].enumName = enumName; +} + /** Set an enum from yaml, decoding strings to ints */ template @@ -961,12 +1135,15 @@ bool trySetEnumOpt( enumOptions += ","; enumOptions += enumOption; } + enumOptions += "}"; auto [optNode, stack] = stringsToYamlObject(yamlBase, yamlNodeDescriptor, comment + enumOptions, out._to_string()); - + addAvailableOptions(stack); + addEnumDetails(stack); + string value; try { @@ -1004,12 +1181,18 @@ bool trySetEnumVec( vector yamlNodeDescriptor, ///< List of strings of keys to trace hierarcy string comment = "") ///< Description to provide to user for automatic documentation { + auto [optNode, stack] = stringsToYamlObject(yamlBase, yamlNodeDescriptor, comment, stringify(enumVector)); + vector enumStrings; bool found = trySetFromYaml(enumStrings, yamlBase, yamlNodeDescriptor, comment); + + addEnumDetails(stack); + if (found == false) return false; enumVector.clear(); + for (auto& enumString : enumStrings) { @@ -1047,15 +1230,16 @@ void trySetKalmanFromYaml( } E_Period proc_noise_dt = E_Period::SECOND; - setInited(output, output.estimate, trySetFromYaml(output.estimate, newYaml, {"0 estimated" }, "[bools] Estimate state in kalman filter")); - trySetEnumOpt(proc_noise_dt, newYaml, {"2 proc_noise_dt" }, E_Period::_from_string_nocase, "(enum) Time unit for process noise - sqrt_sec, sqrt_day etc."); + setInited(output, output.estimate, trySetFromYaml(output.estimate, newYaml, {"0! estimated" }, "[bools] Estimate state in kalman filter")); + trySetEnumOpt(proc_noise_dt, newYaml, {"2@ proc_noise_dt" }, E_Period::_from_string_nocase, "(enum) Time unit for process noise - sqrt_sec, sqrt_day etc."); - setInited(output, output.sigma, trySetFromYaml(output.sigma, newYaml, {"1 sigma" }, "[floats] Apriori sigma values - if zero, will be initialised using least squares")); - setInited(output, output.apriori_val, trySetFromYaml(output.apriori_val, newYaml, {"3 apriori_val" }, "[floats] Apriori state values")); - setInited(output, output.proc_noise, trySetFromYaml(output.proc_noise, newYaml, {"2 proc_noise" }, "[floats] Process noise sigmas")); - setInited(output, output.tau, trySetFromYaml(output.tau, newYaml, {"tau" }, "[floats] Correlation times for gauss markov noise, defaults to -1 -> inf (Random Walk)")); - setInited(output, output.mu, trySetFromYaml(output.mu, newYaml, {"mu" }, "[floats] Desired mean value for gauss markov states")); - setInited(output, output.comment, trySetFromYaml(output.comment, newYaml, {"comment" }, "[strings] Comment to apply to the state")); + setInited(output, output.sigma, trySetFromYaml(output.sigma, newYaml, {"1! sigma" }, "[floats] Apriori sigma values - if zero, will be initialised using least squares")); + setInited(output, output.apriori_val, trySetFromYaml(output.apriori_val, newYaml, {"3! apriori_val" }, "[floats] Apriori state values")); + setInited(output, output.proc_noise, trySetFromYaml(output.proc_noise, newYaml, {"2! proc_noise" }, "[floats] Process noise sigmas")); + setInited(output, output.proc_noise, trySetFromYaml(output.proc_noise, newYaml, {"2 process_noise" }, "[floats] Process noise sigmas")); + setInited(output, output.tau, trySetFromYaml(output.tau, newYaml, {"@ tau" }, "[floats] Correlation times for gauss markov noise, defaults to -1 -> inf (Random Walk)")); + setInited(output, output.mu, trySetFromYaml(output.mu, newYaml, {"@ mu" }, "[floats] Desired mean value for gauss markov states")); + setInited(output, output.comment, trySetFromYaml(output.comment, newYaml, {"@ comment" }, "[strings] Comment to apply to the state")); if (isInited(output, output.proc_noise)) { @@ -1074,6 +1258,43 @@ void trySetKalmanFromYaml( } } +void tryGetMappedList( + map>& mappedList, + NodeStack& yaml, + string key, + string comment = "") +{ + auto [outStreamNode, outStreamString] = stringsToYamlObject(yaml, {key}); + + for (auto outLabelYaml : outStreamNode) + { + if (outLabelYaml.IsScalar()) + { + string value = outLabelYaml.as(); + + int keyPos = 0; + int lastSlash = value.find_last_of('/'); + + if (lastSlash != string::npos) + { + keyPos = lastSlash + 1; + } + + mappedList[""].push_back(value); + } + if (outLabelYaml.IsMap()) + { + for (auto it = outLabelYaml.begin(); it != outLabelYaml.end(); it++) + { + string key = it->first.as(); + + mappedList[key] = it->second.as>(); + } + } + } +} + + /** Set the variables associated with an output stream */ void tryGetStreamFromYaml( @@ -1083,16 +1304,16 @@ void tryGetStreamFromYaml( { auto outStreamsYaml = stringsToYamlObject(yaml, {id}); - trySetFromYaml(outStreamData.url, outStreamsYaml, {"0 url"}, "(string) Url of caster to send messages to"); + trySetFromYaml(outStreamData.url, outStreamsYaml, {"0@ url"}, "(string) Url of caster to send messages to"); for (auto msgType : RtcmMessageType::_values()) { if (msgType == +RtcmMessageType::IGS_SSR) for (auto subType : IgsSSRSubtype::_values()) { - string str = (boost::format("rtcm_%4d_%03d") % msgType._to_integral() % subType._to_integral()).str(); + string str = (boost::format("@ rtcm_%4d_%03d") % msgType._to_integral() % subType._to_integral()).str(); - auto msgOptions = stringsToYamlObject(outStreamsYaml, {"0 messages", str}, "(int) Message type to output"); + auto msgOptions = stringsToYamlObject(outStreamsYaml, {"0@ messages", str}, "(int) Message type to output"); bool found = trySetFromYaml(outStreamData.rtcmMsgOptsMap[msgType].igs_udi[subType], msgOptions, {"0 udi"}, "(int) Update interval"); if (found) @@ -1102,22 +1323,22 @@ void tryGetStreamFromYaml( else if (msgType == +RtcmMessageType::COMPACT_SSR) for (auto subType : CompactSSRSubtype::_values()) { - string str = (boost::format("rtcm_%4d_%02d") % msgType._to_integral() % subType._to_integral()).str(); + string str = (boost::format("@ rtcm_%4d_%02d") % msgType._to_integral() % subType._to_integral()).str(); - auto msgOptions = stringsToYamlObject(outStreamsYaml, {"0 messages", str}, "(int) Message type to output"); + auto msgOptions = stringsToYamlObject(outStreamsYaml, {"0@ messages", str}, "(int) Message type to output"); - bool found = trySetFromYaml(outStreamData.rtcmMsgOptsMap[msgType].comp_udi[subType], msgOptions, {"0 udi"}, "(int) Update interval"); + bool found = trySetFromYaml(outStreamData.rtcmMsgOptsMap[msgType].comp_udi[subType], msgOptions, {"0@ udi"}, "(int) Update interval"); if (found) outStreamData.rtcmMsgOptsMap[msgType].udi = 1; } else { - string str = "rtcm_" + std::to_string(msgType); + string str = "@ rtcm_" + std::to_string(msgType); - auto msgOptions = stringsToYamlObject(outStreamsYaml, {"0 messages", str}, "(int) Message type to output"); + auto msgOptions = stringsToYamlObject(outStreamsYaml, {"0@ messages", str}, "(int) Message type to output"); - trySetFromYaml(outStreamData.rtcmMsgOptsMap[msgType].udi, msgOptions, {"0 udi"}, "(int) Update interval"); + trySetFromYaml(outStreamData.rtcmMsgOptsMap[msgType].udi, msgOptions, {"0@ udi"}, "(int) Update interval"); } } @@ -1137,38 +1358,49 @@ void getFromYaml( { auto satNode = stringsToYamlObject(yamlBase, yamlNodeDescriptor); - trySetKalmanFromYaml(satOpts.clk, satNode, "clk", "Clocks"); - trySetKalmanFromYaml(satOpts.clk_rate, satNode, "clk_rate", "Clock rates"); - trySetKalmanFromYaml(satOpts.pos, satNode, "pos", "Position (experimental, use orb)"); - trySetKalmanFromYaml(satOpts.pos_rate, satNode, "pos_rate", "Velocity (experimental, use orb)"); - trySetKalmanFromYaml(satOpts.orb, satNode, "orb", "Orbit corrections"); - trySetKalmanFromYaml(satOpts.srp, satNode, "srp", "Solar radiation pressure (experimental, use orb)"); + trySetKalmanFromYaml(satOpts.clk, satNode, "! clk", "Clocks"); + trySetKalmanFromYaml(satOpts.clk_rate, satNode, "! clk_rate", "Clock rates"); + trySetKalmanFromYaml(satOpts.pos, satNode, "! pos", "Position (experimental, use orb)"); + trySetKalmanFromYaml(satOpts.pos_rate, satNode, "! pos_rate", "Velocity (experimental, use orb)"); + trySetKalmanFromYaml(satOpts.orb, satNode, "@ orb", "Orbit corrections"); trySetKalmanFromYaml(satOpts.pco, satNode, "pco", "Phase Center Offsets (experimental)"); trySetKalmanFromYaml(satOpts.ant, satNode, "ant", "Antenna offsets (experimental)"); - trySetKalmanFromYaml(satOpts.orbit, satNode, "orbit", "Orbital state"); - trySetKalmanFromYaml(satOpts.ion_model, satNode, "ion_model", "Ionosphere models"); - trySetKalmanFromYaml(satOpts.code_bias, satNode, "code_bias", "Code bias (experimental)"); - trySetKalmanFromYaml(satOpts.phase_bias, satNode, "phase_bias", "Phase bias (experiemental)"); - trySetKalmanFromYaml(satOpts.emp_dyb_0, satNode, "emp_dyb_0", "emp bias "); - trySetKalmanFromYaml(satOpts.emp_dyb_1c, satNode, "emp_dyb_1c", "emp 1 per rev cosine term "); - trySetKalmanFromYaml(satOpts.emp_dyb_1s, satNode, "emp_dyb_1s", "emp 1 per rev sine term "); - trySetKalmanFromYaml(satOpts.emp_dyb_2c, satNode, "emp_dyb_2c", "emp 2 per rev cosine term "); - trySetKalmanFromYaml(satOpts.emp_dyb_2s, satNode, "emp_dyb_2s", "emp 2 per rev sine term "); - trySetKalmanFromYaml(satOpts.emp_dyb_3c, satNode, "emp_dyb_3c", "emp 3 per rev cosine term "); - trySetKalmanFromYaml(satOpts.emp_dyb_3s, satNode, "emp_dyb_3s", "emp 3 per rev sine term "); - trySetKalmanFromYaml(satOpts.emp_dyb_4c, satNode, "emp_dyb_4c", "emp 4 per rev cosine term "); - trySetKalmanFromYaml(satOpts.emp_dyb_4s, satNode, "emp_dyb_4s", "emp 4 per rev sine term "); - - setInited(satOpts, satOpts.exclude, trySetFromYaml(satOpts.exclude, satNode, {"0 exclude"})); - setInited(satOpts, satOpts.code_sigmas, trySetFromYaml(satOpts.code_sigmas, satNode, {"0 code_sigmas" }, "[floats] Standard deviation of code measurements")); - setInited(satOpts, satOpts.phas_sigmas, trySetFromYaml(satOpts.phas_sigmas, satNode, {"0 phase_sigmas" }, "[floats] Standard deviation of phase measurmeents")); - setInited(satOpts, satOpts.laser_sigmas, trySetFromYaml(satOpts.laser_sigmas, satNode, {"laser_sigmas" }, "[floats] Standard deviation of SLR laser measurements")); + trySetKalmanFromYaml(satOpts.orbit, satNode, "! orbit", "Orbital state"); + trySetKalmanFromYaml(satOpts.ion_model, satNode, "@ ion_model", "Ionosphere models"); + trySetKalmanFromYaml(satOpts.code_bias, satNode, "! code_bias", "Code bias (experimental)"); + trySetKalmanFromYaml(satOpts.phase_bias, satNode, "! phase_bias", "Phase bias (experiemental)"); + + trySetKalmanFromYaml(satOpts.emp_dyb_0, satNode, "! emp_dyb_0", "emp bias "); + trySetKalmanFromYaml(satOpts.emp_dyb_1c, satNode, "! emp_dyb_1c", "emp 1 per rev cosine term "); + trySetKalmanFromYaml(satOpts.emp_dyb_1s, satNode, "! emp_dyb_1s", "emp 1 per rev sine term "); + trySetKalmanFromYaml(satOpts.emp_dyb_2c, satNode, "! emp_dyb_2c", "emp 2 per rev cosine term "); + trySetKalmanFromYaml(satOpts.emp_dyb_2s, satNode, "! emp_dyb_2s", "emp 2 per rev sine term "); + trySetKalmanFromYaml(satOpts.emp_dyb_3c, satNode, "! emp_dyb_3c", "emp 3 per rev cosine term "); + trySetKalmanFromYaml(satOpts.emp_dyb_3s, satNode, "! emp_dyb_3s", "emp 3 per rev sine term "); + trySetKalmanFromYaml(satOpts.emp_dyb_4c, satNode, "! emp_dyb_4c", "emp 4 per rev cosine term "); + trySetKalmanFromYaml(satOpts.emp_dyb_4s, satNode, "! emp_dyb_4s", "emp 4 per rev sine term "); + + trySetKalmanFromYaml(satOpts.srp_dyb_0, satNode, "! srp_dyb_0", "srp bias "); + trySetKalmanFromYaml(satOpts.srp_dyb_1c, satNode, "! srp_dyb_1c", "srp 1 per rev cosine term "); + trySetKalmanFromYaml(satOpts.srp_dyb_1s, satNode, "! srp_dyb_1s", "srp 1 per rev sine term "); + trySetKalmanFromYaml(satOpts.srp_dyb_2c, satNode, "! srp_dyb_2c", "srp 2 per rev cosine term "); + trySetKalmanFromYaml(satOpts.srp_dyb_2s, satNode, "! srp_dyb_2s", "srp 2 per rev sine term "); + trySetKalmanFromYaml(satOpts.srp_dyb_3c, satNode, "! srp_dyb_3c", "srp 3 per rev cosine term "); + trySetKalmanFromYaml(satOpts.srp_dyb_3s, satNode, "! srp_dyb_3s", "srp 3 per rev sine term "); + trySetKalmanFromYaml(satOpts.srp_dyb_4c, satNode, "! srp_dyb_4c", "srp 4 per rev cosine term "); + trySetKalmanFromYaml(satOpts.srp_dyb_4s, satNode, "! srp_dyb_4s", "srp 4 per rev sine term "); + + setInited(satOpts, satOpts.exclude, trySetFromYaml(satOpts.exclude, satNode, {"0! exclude" })); + setInited(satOpts, satOpts.code_sigmas, trySetFromYaml(satOpts.code_sigmas, satNode, {"0! code_sigmas" }, "[floats] Standard deviation of code measurements")); + setInited(satOpts, satOpts.phas_sigmas, trySetFromYaml(satOpts.phas_sigmas, satNode, {"0! phase_sigmas" }, "[floats] Standard deviation of phase measurmeents")); + setInited(satOpts, satOpts.pseudo_sigmas, trySetFromYaml(satOpts.pseudo_sigmas, satNode, {"0@ pseudo_sigmas" }, "[floats] Standard deviation of pseudo measurmeents")); + setInited(satOpts, satOpts.laser_sigmas, trySetFromYaml(satOpts.laser_sigmas, satNode, {"0@ laser_sigmas" }, "[floats] Standard deviation of SLR laser measurements")); satOpts._initialised = true; } -const string estimation_parameters_str = "4 estimation_parameters"; -const string processing_options_str = "2 processing_options"; +const string estimation_parameters_str = "4! estimation_parameters"; +const string processing_options_str = "2! processing_options"; /** Set receiver options from yaml */ @@ -1179,30 +1411,30 @@ void getFromYaml( { auto recNode = stringsToYamlObject(yamlBase, yamlNodeDescriptor); - trySetKalmanFromYaml(recOpts.clk, recNode, "clk", "Clocks"); - trySetKalmanFromYaml(recOpts.clk_rate, recNode, "clk_rate", "Clock rates"); - trySetKalmanFromYaml(recOpts.pos, recNode, "pos", "Position"); - trySetKalmanFromYaml(recOpts.heading, recNode, "heading", "Heading"); - trySetKalmanFromYaml(recOpts.pos_rate, recNode, "pos_rate", "Velocity"); - trySetKalmanFromYaml(recOpts.orbit, recNode, "orbit", "Orbital state"); - trySetKalmanFromYaml(recOpts.strain_rate, recNode, "strain_rate", "Velocity (large gain, for geodetic timescales)"); - trySetKalmanFromYaml(recOpts.amb, recNode, "amb", "Integer phase ambiguities"); + trySetKalmanFromYaml(recOpts.clk, recNode, "! clk", "Clocks"); + trySetKalmanFromYaml(recOpts.clk_rate, recNode, "! clk_rate", "Clock rates"); + trySetKalmanFromYaml(recOpts.pos, recNode, "! pos", "Position"); + trySetKalmanFromYaml(recOpts.pos_rate, recNode, "! pos_rate", "Velocity"); + trySetKalmanFromYaml(recOpts.heading, recNode, "@ heading", "Heading"); + trySetKalmanFromYaml(recOpts.orbit, recNode, "@ orbit", "Orbital state"); + trySetKalmanFromYaml(recOpts.strain_rate, recNode, "@ strain_rate", "Velocity (large gain, for geodetic timescales)"); + trySetKalmanFromYaml(recOpts.amb, recNode, "! amb", "Integer phase ambiguities"); trySetKalmanFromYaml(recOpts.pco, recNode, "pco", "Phase Center Offsets (experimental)"); trySetKalmanFromYaml(recOpts.ant, recNode, "ant", "Antenna offsets (experimental)"); - trySetKalmanFromYaml(recOpts.code_bias, recNode, "code_bias", "Code bias (experimental)"); - trySetKalmanFromYaml(recOpts.phase_bias, recNode, "phase_bias", "Phase bias (experiemental)"); - trySetKalmanFromYaml(recOpts.ion_stec, recNode, "ion_stec", "Ionosphere (experimental)"); - trySetKalmanFromYaml(recOpts.slr_range_bias, recNode, "slr_range_bias", "Satellite Laser Ranging range bias"); - trySetKalmanFromYaml(recOpts.slr_time_bias, recNode, "slr_time_bias", "Satellite Laser Ranging time bias"); - trySetKalmanFromYaml(recOpts.trop, recNode, "trop", "Troposphere corrections"); - trySetKalmanFromYaml(recOpts.trop_grads, recNode, "trop_grads", "Troposphere gradients"); - - setInited(recOpts, recOpts.exclude, trySetFromYaml (recOpts.exclude, recNode, {"1 exclude" })); - setInited(recOpts, recOpts.error_model, trySetEnumOpt (recOpts.error_model, recNode, {"0 error_model" }, E_NoiseModel::_from_string_nocase)); - setInited(recOpts, recOpts.spp_sigma_scaling, trySetFromYaml (recOpts.spp_sigma_scaling, recNode, {"spp_sigma_scaling" }, "(floats) Amount to scale sigmas for SPP")); - setInited(recOpts, recOpts.code_sigmas, trySetFromYaml (recOpts.code_sigmas, recNode, {"0 code_sigmas" }, "[floats] Standard deviation of code measurements")); - setInited(recOpts, recOpts.phas_sigmas, trySetFromYaml (recOpts.phas_sigmas, recNode, {"0 phase_sigmas" }, "[floats] Standard deviation of phase measurmeents")); - setInited(recOpts, recOpts.laser_sigmas, trySetFromYaml (recOpts.laser_sigmas, recNode, {"laser_sigmas" }, "[floats] Standard deviation of SLR laser measurements")); + trySetKalmanFromYaml(recOpts.code_bias, recNode, "! code_bias", "Code bias (experimental)"); + trySetKalmanFromYaml(recOpts.phase_bias, recNode, "! phase_bias", "Phase bias (experiemental)"); + trySetKalmanFromYaml(recOpts.ion_stec, recNode, "! ion_stec", "Ionosphere (experimental)"); + trySetKalmanFromYaml(recOpts.slr_range_bias, recNode, "@ slr_range_bias", "Satellite Laser Ranging range bias"); + trySetKalmanFromYaml(recOpts.slr_time_bias, recNode, "@ slr_time_bias", "Satellite Laser Ranging time bias"); + trySetKalmanFromYaml(recOpts.trop, recNode, "! trop", "Troposphere corrections"); + trySetKalmanFromYaml(recOpts.trop_grads, recNode, "! trop_grads", "Troposphere gradients"); + + setInited(recOpts, recOpts.exclude, trySetFromYaml (recOpts.exclude, recNode, {"1! exclude" })); + setInited(recOpts, recOpts.error_model, trySetEnumOpt (recOpts.error_model, recNode, {"0@ error_model" }, E_NoiseModel::_from_string_nocase)); + setInited(recOpts, recOpts.spp_sigma_scaling, trySetFromYaml (recOpts.spp_sigma_scaling, recNode, {"@ spp_sigma_scaling" }, "(floats) Amount to scale sigmas for SPP")); + setInited(recOpts, recOpts.code_sigmas, trySetFromYaml (recOpts.code_sigmas, recNode, {"0! code_sigmas" }, "[floats] Standard deviation of code measurements")); + setInited(recOpts, recOpts.phas_sigmas, trySetFromYaml (recOpts.phas_sigmas, recNode, {"0! phase_sigmas" }, "[floats] Standard deviation of phase measurmeents")); + setInited(recOpts, recOpts.laser_sigmas, trySetFromYaml (recOpts.laser_sigmas, recNode, {"@ laser_sigmas" }, "[floats] Standard deviation of SLR laser measurements")); } /** Set satellite options for a specific satellite using a hierarchy of sources @@ -1230,14 +1462,14 @@ SatelliteOptions& ACSConfig::getSatOpts( vector aliases; aliases.push_back(""); - aliases.push_back("global"); + aliases.push_back("! global"); for (int i = 0; i < yamls.size(); i++) { auto& yaml = yamls[i]; vector yamlAliases; - trySetFromYaml(yamlAliases, {yaml, ""}, {"satellite_options", Sat.id(), "aliases"}, "[string] Aliases for this satellite"); + trySetFromYaml(yamlAliases, {yaml, ""}, {"! satellite_options", Sat.id(), "@ aliases"}, "[string] Aliases for this satellite"); for (auto& alias : yamlAliases) { @@ -1255,6 +1487,8 @@ SatelliteOptions& ACSConfig::getSatOpts( for (auto& alias : aliases) for (int S = 0; S <= suffixes .size(); S++) { + boost::trim_right(alias); + string aliasName = std::to_string(i) + alias; for (int s = 0; s < S; s++) @@ -1272,7 +1506,7 @@ SatelliteOptions& ACSConfig::getSatOpts( aliasOpts._initialised = true; - vector descriptorVec = {estimation_parameters_str, "0 satellites", alias}; + vector descriptorVec = {estimation_parameters_str, "0! satellites", alias}; for (int s = 0; s < S; s++) { descriptorVec.push_back(suffixes[s]); @@ -1285,14 +1519,14 @@ SatelliteOptions& ACSConfig::getSatOpts( vector antenna_boresight; vector antenna_azimuth; - descriptorVec = {estimation_parameters_str, "satellite_options", alias}; + descriptorVec = {"@ satellite_options", alias}; for (int s = 0; s < S; s++) { descriptorVec.push_back(suffixes[s]); } - { auto vec = descriptorVec; vec.push_back("antenna_boresight"); trySetFromYaml (antenna_boresight, {yaml, ""}, vec, "[floats] Antenna boresight (Up) in satellite body-fixed frame"); } - { auto vec = descriptorVec; vec.push_back("antenna_azimuth"); trySetFromYaml (antenna_azimuth, {yaml, ""}, vec, "[floats] Antenna azimuth (North) in satellite body-fixed frame"); } + { auto vec = descriptorVec; vec.push_back("@ antenna_boresight"); trySetFromYaml (antenna_boresight, {yaml, ""}, vec, "[floats] Antenna boresight (Up) in satellite body-fixed frame"); } + { auto vec = descriptorVec; vec.push_back("@ antenna_azimuth"); trySetFromYaml (antenna_azimuth, {yaml, ""}, vec, "[floats] Antenna azimuth (North) in satellite body-fixed frame"); } if (antenna_boresight .size() == 3) { aliasOpts.antenna_boresight = Vector3d(antenna_boresight.data()); setInited(aliasOpts, aliasOpts.antenna_boresight); } if (antenna_azimuth .size() == 3) { aliasOpts.antenna_azimuth = Vector3d(antenna_azimuth .data()); setInited(aliasOpts, aliasOpts.antenna_azimuth); } @@ -1329,14 +1563,14 @@ ReceiverOptions& ACSConfig::getRecOpts( vector aliases; aliases.push_back(""); - aliases.push_back("global"); + aliases.push_back("! global"); for (int i = 0; i < yamls.size(); i++) { auto& yaml = yamls[i]; vector yamlAliases; - trySetFromYaml(yamlAliases, {yaml, ""}, {"station_options", id, "aliases"}, "[string] Aliases for this station"); + trySetFromYaml(yamlAliases, {yaml, ""}, {"! station_options", id, "@ aliases"}, "[string] Aliases for this station"); for (auto& alias : yamlAliases) { @@ -1368,7 +1602,7 @@ ReceiverOptions& ACSConfig::getRecOpts( aliasOpts._initialised = true; - vector descriptorVec = {estimation_parameters_str, "0 stations", alias}; + vector descriptorVec = {estimation_parameters_str, "0! stations", alias}; for (int s = 0; s < S; s++) { descriptorVec.push_back(suffixes[s]); @@ -1385,18 +1619,19 @@ ReceiverOptions& ACSConfig::getRecOpts( setInited(aliasOpts, aliasOpts.minConNoise, trySetFromYaml(aliasOpts.minConNoise, {yaml, ""}, {processing_options_str, "minimum_constraints", "station_noise", alias}, "(float) Sigma applied to all stations for weighting in transformation estimation. (Lower is stronger weighting, Negative is unweighted, in ENU frame)")); - descriptorVec = {"station_options", alias}; + descriptorVec = {"@ station_options", alias}; for (int s = 0; s < S; s++) { descriptorVec.push_back(suffixes[s]); } - { auto vec = descriptorVec; vec.push_back("receiver_type"); setInited(aliasOpts, aliasOpts.receiver_type, trySetFromYaml (aliasOpts.receiver_type, {yaml, ""}, vec, "(string) ")); } - { auto vec = descriptorVec; vec.push_back("antenna_type"); setInited(aliasOpts, aliasOpts.antenna_type, trySetFromYaml (aliasOpts.antenna_type, {yaml, ""}, vec, "(string) Antenna type and radome in 20 character string as per sinex")); } - { auto vec = descriptorVec; vec.push_back("eccentricity"); trySetFromYaml (eccentricity, {yaml, ""}, vec, "[floats] Antenna offset in ENU frame");} - { auto vec = descriptorVec; vec.push_back("apriori_position"); trySetFromYaml (apriori_pos, {yaml, ""}, vec, "[floats] Apriori position in XYZ ECEF frame");} - { auto vec = descriptorVec; vec.push_back("antenna_boresight"); trySetFromYaml (antenna_boresight, {yaml, ""}, vec, "[floats] Antenna boresight (Up) in receiver body-fixed frame");} - { auto vec = descriptorVec; vec.push_back("antenna_azimuth"); trySetFromYaml (antenna_azimuth, {yaml, ""}, vec, "[floats] Antenna azimuth (North) in receiver body-fixed frame");} + { auto vec = descriptorVec; vec.push_back("@ sat_id"); setInited(aliasOpts, aliasOpts.sat_id, trySetFromYaml (aliasOpts.sat_id, {yaml, ""}, vec, "(string) ")); } + { auto vec = descriptorVec; vec.push_back("@ receiver_type"); setInited(aliasOpts, aliasOpts.receiver_type, trySetFromYaml (aliasOpts.receiver_type, {yaml, ""}, vec, "(string) ")); } + { auto vec = descriptorVec; vec.push_back("@ antenna_type"); setInited(aliasOpts, aliasOpts.antenna_type, trySetFromYaml (aliasOpts.antenna_type, {yaml, ""}, vec, "(string) Antenna type and radome in 20 character string as per sinex")); } + { auto vec = descriptorVec; vec.push_back("@ eccentricity"); trySetFromYaml (eccentricity, {yaml, ""}, vec, "[floats] Antenna offset in ENU frame");} + { auto vec = descriptorVec; vec.push_back("@ apriori_position"); trySetFromYaml (apriori_pos, {yaml, ""}, vec, "[floats] Apriori position in XYZ ECEF frame");} + { auto vec = descriptorVec; vec.push_back("@ antenna_boresight"); trySetFromYaml (antenna_boresight, {yaml, ""}, vec, "[floats] Antenna boresight (Up) in receiver body-fixed frame");} + { auto vec = descriptorVec; vec.push_back("@ antenna_azimuth"); trySetFromYaml (antenna_azimuth, {yaml, ""}, vec, "[floats] Antenna azimuth (North) in receiver body-fixed frame");} if (eccentricity .size() == 3) { aliasOpts.eccentricity = Vector3d(eccentricity .data()); setInited(aliasOpts, aliasOpts.eccentricity); } if (apriori_pos .size() == 3) { aliasOpts.apriori_pos = Vector3d(apriori_pos .data()); setInited(aliasOpts, aliasOpts.apriori_pos); } @@ -1413,8 +1648,8 @@ ReceiverOptions& ACSConfig::getRecOpts( string sysName = boost::algorithm::to_lower_copy((string) sys._to_string()); - { auto vec = descriptorVec; vec.push_back("rnx_code_conversions"); trySetEnumOpt(rinex3Code, stringsToYamlObject( {yaml, ""}, vec), {sysName, obsCode2._to_string()}, E_ObsCode::_from_string_nocase);} - { auto vec = descriptorVec; vec.push_back("rnx_phase_conversions"); trySetEnumOpt(rinex3Phas, stringsToYamlObject( {yaml, ""}, vec), {sysName, obsCode2._to_string()}, E_ObsCode::_from_string_nocase);} + { auto vec = descriptorVec; vec.push_back("@ rnx_code_conversions"); trySetEnumOpt(rinex3Code, stringsToYamlObject( {yaml, ""}, vec), {sysName, obsCode2._to_string()}, E_ObsCode::_from_string_nocase);} + { auto vec = descriptorVec; vec.push_back("@ rnx_phase_conversions"); trySetEnumOpt(rinex3Phas, stringsToYamlObject( {yaml, ""}, vec), {sysName, obsCode2._to_string()}, E_ObsCode::_from_string_nocase);} } } @@ -1490,8 +1725,8 @@ void replaceTags( replaceString(str, "", acsConfig.config_description); replaceString(str, "", acsConfig.stream_user); replaceString(str, "", acsConfig.stream_pass); - replaceString(str, "", GINAN_BRANCH_NAME); - replaceString(str, "", GINAN_COMMIT_HASH); + replaceString(str, "", ginanBranchName()); + replaceString(str, "", ginanCommitHash()); replaceString(str, "", acsConfig.analysis_agency); replaceString(str, "", acsConfig.analysis_program.substr(0,3)); } @@ -1564,7 +1799,7 @@ void replaceTimes( } void replaceTags( - vector& strs) + vector& strs) { for (auto& str : strs) { @@ -1572,6 +1807,15 @@ void replaceTags( } } +void replaceTags( + map>& strs) +{ + for (auto& [id, str] : strs) + { + replaceTags(str); + } +} + void replaceTimes( vector& strs, boost::posix_time::ptime time_time) @@ -1674,7 +1918,6 @@ bool ACSConfig::parse( commandOpts = newCommandOpts; - //clear old saved parameters satOptsMap.clear(); recOptsMap.clear(); @@ -1686,17 +1929,71 @@ bool ACSConfig::parse( code_priorities[sys] = code_priorities_default; } - - yamls.resize(filenames.size()); string root_output_directory = "./"; string root_input_directory = "./"; + vector yamlList; + + yamls.resize(filenames.size()); + for (int i = 0; i < filenames.size(); i++) { auto& filename = filenames [i]; auto& yaml = yamls [i]; + BOOST_LOG_TRIVIAL(info) + << "Checking configuration file " << filename; + + try + { + yaml.reset(); + yaml = YAML::LoadFile(filename); + } + catch (const YAML::BadFile &e) + { + if (commandOpts.count("yaml-defaults")) + { + //we expect to break, continue parsing + } + else + { + BOOST_LOG_TRIVIAL(error) << "Error: \nFailed to parse configuration file " << filename; + BOOST_LOG_TRIVIAL(error) << e.msg << std::endl; + return false; + } + } + catch (const YAML::ParserException& e) + { + BOOST_LOG_TRIVIAL(error) << "Error: \nFailed to parse configuration. Check for errors as described near the below:\n"; + BOOST_LOG_TRIVIAL(error) << e.what() << std::endl << std::endl; + return false; + } + + vector includes; + + auto inputs = stringsToYamlObject({yaml, ""}, {"0 inputs"}, docs["inputs"]); + + trySetFromYaml(includes, inputs, {"include_yamls"}, "[string] List of yaml files to include before this one"); + + for (auto& include : includes) + { + yamlList.push_back(include); + } + } + + for (auto& filename : filenames) + { + yamlList.push_back(filename); + } + + yamls.resize(yamlList.size()); + + for (int i = 0; i < yamlList.size(); i++) + { + auto& filename = yamlList [i]; + auto& yaml = yamls [i]; + BOOST_LOG_TRIVIAL(info) << "Loading configuration from file " << filename; @@ -1727,198 +2024,199 @@ bool ACSConfig::parse( { - auto outputs = stringsToYamlObject({yaml, ""}, {"1 outputs"}, "Configuration for types of files to output"); + auto outputs = stringsToYamlObject({yaml, ""}, {"1! outputs"}, docs["outputs"]); - trySetFromYaml(root_output_directory, outputs, {"0 root_directory" }); + trySetFromYaml(root_output_directory, outputs, {"0! root_directory" }); { - auto metadata = stringsToYamlObject(outputs, {"metadata"}); - - trySetFromAny (config_description, commandOpts, metadata, {"config_description" }, "(string) ID for this config, used to replace tags in other options"); - trySetFromAny (stream_user, commandOpts, metadata, {"user" }, "(string) Username for connecting to NTRIP casters"); - trySetFromAny (stream_pass, commandOpts, metadata, {"pass" }, "(string) Password for connecting to NTRIP casters"); - trySetFromYaml(analysis_agency, metadata, {"analysis_agency" }); - trySetFromYaml(analysis_center, metadata, {"analysis_center" }); - trySetFromYaml(ac_contact, metadata, {"ac_contact" }); - trySetFromYaml(analysis_program, metadata, {"analysis_program" }); - trySetFromYaml(analysis_program_version, metadata, {"analysis_program_version" }); - trySetFromYaml(rinex_comment, metadata, {"rinex_comment" }); - trySetFromYaml(reference_system, metadata, {"reference_system" }, "(string) Terrestrial Reference System Code"); - trySetFromYaml(time_system, metadata, {"time_system" }, "(string) Time system - e.g. \"G\", \"UTC\""); - trySetFromYaml(bias_time_system, metadata, {"bias_time_system" }, "(string) Time system for bias SINEX \"G\", \"UTC\""); - trySetFromYaml(ocean_tide_loading_model, metadata, {"ocean_tide_loading_model" }, "(string) Ocean tide loading model applied"); - trySetFromYaml(atmospheric_tide_loading_model, metadata, {"atmospheric_tide_loading_model" }, "(string) Atmospheric tide loading model applied"); - trySetFromYaml(geoid_model, metadata, {"geoid_model" }, "(string) Geoid model name for undulation values"); - trySetFromYaml(gradient_mapping_function, metadata, {"gradient_mapping_function" }, "(string) Name of mapping function used for mapping horizontal troposphere gradients"); + auto metadata = stringsToYamlObject(outputs, {"! metadata"}); + + trySetFromAny (config_description, commandOpts, metadata, {"! config_description" }, "(string) ID for this config, used to replace tags in other options"); + trySetFromAny (stream_user, commandOpts, metadata, {"! user" }, "(string) Username for connecting to NTRIP casters"); + trySetFromAny (stream_pass, commandOpts, metadata, {"! pass" }, "(string) Password for connecting to NTRIP casters"); + trySetFromYaml(analysis_agency, metadata, {"@ analysis_agency" }); + trySetFromYaml(analysis_center, metadata, {"@ analysis_center" }); + trySetFromYaml(ac_contact, metadata, {"@ ac_contact" }); + trySetFromYaml(analysis_program, metadata, {"@ analysis_program" }); + trySetFromYaml(analysis_program_version, metadata, {"@ analysis_program_version" }); + trySetFromYaml(rinex_comment, metadata, {"@ rinex_comment" }); + trySetFromYaml(reference_system, metadata, {"@ reference_system" }, "(string) Terrestrial Reference System Code"); + trySetFromYaml(time_system, metadata, {"@ time_system" }, "(string) Time system - e.g. \"G\", \"UTC\""); + trySetFromYaml(bias_time_system, metadata, {"@ bias_time_system" }, "(string) Time system for bias SINEX \"G\", \"UTC\""); + trySetFromYaml(ocean_tide_loading_model, metadata, {"@ ocean_tide_loading_model" }, "(string) Ocean tide loading model applied"); + trySetFromYaml(atmospheric_tide_loading_model, metadata, {"@ atmospheric_tide_loading_model" }, "(string) Atmospheric tide loading model applied"); + trySetFromYaml(geoid_model, metadata, {"@ geoid_model" }, "(string) Geoid model name for undulation values"); + trySetFromYaml(gradient_mapping_function, metadata, {"@ gradient_mapping_function" }, "(string) Name of mapping function used for mapping horizontal troposphere gradients"); } { - auto trace = stringsToYamlObject(outputs, {"0 trace"}); - - trySetFromYaml(output_station_trace, trace, {"0 output_stations" }, "(bool) "); - trySetFromYaml(output_network_trace, trace, {"0 output_network" }, "(bool) "); - trySetFromYaml(output_satellite_trace, trace, {"0 output_satellites" }, "(bool) "); - trySetFromYaml(trace_directory, trace, {"directory" }); - trySetFromYaml(satellite_trace_filename, trace, {"1 satellite_filename" }); - trySetFromYaml(station_trace_filename, trace, {"1 station_filename" }); - trySetFromYaml(network_trace_filename, trace, {"1 network_filename" }); - trySetFromAny(trace_level, commandOpts, trace, {"level" }, "(int) Threshold level for printing messages (0-5)"); - - trySetFromYaml(output_residual_chain, trace, {"output_residual_chain" }, "(bool) "); - trySetFromYaml(output_residuals, trace, {"output_residuals" }, "(bool) "); - trySetFromYaml(output_config, trace, {"output_config" }, "(bool) "); - trySetFromYaml(output_json_trace, trace, {"output_json" }, "(bool) "); + auto trace = stringsToYamlObject(outputs, {"0! trace"}); + + trySetFromYaml(output_station_trace, trace, {"0! output_stations" }, "(bool) "); + trySetFromYaml(output_network_trace, trace, {"0! output_network" }, "(bool) "); + trySetFromYaml(output_satellite_trace, trace, {"0! output_satellites" }, "(bool) "); + trySetFromYaml(trace_directory, trace, {"! directory" }); + trySetFromYaml(satellite_trace_filename, trace, {"1! satellite_filename" }); + trySetFromYaml(station_trace_filename, trace, {"1! station_filename" }); + trySetFromYaml(network_trace_filename, trace, {"1! network_filename" }); + trySetFromAny(trace_level, commandOpts, trace, {"! level" }, "(int) Threshold level for printing messages (0-5)"); + + trySetFromYaml(output_residual_chain, trace, {"! output_residual_chain" }, "(bool) "); + trySetFromYaml(output_residuals, trace, {"! output_residuals" }, "(bool) "); + trySetFromYaml(output_config, trace, {"! output_config" }, "(bool) "); + trySetFromYaml(output_json_trace, trace, {"@ output_json" }, "(bool) "); } { - auto output_rotation = stringsToYamlObject(outputs, {"output_rotation"}); + auto output_rotation = stringsToYamlObject(outputs, {"@ output_rotation"}); - trySetScaledFromYaml(rotate_period, output_rotation, {"period" }, {"period_units" }, E_Period::_from_string_nocase); + trySetScaledFromYaml(rotate_period, output_rotation, {"@ period" }, {"@ period_units" }, E_Period::_from_string_nocase); } { - auto bias_sinex = stringsToYamlObject(outputs, {"bias_sinex"}); + auto bias_sinex = stringsToYamlObject(outputs, {"! bias_sinex"}); trySetFromYaml(output_bias_sinex, bias_sinex, {"0 output" }, "(bool) "); - trySetFromYaml(bias_sinex_directory, bias_sinex, {"directory" }); - trySetFromYaml(bias_sinex_filename, bias_sinex, {"filename" }); - trySetFromYaml(ambrOpts.code_output_interval, bias_sinex, {"code_output_interval" }, "(double) Update interval for code biases"); - trySetFromYaml(ambrOpts.phase_output_interval, bias_sinex, {"phase_output_interval" }, "(double) Update interval for phase biases"); - trySetFromYaml(ambrOpts.output_rec_bias, bias_sinex, {"output_rec_bias" }, "(bool) output receiver biases"); + trySetFromYaml(bias_sinex_directory, bias_sinex, {"@ directory" }); + trySetFromYaml(bias_sinex_filename, bias_sinex, {"@ filename" }); + trySetFromYaml(ambrOpts.code_output_interval, bias_sinex, {"@ code_output_interval" }, "(double) Update interval for code biases"); + trySetFromYaml(ambrOpts.phase_output_interval, bias_sinex, {"@ phase_output_interval" }, "(double) Update interval for phase biases"); + trySetFromYaml(ambrOpts.output_rec_bias, bias_sinex, {"@ output_rec_bias" }, "(bool) output receiver biases"); } { - auto clocks = stringsToYamlObject(outputs, {"clocks"}); - - trySetFromYaml(output_clocks, clocks, {"0 output" }, "(bool) "); - trySetFromYaml(clocks_directory, clocks, {"directory" }); - trySetFromYaml(clocks_filename, clocks, {"filename" }); - trySetFromYaml(output_ar_clocks, clocks, {"output_ar_clocks" }, "(bool) "); - trySetEnumVec (clocks_receiver_sources, clocks, {"receiver_sources" }); - trySetEnumVec (clocks_satellite_sources, clocks, {"satellite_sources" }); + auto clocks = stringsToYamlObject(outputs, {"! clocks"}); + + trySetFromYaml(output_clocks, clocks, {"0 output" }, "(bool) "); + trySetFromYaml(clocks_directory, clocks, {"@ directory" }); + trySetFromYaml(clocks_filename, clocks, {"@ filename" }); + trySetFromYaml(output_ar_clocks, clocks, {"@ output_ar_clocks" }, "(bool) "); + trySetEnumVec (clocks_receiver_sources, clocks, {"@ receiver_sources" }); + trySetEnumVec (clocks_satellite_sources, clocks, {"@ satellite_sources" }); } { - auto decoded_rtcm = stringsToYamlObject(outputs, {"decoded_rtcm"}); + auto decoded_rtcm = stringsToYamlObject(outputs, {"@ decoded_rtcm"}); - trySetFromYaml(output_decoded_rtcm_json, decoded_rtcm, {"0 output" }, "(bool) Enable exporting decoded RTCM data to file"); - trySetFromYaml(decoded_rtcm_json_directory, decoded_rtcm, {"directory" }, "(string) Directory to export decoded RTCM data"); - trySetFromYaml(decoded_rtcm_json_filename, decoded_rtcm, {"filename" }, "(string) Decoded RTCM data filename"); + trySetFromYaml(output_decoded_rtcm_json, decoded_rtcm, {"0@ output" }, "(bool) Enable exporting decoded RTCM data to file"); + trySetFromYaml(decoded_rtcm_json_directory, decoded_rtcm, {"@ directory" }, "(string) Directory to export decoded RTCM data"); + trySetFromYaml(decoded_rtcm_json_filename, decoded_rtcm, {"@ filename" }, "(string) Decoded RTCM data filename"); } { - auto encoded_rtcm = stringsToYamlObject(outputs, {"encoded_rtcm"}); + auto encoded_rtcm = stringsToYamlObject(outputs, {"@ encoded_rtcm"}); - trySetFromYaml(output_encoded_rtcm_json, encoded_rtcm, {"0 output" }, "(bool) Enable exporting encoded RTCM data to file"); - trySetFromYaml(encoded_rtcm_json_directory, encoded_rtcm, {"directory" }, "(string) Directory to export encoded RTCM data"); - trySetFromYaml(encoded_rtcm_json_filename, encoded_rtcm, {"filename" }, "(string) Encoded RTCM data filename"); + trySetFromYaml(output_encoded_rtcm_json, encoded_rtcm, {"0@ output" }, "(bool) Enable exporting encoded RTCM data to file"); + trySetFromYaml(encoded_rtcm_json_directory, encoded_rtcm, {"@ directory" }, "(string) Directory to export encoded RTCM data"); + trySetFromYaml(encoded_rtcm_json_filename, encoded_rtcm, {"@ filename" }, "(string) Encoded RTCM data filename"); } { - auto erp = stringsToYamlObject(outputs, {"erp"}); + auto erp = stringsToYamlObject(outputs, {"! erp"}); - trySetFromYaml(output_erp, erp, {"0 output" }, "(bool) "); - trySetFromYaml(erp_directory, erp, {"directory" }); - trySetFromYaml(erp_filename, erp, {"filename" }); + trySetFromYaml(output_erp, erp, {"0! output" }, "(bool) "); + trySetFromYaml(erp_directory, erp, {"@ directory" }); + trySetFromYaml(erp_filename, erp, {"@ filename" }); } { - auto ionex = stringsToYamlObject(outputs, {"ionex"}); - - trySetFromYaml(output_ionex, ionex, {"0 output" }, "(bool) "); - trySetFromYaml(ionex_directory, ionex, {"directory" }); - trySetFromYaml(ionex_filename, ionex, {"filename" }); - trySetFromYaml(ionexGrid.lat_center, ionex, {"grid", "lat_center" }); - trySetFromYaml(ionexGrid.lon_center, ionex, {"grid", "lon_center" }); - trySetFromYaml(ionexGrid.lat_width, ionex, {"grid", "lat_width" }); - trySetFromYaml(ionexGrid.lon_width, ionex, {"grid", "lon_width" }); - trySetFromYaml(ionexGrid.lat_res, ionex, {"grid", "lat_resolution" }); - trySetFromYaml(ionexGrid.lon_res, ionex, {"grid", "lon_resolution" }); - trySetFromYaml(ionexGrid.time_res, ionex, {"grid", "time_resolution" }); + auto ionex = stringsToYamlObject(outputs, {"! ionex"}); + + trySetFromYaml(output_ionex, ionex, {"0! output" }, "(bool) "); + trySetFromYaml(ionex_directory, ionex, {"@ directory" }); + trySetFromYaml(ionex_filename, ionex, {"@ filename" }); + trySetFromYaml(ionexGrid.lat_center, ionex, {"@ grid", "@ lat_center" }); + trySetFromYaml(ionexGrid.lon_center, ionex, {"@ grid", "@ lon_center" }); + trySetFromYaml(ionexGrid.lat_width, ionex, {"@ grid", "@ lat_width" }); + trySetFromYaml(ionexGrid.lon_width, ionex, {"@ grid", "@ lon_width" }); + trySetFromYaml(ionexGrid.lat_res, ionex, {"@ grid", "@ lat_resolution" }); + trySetFromYaml(ionexGrid.lon_res, ionex, {"@ grid", "@ lon_resolution" }); + trySetFromYaml(ionexGrid.time_res, ionex, {"@ grid", "@ time_resolution" }); } { - auto ionstec = stringsToYamlObject(outputs, {"ionstec"}); + auto ionstec = stringsToYamlObject(outputs, {"! ionstec"}); - trySetFromYaml(output_ionstec, ionstec, {"0 output" }, "(bool) "); - trySetFromYaml(ionstec_directory, ionstec, {"directory" }); - trySetFromYaml(ionstec_filename, ionstec, {"filename" }); + trySetFromYaml(output_ionstec, ionstec, {"0! output" }, "(bool) "); + trySetFromYaml(ionstec_directory, ionstec, {"@ directory" }); + trySetFromYaml(ionstec_filename, ionstec, {"@ filename" }); } { - auto sinex = stringsToYamlObject(outputs, {"sinex"}); + auto sinex = stringsToYamlObject(outputs, {"! sinex"}); - trySetFromYaml(output_sinex, sinex, {"0 output" }, "(bool) "); - trySetFromYaml(sinex_directory, sinex, {"directory" }); - trySetFromYaml(sinex_filename, sinex, {"filename" }); + trySetFromYaml(output_sinex, sinex, {"0! output" }, "(bool) "); + trySetFromYaml(sinex_directory, sinex, {"@ directory" }); + trySetFromYaml(sinex_filename, sinex, {"@ filename" }); } { - auto log = stringsToYamlObject(outputs, {"log"}); + auto log = stringsToYamlObject(outputs, {"! log"}); - trySetFromYaml(output_log, log, {"0 output" }, "(bool) "); - trySetFromYaml(log_directory, log, {"directory" }); - trySetFromYaml(log_filename, log, {"filename" }); + trySetFromYaml(output_log, log, {"0! output" }, "(bool) "); + trySetFromYaml(log_directory, log, {"@ directory" }); + trySetFromYaml(log_filename, log, {"@ filename" }); } { - auto ntrip_log = stringsToYamlObject(outputs, {"ntrip_log"}); + auto ntrip_log = stringsToYamlObject(outputs, {"@ ntrip_log"}); - trySetFromYaml(output_ntrip_log, ntrip_log, {"0 output" }, "(bool) "); - trySetFromYaml(ntrip_log_directory, ntrip_log, {"directory" }); - trySetFromYaml(ntrip_log_filename, ntrip_log, {"filename" }); + trySetFromYaml(output_ntrip_log, ntrip_log, {"0@ output" }, "(bool) "); + trySetFromYaml(ntrip_log_directory, ntrip_log, {"@ directory" }); + trySetFromYaml(ntrip_log_filename, ntrip_log, {"@ filename" }); } { - auto gpx = stringsToYamlObject(outputs, {"gpx"}); + auto gpx = stringsToYamlObject(outputs, {"! gpx"}); - trySetFromYaml(output_gpx, gpx, {"0 output" }, "(bool) "); - trySetFromYaml(gpx_directory, gpx, {"directory" }); - trySetFromYaml(gpx_filename, gpx, {"filename" }); + trySetFromYaml(output_gpx, gpx, {"0! output" }, "(bool) "); + trySetFromYaml(gpx_directory, gpx, {"@ directory" }); + trySetFromYaml(gpx_filename, gpx, {"@ filename" }); } { - auto network_statistics = stringsToYamlObject(outputs, {"network_statistics"}); + auto network_statistics = stringsToYamlObject(outputs, {"@ network_statistics"}); - trySetFromYaml(output_network_statistics_json, network_statistics, {"0 output" }, "(bool) Enable exporting network statistics data to file"); - trySetFromYaml(network_statistics_json_directory, network_statistics, {"directory" }, "(string) Directory to export network statistics data"); - trySetFromYaml(network_statistics_json_filename, network_statistics, {"filename" }, "(string) Network statistics data filename"); + trySetFromYaml(output_network_statistics_json, network_statistics, {"0@ output" }, "(bool) Enable exporting network statistics data to file"); + trySetFromYaml(network_statistics_json_directory, network_statistics, {"@ directory" }, "(string) Directory to export network statistics data"); + trySetFromYaml(network_statistics_json_filename, network_statistics, {"@ filename" }, "(string) Network statistics data filename"); } { - auto sp3 = stringsToYamlObject(outputs, {"sp3"}); - - trySetFromYaml(output_orbits, sp3, {"0 output" }, "(bool) "); - trySetFromYaml(output_predicted_orbits, sp3, {"0 output_predicted_orbits" }, "(bool) "); - trySetFromYaml(output_orbit_velocities, sp3, {"output_velocities" }, "(bool) "); - trySetFromYaml(orbits_directory, sp3, {"directory" }); - trySetFromYaml(orbits_filename, sp3, {"filename" }); - trySetFromYaml(predicted_orbits_filename, sp3, {"predicted_filename" }); - trySetEnumVec (orbits_data_sources, sp3, {"sources" }); - trySetFromYaml(orbits_output_interval, sp3, {"output_interval" }, "(int) Update interval for sp3 records"); - trySetFromYaml(output_inertial_orbits, sp3, {"output_inertial" }, "(bool) Output the entries using inertial positions and velocities"); + auto sp3 = stringsToYamlObject(outputs, {"! sp3"}); + + trySetFromYaml(output_sp3, sp3, {"0! output" }, "(bool) "); + trySetFromYaml(output_inertial_orbits, sp3, {"@ output_inertial" }, "(bool) Output the entries using inertial positions and velocities"); + trySetFromYaml(output_predicted_orbits, sp3, {"0@ output_predicted_orbits" }, "(bool) "); + trySetFromYaml(output_sp3_velocities, sp3, {"@ output_velocities" }, "(bool) "); + trySetFromYaml(sp3_directory, sp3, {"@ directory" }); + trySetFromYaml(sp3_filename, sp3, {"@ filename" }); + trySetFromYaml(predicted_sp3_filename, sp3, {"@ predicted_filename" }); + trySetEnumVec (sp3_clock_sources, sp3, {"@ clock_sources" }); + trySetEnumVec (sp3_orbit_sources, sp3, {"@ orbit_sources" }); + trySetFromYaml(sp3_output_interval, sp3, {"@ output_interval" }, "(int) Update interval for sp3 records"); } { - auto orbit_ics = stringsToYamlObject(outputs, {"orbit_ics"}); + auto orbit_ics = stringsToYamlObject(outputs, {"@ orbit_ics"}); - trySetFromYaml(output_orbit_ics, orbit_ics, {"output" }, ""); - trySetFromYaml(orbit_ics_filename, orbit_ics, {"orbit_ics_filename" }, ""); - trySetFromYaml(orbit_ics_directory, orbit_ics, {"orbit_ics_directory" }, ""); + trySetFromYaml(output_orbit_ics, orbit_ics, {"@ output" }, ""); + trySetFromYaml(orbit_ics_filename, orbit_ics, {"@ orbit_ics_filename" }, ""); + trySetFromYaml(orbit_ics_directory, orbit_ics, {"@ orbit_ics_directory" }, ""); } { - auto orbex = stringsToYamlObject(outputs, {"orbex"}); + auto orbex = stringsToYamlObject(outputs, {"@ orbex"}); - trySetFromYaml(output_orbex, orbex, {"0 output" }, "(bool) Output orbex file"); - trySetFromYaml(orbex_directory, orbex, {"directory" }, "(string) Output orbex directory"); - trySetFromYaml(orbex_filename, orbex, {"filename" }, "(string) Output orbex filename"); - trySetEnumVec (orbex_orbit_sources, orbex, {"orbit_sources" }, "[E_Source] Source for orbex orbits"); - trySetEnumVec (orbex_clock_sources, orbex, {"clock_sources" }, "[E_Source] Source for orbex clocks"); - trySetEnumVec (orbex_attitude_sources, orbex, {"attitude_sources" }, "[E_Source] Source for orbex attitudes"); + trySetFromYaml(output_orbex, orbex, {"0@ output" }, "(bool) Output orbex file"); + trySetFromYaml(orbex_directory, orbex, {"@ directory" }, "(string) Output orbex directory"); + trySetFromYaml(orbex_filename, orbex, {"@ filename" }, "(string) Output orbex filename"); + trySetEnumVec (orbex_orbit_sources, orbex, {"@ orbit_sources" }, "[E_Source] Source for orbex orbits"); + trySetEnumVec (orbex_clock_sources, orbex, {"@ clock_sources" }, "[E_Source] Source for orbex clocks"); + trySetEnumVec (orbex_attitude_sources, orbex, {"@ attitude_sources" }, "[E_Source] Source for orbex attitudes"); vector recordTypeStrings; - bool found = trySetFromYaml(recordTypeStrings, orbex, {"record_types" }, "[string] List of record types to output to ORBEX file"); + bool found = trySetFromYaml(recordTypeStrings, orbex, {"@ record_types" }, "[string] List of record types to output to ORBEX file"); if (found) for (auto once : {1}) { @@ -1939,66 +2237,66 @@ bool ACSConfig::parse( } { - auto ppp_sol = stringsToYamlObject(outputs, {"ppp_sol"}); + auto ppp_sol = stringsToYamlObject(outputs, {"! ppp_sol"}); - trySetFromYaml(output_ppp_sol, ppp_sol, {"0 output" }, "(bool) "); - trySetFromYaml(ppp_sol_directory, ppp_sol, {"directory" }); - trySetFromYaml(ppp_sol_filename, ppp_sol, {"filename" }); + trySetFromYaml(output_ppp_sol, ppp_sol, {"0! output" }, "(bool) "); + trySetFromYaml(ppp_sol_directory, ppp_sol, {"@ directory" }); + trySetFromYaml(ppp_sol_filename, ppp_sol, {"@ filename" }); } { - auto cost = stringsToYamlObject(outputs, {"cost"}); - - trySetFromYaml(output_cost, cost, {"0 output" }, "(bool) Enable data exporting to troposphere COST file"); - trySetEnumVec (cost_data_sources, cost, {"sources" }, "(enum) Source for troposphere delay data - KALMAN, etc."); - trySetFromYaml(cost_directory, cost, {"directory" }, "(string) Directory to export troposphere COST file"); - trySetFromYaml(cost_filename, cost, {"filename" }, "(string) Troposphere COST filename"); - trySetFromYaml(cost_time_interval, cost, {"time_interval" }, "(int) Time interval between entries in troposphere COST file (sec)"); - trySetFromYaml(cost_format, cost, {"cost_format" }, "(string) Format name & version number"); - trySetFromYaml(cost_project, cost, {"cost_project" }, "(string) Project name"); - trySetFromYaml(cost_status, cost, {"cost_status" }, "(string) File status"); - trySetFromYaml(cost_centre, cost, {"cost_centre" }, "(string) Processing centre"); - trySetFromYaml(cost_method, cost, {"cost_method" }, "(string) Processing method"); - trySetFromYaml(cost_orbit_type, cost, {"cost_orbit_type" }, "(string) Orbit type"); - trySetFromYaml(cost_met_source, cost, {"cost_met_sources" }, "(string) Source of met. data"); + auto cost = stringsToYamlObject(outputs, {"@ cost"}); + + trySetFromYaml(output_cost, cost, {"0@ output" }, "(bool) Enable data exporting to troposphere COST file"); + trySetEnumVec (cost_data_sources, cost, {"@ sources" }, "(enum) Source for troposphere delay data - KALMAN, etc."); + trySetFromYaml(cost_directory, cost, {"@ directory" }, "(string) Directory to export troposphere COST file"); + trySetFromYaml(cost_filename, cost, {"@ filename" }, "(string) Troposphere COST filename"); + trySetFromYaml(cost_time_interval, cost, {"@ time_interval" }, "(int) Time interval between entries in troposphere COST file (sec)"); + trySetFromYaml(cost_format, cost, {"@ cost_format" }, "(string) Format name & version number"); + trySetFromYaml(cost_project, cost, {"@ cost_project" }, "(string) Project name"); + trySetFromYaml(cost_status, cost, {"@ cost_status" }, "(string) File status"); + trySetFromYaml(cost_centre, cost, {"@ cost_centre" }, "(string) Processing centre"); + trySetFromYaml(cost_method, cost, {"@ cost_method" }, "(string) Processing method"); + trySetFromYaml(cost_orbit_type, cost, {"@ cost_orbit_type" }, "(string) Orbit type"); + trySetFromYaml(cost_met_source, cost, {"@ cost_met_sources" }, "(string) Source of met. data"); } { - auto rinex_nav = stringsToYamlObject(outputs, {"rinex_nav"}); + auto rinex_nav = stringsToYamlObject(outputs, {"@ rinex_nav"}); - trySetFromYaml(output_rinex_nav, rinex_nav, {"0 output" }, "(bool) "); - trySetFromYaml(rinex_nav_directory, rinex_nav, {"directory" }); - trySetFromYaml(rinex_nav_filename, rinex_nav, {"filename" }); - trySetFromYaml(rinex_nav_version, rinex_nav, {"version" }); + trySetFromYaml(output_rinex_nav, rinex_nav, {"0@ output" }, "(bool) "); + trySetFromYaml(rinex_nav_directory, rinex_nav, {"@ directory" }); + trySetFromYaml(rinex_nav_filename, rinex_nav, {"@ filename" }); + trySetFromYaml(rinex_nav_version, rinex_nav, {"@ version" }); } { - auto rinex_obs = stringsToYamlObject(outputs, {"rinex_obs"}); - - trySetFromYaml(output_rinex_obs, rinex_obs, {"0 output" }, "(bool) "); - trySetFromYaml(rinex_obs_directory, rinex_obs, {"directory" }); - trySetFromYaml(rinex_obs_print_C_code, rinex_obs, {"output_pseudorange" }, "(bool) "); - trySetFromYaml(rinex_obs_print_L_code, rinex_obs, {"output_phase_range" }, "(bool) "); - trySetFromYaml(rinex_obs_print_D_code, rinex_obs, {"output_doppler" }, "(bool) "); - trySetFromYaml(rinex_obs_print_S_code, rinex_obs, {"output_signal_to_noise" }, "(bool) "); - trySetFromYaml(rinex_obs_filename, rinex_obs, {"filename" }); - trySetFromYaml(rinex_obs_version, rinex_obs, {"version" }); + auto rinex_obs = stringsToYamlObject(outputs, {"@ rinex_obs"}); + + trySetFromYaml(output_rinex_obs, rinex_obs, {"0@ output" }, "(bool) "); + trySetFromYaml(rinex_obs_directory, rinex_obs, {"@ directory" }); + trySetFromYaml(rinex_obs_print_C_code, rinex_obs, {"@ output_pseudorange" }, "(bool) "); + trySetFromYaml(rinex_obs_print_L_code, rinex_obs, {"@ output_phase_range" }, "(bool) "); + trySetFromYaml(rinex_obs_print_D_code, rinex_obs, {"@ output_doppler" }, "(bool) "); + trySetFromYaml(rinex_obs_print_S_code, rinex_obs, {"@ output_signal_to_noise" }, "(bool) "); + trySetFromYaml(rinex_obs_filename, rinex_obs, {"@ filename" }); + trySetFromYaml(rinex_obs_version, rinex_obs, {"@ version" }); } { - auto rtcm_nav = stringsToYamlObject(outputs, {"rtcm_nav"}); + auto rtcm_nav = stringsToYamlObject(outputs, {"@ rtcm_nav"}); - trySetFromYaml(record_rtcm_nav, rtcm_nav, {"0 output" }, "(bool) "); - trySetFromYaml(rtcm_nav_directory, rtcm_nav, {"directory" }); - trySetFromYaml(rtcm_nav_filename, rtcm_nav, {"filename" }); + trySetFromYaml(record_rtcm_nav, rtcm_nav, {"0@ output" }, "(bool) "); + trySetFromYaml(rtcm_nav_directory, rtcm_nav, {"@ directory" }); + trySetFromYaml(rtcm_nav_filename, rtcm_nav, {"@ filename" }); } { - auto rtcm_obs = stringsToYamlObject(outputs, {"rtcm_obs"}); + auto rtcm_obs = stringsToYamlObject(outputs, {"@ rtcm_obs"}); - trySetFromYaml(record_rtcm_obs, rtcm_obs, {"0 output" }, "(bool) "); - trySetFromYaml(rtcm_obs_directory, rtcm_obs, {"directory" }); - trySetFromYaml(rtcm_obs_filename, rtcm_obs, {"filename" }); + trySetFromYaml(record_rtcm_obs, rtcm_obs, {"0@ output" }, "(bool) "); + trySetFromYaml(rtcm_obs_directory, rtcm_obs, {"@ directory" }); + trySetFromYaml(rtcm_obs_filename, rtcm_obs, {"@ filename" }); } { @@ -2010,38 +2308,38 @@ bool ACSConfig::parse( } { - auto slr_obs = stringsToYamlObject(outputs, {"slr_obs"}); + auto slr_obs = stringsToYamlObject(outputs, {"@ slr_obs"}); - trySetFromYaml(output_slr_obs, slr_obs, {"0 output" }, "(bool) Enable data exporting to tabular SLR obs file"); - trySetFromYaml(slr_obs_directory, slr_obs, {"directory" }, "(string) Directory to export tabular SLR obs file"); - trySetFromYaml(slr_obs_filename, slr_obs, {"filename" }, "(string) Tabular SLR obs filename"); + trySetFromYaml(output_slr_obs, slr_obs, {"0@ output" }, "(bool) Enable data exporting to tabular SLR obs file"); + trySetFromYaml(slr_obs_directory, slr_obs, {"@ directory" }, "(string) Directory to export tabular SLR obs file"); + trySetFromYaml(slr_obs_filename, slr_obs, {"@ filename" }, "(string) Tabular SLR obs filename"); } { - auto trop_sinex = stringsToYamlObject(outputs, {"trop_sinex"}); - - trySetFromYaml(output_trop_sinex, trop_sinex, {"0 output" }, "(bool) Enable data exporting to troposphere SINEX file"); - trySetEnumVec (trop_sinex_data_sources, trop_sinex, {"sources" }, "(enum) Source for troposphere delay data - KALMAN, etc."); - trySetFromYaml(trop_sinex_directory, trop_sinex, {"directory" }, "(string) Directory to export troposphere SINEX file"); - trySetFromYaml(trop_sinex_filename, trop_sinex, {"filename" }, "(string) Troposphere SINEX filename"); - trySetFromYaml(trop_sinex_sol_type, trop_sinex, {"sol_type" }, "(string) Troposphere SINEX solution type"); - trySetFromYaml(trop_sinex_obs_code, trop_sinex, {"obs_code" }, "(string) Troposphere SINEX observation code"); - trySetFromYaml(trop_sinex_const_code, trop_sinex, {"const_code" }, "(string) Troposphere SINEX const code"); - trySetFromYaml(trop_sinex_version, trop_sinex, {"version" }, "(string) Troposphere SINEX version"); + auto trop_sinex = stringsToYamlObject(outputs, {"! trop_sinex"}); + + trySetFromYaml(output_trop_sinex, trop_sinex, {"0! output" }, "(bool) Enable data exporting to troposphere SINEX file"); + trySetEnumVec (trop_sinex_data_sources, trop_sinex, {"@ sources" }, "(enum) Source for troposphere delay data - KALMAN, etc."); + trySetFromYaml(trop_sinex_directory, trop_sinex, {"@ directory" }, "(string) Directory to export troposphere SINEX file"); + trySetFromYaml(trop_sinex_filename, trop_sinex, {"@ filename" }, "(string) Troposphere SINEX filename"); + trySetFromYaml(trop_sinex_sol_type, trop_sinex, {"@ sol_type" }, "(string) Troposphere SINEX solution type"); + trySetFromYaml(trop_sinex_obs_code, trop_sinex, {"@ obs_code" }, "(string) Troposphere SINEX observation code"); + trySetFromYaml(trop_sinex_const_code, trop_sinex, {"@ const_code" }, "(string) Troposphere SINEX const code"); + trySetFromYaml(trop_sinex_version, trop_sinex, {"@ version" }, "(string) Troposphere SINEX version"); } { - auto streams = stringsToYamlObject(outputs, {"streams"}); + auto streams = stringsToYamlObject(outputs, {"! streams"}); string root_stream_url = ""; - trySetFromYaml(root_stream_url, streams, {"0 root_url"}, "(string) Root url to be prepended to all other streams specified in this section. If the streams used have individually specified root urls, usernames, or passwords, this should not be used."); + trySetFromYaml(root_stream_url, streams, {"0! root_url"}, "(string) Root url to be prepended to all other streams specified in this section. If the streams used have individually specified root urls, usernames, or passwords, this should not be used."); replaceTags(root_stream_url); SsrBroadcast dummyStreamData; - tryGetStreamFromYaml(dummyStreamData, streams, {"XMPL"}); + tryGetStreamFromYaml(dummyStreamData, streams, {"@ XMPL"}); - auto [outStreamNode, outStreamString] = stringsToYamlObject(streams, {"1 labels"}, "[string] List of output stream is with further information to be found in its own section, as per XMPL below"); + auto [outStreamNode, outStreamString] = stringsToYamlObject(streams, {"1@ labels"}, "[string] List of output stream is with further information to be found in its own section, as per XMPL below"); for (auto outLabelYaml : outStreamNode) { @@ -2055,40 +2353,40 @@ bool ACSConfig::parse( } { - auto inputs = stringsToYamlObject({yaml, ""}, {"0 inputs"}); + auto inputs = stringsToYamlObject({yaml, ""}, {"0! inputs"}, docs["inputs"]); string root_stream_url; - trySetFromAny(root_input_directory, commandOpts, inputs, {"0 root_directory" }, "(string) Root path to be added to all other input files (unless they are absolute)"); - trySetFromYaml(root_stream_url, inputs, {"0 root_stream_url" }, "(string) Root url to be prepended to all other streams specified in this section. If the streams used have individually specified root urls, usernames, or passwords, this should not be used."); + trySetFromAny(root_input_directory, commandOpts, inputs, {"0! root_directory" }, "(string) Root path to be added to all other input files (unless they are absolute)"); + trySetFromYaml(root_stream_url, inputs, {"0! root_stream_url" }, "(string) Root url to be prepended to all other streams specified in this section. If the streams used have individually specified root urls, usernames, or passwords, this should not be used."); - trySetFromAny(atx_files, commandOpts, inputs, {"atx_files" }, "[string] List of atx files to use"); - trySetFromAny(snx_files, commandOpts, inputs, {"snx_files" }, "[string] List of snx files to use"); - trySetFromAny(blq_files, commandOpts, inputs, {"blq_files" }, "[string] List of blq files to use"); - trySetFromAny(erp_files, commandOpts, inputs, {"erp_files" }, "[string] List of erp files to use"); - trySetFromAny(ion_files, commandOpts, inputs, {"ion_files" }, "[string] List of ion files to use"); - trySetFromAny(igrf_files, commandOpts, inputs, {"igrf_files" }, "[string] List of igrf files to use"); - trySetFromAny(egm_files, commandOpts, inputs, {"egm_files" }, "[string] List of egm files to use"); - trySetFromAny(jpl_files, commandOpts, inputs, {"jpl_files" }, "[string] List of jpl files to use"); - trySetFromAny(tide_files, commandOpts, inputs, {"tide_files"}); + trySetFromAny(atx_files, commandOpts, inputs, {"! atx_files" }, "[string] List of atx files to use"); + trySetFromAny(snx_files, commandOpts, inputs, {"! snx_files" }, "[string] List of snx files to use"); + trySetFromAny(blq_files, commandOpts, inputs, {"! blq_files" }, "[string] List of blq files to use"); + trySetFromAny(erp_files, commandOpts, inputs, {"! erp_files" }, "[string] List of erp files to use"); + trySetFromAny(ion_files, commandOpts, inputs, {"! ion_files" }, "[string] List of ion files to use"); + trySetFromAny(igrf_files, commandOpts, inputs, {"! igrf_files" }, "[string] List of igrf files to use"); + trySetFromAny(egm_files, commandOpts, inputs, {"! egm_files" }, "[string] List of egm files to use"); + trySetFromAny(jpl_files, commandOpts, inputs, {"! jpl_files" }, "[string] List of jpl files to use"); + trySetFromAny(tide_files, commandOpts, inputs, {"! tide_files"}); - trySetFromYaml(vmf_files, inputs, {"troposphere", "vmf_files" }, "[string] List of vmf files to use"); - trySetFromYaml(model.trop.orography, inputs, {"troposphere", "orography_files" }); - trySetFromYaml(model.trop.gpt2grid, inputs, {"troposphere", "gpt2grid_files" }); + trySetFromYaml(vmf_files, inputs, {"! troposphere", "! vmf_files" }, "[string] List of vmf files to use"); + trySetFromYaml(model.trop.orography, inputs, {"! troposphere", "! orography_files" }); + trySetFromYaml(model.trop.gpt2grid, inputs, {"! troposphere", "! gpt2grid_files" }); - trySetFromYaml(atm_reg_definitions, inputs, {"ionosphere" , "atm_reg_definitions" }, "[string] List of files to define regions for compact SSR"); - trySetFromAny(ion_files, commandOpts, inputs, {"ionosphere" , "ion_files" }, "[string] List of IONEX files for VTEC input"); + trySetFromYaml(atm_reg_definitions, inputs, {"@ ionosphere" , "@ atm_reg_definitions" }, "[string] List of files to define regions for compact SSR"); + trySetFromAny(ion_files, commandOpts, inputs, {"! ionosphere" , "! ion_files" }, "[string] List of IONEX files for VTEC input"); { - auto gnss_data = stringsToYamlObject(inputs, {"1 gnss_observations"}); + auto gnss_data = stringsToYamlObject(inputs, {"1! gnss_observations"}); string inputs_root = "./"; - trySetFromAny(inputs_root, commandOpts, gnss_data, {"0 inputs_root" }, "(string) Root path to be added to all other gnss data inputs (unless they are absolute)"); + trySetFromAny(inputs_root, commandOpts, gnss_data, {"0! inputs_root" }, "(string) Root path to be added to all other gnss data inputs (unless they are absolute)"); - trySetFromAny(rnx_inputs, commandOpts, gnss_data, {"rnx_inputs" }, "[string] List of rinex inputs to use"); - trySetFromAny(ubx_inputs, commandOpts, gnss_data, {"ubx_inputs" }, "[string] List of ubxfiles inputs to use"); - trySetFromAny(obs_rtcm_inputs, commandOpts, gnss_data, {"rtcm_inputs" }, "[string] List of rtcmfiles inputs to use for observations"); + tryGetMappedList(rnx_inputs, gnss_data, {"! rnx_inputs" }, "[string] List of rinex inputs to use"); + tryGetMappedList(ubx_inputs, gnss_data, {"ubx_inputs" }, "[string] List of ubxfiles inputs to use"); + tryGetMappedList(obs_rtcm_inputs, gnss_data, {"! rtcm_inputs" }, "[string] List of rtcmfiles inputs to use for observations"); tryAddRootToPath(inputs_root, rnx_inputs); tryAddRootToPath(inputs_root, ubx_inputs); @@ -2096,35 +2394,35 @@ bool ACSConfig::parse( } { - auto pseudo_observation_data = stringsToYamlObject(inputs, {"pseudo_observations"}); + auto pseudo_observation_data = stringsToYamlObject(inputs, {"! pseudo_observations"}); string inputs_root = "./"; - trySetFromYaml(inputs_root, pseudo_observation_data, {"0 inputs_root" }, "(string) Root path to be added to all other pseudo obs data files (unless they are absolute)"); + trySetFromYaml(inputs_root, pseudo_observation_data, {"0! inputs_root" }, "(string) Root path to be added to all other pseudo obs data files (unless they are absolute)"); - trySetFromAny(pseudo_sp3_inputs, commandOpts, pseudo_observation_data, {"sp3_inputs" }, "[string] List of sp3 inputs to use for pseudoobservations"); - trySetFromAny(pseudo_snx_inputs, commandOpts, pseudo_observation_data, {"snx_inputs" }, "[string] List of snx inputs to use for pseudoobservations"); + tryGetMappedList(pseudo_sp3_inputs, pseudo_observation_data, {"! sp3_inputs" }, "[string] List of sp3 inputs to use for pseudoobservations"); + tryGetMappedList(pseudo_snx_inputs, pseudo_observation_data, {"@ snx_inputs" }, "[string] List of snx inputs to use for pseudoobservations"); tryAddRootToPath(inputs_root, pseudo_sp3_inputs); tryAddRootToPath(inputs_root, pseudo_snx_inputs); } { - auto satellite_data = stringsToYamlObject(inputs, {"0 satellite_data"}); + auto satellite_data = stringsToYamlObject(inputs, {"0! satellite_data"}); string inputs_root = "./"; - trySetFromYaml(inputs_root, satellite_data, {"0 inputs_root" }, "(string) Root path to be added to all other satellite data files (unless they are absolute)"); - - trySetFromAny(nav_files, commandOpts, satellite_data, {"nav_files" }, "[string] List of ephemeris files to use"); - trySetFromAny(sp3_files, commandOpts, satellite_data, {"sp3_files" }, "[string] List of sp3 files to use"); - trySetFromAny(dcb_files, commandOpts, satellite_data, {"dcb_files" }, "[string] List of dcb files to use"); - trySetFromAny(bsx_files, commandOpts, satellite_data, {"bsx_files" }, "[string] List of biassinex files to use"); - trySetFromAny(clk_files, commandOpts, satellite_data, {"clk_files" }, "[string] List of clock files to use"); - trySetFromAny(sid_files, commandOpts, satellite_data, {"sid_files" }, "[string] List of sat ID files to use - from https://cddis.nasa.gov/sp3c_satlist.html/"); - trySetFromAny(com_files, commandOpts, satellite_data, {"com_files" }, "[string] List of com files to use - retroreflector offsets from centre-of-mass for spherical sats"); - trySetFromAny(crd_files, commandOpts, satellite_data, {"crd_files" }, "[string] List of crd files to use - SLR observation data"); - trySetFromAny(obx_files, commandOpts, satellite_data, {"obx_files" }, "[string] List of orbex files to use"); - trySetFromAny(orb_files, commandOpts, satellite_data, {"orb_files" }, "[string] List of orbit(pod) files to use"); - trySetFromAny(nav_rtcm_inputs, commandOpts, satellite_data, {"rtcm_inputs" }, "[string] List of rtcm inputs to use for corrections"); + trySetFromYaml(inputs_root, satellite_data, {"0! inputs_root" }, "(string) Root path to be added to all other satellite data files (unless they are absolute)"); + + trySetFromAny(nav_files, commandOpts, satellite_data, {"! nav_files" }, "[string] List of ephemeris files to use"); + trySetFromAny(sp3_files, commandOpts, satellite_data, {"! sp3_files" }, "[string] List of sp3 files to use"); + trySetFromAny(dcb_files, commandOpts, satellite_data, {"! dcb_files" }, "[string] List of dcb files to use"); + trySetFromAny(bsx_files, commandOpts, satellite_data, {"! bsx_files" }, "[string] List of biassinex files to use"); + trySetFromAny(clk_files, commandOpts, satellite_data, {"! clk_files" }, "[string] List of clock files to use"); + trySetFromAny(sid_files, commandOpts, satellite_data, {"@ sid_files" }, "[string] List of sat ID files to use - from https://cddis.nasa.gov/sp3c_satlist.html/"); + trySetFromAny(com_files, commandOpts, satellite_data, {"@ com_files" }, "[string] List of com files to use - retroreflector offsets from centre-of-mass for spherical sats"); + trySetFromAny(crd_files, commandOpts, satellite_data, {"@ crd_files" }, "[string] List of crd files to use - SLR observation data"); + trySetFromAny(obx_files, commandOpts, satellite_data, {"! obx_files" }, "[string] List of orbex files to use"); + trySetFromAny(orb_files, commandOpts, satellite_data, {"@ orb_files" }, "[string] List of orbit(pod) files to use"); + trySetFromAny(nav_rtcm_inputs, commandOpts, satellite_data, {"! rtcm_inputs" }, "[string] List of rtcm inputs to use for corrections"); // tryAddRootToPath(inputs_root, nav_files); // tryAddRootToPath(inputs_root, sp3_files); @@ -2142,36 +2440,37 @@ bool ACSConfig::parse( auto processing_options = stringsToYamlObject({ yaml, "" }, {processing_options_str}); { - auto general = stringsToYamlObject(processing_options, {"2 gnss_general"}); + auto general = stringsToYamlObject(processing_options, {"2! gnss_general"}); - bool found = trySetFromAny(elevation_mask, commandOpts, general, {"0 elevation_mask" }); + bool found = trySetFromAny(elevation_mask, commandOpts, general, {"0! elevation_mask" }); if (found) elevation_mask *= D2R; - trySetFromYaml (require_apriori_positions, general, {"require_apriori_positions" }, "(bool) "); - trySetFromYaml (require_antenna_details, general, {"require_antenna_details" }, "(bool) "); - trySetFromYaml (pivot_station, general, {"pivot_station" }, "(string) "); - trySetFromYaml (interpolate_rec_pco, general, {"interpolate_rec_pco" }, "(bool) "); - trySetFromYaml (max_gdop, general, {"max_gdop" }); - trySetFromYaml (raim, general, {"raim" }, "(bool) "); - trySetEnumOpt (recOptsMap[""].error_model, general, {"error_model" }, E_NoiseModel::_from_string_nocase); - trySetFromYaml (pppOpts.common_atmosphere, general, {"common_atmosphere" }, "(bool) "); - trySetFromYaml (pppOpts.use_rtk_combo, general, {"use_rtk_combo" }, "(bool) "); - trySetFromYaml (delete_old_ephemerides, general, {"delete_old_ephemerides" }, "(bool) "); - trySetFromYaml (no_bias_sigma, general, {"no_bias_sigma" }, "(float) Sigma to use for biases that are not found"); - trySetFromYaml (common_sat_pco, general, {"common_sat_pco" }, "(bool) Use L1 satellite PCO values for all signals"); - trySetFromYaml (common_rec_pco, general, {"common_rec_pco" }, "(bool) Use L1 receiver PCO values for all signals"); - trySetFromYaml (leap_seconds, general, {"gpst_utc_leap_seconds" }, "(int) Difference between gps time and utc in leap seconds"); - - trySetFromYaml (process_meas[CODE], general, {"1 code_measurements", "process" }, "(bool) "); - trySetFromYaml (recOptsMap[""].code_sigmas, general, {"1 code_measurements", "sigmas" }); + trySetFromYaml (require_apriori_positions, general, {"@ require_apriori_positions" }, "(bool) "); + trySetFromYaml (require_antenna_details, general, {"@ require_antenna_details" }, "(bool) "); + trySetFromYaml (pivot_station, general, {"@ pivot_station" }, "(string) "); + trySetFromYaml (interpolate_rec_pco, general, {"@ interpolate_rec_pco" }, "(bool) "); + trySetFromYaml (max_gdop, general, {"@ max_gdop" }); + trySetFromYaml (raim, general, {"@ raim" }, "(bool) "); + trySetEnumOpt (recOptsMap[""].error_model, general, {"@ error_model" }, E_NoiseModel::_from_string_nocase); + trySetFromYaml (pppOpts.common_atmosphere, general, {"@ common_atmosphere" }, "(bool) "); + trySetFromYaml (pppOpts.use_rtk_combo, general, {"@ use_rtk_combo" }, "(bool) "); + trySetFromYaml (delete_old_ephemerides, general, {"@ delete_old_ephemerides" }, "(bool) "); + trySetFromYaml (no_bias_sigma, general, {"@ no_bias_sigma" }, "(float) Sigma to use for biases that are not found"); + trySetFromYaml (use_tgd_bias, general, {"@ use_tgd_bias" }, "(bool) Use TGD/BGD bias from ephemeris, DO NOT turn on unless using Klobuchar/NeQuick Ionospheres"); + trySetFromYaml (common_sat_pco, general, {"@ common_sat_pco" }, "(bool) Use L1 satellite PCO values for all signals"); + trySetFromYaml (common_rec_pco, general, {"@ common_rec_pco" }, "(bool) Use L1 receiver PCO values for all signals"); + trySetFromYaml (leap_seconds, general, {"@ gpst_utc_leap_seconds" }, "(int) Difference between gps time and utc in leap seconds"); + + trySetFromYaml (process_meas[CODE], general, {"1@ code_measurements", "process" }, "(bool) "); + trySetFromYaml (recOptsMap[""].code_sigmas, general, {"1@ code_measurements", "sigmas" }); - trySetFromYaml (process_meas[PHAS], general, {"1 phase_measurements", "process" }, "(bool) "); - trySetFromYaml (recOptsMap[""].phas_sigmas, general, {"1 phase_measurements", "sigmas" }); + trySetFromYaml (process_meas[PHAS], general, {"1@ phase_measurements", "process" }, "(bool) "); + trySetFromYaml (recOptsMap[""].phas_sigmas, general, {"1@ phase_measurements", "sigmas" }); //todo aaron needed? - trySetEnumOpt (receiver_reference_clk, general, {"rec_reference_system" }, E_Sys::_from_string_nocase, "(String) Receiver will use this system as reference clock"); - trySetFromYaml (fixed_phase_bias_var, general, {"fixed_phase_bias_var" }, "(double) variance of phase bias to be considered fixed/binded"); - trySetFromYaml (sat_clk_definition, general, {"sat_clk_definition" }, "(bool) use satellite clock definition pseudorange "); + trySetEnumOpt (receiver_reference_clk, general, {"@ rec_reference_system" }, E_Sys::_from_string_nocase, "(String) Receiver will use this system as reference clock"); + trySetFromYaml (fixed_phase_bias_var, general, {"@ fixed_phase_bias_var" }, "(double) variance of phase bias to be considered fixed/binded"); + trySetFromYaml (sat_clk_definition, general, {"@ sat_clk_definition" }, "(bool) use satellite clock definition pseudorange "); for (int i = E_Sys::GPS; i < E_Sys::SUPPORTED; i++) @@ -2179,22 +2478,22 @@ bool ACSConfig::parse( E_Sys sys = E_Sys::_values()[i]; string sysName = boost::algorithm::to_lower_copy((string) sys._to_string()); - auto sys_options = stringsToYamlObject(general, {"1 sys_options", sysName}); - - trySetFromYaml(process_sys [sys], sys_options, {"0 process" }, "(bool) Process this constellation"); - trySetFromYaml(solve_amb_for [sys], sys_options, {"ambiguity_resolution" }, "(bool) Solve carrier phase ambiguities for this constellation"); - trySetFromYaml(reject_eclipse [sys], sys_options, {"reject_eclipse" }, "(bool) Exclude satellites that are in eclipsing region"); - trySetFromYaml(zero_satellite_dcb [sys], sys_options, {"zero_satellite_dcb" }, "(bool) Constrain: satellite DCB for this system to zero"); - trySetFromYaml(zero_receiver_dcb [sys], sys_options, {"zero_receiver_dcb" }, "(bool) Constrain: receiver DCB for this system to zero"); - trySetFromYaml(one_phase_bias [sys], sys_options, {"one_phase_bias" }, "(bool) Constrain: assume satellite phase biases are common among frequencies"); - trySetFromYaml(receiver_amb_pivot [sys], sys_options, {"receiver_amb_pivot" }, "(bool) Constrain: set of ambiguities, to eliminate receiver rank deficiencies"); - trySetFromYaml(network_amb_pivot [sys], sys_options, {"network_amb_pivot" }, "(bool) Constrain: set of ambiguities, to eliminate network rank deficiencies"); - trySetFromYaml(use_for_iono_model [sys], sys_options, {"use_for_iono_model" }, "(bool) Use this constellation as part of Ionospheric model"); - trySetFromYaml(use_iono_corrections [sys], sys_options, {"use_iono_corrections" }, "(bool) Use external ionosphere delay estimation for this constellation"); - trySetEnumOpt( used_nav_types [sys], sys_options, {"used_nav_type" }, E_NavMsgType::_from_string_nocase); + auto sys_options = stringsToYamlObject(general, {"1! sys_options", sysName}); + + trySetFromYaml(process_sys [sys], sys_options, {"0! process" }, "(bool) Process this constellation"); + trySetFromYaml(solve_amb_for [sys], sys_options, {"! ambiguity_resolution" }, "(bool) Solve carrier phase ambiguities for this constellation"); + trySetFromYaml(reject_eclipse [sys], sys_options, {"@ reject_eclipse" }, "(bool) Exclude satellites that are in eclipsing region"); + trySetFromYaml(zero_satellite_dcb [sys], sys_options, {"@ zero_satellite_dcb" }, "(bool) Constrain: satellite DCB for this system to zero"); + trySetFromYaml(zero_receiver_dcb [sys], sys_options, {"@ zero_receiver_dcb" }, "(bool) Constrain: receiver DCB for this system to zero"); + trySetFromYaml(one_phase_bias [sys], sys_options, {"@ one_phase_bias" }, "(bool) Constrain: assume satellite phase biases are common among frequencies"); + trySetFromYaml(receiver_amb_pivot [sys], sys_options, {"@ receiver_amb_pivot" }, "(bool) Constrain: set of ambiguities, to eliminate receiver rank deficiencies"); + trySetFromYaml(network_amb_pivot [sys], sys_options, {"@ network_amb_pivot" }, "(bool) Constrain: set of ambiguities, to eliminate network rank deficiencies"); + trySetFromYaml(use_for_iono_model [sys], sys_options, {"@ use_for_iono_model" }, "(bool) Use this constellation as part of Ionospheric model"); + trySetFromYaml(use_iono_corrections [sys], sys_options, {"@ use_iono_corrections" }, "(bool) Use external ionosphere delay estimation for this constellation"); + trySetEnumOpt( used_nav_types [sys], sys_options, {"@ used_nav_type" }, E_NavMsgType::_from_string_nocase); vector clockCodesStrings; - bool found = trySetFromYaml(clockCodesStrings, sys_options, {"clock_codes" }, "(string) Default observation codes on two frequencies for IF combination based satellite clocks"); + bool found = trySetFromYaml(clockCodesStrings, sys_options, {"@ clock_codes" }, "(string) Default observation codes on two frequencies for IF combination based satellite clocks"); if (found) for (auto once : {1}) { @@ -2214,7 +2513,7 @@ bool ACSConfig::parse( } vector codePriorityStrings; - found = trySetFromYaml(codePriorityStrings, sys_options, {"code_priorities" }); + found = trySetFromYaml(codePriorityStrings, sys_options, {"! code_priorities" }); if (found) for (auto once : {1}) { @@ -2235,7 +2534,7 @@ bool ACSConfig::parse( } vector zeroAverageCodes; - found = trySetFromYaml(zeroAverageCodes, sys_options, {"zero_code_average" }); + found = trySetFromYaml(zeroAverageCodes, sys_options, {"@ zero_code_average" }); if (found) for (auto once : {1}) { @@ -2256,7 +2555,7 @@ bool ACSConfig::parse( } vector zeroAveragePhase; - found = trySetFromYaml(zeroAveragePhase, sys_options, {"zero_phas_average" }); + found = trySetFromYaml(zeroAveragePhase, sys_options, {"@ zero_phas_average" }); if (found) for (auto once : {1}) { @@ -2278,113 +2577,112 @@ bool ACSConfig::parse( } { - auto epoch_control = stringsToYamlObject(processing_options, {"0 epoch_control"}); + auto epoch_control = stringsToYamlObject(processing_options, {"0! epoch_control"}); int i = 0; string startStr; string stopStr; - trySetFromAny(epoch_interval, commandOpts, epoch_control, {std::to_string(i++) + "epoch_interval" }, "(float) Desired time step between each processing epoch"); - trySetFromAny(epoch_tolerance, commandOpts, epoch_control, {std::to_string(i++) + "epoch_tolerance" }, "(float) Tolerance of times to add to an epoch (usually half of the original data's sample rate)"); - trySetFromAny(max_epochs, commandOpts, epoch_control, {std::to_string(i++) + "max_epochs" }, "(int) Maximum number of epochs to process"); - trySetFromAny(startStr, commandOpts, epoch_control, {std::to_string(i++) + "start_epoch" }, "(date) The time of the first epoch to process (all observations before this will be skipped)"); - trySetFromAny(stopStr, commandOpts, epoch_control, {std::to_string(i++) + "end_epoch" }, "(date) The time of the last epoch to process (all observations after this will be skipped)"); + trySetFromAny(epoch_interval, commandOpts, epoch_control, {std::to_string(i++) + "! epoch_interval" }, "(float) Desired time step between each processing epoch"); + trySetFromAny(epoch_tolerance, commandOpts, epoch_control, {std::to_string(i++) + "@ epoch_tolerance" }, "(float) Tolerance of times to add to an epoch (usually half of the original data's sample rate)"); + trySetFromAny(max_epochs, commandOpts, epoch_control, {std::to_string(i++) + "! max_epochs" }, "(int) Maximum number of epochs to process"); + trySetFromAny(startStr, commandOpts, epoch_control, {std::to_string(i++) + "! start_epoch" }, "(date) The time of the first epoch to process (all observations before this will be skipped)"); + trySetFromAny(stopStr, commandOpts, epoch_control, {std::to_string(i++) + "! end_epoch" }, "(date) The time of the last epoch to process (all observations after this will be skipped)"); if (!startStr.empty()) start_epoch = boost::posix_time::time_from_string(startStr); if (!stopStr .empty()) end_epoch = boost::posix_time::time_from_string(stopStr); - trySetFromAny(fatal_level, commandOpts, epoch_control, {std::to_string(i++) + "fatal_message_level" }, "(int) Threshold level for exiting the program early (0-2)"); + trySetFromAny(fatal_level, commandOpts, epoch_control, {std::to_string(i++) + "@ fatal_message_level" }, "(int) Threshold level for exiting the program early (0-2)"); wait_next_epoch = epoch_interval + 0.01; - trySetFromYaml(wait_next_epoch, epoch_control, {std::to_string(i++) + "wait_next_epoch" }, "(float) Time to wait for next epochs data before skipping the epoch (will default to epoch_interval as an appropriate minimum value for realtime)"); - trySetFromYaml(wait_all_stations, epoch_control, {std::to_string(i++) + "wait_all_stations" }, "(float) Time to wait from the reception of the first data of an epoch before skipping stations with data still unreceived"); - trySetFromYaml(require_obs, epoch_control, {std::to_string(i++) + "require_obs" }, "(bool) Exit the program if no observation sources are available"); - trySetFromYaml(assign_closest_epoch, epoch_control, {std::to_string(i++) + "assign_closest_epoch"}, "(bool) Assign observations to the closest epoch - don't skip observations that fall between epochs"); - trySetFromAny(simulate_real_time, commandOpts, epoch_control, {std::to_string(i++) + "simulate_real_time" }, "(bool) For RTCM playback - delay processing to match original data rate"); + trySetFromYaml(wait_next_epoch, epoch_control, {std::to_string(i++) + "@ wait_next_epoch" }, "(float) Time to wait for next epochs data before skipping the epoch (will default to epoch_interval as an appropriate minimum value for realtime)"); + trySetFromYaml(wait_all_stations, epoch_control, {std::to_string(i++) + "@ wait_all_stations" }, "(float) Time to wait from the reception of the first data of an epoch before skipping stations with data still unreceived"); + trySetFromYaml(require_obs, epoch_control, {std::to_string(i++) + "@ require_obs" }, "(bool) Exit the program if no observation sources are available"); + trySetFromYaml(assign_closest_epoch, epoch_control, {std::to_string(i++) + "@ assign_closest_epoch" }, "(bool) Assign observations to the closest epoch - don't skip observations that fall between epochs"); + trySetFromAny(simulate_real_time, commandOpts, epoch_control, {std::to_string(i++) + "@ simulate_real_time" }, "(bool) For RTCM playback - delay processing to match original data rate"); } { - auto gnss_modelling = stringsToYamlObject(processing_options, {"2 gnss_models"}); + auto gnss_modelling = stringsToYamlObject(processing_options, {"2! gnss_models"}); - trySetFromYaml(model.rec_pos.enable, gnss_modelling, {"rec_pos", "enable" }, "(bool) "); - trySetFromYaml(model.sat_pos.enable, gnss_modelling, {"sat_pos", "enable" }, "(bool) "); - trySetEnumVec( model.sat_pos.ephemeris_sources, gnss_modelling, {"sat_pos", "sources" }); + trySetFromYaml(model.rec_pos.enable, gnss_modelling, {"@ rec_pos", "enable" }, "(bool) "); + trySetFromYaml(model.sat_pos.enable, gnss_modelling, {"@ sat_pos", "enable" }, "(bool) "); + trySetEnumVec( model.sat_pos.ephemeris_sources, gnss_modelling, {"! sat_pos", "sources" }); - trySetFromYaml(model.range, gnss_modelling, {"range", "enable" }, "(bool) "); + trySetFromYaml(model.range, gnss_modelling, {"@ range", "enable" }, "(bool) "); - trySetFromYaml(model.sat_clock.enable, gnss_modelling, {"sat_clock", "enable" }, "(bool) "); - trySetEnumVec( model.sat_clock.ephemeris_sources, gnss_modelling, {"sat_clock", "sources" }); + trySetFromYaml(model.sat_clock.enable, gnss_modelling, {"! sat_clock", "enable" }, "(bool) "); + trySetEnumVec( model.sat_clock.ephemeris_sources, gnss_modelling, {"! sat_clock", "! sources" }); - trySetFromYaml(model.rec_clock.enable, gnss_modelling, {"rec_clock", "enable" }, "(bool) "); - trySetFromYaml(model.sat_code_bias, gnss_modelling, {"sat_code_bias", "enable" }, "(bool) "); - trySetFromYaml(model.rec_code_bias, gnss_modelling, {"rec_code_bias", "enable" }, "(bool) "); - trySetFromYaml(model.sat_phase_bias, gnss_modelling, {"sat_phase_bias", "enable" }, "(bool) "); - trySetFromYaml(model.rec_phase_bias, gnss_modelling, {"rec_phase_bias", "enable" }, "(bool) "); + trySetFromYaml(model.rec_clock.enable, gnss_modelling, {"@ rec_clock", "enable" }, "(bool) "); + trySetFromYaml(model.sat_code_bias, gnss_modelling, {"@ sat_code_bias", "enable" }, "(bool) "); + trySetFromYaml(model.rec_code_bias, gnss_modelling, {"@ rec_code_bias", "enable" }, "(bool) "); + trySetFromYaml(model.sat_phase_bias, gnss_modelling, {"@ sat_phase_bias", "enable" }, "(bool) "); + trySetFromYaml(model.rec_phase_bias, gnss_modelling, {"@ rec_phase_bias", "enable" }, "(bool) "); - trySetFromYaml(model.rec_ant_delta, gnss_modelling, {"rec_ant_delta", "enable" }, "(bool) "); - trySetFromYaml(model.sat_pco, gnss_modelling, {"sat_pco", "enable" }, "(bool) "); - trySetFromYaml(model.rec_pco, gnss_modelling, {"rec_pco", "enable" }, "(bool) "); - trySetFromYaml(model.sat_pcv, gnss_modelling, {"sat_pcv", "enable" }, "(bool) "); - trySetFromYaml(model.rec_pcv, gnss_modelling, {"rec_pcv", "enable" }, "(bool) "); + trySetFromYaml(model.rec_ant_delta, gnss_modelling, {"@ rec_ant_delta", "enable" }, "(bool) "); + trySetFromYaml(model.sat_pco, gnss_modelling, {"@ sat_pco", "enable" }, "(bool) "); + trySetFromYaml(model.rec_pco, gnss_modelling, {"@ rec_pco", "enable" }, "(bool) "); + trySetFromYaml(model.sat_pcv, gnss_modelling, {"@ sat_pcv", "enable" }, "(bool) "); + trySetFromYaml(model.rec_pcv, gnss_modelling, {"@ rec_pcv", "enable" }, "(bool) "); - trySetFromYaml(model.tides.enable, gnss_modelling, {"tides", "enable" }, "(bool) "); - trySetFromYaml(model.tides.solid, gnss_modelling, {"tides", "solid" }, "(bool) "); - trySetFromYaml(model.tides.otl, gnss_modelling, {"tides", "otl" }, "(bool) "); - trySetFromYaml(model.tides.pole, gnss_modelling, {"tides", "pole" }, "(bool) "); + trySetFromYaml(model.tides.enable, gnss_modelling, {"@ tides", "@ enable" }, "(bool) "); + trySetFromYaml(model.tides.solid, gnss_modelling, {"@ tides", "@ solid" }, "(bool) "); + trySetFromYaml(model.tides.otl, gnss_modelling, {"@ tides", "@ otl" }, "(bool) "); + trySetFromYaml(model.tides.pole, gnss_modelling, {"@ tides", "@ pole" }, "(bool) "); - trySetFromYaml(model.relativity, gnss_modelling, {"relativity", "enable" }, "(bool) "); - trySetFromYaml(model.relativity2, gnss_modelling, {"relativity2", "enable" }, "(bool) "); - trySetFromYaml(model.sagnac, gnss_modelling, {"sagnac", "enable" }, "(bool) "); + trySetFromYaml(model.relativity, gnss_modelling, {"@ relativity", "@ enable" }, "(bool) "); + trySetFromYaml(model.relativity2, gnss_modelling, {"@ relativity2", "@ enable" }, "(bool) "); + trySetFromYaml(model.sagnac, gnss_modelling, {"@ sagnac", "@ enable" }, "(bool) "); - trySetFromYaml(model.sat_attitude.enable, gnss_modelling, {"sat_attitude", "enable" }, "(bool) Enables non-nominal attitude types"); - trySetEnumVec( model.sat_attitude.sources, gnss_modelling, {"sat_attitude", "sources" }, "[E_Source] Attitude type "); - trySetFromYaml(model.sat_attitude.valid_var, gnss_modelling, {"sat_attitude", "valid_var" }, "(double) Observation variance added when attitude is valid"); - trySetFromYaml(model.sat_attitude.invalid_var, gnss_modelling, {"sat_attitude", "invalid_var"},"(double) Observation variance added when attitude is invalid"); + trySetFromYaml(model.sat_attitude.enable, gnss_modelling, {"@ sat_attitude", "@ enable" }, "(bool) Enables non-nominal attitude types"); + trySetEnumVec( model.sat_attitude.sources, gnss_modelling, {"@ sat_attitude", "@ sources" }, "[E_Source] Attitude type "); + trySetFromYaml(model.sat_attitude.valid_var, gnss_modelling, {"@ sat_attitude", "@ valid_var" }, "(double) Observation variance added when attitude is valid"); + trySetFromYaml(model.sat_attitude.invalid_var, gnss_modelling, {"@ sat_attitude", "@ invalid_var" }, "(double) Observation variance added when attitude is invalid"); - trySetFromYaml(model.rec_attitude.enable, gnss_modelling, {"rec_attitude", "enable" }, "(bool) Enables non-nominal attitude types"); - trySetEnumVec( model.rec_attitude.sources, gnss_modelling, {"rec_attitude", "sources" }, "[E_Source] Attitude type"); - trySetFromYaml(model.rec_attitude.valid_var, gnss_modelling, {"rec_attitude", "valid_var" }, "(double) Observation variance added when attitude is valid"); - trySetFromYaml(model.rec_attitude.invalid_var, gnss_modelling, {"rec_attitude", "invalid_var"},"(double) Observation variance added when attitude is invalid"); + trySetFromYaml(model.rec_attitude.enable, gnss_modelling, {"@ rec_attitude", "@ enable" }, "(bool) Enables non-nominal attitude types"); + trySetEnumVec( model.rec_attitude.sources, gnss_modelling, {"@ rec_attitude", "@ sources" }, "[E_Source] Attitude type"); + trySetFromYaml(model.rec_attitude.valid_var, gnss_modelling, {"@ rec_attitude", "@ valid_var" }, "(double) Observation variance added when attitude is valid"); + trySetFromYaml(model.rec_attitude.invalid_var, gnss_modelling, {"@ rec_attitude", "@ invalid_var" }, "(double) Observation variance added when attitude is invalid"); { - auto ionospheric_component = stringsToYamlObject(gnss_modelling, {"ionospheric_component"}); - - trySetFromYaml(model.ionospheric_component, ionospheric_component, {"0 enable" }, "(bool) "); - - trySetEnumOpt( ionoOpts.corr_mode, ionospheric_component, {"corr_mode" }, E_IonoMode::_from_string_nocase); - trySetEnumOpt( ionoOpts.iflc_freqs, ionospheric_component, {"iflc_freqs" }, E_LinearCombo::_from_string_nocase); - trySetEnumOpt( ionoOpts.mapping_function, ionospheric_component, {"mapping_function" }, E_IonoMapFn::_from_string_nocase, "(E_IonoMapFn) mapping function if not specified in the data or model"); - trySetFromYaml(ionoOpts.pierce_point_layer_height, ionospheric_component, {"pierce_point_layer_height" }, "(double) ionospheric pierce point layer height if not specified in the data or model (km)"); - trySetFromYaml(ionoOpts.mapping_function_layer_height, ionospheric_component, {"mapping_function_layer_height" }, "(double) mapping function layer height if not specified in the data or model (km)"); - trySetFromYaml(ionoOpts.common_ionosphere, ionospheric_component, {"common_ionosphere" }, "(bool) "); - trySetFromYaml(ionoOpts.use_if_combo, ionospheric_component, {"use_if_combo" }, "(bool) "); - trySetFromYaml(ionoOpts.auto_select_default_code, ionospheric_component, {"automatic_def_codes" }, "(bool) Automatically detect/select default GNSS codes to estimate the Ionosphere"); + auto ionospheric_component = stringsToYamlObject(gnss_modelling, {"! ionospheric_component"}); + + trySetFromYaml(model.ionospheric_component, ionospheric_component, {"0@ enable" }, "(bool) "); + + trySetEnumOpt( ionoOpts.corr_mode, ionospheric_component, {"@ corr_mode" }, E_IonoMode::_from_string_nocase); + trySetEnumOpt( ionoOpts.mapping_function, ionospheric_component, {"@ mapping_function" }, E_IonoMapFn::_from_string_nocase, "(E_IonoMapFn) mapping function if not specified in the data or model"); + trySetFromYaml(ionoOpts.pierce_point_layer_height, ionospheric_component, {"@ pierce_point_layer_height" }, "(double) ionospheric pierce point layer height if not specified in the data or model (km)"); + trySetFromYaml(ionoOpts.mapping_function_layer_height, ionospheric_component, {"@ mapping_function_layer_height" }, "(double) mapping function layer height if not specified in the data or model (km)"); + trySetFromYaml(ionoOpts.common_ionosphere, ionospheric_component, {"! common_ionosphere" }, "(bool) "); + trySetFromYaml(ionoOpts.use_if_combo, ionospheric_component, {"! use_if_combo" }, "(bool) "); + trySetFromYaml(ionoOpts.auto_select_default_code, ionospheric_component, {"@ automatic_def_codes" }, "(bool) Automatically detect/select default GNSS codes to estimate the Ionosphere"); } { - auto ionospheric_component2 = stringsToYamlObject(gnss_modelling, {"ionospheric_component2"}); + auto ionospheric_component2 = stringsToYamlObject(gnss_modelling, {"@ ionospheric_component2"}); - trySetFromYaml(model.ionospheric_component2, ionospheric_component2, {"0 enable" }, "(bool) "); + trySetFromYaml(model.ionospheric_component2, ionospheric_component2, {"0@ enable" }, "(bool) "); } { - auto ionospheric_component3 = stringsToYamlObject(gnss_modelling, {"ionospheric_component3"}); + auto ionospheric_component3 = stringsToYamlObject(gnss_modelling, {"@ ionospheric_component3"}); - trySetFromYaml(model.ionospheric_component3, ionospheric_component3, {"0 enable" }, "(bool) "); + trySetFromYaml(model.ionospheric_component3, ionospheric_component3, {"0@ enable" }, "(bool) "); } { - auto ionospheric_model = stringsToYamlObject(gnss_modelling, {"ionospheric_model"}); + auto ionospheric_model = stringsToYamlObject(gnss_modelling, {"@ ionospheric_model"}); - trySetFromYaml(process_ionosphere, ionospheric_model, {"0 enable" }, "(bool) Compute ionosphere maps from a network of stations"); - trySetEnumOpt( ionModelOpts.model, ionospheric_model, {"model" }, E_IonoModel::_from_string_nocase); - trySetFromYaml(ionModelOpts.function_order, ionospheric_model, {"function_order" }, "Maximum order of Spherical harmonics for Ionospheric mapping"); - trySetFromYaml(ionModelOpts.function_degree, ionospheric_model, {"function_degree" }, "Maximum degree of Spherical harmonics for Ionospheric mapping"); - trySetFromYaml(ionModelOpts.estimate_sat_dcb, ionospheric_model, {"estimate_sat_dcb" }, "(bool) Estimate satellite dcb alongside Ionosphere models, should be false for local STEC"); - trySetFromYaml(ionModelOpts.use_rotation_mtx, ionospheric_model, {"use_rotation_mtx" }, "(bool) Use 3D rotation matrix for spherical harmonics"); + trySetFromYaml(process_ionosphere, ionospheric_model, {"0@ enable" }, "(bool) Compute ionosphere maps from a network of stations"); + trySetEnumOpt( ionModelOpts.model, ionospheric_model, {"@ model" }, E_IonoModel::_from_string_nocase); + trySetFromYaml(ionModelOpts.function_order, ionospheric_model, {"@ function_order" }, "Maximum order of Spherical harmonics for Ionospheric mapping"); + trySetFromYaml(ionModelOpts.function_degree, ionospheric_model, {"@ function_degree" }, "Maximum degree of Spherical harmonics for Ionospheric mapping"); + trySetFromYaml(ionModelOpts.estimate_sat_dcb, ionospheric_model, {"@ estimate_sat_dcb" }, "(bool) Estimate satellite dcb alongside Ionosphere models, should be false for local STEC"); + trySetFromYaml(ionModelOpts.use_rotation_mtx, ionospheric_model, {"@ use_rotation_mtx" }, "(bool) Use 3D rotation matrix for spherical harmonics"); - bool found = trySetFromYaml(ionModelOpts.layer_heights, ionospheric_model, {"layer_heights" }); + bool found = trySetFromYaml(ionModelOpts.layer_heights, ionospheric_model, {"@ layer_heights" }); if (found) for (auto& a : ionModelOpts.layer_heights) { @@ -2392,73 +2690,73 @@ bool ACSConfig::parse( } } - auto troposhpere = stringsToYamlObject(gnss_modelling, {"troposphere"}); + auto troposhpere = stringsToYamlObject(gnss_modelling, {"@ troposphere"}); { - trySetFromYaml(model.trop.enable, troposhpere, {"0 enable" }); - trySetEnumOpt( model.trop.model, troposhpere, {"model" }, E_TropModel::_from_string_nocase); + trySetFromYaml(model.trop.enable, troposhpere, {"0@ enable" }); + trySetEnumOpt( model.trop.model, troposhpere, {"@ model" }, E_TropModel::_from_string_nocase); } - auto orbits = stringsToYamlObject(gnss_modelling, {"orbits"}); + auto orbits = stringsToYamlObject(gnss_modelling, {"@ orbits"}); { - trySetFromYaml(model.orbits, orbits, {"0 enable" }); + trySetFromYaml(model.orbits, orbits, {"0@ enable" }); } - trySetFromYaml(model.phase_windup, gnss_modelling, {"phase_windup", "enable" }, "(bool) "); - trySetFromYaml(model.heading, gnss_modelling, {"heading", "enable" }, "(bool) "); - trySetFromYaml(model.integer_ambiguity, gnss_modelling, {"integer_ambiguity", "enable" }, "(bool) "); - trySetFromYaml(model.clock_definitions, gnss_modelling, {"clock_definitions", "enable" }, "(bool) "); + trySetFromYaml(model.phase_windup, gnss_modelling, {"@ phase_windup", "enable" }, "(bool) "); + trySetFromYaml(model.heading, gnss_modelling, {"@ heading", "enable" }, "(bool) "); + trySetFromYaml(model.integer_ambiguity, gnss_modelling, {"@ integer_ambiguity", "enable" }, "(bool) "); + trySetFromYaml(model.clock_definitions, gnss_modelling, {"@ clock_definitions", "enable" }, "(bool) "); } { - auto model_error_checking = stringsToYamlObject(processing_options, {"3 model_error_checking"}); + auto model_error_checking = stringsToYamlObject(processing_options, {"3! model_error_checking"}); { - auto deweighting = stringsToYamlObject(model_error_checking, {"deweighting"}); + auto deweighting = stringsToYamlObject(model_error_checking, {"! deweighting"}); - trySetFromYaml(deweight_on_state_error, deweighting, {"deweight_on_state_error" }, "(bool) Any \"state\" errors cause deweighting of all measurements that reference the state"); + trySetFromYaml(deweight_on_state_error, deweighting, {"@ deweight_on_state_error" }, "(bool) Any \"state\" errors cause deweighting of all measurements that reference the state"); - trySetFromYaml(deweight_factor, deweighting, {"deweight_factor" }, "(float) Factor to downweight the variance of measurements with statistically detected errors"); - trySetFromYaml(deweight_on_state_error, deweighting, {"deweight_on_state_error" }, "(bool) Any \"state\" errors cause deweighting of all measurements that reference the state"); + trySetFromYaml(deweight_factor, deweighting, {"! deweight_factor" }, "(float) Factor to downweight the variance of measurements with statistically detected errors"); + trySetFromYaml(deweight_on_state_error, deweighting, {"@ deweight_on_state_error" }, "(bool) Any \"state\" errors cause deweighting of all measurements that reference the state"); } { - auto orbit_errors = stringsToYamlObject(model_error_checking, {"orbit_errors"}); + auto orbit_errors = stringsToYamlObject(model_error_checking, {"@ orbit_errors"}); - trySetFromYaml(orbit_pos_proc_noise, orbit_errors, {"orbit_pos_proc_noise" }); - trySetFromYaml(orbit_vel_proc_noise, orbit_errors, {"orbit_vel_proc_noise" }); - trySetFromYaml(orbit_vel_proc_noise_trail, orbit_errors, {"orbit_vel_proc_noise_trail" }); - trySetFromYaml(orbit_vel_proc_noise_trail_tau, orbit_errors, {"orbit_vel_proc_noise_trail_tau" }); + trySetFromYaml(orbit_pos_proc_noise, orbit_errors, {"@ orbit_pos_proc_noise" }); + trySetFromYaml(orbit_vel_proc_noise, orbit_errors, {"@ orbit_vel_proc_noise" }); + trySetFromYaml(orbit_vel_proc_noise_trail, orbit_errors, {"@ orbit_vel_proc_noise_trail" }); + trySetFromYaml(orbit_vel_proc_noise_trail_tau, orbit_errors, {"@ orbit_vel_proc_noise_trail_tau" }); } { - auto ambiguities = stringsToYamlObject(model_error_checking, {"ambiguities"}); + auto ambiguities = stringsToYamlObject(model_error_checking, {"! ambiguities"}); - trySetFromYaml(reinit_on_all_slips, ambiguities, {"reinit_on_all_slips" }, "(bool) Any detected slips cause removal and reinitialisation of ambiguities"); - trySetFromYaml(pppOpts.outage_reset_limit, ambiguities, {"outage_reset_limit" }, "(int) Maximum number of epochs with missed phase measurements before the ambiguity associated with the measurement is reset."); - trySetFromYaml(pppOpts.phase_reject_limit, ambiguities, {"phase_reject_limit" }, "(int) Maximum number of phase measurements to reject before the ambiguity associated with the measurement is reset."); + trySetFromYaml(reinit_on_all_slips, ambiguities, {"! reinit_on_all_slips" }, "(bool) Any detected slips cause removal and reinitialisation of ambiguities"); + trySetFromYaml(pppOpts.outage_reset_limit, ambiguities, {"! outage_reset_limit" }, "(int) Maximum number of epochs with missed phase measurements before the ambiguity associated with the measurement is reset."); + trySetFromYaml(pppOpts.phase_reject_limit, ambiguities, {"! phase_reject_limit" }, "(int) Maximum number of phase measurements to reject before the ambiguity associated with the measurement is reset."); } { - auto clocks = stringsToYamlObject(model_error_checking, {"clocks"}); + auto clocks = stringsToYamlObject(model_error_checking, {"@ clocks"}); - trySetFromYaml(reinit_on_clock_error, clocks, {"reinit_on_clock_error" }, "(bool) Any clock \"state\" errors cause removal and reinitialisation of the clocks and all associated ambiguities"); + trySetFromYaml(reinit_on_clock_error, clocks, {"@ reinit_on_clock_error" }, "(bool) Any clock \"state\" errors cause removal and reinitialisation of the clocks and all associated ambiguities"); } { - auto cycle_slips = stringsToYamlObject(model_error_checking, {"cycle_slips"}); + auto cycle_slips = stringsToYamlObject(model_error_checking, {"@ cycle_slips"}); - trySetFromYaml(thres_slip, cycle_slips, {"slip_threshold" }); - trySetFromYaml(mw_proc_noise, cycle_slips, {"mw_proc_noise" }); + trySetFromYaml(thres_slip, cycle_slips, {"@ slip_threshold" }); + trySetFromYaml(mw_proc_noise, cycle_slips, {"@ mw_proc_noise" }); - trySetFromYaml(excludeSlip.LLI, cycle_slips, {"exclude_on", "lli" }, "(bool) Exclude measurements that fail LLI slip test in preprocessor"); - trySetFromYaml(excludeSlip.GF, cycle_slips, {"exclude_on", "gf" }, "(bool) Exclude measurements that fail GF slip test in preprocessor"); - trySetFromYaml(excludeSlip.MW, cycle_slips, {"exclude_on", "mw" }, "(bool) Exclude measurements that fail MW slip test in preprocessor"); - trySetFromYaml(excludeSlip.SCDIA, cycle_slips, {"exclude_on", "scdia" }, "(bool) Exclude measurements that fail SCDIA test in preprocessor"); + trySetFromYaml(excludeSlip.LLI, cycle_slips, {"@ exclude_on", "@ lli" }, "(bool) Exclude measurements that fail LLI slip test in preprocessor"); + trySetFromYaml(excludeSlip.GF, cycle_slips, {"@ exclude_on", "@ gf" }, "(bool) Exclude measurements that fail GF slip test in preprocessor"); + trySetFromYaml(excludeSlip.MW, cycle_slips, {"@ exclude_on", "@ mw" }, "(bool) Exclude measurements that fail MW slip test in preprocessor"); + trySetFromYaml(excludeSlip.SCDIA, cycle_slips, {"@ exclude_on", "@ scdia" }, "(bool) Exclude measurements that fail SCDIA test in preprocessor"); - trySetFromYaml(resetOnSlip.LLI, cycle_slips, {"reset_on", "lli" }, "(bool) Reset ambiguities if LLI test is detecting a slip"); - trySetFromYaml(resetOnSlip.GF, cycle_slips, {"reset_on", "gf" }, "(bool) Reset ambiguities if GF test is detecting a slip"); - trySetFromYaml(resetOnSlip.MW, cycle_slips, {"reset_on", "mw" }, "(bool) Reset ambiguities if MW test is detecting a slip"); - trySetFromYaml(resetOnSlip.SCDIA, cycle_slips, {"reset_on", "scdia" }, "(bool) Reset ambiguities if SCDIA test is detecting a slip"); + trySetFromYaml(resetOnSlip.LLI, cycle_slips, {"@ reset_on", "@ lli" }, "(bool) Reset ambiguities if LLI test is detecting a slip"); + trySetFromYaml(resetOnSlip.GF, cycle_slips, {"@ reset_on", "@ gf" }, "(bool) Reset ambiguities if GF test is detecting a slip"); + trySetFromYaml(resetOnSlip.MW, cycle_slips, {"@ reset_on", "@ mw" }, "(bool) Reset ambiguities if MW test is detecting a slip"); + trySetFromYaml(resetOnSlip.SCDIA, cycle_slips, {"@ reset_on", "@ scdia" }, "(bool) Reset ambiguities if SCDIA test is detecting a slip"); } } @@ -2466,93 +2764,91 @@ bool ACSConfig::parse( { auto process_modes = stringsToYamlObject(processing_options, {"1 process_modes"}); - trySetFromYaml(process_user, process_modes, {"user" }, "(bool) Compute position/clock/atmosphere at autonomous receiver location using UD/IF PPP"); - trySetFromYaml(process_network, process_modes, {"network" }, "(bool) Compute GNSS corrections using UD/IF PPP on a CORS network"); - trySetFromYaml(process_ionosphere, process_modes, {"ionosphere" }, "(bool) Compute Ionosphere models based on GNSS measurements"); - trySetFromYaml(process_preprocessor, process_modes, {"preprocessor" }, "(bool) Preprocessing and quality checks"); - trySetFromYaml(process_spp, process_modes, {"spp" }, "(bool) Perform SPP on station data"); - trySetFromYaml(process_ppp, process_modes, {"ppp" }, "(bool) Perform PPP network or end user mode"); + trySetFromYaml(process_user, process_modes, {"@ user" }, "(bool) Compute position/clock/atmosphere at autonomous receiver location using UD/IF PPP"); + trySetFromYaml(process_network, process_modes, {"@ network" }, "(bool) Compute GNSS corrections using UD/IF PPP on a CORS network"); + trySetFromYaml(process_ionosphere, process_modes, {"@ ionosphere" }, "(bool) Compute Ionosphere models based on GNSS measurements"); + trySetFromYaml(process_preprocessor, process_modes, {"! preprocessor" }, "(bool) Preprocessing and quality checks"); + trySetFromYaml(process_spp, process_modes, {"@ spp" }, "(bool) Perform SPP on station data"); + trySetFromYaml(process_ppp, process_modes, {"! ppp" }, "(bool) Perform PPP network or end user mode"); } { - auto minimum_constraints = stringsToYamlObject(processing_options, {"minimum_constraints"}); - - trySetFromYaml(process_minimum_constraints, minimum_constraints, {"enable" }, "(bool) Transform states by minimal constraints to selected station coordinates"); - - trySetKalmanFromYaml(minCOpts.scale, minimum_constraints, "scale"); - trySetKalmanFromYaml(minCOpts.rotation, minimum_constraints, "rotation"); - trySetKalmanFromYaml(minCOpts.translation, minimum_constraints, "translation"); - - trySetFromYaml(minCOpts.once_per_epoch, minimum_constraints, {"once_per_epoch" }, "(bool) Perform minimum constraints on a temporary filter and output results once per epoch"); - trySetFromYaml(minCOpts.full_vcv, minimum_constraints, {"full_vcv" }, "(bool) ! experimental ! Use full VCV for measurement noise in minimum constraints filter"); - trySetFromYaml(minCOpts.scale_by_vcv, minimum_constraints, {"scale_by_vcv" }, "(bool) Use variance of positions as additional scaling factor in minimum constraints weighting"); - - trySetEnumOpt( minCOpts.inverter, minimum_constraints, {"inverter" }, E_Inverter::_from_string_nocase); - trySetFromYaml(minCOpts.max_filter_iter, minimum_constraints, {"max_filter_iterations" }); - trySetFromYaml(minCOpts.max_prefit_remv, minimum_constraints, {"max_prefit_removals" }, "(int) Maximum number of measurements to exclude using prefit checks before attempting to filter"); - trySetFromYaml(minCOpts.sigma_check, minimum_constraints, {"outlier_screening", "sigma_check" }, "(bool) Enable prefit and postfit sigma check"); - trySetFromYaml(minCOpts.w_test, minimum_constraints, {"outlier_screening", "w_test" }, "(bool) Enable w-test"); - trySetFromYaml(minCOpts.chi_square_test, minimum_constraints, {"outlier_screening", "chi_square_test" }, "(bool) Enable Chi-square test"); - trySetEnumOpt( minCOpts.chi_square_mode, minimum_constraints, {"outlier_screening", "chi_square_mode" }, E_ChiSqMode::_from_string_nocase, "(enum) Chi-square test mode - innovation, measurement, state"); - trySetFromYaml(minCOpts.sigma_threshold, minimum_constraints, {"outlier_screening", "sigma_threshold" }, "(float) sigma threshold"); + auto minimum_constraints = stringsToYamlObject(processing_options, {"! minimum_constraints"}); + + trySetFromYaml(process_minimum_constraints, minimum_constraints, {"! enable" }, "(bool) Transform states by minimal constraints to selected station coordinates"); + + trySetKalmanFromYaml(minCOpts.scale, minimum_constraints, "! scale"); + trySetKalmanFromYaml(minCOpts.rotation, minimum_constraints, "! rotation"); + trySetKalmanFromYaml(minCOpts.translation, minimum_constraints, "! translation"); + + trySetFromYaml(minCOpts.once_per_epoch, minimum_constraints, {"@ once_per_epoch" }, "(bool) Perform minimum constraints on a temporary filter and output results once per epoch"); + trySetFromYaml(minCOpts.full_vcv, minimum_constraints, {"@ full_vcv" }, "(bool) ! experimental ! Use full VCV for measurement noise in minimum constraints filter"); + trySetFromYaml(minCOpts.scale_by_vcv, minimum_constraints, {"@ scale_by_vcv" }, "(bool) Use variance of positions as additional scaling factor in minimum constraints weighting"); + + trySetEnumOpt( minCOpts.inverter, minimum_constraints, {"@ inverter" }, E_Inverter::_from_string_nocase); + trySetFromYaml(minCOpts.max_filter_iter, minimum_constraints, {"@ max_filter_iterations" }); + trySetFromYaml(minCOpts.max_prefit_remv, minimum_constraints, {"@ max_prefit_removals" }, "(int) Maximum number of measurements to exclude using prefit checks before attempting to filter"); + trySetFromYaml(minCOpts.sigma_check, minimum_constraints, {"@ outlier_screening", "@ sigma_check" }, "(bool) Enable prefit and postfit sigma check"); + trySetFromYaml(minCOpts.w_test, minimum_constraints, {"@ outlier_screening", "@ w_test" }, "(bool) Enable w-test"); + trySetFromYaml(minCOpts.chi_square_test, minimum_constraints, {"@ outlier_screening", "@ chi_square_test" }, "(bool) Enable Chi-square test"); + trySetEnumOpt( minCOpts.chi_square_mode, minimum_constraints, {"@ outlier_screening", "@ chi_square_mode" }, E_ChiSqMode::_from_string_nocase, "(enum) Chi-square test mode - innovation, measurement, state"); + trySetFromYaml(minCOpts.sigma_threshold, minimum_constraints, {"@ outlier_screening", "@ sigma_threshold" }, "(float) sigma threshold"); } - auto filter_options = stringsToYamlObject(processing_options, {"filter_options"}); + auto filter_options = stringsToYamlObject(processing_options, {"! filter_options"}); { trySetFromYaml(joseph_stabilisation, filter_options, {"joseph_stabilisation" }); trySetEnumOpt( pppOpts.inverter, filter_options, {"inverter" }, E_Inverter::_from_string_nocase, "Inverter to be used within the Kalman filter update stage, which may provide different performance outcomes in terms of processing time and accuracy and stability."); - trySetFromYaml(process_rts, filter_options, {"rts", "0 enable" }, "(bool) Perform backward smoothing of states to improve precision of earlier states"); - trySetFromYaml(pppOpts.rts_lag, filter_options, {"rts", "1 lag" }, "(int) Number of epochs to use in RTS smoothing. Negative numbers indicate full reverse smoothing."); - trySetFromYaml(pppOpts.rts_directory, filter_options, {"rts", "directory" }, "(string) Directory for rts intermediate files"); - trySetFromYaml(pppOpts.rts_filename, filter_options, {"rts", "filename" }, "(string) Base filename for rts intermediate files"); - trySetFromYaml(pppOpts.rts_smoothed_suffix, filter_options, {"rts", "suffix" }, "(string) Suffix to be applied to smoothed versions of files"); - trySetEnumOpt( pppOpts.rts_inverter, filter_options, {"rts", "inverter" }, E_Inverter::_from_string_nocase, "Inverter to be used within the rts processor, which may provide different performance outcomes in terms of processing time and accuracy and stability."); - trySetFromYaml(pppOpts.output_intermediate_rts, filter_options, {"rts", "output_intermediates" }, "(bool) Output best available smoothed states when performing fixed-lag rts (slow, use only when needed)"); + trySetFromYaml(process_rts, filter_options, {"! rts", "0! enable" }, "(bool) Perform backward smoothing of states to improve precision of earlier states"); + trySetFromYaml(pppOpts.rts_lag, filter_options, {"! rts", "1 lag" }, "(int) Number of epochs to use in RTS smoothing. Negative numbers indicate full reverse smoothing."); + trySetFromYaml(pppOpts.rts_directory, filter_options, {"! rts", "directory" }, "(string) Directory for rts intermediate files"); + trySetFromYaml(pppOpts.rts_filename, filter_options, {"! rts", "filename" }, "(string) Base filename for rts intermediate files"); + trySetFromYaml(pppOpts.rts_smoothed_suffix, filter_options, {"! rts", "suffix" }, "(string) Suffix to be applied to smoothed versions of files"); + trySetEnumOpt( pppOpts.rts_inverter, filter_options, {"! rts", "inverter" }, E_Inverter::_from_string_nocase, "Inverter to be used within the rts processor, which may provide different performance outcomes in terms of processing time and accuracy and stability."); + trySetFromYaml(pppOpts.output_intermediate_rts, filter_options, {"! rts", "output_intermediates" }, "(bool) Output best available smoothed states when performing fixed-lag rts (slow, use only when needed)"); trySetFromYaml(pppOpts.simulate_filter_only, filter_options, {"simulate_filter_only" }, "(bool) Residuals will be calculated, but no adjustments to state or covariances will be applied"); - trySetFromYaml(pppOpts.simulate_pseudos_only, filter_options, {"simulate_pseudos_only" }, "(bool) Residuals will be calculated for sp3 pseudoobs, but no adjustments to state or covariances will be applied"); - trySetFromYaml(pppOpts.max_filter_iter, filter_options, {"outlier_screening", "max_filter_iterations" }); - trySetFromYaml(pppOpts.sigma_check, filter_options, {"outlier_screening", "sigma_check" }, "(bool) Enable prefit and postfit sigma check"); - trySetFromYaml(pppOpts.w_test, filter_options, {"outlier_screening", "w_test" }, "(bool) Enable w-test"); - trySetFromYaml(pppOpts.chi_square_test, filter_options, {"outlier_screening", "chi_square_test" }, "(bool) Enable Chi-square test"); - trySetEnumOpt( pppOpts.chi_square_mode, filter_options, {"outlier_screening", "chi_square_mode" }, E_ChiSqMode::_from_string_nocase, "(enum) Chi-square test mode - innovation, measurement, state"); - trySetFromYaml(pppOpts.sigma_threshold, filter_options, {"outlier_screening", "sigma_threshold" }, "(float) sigma threshold"); - trySetFromYaml(pppOpts.max_prefit_remv, filter_options, {"outlier_screening", "max_prefit_removals" }, "(int) Maximum number of measurements to exclude using prefit checks before attempting to filter"); - trySetFromYaml(pppOpts.chunk_size, filter_options, {"chunking", "size" }); - trySetFromYaml(pppOpts.station_chunking, filter_options, {"station_chunking", "enable" }, "(bool) "); - trySetFromYaml(pppOpts.satellite_chunking, filter_options, {"satellite_chunking", "enable" }, "(bool) "); + trySetFromYaml(pppOpts.max_filter_iter, filter_options, {"! outlier_screening", "! max_filter_iterations" }); + trySetFromYaml(pppOpts.sigma_check, filter_options, {"@ outlier_screening", "@ sigma_check" }, "(bool) Enable prefit and postfit sigma check"); + trySetFromYaml(pppOpts.w_test, filter_options, {"@ outlier_screening", "@ w_test" }, "(bool) Enable w-test"); + trySetFromYaml(pppOpts.chi_square_test, filter_options, {"@ outlier_screening", "@ chi_square_test" }, "(bool) Enable Chi-square test"); + trySetEnumOpt( pppOpts.chi_square_mode, filter_options, {"@ outlier_screening", "@ chi_square_mode" }, E_ChiSqMode::_from_string_nocase, "(enum) Chi-square test mode - innovation, measurement, state"); + trySetFromYaml(pppOpts.sigma_threshold, filter_options, {"@ outlier_screening", "@ sigma_threshold" }, "(float) sigma threshold"); + trySetFromYaml(pppOpts.max_prefit_remv, filter_options, {"@ outlier_screening", "@ max_prefit_removals" }, "(int) Maximum number of measurements to exclude using prefit checks before attempting to filter"); + trySetFromYaml(pppOpts.chunk_size, filter_options, {"@ chunking", "size" }); + trySetFromYaml(pppOpts.station_chunking, filter_options, {"@ station_chunking", "@ enable" }, "(bool) "); + trySetFromYaml(pppOpts.satellite_chunking, filter_options, {"@ satellite_chunking", "@ enable" }, "(bool) "); } - auto slr_options = stringsToYamlObject(processing_options, {"slr_options"}); + auto slr_options = stringsToYamlObject(processing_options, {"@ slr_options"}); { - trySetFromYaml(slrOpts.process_slr, slr_options, {"process_slr" }, "(bool) Process SLR observations (in addition to GNSS)"); + trySetFromYaml(slrOpts.process_slr, slr_options, {"@ process_slr" }, "(bool) Process SLR observations (in addition to GNSS)"); } } - auto orbit_propagation = stringsToYamlObject({ yaml, "" }, {processing_options_str, "orbit_propagation"}); + auto orbit_propagation = stringsToYamlObject({ yaml, "" }, {processing_options_str, "@ orbit_propagation"}); { - trySetFromYaml(orbitPropagation.central_force, orbit_propagation, {"central_force" }); - trySetFromYaml(orbitPropagation.planetary_perturbation, orbit_propagation, {"planetary_perturbation" }); - trySetFromYaml(orbitPropagation.indirect_J2, orbit_propagation, {"indirect_J2" }); - trySetFromYaml(orbitPropagation.egm_field, orbit_propagation, {"egm_field" }); - trySetFromYaml(orbitPropagation.solid_earth_tide, orbit_propagation, {"solid_earth_tide" }); - trySetFromYaml(orbitPropagation.ocean_tide, orbit_propagation, {"ocean_tide" }); - trySetFromYaml(orbitPropagation.general_relativity, orbit_propagation, {"general_relativity" }); - trySetFromYaml(orbitPropagation.pole_tide_ocean, orbit_propagation, {"pole_tide_ocean" }); - trySetFromYaml(orbitPropagation.pole_tide_solid, orbit_propagation, {"pole_tide_solid" }); - trySetFromYaml(orbitPropagation.solar_pressure_radiation, orbit_propagation, {"solar_pressure_radiation" }); - trySetFromYaml(orbitPropagation.empirical_dyb, orbit_propagation, {"empirical_dyb" }); - trySetFromYaml(orbitPropagation.antenna_thrust, orbit_propagation, {"antenna_thrust" }); - trySetFromYaml(orbitPropagation.albedo, orbit_propagation, {"albedo" }); - trySetFromYaml(orbitPropagation.sat_mass, orbit_propagation, {"sat_mass" }); - trySetFromYaml(orbitPropagation.sat_area, orbit_propagation, {"sat_area" }); - trySetFromYaml(orbitPropagation.srp_cr, orbit_propagation, {"srp_cr" }); - trySetFromYaml(orbitPropagation.degree_max, orbit_propagation, {"degree_max" }); - trySetFromYaml(orbitPropagation.itrf_pseudoobs, orbit_propagation, {"itrf_pseudoobs" }); - trySetFromYaml(orbitPropagation.integrator_time_step, orbit_propagation, {"integrator_time_step" }); - - + trySetFromYaml(orbitPropagation.central_force, orbit_propagation, {"@ central_force" }); + trySetFromYaml(orbitPropagation.planetary_perturbation, orbit_propagation, {"@ planetary_perturbation" }); + trySetFromYaml(orbitPropagation.indirect_J2, orbit_propagation, {"@ indirect_J2" }); + trySetFromYaml(orbitPropagation.egm_field, orbit_propagation, {"@ egm_field" }); + trySetFromYaml(orbitPropagation.solid_earth_tide, orbit_propagation, {"@ solid_earth_tide" }); + trySetFromYaml(orbitPropagation.ocean_tide, orbit_propagation, {"@ ocean_tide" }); + trySetFromYaml(orbitPropagation.general_relativity, orbit_propagation, {"@ general_relativity" }); + trySetFromYaml(orbitPropagation.pole_tide_ocean, orbit_propagation, {"@ pole_tide_ocean" }); + trySetFromYaml(orbitPropagation.pole_tide_solid, orbit_propagation, {"@ pole_tide_solid" }); + trySetFromYaml(orbitPropagation.solar_pressure_radiation, orbit_propagation, {"@ solar_pressure_radiation" }); + trySetFromYaml(orbitPropagation.empirical_dyb, orbit_propagation, {"@ empirical_dyb" }); + trySetFromYaml(orbitPropagation.antenna_thrust, orbit_propagation, {"@ antenna_thrust" }); + trySetFromYaml(orbitPropagation.albedo, orbit_propagation, {"@ albedo" }); + trySetFromYaml(orbitPropagation.sat_mass, orbit_propagation, {"@ sat_mass" }); + trySetFromYaml(orbitPropagation.sat_area, orbit_propagation, {"@ sat_area" }); + trySetFromYaml(orbitPropagation.sat_power, orbit_propagation, {"@ sat_power" }); + trySetFromYaml(orbitPropagation.srp_cr, orbit_propagation, {"@ srp_cr" }); + trySetFromYaml(orbitPropagation.degree_max, orbit_propagation, {"@ degree_max" }); + trySetFromYaml(orbitPropagation.itrf_pseudoobs, orbit_propagation, {"@ itrf_pseudoobs" }); + trySetFromYaml(orbitPropagation.integrator_time_step, orbit_propagation, {"@ integrator_time_step" }); } @@ -2565,28 +2861,28 @@ bool ACSConfig::parse( { - auto ambres_options = stringsToYamlObject(processing_options, {"ambiguity_resolution"}); + auto ambres_options = stringsToYamlObject(processing_options, {"@ ambiguity_resolution"}); - trySetFromYaml(ambrOpts.min_el_AR, ambres_options, {"elevation_mask" }); - trySetFromYaml(ambrOpts.lambda_set, ambres_options, {"lambda_set_size" }); - trySetFromYaml(ambrOpts.AR_max_itr, ambres_options, {"max_rounding_iterations" }); - trySetFromYaml(ambrOpts.Max_Hold_epoc, ambres_options, {"max_hold_epochs" }, "Maximun number of epocs to hold ambiguities"); - trySetFromYaml(ambrOpts.Max_Hold_time, ambres_options, {"max_hold_time" }, "Maximun amount of time (sec) to hold ambiguities"); + trySetFromYaml(ambrOpts.min_el_AR, ambres_options, {"@ elevation_mask" }); + trySetFromYaml(ambrOpts.lambda_set, ambres_options, {"@ lambda_set_size" }); + trySetFromYaml(ambrOpts.AR_max_itr, ambres_options, {"@ max_rounding_iterations" }); + trySetFromYaml(ambrOpts.Max_Hold_epoc, ambres_options, {"@ max_hold_epochs" }, "Maximun number of epocs to hold ambiguities"); + trySetFromYaml(ambrOpts.Max_Hold_time, ambres_options, {"@ max_hold_time" }, "Maximun amount of time (sec) to hold ambiguities"); - trySetEnumOpt( ambrOpts.WLmode, ambres_options, {"wide_lane", "mode" }, E_ARmode::_from_string_nocase); - trySetFromYaml(ambrOpts.WLsuccsThres, ambres_options, {"wide_lane", "success_rate_threshold" }); - trySetFromYaml(ambrOpts.WLratioThres, ambres_options, {"wide_lane", "solution_ratio_threshold" }); - trySetFromYaml(ambrOpts.WLSatPrcNois, ambres_options, {"wide_lane", "process_noise_sat" }, "WL bias process noise for satellite"); - trySetFromYaml(ambrOpts.WLRecPrcNois, ambres_options, {"wide_lane", "process_noise_rec" }, "WL bias process noise for receivers"); - trySetFromYaml(ambrOpts.WL_filter_iter, ambres_options, {"wide_lane", "filter_max_iterations" }); - trySetFromYaml(ambrOpts.WL_prefit_remv, ambres_options, {"wide_lane", "filter_max_removals" }); - - trySetEnumOpt( ambrOpts.NLmode, ambres_options, {"narrow_lane", "mode" }, E_ARmode::_from_string_nocase); - trySetFromYaml(ambrOpts.NLsuccsThres, ambres_options, {"narrow_lane", "success_rate_threshold" }); - trySetFromYaml(ambrOpts.NLratioThres, ambres_options, {"narrow_lane", "solution_ratio_threshold" }); - trySetFromYaml(ambrOpts.NLstarttime, ambres_options, {"narrow_lane", "proc_start" }); - - trySetFromYaml(ambrOpts.reduction_limit, ambres_options, {"reduction_limit" }); + trySetEnumOpt( ambrOpts.WLmode, ambres_options, {"@ wide_lane", "@ mode" }, E_ARmode::_from_string_nocase); + trySetFromYaml(ambrOpts.WLsuccsThres, ambres_options, {"@ wide_lane", "@ success_rate_threshold" }); + trySetFromYaml(ambrOpts.WLratioThres, ambres_options, {"@ wide_lane", "@ solution_ratio_threshold" }); + trySetFromYaml(ambrOpts.WLSatPrcNois, ambres_options, {"@ wide_lane", "@ process_noise_sat" }, "WL bias process noise for satellite"); + trySetFromYaml(ambrOpts.WLRecPrcNois, ambres_options, {"@ wide_lane", "@ process_noise_rec" }, "WL bias process noise for receivers"); + trySetFromYaml(ambrOpts.WL_filter_iter, ambres_options, {"@ wide_lane", "@ filter_max_iterations" }); + trySetFromYaml(ambrOpts.WL_prefit_remv, ambres_options, {"@ wide_lane", "@ filter_max_removals" }); + + trySetEnumOpt( ambrOpts.NLmode, ambres_options, {"@ narrow_lane", "@ mode" }, E_ARmode::_from_string_nocase); + trySetFromYaml(ambrOpts.NLsuccsThres, ambres_options, {"@ narrow_lane", "@ success_rate_threshold" }); + trySetFromYaml(ambrOpts.NLratioThres, ambres_options, {"@ narrow_lane", "@ solution_ratio_threshold" }); + trySetFromYaml(ambrOpts.NLstarttime, ambres_options, {"@ narrow_lane", "@ proc_start" }); + + trySetFromYaml(ambrOpts.reduction_limit, ambres_options, {"@ reduction_limit" }); } { @@ -2598,78 +2894,79 @@ bool ACSConfig::parse( trySetEnumVec (ssrOpts.phase_bias_sources, ssr_corrections, {"phase_bias_sources" }); trySetEnumVec (ssrOpts.ionosphere_sources, ssr_corrections, {"ionosphere_sources" }); // trySetEnumVec (ssrOpts.troposphere_sources, ssr_corrections, {"troposphere_sources" }); + trySetEnumOpt (ssrOpts.output_timing, ssr_corrections, {"output_timing" }, E_SSROutTiming::_from_string_nocase); trySetFromYaml(ssrOpts.prediction_interval, ssr_corrections, {"prediction_interval" }); trySetFromYaml(ssrOpts.prediction_duration, ssr_corrections, {"prediction_duration" }); trySetFromYaml(ssrOpts.extrapolate_corrections, ssr_corrections, {"extrapolate_corrections" }, "(bool) "); } { - auto ssr_inputs = stringsToYamlObject(processing_options, {"ssr_inputs"}); - - trySetFromYaml(ssrInOpts.code_bias_valid_time, ssr_inputs, {"code_bias_validity_time" }, "(double) Valid time period of SSR code biases"); - trySetFromYaml(ssrInOpts.phase_bias_valid_time, ssr_inputs, {"phase_bias_validity_time" }, "(double) Valid time period of SSR phase biases"); - trySetFromYaml(ssrInOpts.one_freq_phase_bias, ssr_inputs, {"one_freq_phase_bias" }, "(bool) Used stream have one SSR phase bias per frequency"); - trySetFromYaml(ssrInOpts.global_vtec_valid_time,ssr_inputs, {"global_vtec_valid_time" }, "(double) Valid time period of global VTEC maps"); - trySetFromYaml(ssrInOpts.local_stec_valid_time, ssr_inputs, {"local_stec_valid_time" }, "(double) Valid time period of local STEC corrections"); - trySetFromYaml(validity_interval_factor, ssr_inputs, {"validity_interval_factor" }); - trySetEnumOpt(ssr_input_antenna_offset, ssr_inputs, {"ssr_antenna_offset" }, E_OffsetType::_from_string_nocase, "Ephemeris type that is provided in the listed SSR stream, i.e. satellite antenna-phase-centre (APC) or centre-of-mass (COM). This information is listed in the NTRIP Caster's sourcetable"); + auto ssr_inputs = stringsToYamlObject(processing_options, {"@ ssr_inputs"}); + + trySetFromYaml(ssrInOpts.code_bias_valid_time, ssr_inputs, {"@ code_bias_validity_time" }, "(double) Valid time period of SSR code biases"); + trySetFromYaml(ssrInOpts.phase_bias_valid_time, ssr_inputs, {"@ phase_bias_validity_time" }, "(double) Valid time period of SSR phase biases"); + trySetFromYaml(ssrInOpts.one_freq_phase_bias, ssr_inputs, {"@ one_freq_phase_bias" }, "(bool) Used stream have one SSR phase bias per frequency"); + trySetFromYaml(ssrInOpts.global_vtec_valid_time,ssr_inputs, {"@ global_vtec_valid_time" }, "(double) Valid time period of global VTEC maps"); + trySetFromYaml(ssrInOpts.local_stec_valid_time, ssr_inputs, {"@ local_stec_valid_time" }, "(double) Valid time period of local STEC corrections"); + trySetFromYaml(validity_interval_factor, ssr_inputs, {"@ validity_interval_factor" }); + trySetEnumOpt(ssr_input_antenna_offset, ssr_inputs, {"@ ssr_antenna_offset" }, E_OffsetType::_from_string_nocase, "Ephemeris type that is provided in the listed SSR stream, i.e. satellite antenna-phase-centre (APC) or centre-of-mass (COM). This information is listed in the NTRIP Caster's sourcetable"); } auto estimation_parameters = stringsToYamlObject({yaml, ""}, {estimation_parameters_str}); { - trySetKalmanFromYaml(pppOpts.eop, estimation_parameters, "eop" ); - trySetKalmanFromYaml(pppOpts.eop_rates, estimation_parameters, "eop_rates" ); - trySetKalmanFromYaml(ionModelOpts.ion, estimation_parameters, "ion" ); + trySetKalmanFromYaml(pppOpts.eop, estimation_parameters, "@ eop" ); + trySetKalmanFromYaml(pppOpts.eop_rates, estimation_parameters, "@ eop_rates" ); + trySetKalmanFromYaml(ionModelOpts.ion, estimation_parameters, "@ ion" ); } { - auto mongo = stringsToYamlObject({yaml, ""}, {"5 mongo"}); - - trySetFromYaml(localMongo.enable, mongo, {"0 enable" }, "(bool) Enable and connect to mongo database"); - trySetFromYaml(localMongo.predict_states, mongo, {"predict_states" }, "(bool) "); - trySetFromYaml(localMongo.output_rtcm_messages, mongo, {"output_rtcm_messages" }, "(bool) Output rtcm data to mongo"); - trySetFromYaml(localMongo.output_measurements, mongo, {"output_measurements" }, "(bool) Output measurements and their residuals"); - trySetFromYaml(localMongo.output_components, mongo, {"output_components" }, "(bool) Output components of measurements"); - trySetFromYaml(localMongo.output_states, mongo, {"output_states" }, "(bool) Output states"); - trySetFromYaml(localMongo.output_trace, mongo, {"output_trace" }, "(bool) Output trace"); - trySetFromYaml(localMongo.output_test_stats, mongo, {"output_test_stats" }, "(bool) Output test statistics"); - trySetFromYaml(localMongo.output_logs, mongo, {"output_logs" }, "(bool) Output console trace and warnings to mongo with timestamps and other metadata"); - trySetFromYaml(localMongo.output_ssr_precursors, mongo, {"output_ssr_precursors" }, "(bool) "); - trySetFromYaml(localMongo.delete_history, mongo, {"delete_history" }, "(bool) Drop the collection in the database at the beginning of the run to only show fresh data"); - trySetFromYaml(localMongo.cull_history, mongo, {"cull_history" }, "(bool) "); - trySetFromYaml(localMongo.min_cull_age, mongo, {"min_cull_age" }, "(float) "); - trySetFromYaml(localMongo.suffix, mongo, {"suffix" }, "(string) Suffix to append to database elements to make distinctions between runs for comparison"); - trySetFromYaml(localMongo.database, mongo, {"database" }, "(string) "); - trySetFromYaml(localMongo.uri, mongo, {"uri" }, "(string) Location and port of the mongo database to connect to"); + auto mongo = stringsToYamlObject({yaml, ""}, {"5! mongo"}); + + trySetFromYaml(localMongo.enable, mongo, {"0! enable" }, "(bool) Enable and connect to mongo database"); + trySetFromYaml(localMongo.predict_states, mongo, {"@ predict_states" }, "(bool) "); + trySetFromYaml(localMongo.output_rtcm_messages, mongo, {"@ output_rtcm_messages" }, "(bool) Output rtcm data to mongo"); + trySetFromYaml(localMongo.output_measurements, mongo, {"! output_measurements" }, "(bool) Output measurements and their residuals"); + trySetFromYaml(localMongo.output_components, mongo, {"! output_components" }, "(bool) Output components of measurements"); + trySetFromYaml(localMongo.output_states, mongo, {"! output_states" }, "(bool) Output states"); + trySetFromYaml(localMongo.output_trace, mongo, {"@ output_trace" }, "(bool) Output trace"); + trySetFromYaml(localMongo.output_test_stats, mongo, {"@ output_test_stats" }, "(bool) Output test statistics"); + trySetFromYaml(localMongo.output_logs, mongo, {"@ output_logs" }, "(bool) Output console trace and warnings to mongo with timestamps and other metadata"); + trySetFromYaml(localMongo.output_ssr_precursors, mongo, {"@ output_ssr_precursors" }, "(bool) "); + trySetFromYaml(localMongo.delete_history, mongo, {"! delete_history" }, "(bool) Drop the collection in the database at the beginning of the run to only show fresh data"); + trySetFromYaml(localMongo.cull_history, mongo, {"@ cull_history" }, "(bool) "); + trySetFromYaml(localMongo.min_cull_age, mongo, {"@ min_cull_age" }, "(float) "); + trySetFromYaml(localMongo.suffix, mongo, {"@ suffix" }, "(string) Suffix to append to database elements to make distinctions between runs for comparison"); + trySetFromYaml(localMongo.database, mongo, {"@ database" }, "(string) "); + trySetFromYaml(localMongo.uri, mongo, {"@ uri" }, "(string) Location and port of the mongo database to connect to"); - trySetScaledFromYaml(localMongo.prediction_interval, mongo, {"prediction_interval" }, {"interval_units" }, E_Period::_from_string_nocase); - trySetScaledFromYaml(localMongo.forward_prediction_duration, mongo, {"forward_prediction_duration" }, {"duration_units" }, E_Period::_from_string_nocase); - trySetScaledFromYaml(localMongo.reverse_prediction_duration, mongo, {"reverse_prediction_duration" }, {"duration_units" }, E_Period::_from_string_nocase); + trySetScaledFromYaml(localMongo.prediction_interval, mongo, {"@ prediction_interval" }, {"@ interval_units" }, E_Period::_from_string_nocase); + trySetScaledFromYaml(localMongo.forward_prediction_duration, mongo, {"@ forward_prediction_duration" }, {"@ duration_units" }, E_Period::_from_string_nocase); + trySetScaledFromYaml(localMongo.reverse_prediction_duration, mongo, {"@ reverse_prediction_duration" }, {"@ duration_units" }, E_Period::_from_string_nocase); } { - auto mongo = stringsToYamlObject({yaml, ""}, {"5 remote_mongo"}); + auto mongo = stringsToYamlObject({yaml, ""}, {"5@ remote_mongo"}); trySetFromYaml(remoteMongo.enable, mongo, {"0 enable" }, "(bool) Enable and connect to mongo database"); - trySetFromYaml(remoteMongo.predict_states, mongo, {"predict_states" }, "(bool) "); - trySetFromYaml(remoteMongo.output_rtcm_messages, mongo, {"output_rtcm_messages" }, "(bool) Output rtcm data to mongo"); - trySetFromYaml(remoteMongo.output_measurements, mongo, {"output_measurements" }, "(bool) Output measurements and their residuals"); - trySetFromYaml(remoteMongo.output_components, mongo, {"output_components" }, "(bool) Output components of measurements"); - trySetFromYaml(remoteMongo.output_states, mongo, {"output_states" }, "(bool) Output states"); - trySetFromYaml(remoteMongo.output_trace, mongo, {"output_trace" }, "(bool) Output trace"); - trySetFromYaml(remoteMongo.output_test_stats, mongo, {"output_test_stats" }, "(bool) Output test statistics"); - trySetFromYaml(remoteMongo.output_logs, mongo, {"output_logs" }, "(bool) Output console trace and warnings to mongo with timestamps and other metadata"); - trySetFromYaml(remoteMongo.output_ssr_precursors, mongo, {"output_ssr_precursors" }, "(bool) "); - trySetFromYaml(remoteMongo.delete_history, mongo, {"delete_history" }, "(bool) Drop the collection in the database at the beginning of the run to only show fresh data"); - trySetFromYaml(remoteMongo.cull_history, mongo, {"cull_history" }, "(bool) "); - trySetFromYaml(remoteMongo.min_cull_age, mongo, {"min_cull_age" }, "(float) "); - trySetFromYaml(remoteMongo.suffix, mongo, {"suffix" }, "(string) Suffix to append to database elements to make distinctions between runs for comparison"); - trySetFromYaml(remoteMongo.database, mongo, {"database" }, "(string) "); - trySetFromYaml(remoteMongo.uri, mongo, {"uri" }, "(string) Location and port of the mongo database to connect to"); + trySetFromYaml(remoteMongo.predict_states, mongo, {"@ predict_states" }, "(bool) "); + trySetFromYaml(remoteMongo.output_rtcm_messages, mongo, {"@ output_rtcm_messages" }, "(bool) Output rtcm data to mongo"); + trySetFromYaml(remoteMongo.output_measurements, mongo, {"@ output_measurements" }, "(bool) Output measurements and their residuals"); + trySetFromYaml(remoteMongo.output_components, mongo, {"@ output_components" }, "(bool) Output components of measurements"); + trySetFromYaml(remoteMongo.output_states, mongo, {"@ output_states" }, "(bool) Output states"); + trySetFromYaml(remoteMongo.output_trace, mongo, {"@ output_trace" }, "(bool) Output trace"); + trySetFromYaml(remoteMongo.output_test_stats, mongo, {"@ output_test_stats" }, "(bool) Output test statistics"); + trySetFromYaml(remoteMongo.output_logs, mongo, {"@ output_logs" }, "(bool) Output console trace and warnings to mongo with timestamps and other metadata"); + trySetFromYaml(remoteMongo.output_ssr_precursors, mongo, {"@ output_ssr_precursors" }, "(bool) "); + trySetFromYaml(remoteMongo.delete_history, mongo, {"@ delete_history" }, "(bool) Drop the collection in the database at the beginning of the run to only show fresh data"); + trySetFromYaml(remoteMongo.cull_history, mongo, {"@ cull_history" }, "(bool) "); + trySetFromYaml(remoteMongo.min_cull_age, mongo, {"@ min_cull_age" }, "(float) "); + trySetFromYaml(remoteMongo.suffix, mongo, {"@ suffix" }, "(string) Suffix to append to database elements to make distinctions between runs for comparison"); + trySetFromYaml(remoteMongo.database, mongo, {"@ database" }, "(string) "); + trySetFromYaml(remoteMongo.uri, mongo, {"@ uri" }, "(string) Location and port of the mongo database to connect to"); - trySetScaledFromYaml(remoteMongo.prediction_interval, mongo, {"prediction_interval" }, {"interval_units" }, E_Period::_from_string_nocase); - trySetScaledFromYaml(remoteMongo.forward_prediction_duration, mongo, {"forward_prediction_duration" }, {"duration_units" }, E_Period::_from_string_nocase); - trySetScaledFromYaml(remoteMongo.reverse_prediction_duration, mongo, {"reverse_prediction_duration" }, {"duration_units" }, E_Period::_from_string_nocase); + trySetScaledFromYaml(remoteMongo.prediction_interval, mongo, {"@ prediction_interval" }, {"@ interval_units" }, E_Period::_from_string_nocase); + trySetScaledFromYaml(remoteMongo.forward_prediction_duration, mongo, {"@ forward_prediction_duration" }, {"@ duration_units" }, E_Period::_from_string_nocase); + trySetScaledFromYaml(remoteMongo.reverse_prediction_duration, mongo, {"@ reverse_prediction_duration" }, {"@ duration_units" }, E_Period::_from_string_nocase); } { @@ -2728,8 +3025,9 @@ bool ACSConfig::parse( tryAddRootToPath(root_input_directory, model.trop.gpt2grid); string revert_trace = trace_directory; - string revert_orbits = orbits_directory; + string revert_sp3 = sp3_directory; + tryPatchPaths(root_output_directory, sp3_directory, sp3_filename); sp3_directory = revert_sp3; tryPatchPaths(root_output_directory, erp_directory, erp_filename); tryPatchPaths(root_output_directory, gpx_directory, gpx_filename); tryPatchPaths(root_output_directory, log_directory, log_filename); @@ -2738,7 +3036,6 @@ bool ACSConfig::parse( tryPatchPaths(root_output_directory, sinex_directory, sinex_filename); tryPatchPaths(root_output_directory, ionex_directory, ionex_filename); tryPatchPaths(root_output_directory, orbex_directory, orbex_filename); - tryPatchPaths(root_output_directory, orbits_directory, orbits_filename); orbits_directory = revert_orbits; tryPatchPaths(root_output_directory, clocks_directory, clocks_filename); tryPatchPaths(root_output_directory, slr_obs_directory, slr_obs_filename); tryPatchPaths(root_output_directory, ionstec_directory, ionstec_filename); @@ -2750,7 +3047,7 @@ bool ACSConfig::parse( tryPatchPaths(root_output_directory, ntrip_log_directory, ntrip_log_filename); tryPatchPaths(root_output_directory, rinex_obs_directory, rinex_obs_filename); tryPatchPaths(root_output_directory, rinex_nav_directory, rinex_nav_filename); - tryPatchPaths(root_output_directory, orbits_directory, predicted_orbits_filename); + tryPatchPaths(root_output_directory, sp3_directory, predicted_sp3_filename); tryPatchPaths(root_output_directory, bias_sinex_directory, bias_sinex_filename); tryPatchPaths(root_output_directory, trop_sinex_directory, trop_sinex_filename); tryPatchPaths(root_output_directory, persistance_directory, persistance_filename); @@ -2796,8 +3093,9 @@ bool ACSConfig::parse( SatSys dummySat; - auto satOpts = getSatOpts(dummySat); - auto recOpts = getRecOpts("XMPL"); + getSatOpts(dummySat); + getRecOpts("global"); + getRecOpts("XMPL"); # ifndef ENABLE_UNIT_TESTS @@ -2816,7 +3114,8 @@ bool ACSConfig::parse( if (commandOpts.count("yaml-defaults")) { - outputDefaultConfiguration(); + int level = commandOpts["yaml-defaults"].as(); + outputDefaultConfiguration(level); } return true; diff --git a/src/cpp/common/acsConfig.hpp b/src/cpp/common/acsConfig.hpp index e43f75417..eae442e64 100644 --- a/src/cpp/common/acsConfig.hpp +++ b/src/cpp/common/acsConfig.hpp @@ -93,13 +93,14 @@ struct InputOptions vector bsx_files; vector ion_files; vector igrf_files; - - vector rnx_inputs; - vector ubx_inputs; - vector obs_rtcm_inputs; - vector nav_rtcm_inputs; - vector pseudo_sp3_inputs; - vector pseudo_snx_inputs; + + vector nav_rtcm_inputs; + + map> rnx_inputs; + map> ubx_inputs; + map> obs_rtcm_inputs; + map> pseudo_sp3_inputs; + map> pseudo_snx_inputs; vector atm_reg_definitions; @@ -168,25 +169,26 @@ struct OutputOptions bool output_config = false; bool output_clocks = false; - vector clocks_receiver_sources = {E_Source::KALMAN}; - vector clocks_satellite_sources = {E_Source::KALMAN}; + vector clocks_receiver_sources = {E_Source::KALMAN, E_Source::PRECISE, E_Source::BROADCAST}; + vector clocks_satellite_sources = {E_Source::KALMAN, E_Source::PRECISE, E_Source::BROADCAST}; string clocks_directory = "./"; string clocks_filename = "-_.clk"; bool output_ar_clocks = false; //todo aaron this config sucks - bool output_orbits = false; + bool output_sp3 = false; bool output_predicted_orbits = false; bool output_inertial_orbits = false; - bool output_orbit_velocities = false; - vector orbits_data_sources = {E_Source::BROADCAST}; - int orbits_output_interval = 900; - string orbits_directory = "./"; - string orbits_filename = "-_-Filt.sp3"; - string predicted_orbits_filename = "-_-Prop.sp3"; + bool output_sp3_velocities = false; + vector sp3_orbit_sources = {E_Source::KALMAN, E_Source::PRECISE, E_Source::BROADCAST}; + vector sp3_clock_sources = {E_Source::KALMAN, E_Source::PRECISE, E_Source::BROADCAST}; + int sp3_output_interval = 900; + string sp3_directory = "./"; + string sp3_filename = "-_-Filt.sp3"; + string predicted_sp3_filename = "-_-Prop.sp3"; bool output_orbex = false; - vector orbex_orbit_sources = {E_Source::BROADCAST}; - vector orbex_clock_sources = {E_Source::BROADCAST}; + vector orbex_orbit_sources = {E_Source::KALMAN, E_Source::PRECISE, E_Source::BROADCAST}; + vector orbex_clock_sources = {E_Source::KALMAN, E_Source::PRECISE, E_Source::BROADCAST}; vector orbex_attitude_sources = {E_Source::NOMINAL}; string orbex_directory = "./"; string orbex_filename = "-_.obx"; @@ -473,6 +475,7 @@ struct GlobalOptions double deweight_factor = 100; double no_bias_sigma = 20; + bool use_tgd_bias = false; double orbit_pos_proc_noise = 10; double orbit_vel_proc_noise = 5; @@ -617,7 +620,6 @@ struct FilterOptions bool w_test = false; bool chi_square_test = false; bool simulate_filter_only = false; - bool simulate_pseudos_only = false; E_ChiSqMode chi_square_mode = E_ChiSqMode::NONE; double sigma_threshold = 4; @@ -654,7 +656,6 @@ struct PPPOptions : FilterOptions struct IonosphericOptions { E_IonoMode corr_mode = E_IonoMode::IONO_FREE_LINEAR_COMBO; - E_LinearCombo iflc_freqs = E_LinearCombo::ANY; E_IonoMapFn mapping_function = E_IonoMapFn::MSLM; double pierce_point_layer_height = 450; @@ -876,7 +877,6 @@ struct SatelliteOptions KalmanModel clk; KalmanModel clk_rate; KalmanModel orbit; - KalmanModel srp; KalmanModel pos; KalmanModel pos_rate; KalmanModel orb; @@ -885,6 +885,7 @@ struct SatelliteOptions KalmanModel code_bias; KalmanModel phase_bias; KalmanModel ion_model; + KalmanModel emp_dyb_0; KalmanModel emp_dyb_1c; KalmanModel emp_dyb_1s; @@ -894,10 +895,21 @@ struct SatelliteOptions KalmanModel emp_dyb_3s; KalmanModel emp_dyb_4c; KalmanModel emp_dyb_4s; + + KalmanModel srp_dyb_0; + KalmanModel srp_dyb_1c; + KalmanModel srp_dyb_1s; + KalmanModel srp_dyb_2c; + KalmanModel srp_dyb_2s; + KalmanModel srp_dyb_3c; + KalmanModel srp_dyb_3s; + KalmanModel srp_dyb_4c; + KalmanModel srp_dyb_4s; bool exclude = false; vector code_sigmas = {0}; vector phas_sigmas = {0}; + vector pseudo_sigmas = {100000}; vector laser_sigmas = {0}; Vector3d antenna_boresight = { 0, 0, +1}; @@ -909,7 +921,6 @@ struct SatelliteOptions clk += rhs.clk; clk_rate += rhs.clk_rate; orbit += rhs.orbit; - srp += rhs.srp; pos += rhs.pos; pos_rate += rhs.pos_rate; orb += rhs.orb; @@ -918,6 +929,7 @@ struct SatelliteOptions code_bias += rhs.code_bias; phase_bias += rhs.phase_bias; ion_model += rhs.ion_model; + emp_dyb_0 += rhs.emp_dyb_0; emp_dyb_1c += rhs.emp_dyb_1c; emp_dyb_1s += rhs.emp_dyb_1s; @@ -928,9 +940,20 @@ struct SatelliteOptions emp_dyb_4c += rhs.emp_dyb_4c; emp_dyb_4s += rhs.emp_dyb_4s; + srp_dyb_0 += rhs.srp_dyb_0; + srp_dyb_1c += rhs.srp_dyb_1c; + srp_dyb_1s += rhs.srp_dyb_1s; + srp_dyb_2c += rhs.srp_dyb_2c; + srp_dyb_2s += rhs.srp_dyb_2s; + srp_dyb_3c += rhs.srp_dyb_3c; + srp_dyb_3s += rhs.srp_dyb_3s; + srp_dyb_4c += rhs.srp_dyb_4c; + srp_dyb_4s += rhs.srp_dyb_4s; + if (isInited(rhs, rhs.exclude )) { exclude = rhs.exclude ; setInited(*this, exclude ); } if (isInited(rhs, rhs.code_sigmas )) { code_sigmas = rhs.code_sigmas ; setInited(*this, code_sigmas ); } if (isInited(rhs, rhs.phas_sigmas )) { phas_sigmas = rhs.phas_sigmas ; setInited(*this, phas_sigmas ); } + if (isInited(rhs, rhs.pseudo_sigmas )) { pseudo_sigmas = rhs.pseudo_sigmas ; setInited(*this, pseudo_sigmas ); } if (isInited(rhs, rhs.laser_sigmas )) { laser_sigmas = rhs.laser_sigmas ; setInited(*this, laser_sigmas ); } if (isInited(rhs, rhs.antenna_boresight )) { antenna_boresight = rhs.antenna_boresight ; setInited(*this, antenna_boresight ); } @@ -983,6 +1006,7 @@ struct ReceiverOptions Vector3d antenna_azimuth = { 0, +1, 0}; string antenna_type ; string receiver_type ; + string sat_id ; ReceiverOptions& operator+=( const ReceiverOptions& rhs) @@ -1022,6 +1046,7 @@ struct ReceiverOptions if (isInited(rhs, rhs.antenna_azimuth )) { antenna_azimuth = rhs.antenna_azimuth ; setInited(*this, antenna_azimuth ); } if (isInited(rhs, rhs.antenna_type )) { antenna_type = rhs.antenna_type ; setInited(*this, antenna_type ); } if (isInited(rhs, rhs.receiver_type )) { receiver_type = rhs.receiver_type ; setInited(*this, receiver_type ); } + if (isInited(rhs, rhs.sat_id )) { sat_id = rhs.sat_id ; setInited(*this, sat_id ); } return *this; } @@ -1079,6 +1104,7 @@ struct SsrOptions vector phase_bias_sources = {E_Source::NONE}; vector ionosphere_sources = {E_Source::NONE}; // vector troposphere_sources = E_Source::NONE; + E_SSROutTiming output_timing = E_SSROutTiming::GPS_TIME; }; struct SsrInOptions @@ -1143,6 +1169,7 @@ struct OrbitPropagation int degree_max = 12; double sat_mass = 1000; double sat_area = 20; + double sat_power = 20; double srp_cr = 1.25; double integrator_time_step = 60; bool itrf_pseudoobs = true; @@ -1154,6 +1181,7 @@ struct YamlDefault string comment; bool found; string foundValue; + string enumName; }; /** General options object to be used throughout the software @@ -1170,6 +1198,8 @@ struct ACSConfig : GlobalOptions, InputOptions, OutputOptions, DebugOptions map configModifyTimeMap; boost::program_options::variables_map commandOpts; + static map docs; + void recurseYaml( YAML::Node node, string stack = "", @@ -1184,7 +1214,8 @@ struct ACSConfig : GlobalOptions, InputOptions, OutputOptions, DebugOptions void info( Trace& trace); - void outputDefaultConfiguration(); + void outputDefaultConfiguration( + int level); SatelliteOptions& getSatOpts (SatSys Sat, vector suffixes = {}); ReceiverOptions& getRecOpts (string id, vector suffixes = {}); diff --git a/src/cpp/common/acsConfigDocs.cpp b/src/cpp/common/acsConfigDocs.cpp new file mode 100644 index 000000000..a826006bb --- /dev/null +++ b/src/cpp/common/acsConfigDocs.cpp @@ -0,0 +1,74 @@ + +#include "acsConfig.hpp" + + +map ACSConfig::docs = +{ + +{ "outputs", R"config(specifies options to enable outputs and specify file locations. + +Each section typically contains an option to `output` the filetype, and a `directory` to place the files named `filename`, along with any ancillary options. +)config"}, + +{ "inputs", R"config(This section of the yaml file specifies the lists of files to be used for general metadata inputs, and inputs of external product data. +)config"}, + +{ "gnss_observations", R"config(This section specifies the sources of observation data to be used in positioning. + + +There are numerous ways that the `pea` can access GNSS observations to process. +You can specify individual files to process, set it up so that it will search a particular directory, or you can use a command line flag `--rnx ` to add an additional file to process. + +The data should be uncompressed rinex (gunzipped, and not in hatanaka format), or RTCM3 formatted binary data. + + +It may consist of RINEX files, or RTCM streams or files, which are specified as follows: + +``` + gnss_observations: + root_stations_directory: /data/acs/ginan/examples/data + rnx_files: + - "ALIC*.rnx" + - "BAKO*.rnx" + + #rtcm_files: + # - "*-OBS.rtcm3" + + #streams: + # - "https://:@ntrip.data.gnss.ga.gov.au/ALIC00AUS0" +``` + +The first 4 characters of the filename are used as the receiver ID. + +If multiple files are supplied with the same ID, they are all processed in sequence - according to the epoch times specified within the files. In this case, it is advisible to correctly specify the start_epoch for the filter, or the first epoch in the first file will likely be used. + +)config"}, + +{ "satellite_data", R"config(This section specifies sources of ephemerides and other satellite data.)config"}, + +{ "configName", R"config(Short description. +more description +)config"}, + +{ "configName", R"config(Short description. +more description +)config"}, + +{ "configName", R"config(Short description. +more description +)config"}, + +{ "configName", R"config(Short description. +more description +)config"}, + + + + +{ "ssr", "Values derived from applying received corrections to broadcast ephemeris"}, +{ "broadcast", "Values derived from broadcast ephemeris streams/files"}, +{ "precise", "Values derived from file-based products such as SP3/CLK/OBX"}, +{ "kalman", "Values estimated internally by the kalman filter"}, + + +}; diff --git a/src/cpp/common/acsQC.cpp b/src/cpp/common/acsQC.cpp index c8f07446e..db294cc34 100644 --- a/src/cpp/common/acsQC.cpp +++ b/src/cpp/common/acsQC.cpp @@ -28,23 +28,14 @@ bool satFreqs( E_FType& ft2, E_FType& ft3) { - if (acsConfig.ionoOpts.iflc_freqs == +E_LinearCombo::L1L2_ONLY) - { - ft1 = F1; - ft2 = F2; - ft3 = FTYPE_NONE; - } - - if (acsConfig.ionoOpts.iflc_freqs == +E_LinearCombo::L1L5_ONLY) - { - ft1 = F1; - ft2 = F5; - ft3 = FTYPE_NONE; - } - bool ft1Ready = false; bool ft2Ready = false; + //Add defaults in case someone forgets to initialise them... + ft1 = F1; + ft2 = F2; + ft3 = F5; + if (acsConfig.code_priorities.find(sys) == acsConfig.code_priorities.end()) return false; diff --git a/src/cpp/common/algebra.cpp b/src/cpp/common/algebra.cpp index 507f4c1ee..9f8dc7697 100644 --- a/src/cpp/common/algebra.cpp +++ b/src/cpp/common/algebra.cpp @@ -816,7 +816,14 @@ void outputResiduals( tracepdeex(0, trace, "#\t%2s\t%22s\t%10s\t%4s\t%4s\t%5s\t%13s\t%13s\t%16s\t %s\n", "It", "Time", "Type", "Sat", "Str", "Num", "Prefit Res", "Postfit Res", "Meas Variance", "Comments"); for (int i = begH; i < begH + numH; i++) { - tracepdeex(0, trace, "%%\t%2d\t%21s\t%20s\t%13.8f\t%13.8f\t%16.9f\t %s\n", iteration, kfMeas.time.to_string(2).c_str(), ((string)kfMeas.obsKeys[i]).c_str(), kfMeas.V(i), kfMeas.VV(i), kfMeas.R(i,i), kfMeas.obsKeys[i].comment.c_str()); + char var[32]; + + double R = kfMeas.R(i,i); + + if (R == 0 || (fabs(R) > 0.0001 && fabs(R) < 1e7)) snprintf(var, sizeof(var), "%16.7f", R); + else snprintf(var, sizeof(var), "%16.3e", R); + + tracepdeex(0, trace, "%%\t%2d\t%21s\t%20s\t%13.8f\t%13.8f\t%s\t %s\n", iteration, kfMeas.time.to_string(2).c_str(), ((string)kfMeas.obsKeys[i]).c_str(), kfMeas.V(i), kfMeas.VV(i), var, kfMeas.obsKeys[i].comment.c_str()); } } @@ -1269,11 +1276,12 @@ KFMeas KFState::combineKFMeasList( meas++; } -// std::cout << R_A << std::endl; +// std::cout << MatrixXd(R_A) << std::endl; kfMeas.R = R_A * uncorrelatedNoise.asDiagonal() * R_A.transpose(); // std::cout << std::setprecision(5); // std::cout << "R" << std::endl << kfMeas.R << std::endl; +// std::cout << "R_" << std::endl << uncorrelatedNoise << std::endl; } return kfMeas; @@ -2110,7 +2118,7 @@ void KFState::outputStates( char xStr[20]; char pStr[20]; if (noAdjust) snprintf(dStr, sizeof(dStr), "%15.0s", ""); - else if (_dx == 0 || (fabs(_dx) > 0.0001 && fabs(_dx) < 1e8)) snprintf(dStr, sizeof(dStr), "%15.8f", _dx); + else if (_dx == 0 || (fabs(_dx) > 0.0001 && fabs(_dx) < 1e5)) snprintf(dStr, sizeof(dStr), "%15.8f", _dx); else snprintf(dStr, sizeof(dStr), "%15.4e", _dx); if (_x == 0 || (fabs(_x) > 0.0001 && fabs(_x) < 1e8)) snprintf(xStr, sizeof(xStr), "%17.7f", _x); diff --git a/src/cpp/common/algebra.hpp b/src/cpp/common/algebra.hpp index b661395b5..df32252ac 100644 --- a/src/cpp/common/algebra.hpp +++ b/src/cpp/common/algebra.hpp @@ -332,7 +332,8 @@ struct KFState : KFState_ : KFState_ (kfState), kfStateMutex () { - + //dont use same rts file unless explicitly copied + rts_basename.clear(); } KFState() @@ -356,6 +357,9 @@ struct KFState : KFState_ *thisKfState_ = *thatKfState_; + //dont use same rts file unless explicitly copied + rts_basename.clear(); + return *this; } diff --git a/src/cpp/common/biasSINEX.hpp b/src/cpp/common/biasSINEX.hpp index 9bc5b3fdb..fca846433 100644 --- a/src/cpp/common/biasSINEX.hpp +++ b/src/cpp/common/biasSINEX.hpp @@ -67,7 +67,7 @@ bool decomposeBGDBias( double bgd1, double bgd2); -int readBiasSinex( +bool readBiasSinex( string& file); bool getBiasSinex( @@ -91,6 +91,13 @@ bool getBiasSinex( double& bias, double& var); +int writeBiasSinex( + Trace& trace, + GTime time, + string biasfile, + StationMap& stationMap, + KFState& kfState); + int writeBiasSinex( Trace& trace, GTime time, diff --git a/src/cpp/common/biasSINEXread.cpp b/src/cpp/common/biasSINEXread.cpp index d91096bec..2554b73e5 100644 --- a/src/cpp/common/biasSINEXread.cpp +++ b/src/cpp/common/biasSINEXread.cpp @@ -68,36 +68,20 @@ string code2str( GTime sinex_time_text( string& line) ///< time system { - double year; - double doy; - double tod; - double ep[6] = {2000, 1, 1, 0, 0, 0}; + E_TimeSys tsys = E_TimeSys::NONE; + if (acsConfig.bias_time_system == "G") tsys = E_TimeSys::GPST; + else if (acsConfig.bias_time_system == "C") tsys = E_TimeSys::BDT; + else if (acsConfig.bias_time_system == "R") tsys = E_TimeSys::GLONASST; + else if (acsConfig.bias_time_system == "UTC") tsys = E_TimeSys::UTC; + else if (acsConfig.bias_time_system == "TAI") tsys = E_TimeSys::TAI; + + double yds[3]; GTime time = {}; - - if (sscanf(line.c_str(), "%lf:%lf:%lf", &year, &doy, &tod) == 3) + if (sscanf(line.c_str(), "%lf:%lf:%lf", &yds[0], &yds[1], &yds[2]) == 3) { - ep[0] = year; - time = epoch2time(ep); - time += 86400 * (doy - 1) + tod; + time = yds2time(yds, tsys); } - if ( acsConfig.bias_time_system == "C") - time += 14; - - if ( acsConfig.bias_time_system == "TAI") - time -= 19; - - if ( acsConfig.bias_time_system == "R") - time -= 10800.0; - - if ( acsConfig.bias_time_system == "R" - || acsConfig.bias_time_system == "UTC") - { - double leap1 = leapSeconds(time); - double leap2 = leapSeconds(time + leap1 + 1); - time += leap2; - } - return time; } @@ -206,9 +190,6 @@ bool decomposeDSBBias( { auto& Sat = DSB.Sat; - if (Sat.sys == +E_Sys::GLO) - return false; - if ( DSB.cod1 != acsConfig.clock_codesL1[Sat.sys] ||DSB.cod2 != acsConfig.clock_codesL2[Sat.sys]) { @@ -217,8 +198,8 @@ bool decomposeDSBBias( E_FType ft1 = code2Freq[Sat.sys][DSB.cod1]; E_FType ft2 = code2Freq[Sat.sys][DSB.cod2]; - double lam1 = nav.satNavMap[Sat].lamMap[ft1]; - double lam2 = nav.satNavMap[Sat].lamMap[ft2]; + double lam1 = genericWavelength[ft1]; + double lam2 = genericWavelength[ft2]; if ( lam1 == 0 || lam2 == 0) @@ -510,7 +491,7 @@ int read_biasSINEX_line( /** Read single bias SINEX file */ -int readBiasSinex( +bool readBiasSinex( string& filename) ///< File to read { int nbia = 0; @@ -520,7 +501,7 @@ int readBiasSinex( if (!inputStream) { printf("Warning: could not find bias SINEX file %s \n", filename.c_str()); - return -1; + return false; } //fprintf(stdout,"\nReading bias SINEX file: %s \n",biasfile); @@ -536,12 +517,20 @@ int readBiasSinex( if (strstr(buff, "TIME_SYSTEM")) { string timeSystem(buff + 40, 1); - if (timeSystem != " ") + if (timeSystem != " ") { - if (timeSystem == "U") timeSystem = "UTC"; - else if (timeSystem == "T") timeSystem = "TAI"; + if ( timeSystem == "G" + ||timeSystem == "C" + ||timeSystem == "R"); // nothing to do + else if ( timeSystem == "U") timeSystem = "UTC"; + else if ( timeSystem == "T") timeSystem = "TAI"; + else + { + BOOST_LOG_TRIVIAL(warning) << "Warning: unsupported time system: " << timeSystem; + return false; + } - acsConfig.bias_time_system = timeSystem; + acsConfig.bias_time_system = timeSystem; } } @@ -554,13 +543,13 @@ int readBiasSinex( if (strstr(buff, "%=ENDBIA")) { //fprintf(stdout,"\n ... %d biases read\n",nbia); - return nbia; + return true; } if (strstr(buff, "%=")) { printf(", Warning: erroneous bias SINEX file %s \n", filename.c_str()); - return -1; + return false; } if (strstr(buff, "+FILE/REFERENCE")) @@ -598,7 +587,7 @@ int readBiasSinex( } } - return nbia; + return true; } void setRestrictiveStartTime( diff --git a/src/cpp/common/biasSINEXwrite.cpp b/src/cpp/common/biasSINEXwrite.cpp index 637d371ce..50ca3e35c 100644 --- a/src/cpp/common/biasSINEXwrite.cpp +++ b/src/cpp/common/biasSINEXwrite.cpp @@ -8,35 +8,10 @@ #include "ionoModel.hpp" map> SINEXBiases_out; -long int BottomOfFile = 0; -UYds StartTimeofFile; +long int bottomOfFile = 0; +double startTimeofFile[3]; string lastBiasSINEXFile = ""; -/* Adjust time reference for bias SINEX file (will be UTC by default) */ -void convertTime(GTime &time, string system) -{ - if (acsConfig.bias_time_system == "UTC") - return; - - if (acsConfig.bias_time_system == "R") - { - time += 10800.0; - return; - } - - double leap1 = leapSeconds(time); - double leap2 = leapSeconds(time + leap1 + 1); - time += leap2; - - if (acsConfig.bias_time_system == "C") - time -= 14; - - if (acsConfig.bias_time_system == "TAI") - time += 19; - - return; -} - /** Determine if the bias is an OSB or DSB given observation codes */ string biasType( @@ -53,38 +28,39 @@ string biasType( */ void updateFirstLine( GTime time, ///< Time of bias to write - Trace& trace, ///< Trace to output to + E_TimeSys tsys, ///< Time system + Trace& trace, ///< Trace to output to int numbias) ///< Number of biases to be written { GTime now = timeGet(); - convertTime(now,acsConfig.bias_time_system); - - UYds yds_now = now; - UYds ydsTime = now; + double ydsNow[3]; + time2yds(now, ydsNow, tsys); + + double ydsEnd[3]; + time2yds(time, ydsEnd, tsys); trace.seekp(0); - tracepdeex(0, trace, "%%=BIA 1.00 %3s %4d:%03d:%05d ", acsConfig.analysis_agency.c_str(), yds_now[0], yds_now[1], yds_now[2]); - tracepdeex(0, trace, "%3s %4d:%03d:%05d ",acsConfig.analysis_agency.c_str(), StartTimeofFile[0], StartTimeofFile[1], StartTimeofFile[2]); - tracepdeex(0, trace, "%4d:%03d:%05d A %8d\n", ydsTime[0], ydsTime[1], ydsTime[2], numbias); + tracepdeex(0, trace, "%%=BIA 1.00 %3s %4d:%03d:%05d ", acsConfig.analysis_agency.c_str(), (int)ydsNow[0], (int)ydsNow[1], (int)ydsNow[2]); + tracepdeex(0, trace, "%3s %4d:%03d:%05d ",acsConfig.analysis_agency.c_str(), (int)startTimeofFile[0], (int)startTimeofFile[1], (int)startTimeofFile[2]); + tracepdeex(0, trace, "%4d:%03d:%05d A %8d\n", (int)ydsEnd[0], (int)ydsEnd[1], (int)ydsEnd[2], numbias); } /** Write bias SINEX head for the first time */ void writeBSINEXHeader( GTime time, ///< Time of bias to write - Trace& trace, ///< Trace to output to + E_TimeSys tsys, ///< Time system + Trace& trace, ///< Trace to output to double updateInterval) ///< Bias Update Interval (seconds) { - GTime tim =time; - convertTime(tim,acsConfig.bias_time_system); - StartTimeofFile = tim; - updateFirstLine(time, trace, 0); + time2yds(time, startTimeofFile, tsys); + updateFirstLine(time, tsys, trace, 0); tracepdeex(0, trace, "*-------------------------------------------------------------------------------\n"); tracepdeex(0, trace, "+FILE/REFERENCE\n"); tracepdeex(0, trace, " DESCRIPTION %s, %s\n",acsConfig.analysis_agency.c_str(), acsConfig.analysis_center.c_str()); - tracepdeex(0, trace, " OUTPUT OSB estimates for day %3d, %4d\n", StartTimeofFile[1], StartTimeofFile[0]); + tracepdeex(0, trace, " OUTPUT OSB estimates for day %3d, %4d\n", startTimeofFile[1], startTimeofFile[0]); tracepdeex(0, trace, " CONTACT %s\n", acsConfig.ac_contact.c_str()); tracepdeex(0, trace, " SOFTWARE %s\n", acsConfig.analysis_program.c_str()); tracepdeex(0, trace, " INPUT %s\n", acsConfig.rinex_comment.c_str()); @@ -97,7 +73,7 @@ void writeBSINEXHeader( tracepdeex(0, trace, " PARAMETER_SPACING %12.0f\n", updateInterval); tracepdeex(0, trace, " DETERMINATION_METHOD COMBINED_ANALYSIS\n"); tracepdeex(0, trace, " BIAS_MODE ABSOLUTE\n"); - tracepdeex(0, trace, " TIME_SYSTEM %s \n",acsConfig.bias_time_system.c_str()); + tracepdeex(0, trace, " TIME_SYSTEM %s \n", acsConfig.bias_time_system.c_str()); E_Sys refConst = acsConfig.receiver_reference_clk; tracepdeex(0, trace, " RECEIVER_CLOCK_REFERENCE_GNSS %c\n", refConst._to_string()[0]); @@ -129,18 +105,20 @@ void writeBSINEXHeader( tracepdeex(0, trace, "+BIAS/SOLUTION\n"); tracepdeex(0, trace, "*BIAS SVN_ PRN STATION__ OBS1 OBS2 BIAS_START____ BIAS_END______ UNIT __ESTIMATED_VALUE____ _STD_DEV___\n"); - BottomOfFile = trace.tellp(); + bottomOfFile = trace.tellp(); } /** print bias SINEX data line */ int writeBSINEXLine( - GTime time, + GTime time, ///< Time of bias to write + E_TimeSys tsys, ///< Time system BiasEntry& bias, ///< Bias entry to write - Trace& trace) ///< Stream to output to + Trace& trace) ///< Stream to output to { string typstr = biasType(bias.cod1, bias.cod2); - if ( typstr != "OSB") + + if (typstr != "OSB") return 0; @@ -158,19 +136,21 @@ int writeBSINEXLine( svn = bias.Sat.svn(); } - string cod1 = code2str(bias.cod1, bias.measType); string cod2 = code2str(bias.cod2, bias.measType); - bool newbotton = false; + bool newbottom = false; if (bias.posInOutFile < 0) { - trace.seekp(BottomOfFile); - bias.posInOutFile = BottomOfFile; - newbotton = true; + trace.seekp(bottomOfFile); + + bias.posInOutFile = bottomOfFile; + newbottom = true; } else + { trace.seekp(bias.posInOutFile); + } tracepdeex(0, trace, " %-4s %4s %3s %-9s %-4s %-4s", typstr.c_str(), @@ -180,22 +160,18 @@ int writeBSINEXLine( cod1.c_str(), cod2.c_str()); - GTime tim; - tim = bias.tini; - convertTime(tim,acsConfig.bias_time_system); - UYds tini = tim; - - tim = bias.tfin; - convertTime(tim,acsConfig.bias_time_system); - UYds tend = tim; + double tini[3]; + double tend[3]; + time2yds(bias.tini, tini, tsys); + time2yds(bias.tfin, tend, tsys); tracepdeex(0, trace, " %4d:%03d:%05d %4d:%03d:%05d %-4s", - tini[0], - tini[1], - tini[2], - tend[0], - tend[1], - tend[2], + (int)tini[0], + (int)tini[1], + (int)tini[2], + (int)tend[0], + (int)tend[1], + (int)tend[2], "ns"); tracepdeex(0, trace, " %21.5f", bias.bias * (1E9/CLIGHT)); @@ -203,8 +179,8 @@ int writeBSINEXLine( tracepdeex(0, trace, "\n"); - if (newbotton) - BottomOfFile = trace.tellp(); + if (newbottom) + bottomOfFile = trace.tellp(); return 1; } @@ -368,13 +344,20 @@ int writeBiasSinex( tracepdeex(2, trace, "ERROR: cannot open bias SINEX output: %s\n", biasfile.c_str()); return -1; } - + if ( acsConfig.ambrOpts.code_output_interval <= 0 && acsConfig.ambrOpts.phase_output_interval <= 0) { return 0; } + E_TimeSys tsys = E_TimeSys::NONE; + if (acsConfig.bias_time_system == "G") tsys = E_TimeSys::GPST; + else if (acsConfig.bias_time_system == "C") tsys = E_TimeSys::BDT; + else if (acsConfig.bias_time_system == "R") tsys = E_TimeSys::GLONASST; + else if (acsConfig.bias_time_system == "UTC") tsys = E_TimeSys::UTC; + else if (acsConfig.bias_time_system == "TAI") tsys = E_TimeSys::TAI; + if (biasfile != lastBiasSINEXFile) { tracepdeex(3, trace, "\nStarting new bias SINEX file: %s\n", biasfile.c_str()); @@ -405,7 +388,7 @@ int writeBiasSinex( SINEXBiases_out.clear(); - writeBSINEXHeader(time0, outputStream, updt2); + writeBSINEXHeader(time0, tsys, outputStream, updt2); lastBiasSINEXFile = biasfile; } @@ -423,7 +406,7 @@ int writeBiasSinex( numbias++; } - updateFirstLine(time, outputStream, numbias); + updateFirstLine(time, tsys, outputStream, numbias); for (auto& [Key, biasMap] : SINEXBiases_out) for (auto& [ind, bias] : biasMap) @@ -436,7 +419,7 @@ int writeBiasSinex( tracepdeex(5,trace,"\n CODE bias for %s %2d %s ... at pos %d", bias.Sat.id().c_str(), bias.cod1._to_string(), ind, bias.posInOutFile); - writeBSINEXLine(time, bias, outputStream); + writeBSINEXLine(time, tsys, bias, outputStream); } for (auto& [Key, biasMap] : SINEXBiases_out) @@ -450,16 +433,32 @@ int writeBiasSinex( tracepdeex(5,trace,"\n PHASE bias for %s %2d %s ... at pos %d", bias.Sat.id().c_str(), bias.cod1._to_string(), ind, bias.posInOutFile); - writeBSINEXLine(time, bias, outputStream); + writeBSINEXLine(time, tsys, bias, outputStream); } - outputStream.seekp(BottomOfFile); + outputStream.seekp(bottomOfFile); tracepdeex(0, outputStream, "-BIAS/SOLUTION\n%%=ENDBIA"); return numbias; } +int writeBiasSinex( + Trace& trace, ///< Trace to output to + GTime time, ///< Time of bias to write + string biasfile, ///< File to write + StationMap& stationMap, ///< stations for which to output receiver biases + KFState& kfState) ///< KF strunct from witch to extract bias estimations +{ + if (acsConfig.process_ppp && !overwriteIonoKF (kfState)) + overwriteFixedKF(kfState); + + if (acsConfig.process_ionosphere && !overwriteIonoKF (kfState)) + return 0; + + return writeBiasSinex(std::cout, time, biasfile, stationMap); +} + /** Find and combine biases from multiple sources: bias inputs, WLNL biases from Ginan 1.0, UC biases from Ginan 2.0 and DCB from ionosphere modules @@ -478,7 +477,7 @@ bool queryBiasOutput( variance = 0; E_FType ftyp = code2Freq[Sat.sys][obsCode]; - tracepdeex(2,trace,"\n Searching %s bias for %s %s %s: ",(type==CODE)?"CODE ":"PHASE", Sat.id().c_str(), obsCode._to_string(), time.to_string(0).c_str()); + tracepdeex(3,trace,"\n Searching %s bias for %s %s %s: ",(type==CODE)?"CODE ":"PHASE", Sat.id().c_str(), obsCode._to_string(), time.to_string(0).c_str()); if (acsConfig.process_ppp) /* Ginan 2.x */ { @@ -488,7 +487,7 @@ bool queryBiasOutput( if (!queryBiasUC(trace, time, Sat, Rec, obsCode, pppBias, pppVar, type)) return false; - tracepdeex(2,trace,"found UC %.4f %.4e", bias, variance); + tracepdeex(4,trace,"found UC %.4f %.4e", bias, variance); bias += pppBias; variance += pppVar; } diff --git a/src/cpp/common/constants.cpp b/src/cpp/common/constants.cpp index 052d7006a..f859b1b8d 100644 --- a/src/cpp/common/constants.cpp +++ b/src/cpp/common/constants.cpp @@ -12,6 +12,23 @@ using std::map; #include +map genericWavelength = +{ + {F1, CLIGHT / FREQ1}, + {F2, CLIGHT / FREQ2}, + {F5, CLIGHT / FREQ5}, + {F6, CLIGHT / FREQ6}, + {F7, CLIGHT / FREQ7}, + {F8, CLIGHT / FREQ8}, + {B1, CLIGHT / FREQ1_CMP}, + {B3, CLIGHT / FREQ3_CMP}, + {G1, CLIGHT / FREQ1_GLO}, + {G2, CLIGHT / FREQ2_GLO}, + {G3, CLIGHT / FREQ3_GLO}, + {G4, CLIGHT / FREQ4_GLO}, + {G6, CLIGHT / FREQ6_GLO} +}; + map> code2Freq = { { E_Sys::GPS, diff --git a/src/cpp/common/constants.hpp b/src/cpp/common/constants.hpp index 7430d5ccb..14a1ab2b6 100644 --- a/src/cpp/common/constants.hpp +++ b/src/cpp/common/constants.hpp @@ -9,6 +9,8 @@ using std::map; #include + +#define TEC_CONSTANT 40.308193e16 #define CLIGHT 299792458.0 /* speed of light (m/s) */ #define PSOL 1367/CLIGHT /* solar radiation pressure at 1 AU, [N/m^2] (1367 W/m^2); IERS 96 */ @@ -211,6 +213,7 @@ using std::map; #define BACKWARD_SUFFIX "_backward" extern map> code2Freq; +extern map genericWavelength; #define Arcs 3600.0*180.0/PI /* Arcseconds per radian */ diff --git a/src/cpp/common/debug.cpp b/src/cpp/common/debug.cpp index d203fdb32..19e05f5df 100644 --- a/src/cpp/common/debug.cpp +++ b/src/cpp/common/debug.cpp @@ -598,20 +598,15 @@ void timecheck() void debugTime() { - auto utcNow = boost::posix_time::second_clock::universal_time(); + auto utcNow = boost::posix_time::microsec_clock::universal_time(); + GTime gTime = timeGet(); - PTime pTime = timeGet(); - auto bTime = boost::posix_time::from_time_t((time_t)pTime.bigTime); - GTime gTime = pTime; - - std::cout << std::setprecision(1) << std::fixed; - std::cout << std::endl; + std::cout << std::setprecision(1) << std::fixed << std::endl; std::cout << "universal_time(): " << utcNow << std::endl; - std::cout << "timeGet(): " << pTime.bigTime << " " << bTime << std::endl; - std::cout << "PTime to GTime: " << gTime.bigTime << " " << gTime.to_string(1) << std::endl; - std::cout << "GTime(timeGet()): " << GTime(timeGet()).to_string(1) << std::endl; + std::cout << "timeGet(): " << gTime.bigTime << " " << gTime.to_string(1) << std::endl; - pTime = gTime; + PTime pTime = gTime; + auto bTime = boost::posix_time::from_time_t((time_t)pTime.bigTime); UtcTime utcTime = gTime; GEpoch gEpoch = gTime; UYds uYds = gTime; @@ -624,12 +619,12 @@ void debugTime() RTod rTod = gTime; - std::cout << std::endl; + std::cout << std::setfill('0') << std::endl; std::cout << "GTime to anything:" << std::endl; - std::cout << "GTime to PTime: " << pTime.bigTime << std::endl; - std::cout << "GTime to UtcTime: " << utcTime.bigTime << std::endl; - std::cout << "GTime to GEpoch: " << (int)gEpoch.year << "-" << (int)gEpoch.month << "-" << (int)gEpoch.day << " " << (int)gEpoch.hour << ":" << (int)gEpoch.min << ":" << gEpoch.sec << std::endl; - std::cout << "GTime to UYds: " << uYds.year << " " << uYds.doy << " " << uYds.sod << std::endl; + std::cout << "GTime to PTime: " << pTime .bigTime << " " << bTime << std::endl; + std::cout << "GTime to UtcTime: " << utcTime.bigTime << " " << utcTime.to_string(1) << std::endl; + std::cout << "GTime to GEpoch: " << (int)gEpoch.year << "-" << std::setw(2) << (int)gEpoch.month << "-" << std::setw(2) << (int)gEpoch.day << " " << std::setw(2) << (int)gEpoch.hour << ":" << std::setw(2) << (int)gEpoch.min << ":" << std::setw(4) << gEpoch.sec << std::endl; + std::cout << "GTime to UYds: " << (int)uYds.year << " " << (int)uYds.doy << " " << uYds.sod << std::endl; std::cout << "GTime to GWeek: " << gWeek.val << std::endl; std::cout << "GTime to GTow: " << gTow. val << std::endl; std::cout << "GTime to BWeek: " << bWeek.val << std::endl; @@ -637,12 +632,14 @@ void debugTime() std::cout << "GTime to RTod: " << rTod. val << std::endl; + GTime gTimeP = pTime; GTime gTimeU = utcTime; GTime gTimeE = gEpoch; GTime gTimeY = uYds; std::cout << std::endl; std::cout << "anything to GTime:" << std::endl; + std::cout << "PTime to GTime: " << gTimeP.bigTime << " " << gTimeP.to_string(1) << std::endl; std::cout << "UtcTime to GTime: " << gTimeU.bigTime << " " << gTimeU.to_string(1) << std::endl; std::cout << "GEpoch to GTime: " << gTimeE.bigTime << " " << gTimeE.to_string(1) << std::endl; std::cout << "UYds to GTime: " << gTimeY.bigTime << " " << gTimeY.to_string(1) << std::endl; @@ -663,39 +660,79 @@ void debugTime() std::cout << "GTime(RTod, GTime): " << gTimeR.bigTime << " " << gTimeR.to_string(1) << std::endl; + double ep[6]; + + std::cout << std::endl; + std::cout << "GTime to epoch to GTime:" << std::endl; + time2epoch(gTime, ep, E_TimeSys::GPST); std::cout << "GTime to GPST epoch: " << (int)ep[0] << "-" << std::setw(2) << (int)ep[1] << "-" << std::setw(2) << (int)ep[2] << " " << std::setw(2) << (int)ep[3] << ":" << std::setw(2) << (int)ep[4] << ":" << std::setw(4) << ep[5] << std::endl; + GTime gTimeEpochGPS = epoch2time(ep, E_TimeSys::GPST); std::cout << "GPST epoch to GTime: " << gTimeEpochGPS.to_string(1) << std::endl; + time2epoch(gTime, ep, E_TimeSys::GLONASST); std::cout << "GTime to GLONASST epoch: " << (int)ep[0] << "-" << std::setw(2) << (int)ep[1] << "-" << std::setw(2) << (int)ep[2] << " " << std::setw(2) << (int)ep[3] << ":" << std::setw(2) << (int)ep[4] << ":" << std::setw(4) << ep[5] << std::endl; + GTime gTimeEpochGLO = epoch2time(ep, E_TimeSys::GLONASST); std::cout << "GLONASST epoch to GTime: " << gTimeEpochGLO.to_string(1) << std::endl; + time2epoch(gTime, ep, E_TimeSys::GST); std::cout << "GTime to GST epoch: " << (int)ep[0] << "-" << std::setw(2) << (int)ep[1] << "-" << std::setw(2) << (int)ep[2] << " " << std::setw(2) << (int)ep[3] << ":" << std::setw(2) << (int)ep[4] << ":" << std::setw(4) << ep[5] << std::endl; + GTime gTimeEpochGST = epoch2time(ep, E_TimeSys::GST); std::cout << "GST epoch to GTime: " << gTimeEpochGST.to_string(1) << std::endl; + time2epoch(gTime, ep, E_TimeSys::BDT); std::cout << "GTime to BDT epoch: " << (int)ep[0] << "-" << std::setw(2) << (int)ep[1] << "-" << std::setw(2) << (int)ep[2] << " " << std::setw(2) << (int)ep[3] << ":" << std::setw(2) << (int)ep[4] << ":" << std::setw(4) << ep[5] << std::endl; + GTime gTimeEpochBDT = epoch2time(ep, E_TimeSys::BDT); std::cout << "BDT epoch to GTime: " << gTimeEpochBDT.to_string(1) << std::endl; + time2epoch(gTime, ep, E_TimeSys::QZSST); std::cout << "GTime to QZSST epoch: " << (int)ep[0] << "-" << std::setw(2) << (int)ep[1] << "-" << std::setw(2) << (int)ep[2] << " " << std::setw(2) << (int)ep[3] << ":" << std::setw(2) << (int)ep[4] << ":" << std::setw(4) << ep[5] << std::endl; + GTime gTimeEpochQZS = epoch2time(ep, E_TimeSys::QZSST); std::cout << "QZSST epoch to GTime: " << gTimeEpochQZS.to_string(1) << std::endl; + time2epoch(gTime, ep, E_TimeSys::TAI); std::cout << "GTime to TAI epoch: " << (int)ep[0] << "-" << std::setw(2) << (int)ep[1] << "-" << std::setw(2) << (int)ep[2] << " " << std::setw(2) << (int)ep[3] << ":" << std::setw(2) << (int)ep[4] << ":" << std::setw(4) << ep[5] << std::endl; + GTime gTimeEpochTAI = epoch2time(ep, E_TimeSys::TAI); std::cout << "TAI epoch to GTime: " << gTimeEpochTAI.to_string(1) << std::endl; + time2epoch(gTime, ep, E_TimeSys::UTC); std::cout << "GTime to UTC epoch: " << (int)ep[0] << "-" << std::setw(2) << (int)ep[1] << "-" << std::setw(2) << (int)ep[2] << " " << std::setw(2) << (int)ep[3] << ":" << std::setw(2) << (int)ep[4] << ":" << std::setw(4) << ep[5] << std::endl; + GTime gTimeEpochUTC = epoch2time(ep, E_TimeSys::UTC); std::cout << "UTC epoch to GTime: " << gTimeEpochUTC.to_string(1) << std::endl; + + + double yds[6]; + + std::cout << std::endl; + std::cout << "GTime to yds to GTime:" << std::endl; + time2yds(gTime, yds, E_TimeSys::GPST); std::cout << "GTime to GPST yds: " << (int)yds[0] << " " << (int)yds[1] << " " << yds[2] << std::endl; + GTime gTimeYdsGPS = yds2time(yds, E_TimeSys::GPST); std::cout << "GPST yds to GTime: " << gTimeYdsGPS.to_string(1) << std::endl; + time2yds(gTime, yds, E_TimeSys::GLONASST); std::cout << "GTime to GLONASST yds: " << (int)yds[0] << " " << (int)yds[1] << " " << yds[2] << std::endl; + GTime gTimeYdsGLO = yds2time(yds, E_TimeSys::GLONASST); std::cout << "GLONASST yds to GTime: " << gTimeYdsGLO.to_string(1) << std::endl; + time2yds(gTime, yds, E_TimeSys::GST); std::cout << "GTime to GST yds: " << (int)yds[0] << " " << (int)yds[1] << " " << yds[2] << std::endl; + GTime gTimeYdsGST = yds2time(yds, E_TimeSys::GST); std::cout << "GST yds to GTime: " << gTimeYdsGST.to_string(1) << std::endl; + time2yds(gTime, yds, E_TimeSys::BDT); std::cout << "GTime to BDT yds: " << (int)yds[0] << " " << (int)yds[1] << " " << yds[2] << std::endl; + GTime gTimeYdsBDT = yds2time(yds, E_TimeSys::BDT); std::cout << "BDT yds to GTime: " << gTimeYdsBDT.to_string(1) << std::endl; + time2yds(gTime, yds, E_TimeSys::QZSST); std::cout << "GTime to QZSST yds: " << (int)yds[0] << " " << (int)yds[1] << " " << yds[2] << std::endl; + GTime gTimeYdsQZS = yds2time(yds, E_TimeSys::QZSST); std::cout << "QZSST yds to GTime: " << gTimeYdsQZS.to_string(1) << std::endl; + time2yds(gTime, yds, E_TimeSys::TAI); std::cout << "GTime to TAI yds: " << (int)yds[0] << " " << (int)yds[1] << " " << yds[2] << std::endl; + GTime gTimeYdsTAI = yds2time(yds, E_TimeSys::TAI); std::cout << "TAI yds to GTime: " << gTimeYdsTAI.to_string(1) << std::endl; + time2yds(gTime, yds, E_TimeSys::UTC); std::cout << "GTime to UTC yds: " << (int)yds[0] << " " << (int)yds[1] << " " << yds[2] << std::endl; + GTime gTimeYdsUTC = yds2time(yds, E_TimeSys::UTC); std::cout << "UTC yds to GTime: " << gTimeYdsUTC.to_string(1) << std::endl; + + GTow nearGTow= 1; nearTime= GTime(gWeek, nearGTow); gTow = 604800 - 1.1; gTimeG = GTime(gTow, nearTime); - std::cout << std::endl; + std::cout << std::setfill(' ') << std::endl; std::cout << "Week/Day roll-over:" << std::endl; - std::cout << "nearGTow: " << nearGTow.val << "\t\tnearTime: " << nearTime.to_string(1) << std::endl; - std::cout << "gTow: " << gTow. val << "\tGTime(gTow, nearTime): " << gTimeG. to_string(1) << std::endl; + std::cout << "nearGTow: " << std::setw(8) << nearGTow.val << "\tnearTime: " << nearTime.to_string(1) << std::endl; + std::cout << "gTow: " << std::setw(8) << gTow. val << "\tGTime(gTow, nearTime): " << gTimeG. to_string(1) << std::endl; nearGTow= 604800 - 1; nearTime= GTime(gWeek, nearGTow); gTow = 1.1; gTimeG = GTime(gTow, nearTime); - std::cout << "nearGTow: " << nearGTow.val << "\tnearTime: " << nearTime.to_string(1) << std::endl; - std::cout << "gTow: " << gTow. val << "\t\tGTime(gTow, nearTime): " << gTimeG. to_string(1) << std::endl; + std::cout << "nearGTow: " << std::setw(8) << nearGTow.val << "\tnearTime: " << nearTime.to_string(1) << std::endl; + std::cout << "gTow: " << std::setw(8) << gTow. val << "\tGTime(gTow, nearTime): " << gTimeG. to_string(1) << std::endl; BTow nearBTow= 1; nearTime= GTime(bWeek, nearBTow); bTow = 604800 - 1.1; gTimeB = GTime(bTow, nearTime); - std::cout << "nearBTow: " << nearBTow.val << "\t\tnearTime: " << nearTime.to_string(1) << std::endl; - std::cout << "bTow: " << bTow. val << "\tGTime(bTow, nearTime): " << gTimeB. to_string(1) << std::endl; + std::cout << "nearBTow: " << std::setw(8) << nearBTow.val << "\tnearTime: " << nearTime.to_string(1) << std::endl; + std::cout << "bTow: " << std::setw(8) << bTow. val << "\tGTime(bTow, nearTime): " << gTimeB. to_string(1) << std::endl; nearBTow= 604800 - 1; nearTime= GTime(bWeek, nearBTow); bTow = 1.1; gTimeB = GTime(bTow, nearTime); - std::cout << "nearBTow: " << nearBTow.val << "\tnearTime: " << nearTime.to_string(1) << std::endl; - std::cout << "bTow: " << bTow. val << "\t\tGTime(bTow, nearTime): " << gTimeB. to_string(1) << std::endl; + std::cout << "nearBTow: " << std::setw(8) << nearBTow.val << "\tnearTime: " << nearTime.to_string(1) << std::endl; + std::cout << "bTow: " << std::setw(8) << bTow. val << "\tGTime(bTow, nearTime): " << gTimeB. to_string(1) << std::endl; UYds nearYds = uYds; nearYds.sod = 86400 - 10800 + 1; @@ -704,8 +741,8 @@ void debugTime() rTod = 86400 - 1.1; gTimeR = GTime(rTod, nearTime); - std::cout << "nearSod: " << nearYds. sod << "\t\tnearTime: " << nearTime.to_string(1) << "\tnearTod: " << nearTod. val << std::endl; - std::cout << "rTod: " << rTod. val << "\tGTime(rTod, nearTime): " << gTimeR. to_string(1) << std::endl; + std::cout << "nearSod: " << std::setw(8) << nearYds. sod << "\tnearTime: " << nearTime.to_string(1) << "\tnearTod: " << nearTod. val << std::endl; + std::cout << "rTod: " << std::setw(8) << rTod. val << "\tGTime(rTod, nearTime): " << gTimeR. to_string(1) << std::endl; nearYds.sod = 86400 - 10800 - 1; nearTime= nearYds; @@ -713,8 +750,19 @@ void debugTime() rTod = 1.1; gTimeR = GTime(rTod, nearTime); - std::cout << "nearSod: " << nearYds. sod << "\t\tnearTime: " << nearTime.to_string(1) << "\tnearTod: " << nearTod. val << std::endl; - std::cout << "rTod: " << rTod. val << "\tGTime(rTod, nearTime): " << gTimeR. to_string(1) << std::endl; + std::cout << "nearSod: " << std::setw(8) << nearYds. sod << "\tnearTime: " << nearTime.to_string(1) << "\tnearTod: " << nearTod. val << std::endl; + std::cout << "rTod: " << std::setw(8) << rTod. val << "\tGTime(rTod, nearTime): " << gTimeR. to_string(1) << std::endl; + + gEpoch = {2017, 1, 1, 0, 0, 17.9}; + gTimeE = gEpoch; + utcTime = gTimeE; + gTimeU = utcTime; + + std::cout << std::endl; + std::cout << "Leap second roll-over:" << std::endl; + std::cout << "GTime: " << gTimeE. bigTime << " " << gTimeE .to_string(1) << std::endl; + std::cout << "GTime to UtcTime: " << utcTime.bigTime << " " << utcTime.to_string(1) << std::endl; + std::cout << "UtcTime to GTime: " << gTimeU. bigTime << " " << gTimeU .to_string(1) << std::endl; } #include "coordinates.hpp" @@ -771,9 +819,10 @@ void longDoubleTest() std::cout << std::endl << "This system uses " << sizeof(a) * 8 << " bits for long doubles. (Hopefully that number is 128...)" << std::endl; } +#include "rtcmEncoder.hpp" #include "ssr.hpp" -void debugSSR(GTime time, E_Sys sys) +void debugSSR(GTime t0, GTime targetTime, E_Sys sys, SsrOutMap& ssrOutMap) { int iodPos; int iodEph; @@ -783,8 +832,14 @@ void debugSSR(GTime time, E_Sys sys) GTime clkValidStart; GTime clkValidStop; Vector3d dPos[2]; - double dClk[2] = {}; - GTime ephTime = time; + double dClk[3] = {}; + double refClk = 0; + bool refClkFound = false; + bool posDeltaPass[2]; + bool clkDeltaPass[2]; + Vector3d dPosDiff; + double dClkDiff[2]; + GTime ephTime = t0; for (auto& Sat : getSysSats(sys)) { @@ -795,18 +850,58 @@ void debugSSR(GTime time, E_Sys sys) dPos[0] = Vector3d::Zero(); dPos[1] = Vector3d::Zero(); - bool posDeltaPass = ssrPosDelta(time, ephTime, obs, obs.satNav_ptr->transmittedSSR, dPos[0], iodPos, iodEph, ephValidStart, ephValidStop); - bool clkDeltaPass = ssrClkDelta(time, ephTime, obs, obs.satNav_ptr->transmittedSSR, dClk[0], iodClk, clkValidStart, clkValidStop); - posDeltaPass = ssrPosDelta(time, ephTime, obs, obs.satNav_ptr->receivedSSR, dPos[1], iodPos, iodEph, ephValidStart, ephValidStop); - clkDeltaPass = ssrClkDelta(time, ephTime, obs, obs.satNav_ptr->receivedSSR, dClk[1], iodClk, clkValidStart, clkValidStop); + posDeltaPass[0] = ssrPosDelta(t0, ephTime, obs, obs.satNav_ptr->transmittedSSR, dPos[0], iodPos, iodEph, ephValidStart, ephValidStop); + clkDeltaPass[0] = ssrClkDelta(t0, ephTime, obs, obs.satNav_ptr->transmittedSSR, dClk[0], iodClk, clkValidStart, clkValidStop); + posDeltaPass[1] = ssrPosDelta(t0, ephTime, obs, obs.satNav_ptr->receivedSSR, dPos[1], iodPos, iodEph, ephValidStart, ephValidStop); + clkDeltaPass[1] = ssrClkDelta(t0, ephTime, obs, obs.satNav_ptr->receivedSSR, dClk[1], iodClk, clkValidStart, clkValidStop); - if (posDeltaPass && clkDeltaPass) + if ( posDeltaPass[0] && clkDeltaPass[0] + &&posDeltaPass[1] && clkDeltaPass[1]) { - std::cout << "Debugging ssr: " << time.to_string(1) << "\t" << Sat.id() << std::setprecision(4) << std::fixed - << "\t" << std::setw(7) << (dPos[0] - dPos[1]).transpose() << "\t" << std::setw(7) << dPos[0].transpose() << "\t" << std::setw(7) << dPos[1].transpose() - << "\t" << std::setw(8) << (dClk[0] - dClk[1]) << "\t" << std::setw(8) << dClk[0] << "\t" << std::setw(8) << dClk[1] << std::endl; + if ( refClkFound == false + &&abs(dClk[0]) < 1E-6) + { + refClk = dClk[1]; + refClkFound = true; + } + + dClk[2] = dClk[1] - refClk; + + dPosDiff = dPos[0] - dPos[1]; + dClkDiff[0] = dClk[0] - dClk[1]; + dClkDiff[1] = dClk[0] - dClk[2]; + + std::cout << std::setprecision(4) << std::fixed; + std::cout << "Debugging ssr: " + << "\tnow time (GPST): " << timeGet().to_string(1) + << "\ttarget time (GPST): " << targetTime.to_string(1) + << "\tt0 (GPST): " << t0.to_string(1) + << "\tsat: " << Sat.id() + << "\tdecoded: " << std::setw(7) << dPos[1] .transpose() << "\t" << std::setw(8) << dClk[1] << "\t" << std::setw(8) << dClk[2] + << "\tencoded: " << std::setw(7) << dPos[0] .transpose() << "\t" << std::setw(8) << dClk[0] + << "\tencoded-decoded: " << std::setw(7) << dPosDiff.transpose() << "\t" << std::setw(8) << dClkDiff[1] + << std::endl; } } + + std::cout << std::setprecision(4) << std::fixed; + for (auto& [sat, ssrOut] : ssrOutMap) + { + std::cout << "Straddle clks: " + << "\tnow time (GPST): " << timeGet().to_string(1) + << "\ttarget time (GPST): " << targetTime.to_string(1) + << "\tt0 (GPST): " << t0.to_string(1) + << "\tsat: " << sat.id() + << "\ttime[0]: " << ssrOut.clkInput.vals[0].time.to_string(1) + << "\tiode[0]: " << std::setw( 3) << ssrOut.clkInput.vals[0].iode + << "\tbrdc[0]: " << std::setw(12) << ssrOut.clkInput.vals[0].brdcClk + << "\tprec[0]: " << std::setw(12) << ssrOut.clkInput.vals[0].precClk + << "\ttime[1]: " << ssrOut.clkInput.vals[1].time.to_string(1) + << "\tiode[1]: " << std::setw( 3) << ssrOut.clkInput.vals[1].iode + << "\tbrdc[1]: " << std::setw(12) << ssrOut.clkInput.vals[1].brdcClk + << "\tprec[1]: " << std::setw(12) << ssrOut.clkInput.vals[1].precClk + << std::endl; + } } void reflector() @@ -869,35 +964,7 @@ void reflector() totalMomentum /= totalFrontalarea; printf("%10.4f %10.4f %10.4f -> %10.4f %10.4f %10.4f \n", source(0), source(1), source(2), totalMomentum(0), totalMomentum(1), totalMomentum(2)); } -} - -void light() -{ - double v = 0; - - double c = 1; - - double t1 = -4; - double t2 = -t1; - double tof = t2-t1/2; - - for (int rec = 1; rec < 10; rec++) - { - std::cout << "\n\nrec = " << rec; - for (int i = 0; i < 10; i++) - { - double t = t2-tof; - - double x = v * t; - - double r = fabs(rec - x); - - tof = r / c; - - std::cout << "\nt = " << t << " x = " << x << " r = " << r << " tof = " << tof; - } - } } // void Spawn() @@ -1127,7 +1194,87 @@ void debugAttitude() } } +void infiniteTest() +{ + KFState kfState; + + + GTime time; + time += 60; + +// for (int i = 0; i < 1000; i++) + { + KFMeasEntryList kfMeasEntryList; + + KFKey ionoKey; + KFKey ambKey; + + ionoKey.type = KF::IONO_STEC; + ambKey.type = KF::AMBIGUITY; + + + InitialState ionoInit; + ionoInit.P = 100; + ionoInit.Q = -1; + + InitialState ambInit; + ambInit.P = 100; + + + + { + KFKey obsKey; + obsKey.num = 1; + + KFMeasEntry measEntry(&kfState); + + measEntry.addDsgnEntry(ionoKey, 1, ionoInit); + + measEntry.setInnov(5); +// measEntry.setNoise(1); + + measEntry.addNoiseEntry(obsKey, 1, 1); + + kfMeasEntryList.push_back(measEntry); + } + + { + KFKey obsKey; + obsKey.num = 2; + + KFMeasEntry measEntry(&kfState); + + measEntry.addDsgnEntry(ionoKey, 1, ionoInit); + measEntry.addDsgnEntry(ambKey, 1, ambInit); + + measEntry.setInnov(8); +// measEntry.setNoise(1); + + measEntry.addNoiseEntry(obsKey, 1, 1); + + kfMeasEntryList.push_back(measEntry); + } + + kfState.output_residuals = true; + + kfState.stateTransition(std::cout, time); + + kfState.outputStates(std::cout); + + KFMeas combinedMeas = kfState.combineKFMeasList(kfMeasEntryList, time); + + kfState.filterKalman(std::cout, combinedMeas, true); + + kfState.outputStates(std::cout); + + + time++; + } +} + void doDebugs() { +// infiniteTest(); +// exit(0); } diff --git a/src/cpp/common/enums.h b/src/cpp/common/enums.h index e8f56327b..44bb23883 100644 --- a/src/cpp/common/enums.h +++ b/src/cpp/common/enums.h @@ -77,14 +77,6 @@ BETTER_ENUM(E_Sys, short int, IMS, COMB) - -BETTER_ENUM(E_DCBPair, short int, - NONE, - P1_P2, - P1_C1, - P2_C2) - - BETTER_ENUM(E_OffsetType, short int, UNSPECIFIED, APC, @@ -173,7 +165,16 @@ BETTER_ENUM(KF, short int, EMP_DYB_3C, EMP_DYB_3S, EMP_DYB_4C, - EMP_DYB_4S, LAST_ORBIT_STATE = EMP_DYB_4S, + EMP_DYB_4S, + SRP_DYB_0, + SRP_DYB_1C, + SRP_DYB_1S, + SRP_DYB_2C, + SRP_DYB_2S, + SRP_DYB_3C, + SRP_DYB_3S, + SRP_DYB_4C, + SRP_DYB_4S, LAST_ORBIT_STATE = SRP_DYB_4S, RANGE @@ -241,11 +242,6 @@ BETTER_ENUM(E_IonoFrame, int, EARTH_FIXED, ///< Earth-fixed reference frame SUN_FIXED) ///< Sun-fixed reference frame -BETTER_ENUM(E_LinearCombo, int, //todo aaron, remove this and use code priorities only - ANY, - L1L2_ONLY, - L1L5_ONLY) - BETTER_ENUM(E_Period, int, SECOND = 1, MINUTE = 60, @@ -790,6 +786,11 @@ BETTER_ENUM(E_FilePos, short int, NUM_SAMPLES, FOOTER) +BETTER_ENUM(E_SSROutTiming, short int, + GPS_TIME, + LATEST_CLOCK_ESTIMATE) + + BETTER_ENUM(E_Component, short int, NONE, X, @@ -831,6 +832,15 @@ BETTER_ENUM(E_Component, short int, EOP, NET_RESIDUAL, ORBIT_PT, - SAT_REFLECTOR_DELTA) + SAT_REFLECTOR_DELTA, + CENTRAL_FORCE, + ALBEDO, + INDIRECT_J2, + EMPIRICAL, + GENERAL_RELATIVITY, + EGM, + SRP, + ANTENNA_THRUST, + PLANETARY_PERTURBATION) diff --git a/src/cpp/common/ephBroadcast.cpp b/src/cpp/common/ephBroadcast.cpp index 7f4a6a9c3..955250052 100644 --- a/src/cpp/common/ephBroadcast.cpp +++ b/src/cpp/common/ephBroadcast.cpp @@ -36,7 +36,7 @@ double var_uraeph( 2.4, 3.4, 4.85, 6.85, 9.65, 13.65, 24.0, 48.0, 96.0, 192.0, 384.0, 768.0, 1536.0, 3072.0, 6144.0 }; - return ura < 0 || 15 < ura ? SQR(6144.0) : SQR(ura_value[ura]); + return ura < 0 || 15 <= ura ? SQR(6144.0) : SQR(ura_value[ura]); } /** select EOP/ION messages @@ -302,7 +302,7 @@ void eph2Pos( if (n >= MAX_ITER_KEPLER) { -// trace(2,"kepler iteration overflow sat=%2d\n",eph->Sat); + printf("kepler iteration overflow sat=%s\n",eph.Sat.id().c_str()); return; } @@ -446,7 +446,7 @@ bool satClkBroadcast( double& satClkVel, double& ephVar, bool& ephClkValid, - int& obsIode, + int& iode, Navigation& nav) { double satClk1; @@ -462,7 +462,7 @@ bool satClkBroadcast( auto type = acsConfig.used_nav_types[Sat.sys]; - auto eph_ptr = seleph(trace, teph, Sat, type, obsIode, nav); + auto eph_ptr = seleph(trace, teph, Sat, type, iode, nav); if (eph_ptr == nullptr) { @@ -480,7 +480,7 @@ bool satClkBroadcast( ephClkValid = true; } - obsIode = eph.iode; + iode = eph.iode; /* satellite velocity and clock drift by differential approx */ satClkVel = (satClk1 - satClk) / tt; @@ -502,7 +502,7 @@ bool satPosBroadcast( Vector3d& satVel, double& ephVar, bool& ephPosValid, - int& obsIode, + int& iode, Navigation& nav) { Vector3d rSat_1; @@ -514,7 +514,7 @@ bool satPosBroadcast( auto type = acsConfig.used_nav_types[Sat.sys]; - auto eph_ptr = seleph(trace, teph, Sat, type, obsIode, nav); + auto eph_ptr = seleph(trace, teph, Sat, type, iode, nav); if (eph_ptr == nullptr) { @@ -532,7 +532,7 @@ bool satPosBroadcast( ephPosValid = true; } - obsIode = eph.iode; + iode = eph.iode; /* satellite velocity and clock drift by differential approx */ satVel = (rSat_1 - rSat) / tt; @@ -551,7 +551,7 @@ bool satClkBroadcast( double& satClkVel, double& ephVar, bool& ephClkValid, - int& obsIode, + int& iode, Navigation& nav) { int sys = Sat.sys; @@ -561,9 +561,9 @@ bool satClkBroadcast( if ( sys == +E_Sys::GPS || sys == +E_Sys::GAL || sys == +E_Sys::QZS - || sys == +E_Sys::BDS) { return satClkBroadcast (trace, time, teph, Sat, satClk, satClkVel, ephVar, ephClkValid, obsIode, nav); } - else if ( sys == +E_Sys::GLO) { return satClkBroadcast (trace, time, teph, Sat, satClk, satClkVel, ephVar, ephClkValid, obsIode, nav); } - else if ( sys == +E_Sys::SBS) { return satClkBroadcast (trace, time, teph, Sat, satClk, satClkVel, ephVar, ephClkValid, obsIode, nav); } + || sys == +E_Sys::BDS) { return satClkBroadcast (trace, time, teph, Sat, satClk, satClkVel, ephVar, ephClkValid, iode, nav); } + else if ( sys == +E_Sys::GLO) { return satClkBroadcast (trace, time, teph, Sat, satClk, satClkVel, ephVar, ephClkValid, iode, nav); } + else if ( sys == +E_Sys::SBS) { return satClkBroadcast (trace, time, teph, Sat, satClk, satClkVel, ephVar, ephClkValid, iode, nav); } else { return false; } } @@ -579,7 +579,7 @@ bool satPosBroadcast( Vector3d& satVel, double& ephVar, bool& ephPosValid, - int& obsIode, + int& iode, Navigation& nav) { int sys = Sat.sys; @@ -589,9 +589,9 @@ bool satPosBroadcast( if ( sys == +E_Sys::GPS || sys == +E_Sys::GAL || sys == +E_Sys::QZS - || sys == +E_Sys::BDS) { return satPosBroadcast (trace, time, teph, Sat, rSat, satVel, ephVar, ephPosValid, obsIode, nav); } - else if ( sys == +E_Sys::GLO) { return satPosBroadcast (trace, time, teph, Sat, rSat, satVel, ephVar, ephPosValid, obsIode, nav); } - else if ( sys == +E_Sys::SBS) { return satPosBroadcast (trace, time, teph, Sat, rSat, satVel, ephVar, ephPosValid, obsIode, nav); } + || sys == +E_Sys::BDS) { return satPosBroadcast (trace, time, teph, Sat, rSat, satVel, ephVar, ephPosValid, iode, nav); } + else if ( sys == +E_Sys::GLO) { return satPosBroadcast (trace, time, teph, Sat, rSat, satVel, ephVar, ephPosValid, iode, nav); } + else if ( sys == +E_Sys::SBS) { return satPosBroadcast (trace, time, teph, Sat, rSat, satVel, ephVar, ephPosValid, iode, nav); } else { return false; } } diff --git a/src/cpp/common/ephPrecise.cpp b/src/cpp/common/ephPrecise.cpp index ef54ac550..e4e07e2b0 100644 --- a/src/cpp/common/ephPrecise.cpp +++ b/src/cpp/common/ephPrecise.cpp @@ -56,19 +56,19 @@ int readdcb( entry.source = "dcb"; string line; + string type; while (std::getline(inputStream, line)) { char* buff = &line[0]; - E_DCBPair type = E_DCBPair::NONE; - if (strstr(buff,"DIFFERENTIAL (P1-P2) CODE BIASES")) type = E_DCBPair::P1_P2; - else if (strstr(buff,"DIFFERENTIAL (P1-C1) CODE BIASES")) type = E_DCBPair::P1_C1; - else if (strstr(buff,"DIFFERENTIAL (P2-C2) CODE BIASES")) type = E_DCBPair::P2_C2; + if (strstr(buff,"DIFFERENTIAL (P1-P2) CODE BIASES")) type = "P1_P2"; + else if (strstr(buff,"DIFFERENTIAL (P1-C1) CODE BIASES")) type = "P1_C1"; + else if (strstr(buff,"DIFFERENTIAL (P2-C2) CODE BIASES")) type = "P2_C2"; char str1[32] = ""; char str2[32] = ""; - if ( !type + if ( type.empty() ||sscanf(buff,"%31s %31s", str1, str2) < 1) continue; @@ -82,15 +82,17 @@ int readdcb( if (Sat.sys == +E_Sys::GPS) { - if (type == +E_DCBPair::P1_P2) { entry.cod1 = E_ObsCode::L1W; entry.cod2 = E_ObsCode::L2W; } - else if (type == +E_DCBPair::P1_C1) { entry.cod1 = E_ObsCode::L1W; entry.cod2 = E_ObsCode::L1C; } - else if (type == +E_DCBPair::P2_C2) { entry.cod1 = E_ObsCode::L2W; entry.cod2 = E_ObsCode::L2D; } + if (type == "P1_P2") { entry.cod1 = E_ObsCode::L1W; entry.cod2 = E_ObsCode::L2W; } + else if (type == "P1_C1") { entry.cod1 = E_ObsCode::L1W; entry.cod2 = E_ObsCode::L1C; } + else if (type == "P2_C2") { entry.cod1 = E_ObsCode::L2W; entry.cod2 = E_ObsCode::L2D; } + else continue; } else if (Sat.sys == +E_Sys::GLO) { - if (type == +E_DCBPair::P1_P2) { entry.cod1 = E_ObsCode::L1P; entry.cod2 = E_ObsCode::L2P; } - else if (type == +E_DCBPair::P1_C1) { entry.cod1 = E_ObsCode::L1P; entry.cod2 = E_ObsCode::L1C; } - else if (type == +E_DCBPair::P2_C2) { entry.cod1 = E_ObsCode::L2P; entry.cod2 = E_ObsCode::L2C; } + if (type == "P1_P2") { entry.cod1 = E_ObsCode::L1P; entry.cod2 = E_ObsCode::L2P; } + else if (type == "P1_C1") { entry.cod1 = E_ObsCode::L1P; entry.cod2 = E_ObsCode::L1C; } + else if (type == "P2_C2") { entry.cod1 = E_ObsCode::L2P; entry.cod2 = E_ObsCode::L2C; } + else continue; } string id; @@ -500,17 +502,10 @@ VectorEcef satAntOff( E_FType j; E_FType k; + E_FType l; E_Sys sys = Sat.sys; - switch (sys) - { - case E_Sys::GPS: j = F1; k = F2; break; //todo aaron, change to use same format as new_preprocessor - case E_Sys::GLO: j = G1; k = G2; break; - case E_Sys::GAL: j = F1; k = F5; break; - case E_Sys::BDS: j = B1; k = B3; break; - case E_Sys::QZS: j = F1; k = F2; break; - case E_Sys::SBS: j = F1; k = F5; break; - default: return dAnt; - } + if (!satFreqs(sys,j,k,l)) + return dAnt; if ( lamMap[j] == 0 ||lamMap[k] == 0) diff --git a/src/cpp/common/ephSSR.cpp b/src/cpp/common/ephSSR.cpp index a5fc5ed3f..03e0eb80d 100644 --- a/src/cpp/common/ephSSR.cpp +++ b/src/cpp/common/ephSSR.cpp @@ -218,8 +218,8 @@ bool satPosSSR( double& satClkVel = satPos.satClkVel; bool& ephPosValid = satPos.ephPosValid; bool& ephClkValid = satPos.ephClkValid; - int& obsIodeClk = satPos.iodeClk; - int& obsIodePos = satPos.iodePos; + int& iodeClk = satPos.iodeClk; + int& iodePos = satPos.iodePos; double& posVar = satPos.posVar; double& clkVar = satPos.satClkVar; @@ -250,14 +250,17 @@ bool satPosSSR( { satPos.failureSSRFail = true; - BOOST_LOG_TRIVIAL(warning) << "Warning: SSR Corrections not found for " << satPos.Sat.id(); + BOOST_LOG_TRIVIAL(warning) << "Warning: SSR Corrections not found for " << satPos.Sat.id(); + trace << "Warning: SSR Corrections not found for " << satPos.Sat.id(); + return false; } if ( ephValidStart >= clkValidStop ||clkValidStart >= ephValidStop) { - BOOST_LOG_TRIVIAL(warning) << "Warning: Timing inconsistent for " << satPos.Sat.id() << " : " << ephValidStart.to_string(0) << "-" << ephValidStop.to_string(0) << " " << clkValidStart.to_string(0) << "-" << clkValidStop.to_string(0); + BOOST_LOG_TRIVIAL(warning) << "Warning: Timing inconsistent for " << satPos.Sat.id() << " : " << ephValidStart.to_string(0) << "-" << ephValidStop.to_string(0) << " " << clkValidStart.to_string(0) << "-" << clkValidStop.to_string(0); + trace << "Warning: Timing inconsistent for " << satPos.Sat.id() << " : " << ephValidStart.to_string(0) << "-" << ephValidStop.to_string(0) << " " << clkValidStart.to_string(0) << "-" << clkValidStop.to_string(0); if (ephValidStart >= clkValidStop) ephTime = clkValidStop - 0.5; if (clkValidStart >= ephValidStop) ephTime = ephValidStop - 0.5; @@ -268,13 +271,18 @@ bool satPosSSR( { satPos.failureIodeConsistency = true; - BOOST_LOG_TRIVIAL(warning) << "Warning: IOD inconsistent for " << satPos.Sat.id() << iodClk << " " << iodPos; + BOOST_LOG_TRIVIAL(warning) << "Warning: IOD inconsistent for " << satPos.Sat.id() << iodClk << " " << iodPos; + trace << "Warning: IOD inconsistent for " << satPos.Sat.id() << iodClk << " " << iodPos; + return false; } + iodePos = iodEph; + iodeClk = iodEph; + bool pass = true; - pass &= satPosBroadcast(trace, time, teph, Sat, rSat, satVel, posVar, ephPosValid, iodEph, nav); - pass &= satClkBroadcast(trace, time, teph, Sat, satClk, satClkVel, clkVar, ephClkValid, iodEph, nav); + pass &= satPosBroadcast(trace, time, teph, Sat, rSat, satVel, posVar, ephPosValid, iodePos, nav); + pass &= satClkBroadcast(trace, time, teph, Sat, satClk, satClkVel, clkVar, ephClkValid, iodeClk, nav); if (pass == false) { @@ -285,13 +293,15 @@ bool satPosSSR( if (clkValidStart < ephValidStart) ephTime = clkValidStart - 0.5; else ephTime = ephValidStart - 0.5; - BOOST_LOG_TRIVIAL(warning) << "Warning: IODE BRDC not found for " << satPos.Sat.id() << " - adjusting ephTime"; + BOOST_LOG_TRIVIAL(warning) << "Warning: IODE BRDC not found for " << satPos.Sat.id() << " - adjusting ephTime"; + trace << "Warning: IODE BRDC not found for " << satPos.Sat.id() << " - adjusting ephTime"; continue; } satPos.failureBroadcastEph = true; - BOOST_LOG_TRIVIAL(warning) << "warning: IODE BRDC not found for " << satPos.Sat.id(); + BOOST_LOG_TRIVIAL(warning) << "warning: IODE BRDC not found for " << satPos.Sat.id(); + trace << "warning: IODE BRDC not found for " << satPos.Sat.id(); return false; } @@ -322,8 +332,9 @@ bool satPosSSR( } clkVar = var_urassr(ura); + posVar = 0; - tracepdeex(4, trace, "\nSSR_EPH %s %s %13.3f %13.3f %13.3f %11.3f ", time.to_string(6).c_str(), Sat.id().c_str(), rSat[0], rSat[1], rSat[2], 1e9*satClk); + tracepdeex(3, trace, "\nSSR_EPH %s %s %13.3f %13.3f %13.3f %11.3f ", time.to_string(6).c_str(), Sat.id().c_str(), rSat[0], rSat[1], rSat[2], 1e9*satClk); tracepdeex(5, trace, "%s: %s sat=%s deph=%6.3f %6.3f %6.3f dclk=%6.3f var=%6.3f iode=%d clktimes:%s %s ephtimes%s %s\n", __FUNCTION__, diff --git a/src/cpp/common/ephemeris.cpp b/src/cpp/common/ephemeris.cpp index 6362250b5..aee7b1928 100644 --- a/src/cpp/common/ephemeris.cpp +++ b/src/cpp/common/ephemeris.cpp @@ -162,8 +162,14 @@ bool satpos( satPos.posSource = ephType; satPos.ephPosValid = true; + if (ephType == +E_Source::SSR) + { + satPos.clkSource = ephType; + satPos.ephClkValid = true; + } + if (ephType == +E_Source::SSR && acsConfig.ssr_input_antenna_offset == +E_OffsetType::UNSPECIFIED) - BOOST_LOG_TRIVIAL(error) << "Error: ssr_input_antenna_offset has not been set in config.\n"; + BOOST_LOG_TRIVIAL(error) << "Error: ssr_antenna_offset has not been set in config.\n"; if (ephType == +E_Source::SSR && offsetType == +E_OffsetType::APC && acsConfig.ssr_input_antenna_offset == +E_OffsetType::COM) antennaScalar = +1; if (ephType == +E_Source::SSR && offsetType == +E_OffsetType::COM && acsConfig.ssr_input_antenna_offset == +E_OffsetType::APC) antennaScalar = -1; @@ -196,17 +202,10 @@ bool satpos( E_FType j; E_FType k; + E_FType l; E_Sys sys = satPos.Sat.sys; - switch (sys) - { - case E_Sys::GPS: j = F1; k = (acsConfig.ionoOpts.iflc_freqs == +E_LinearCombo::L1L5_ONLY) ? F5 : F2; break; - case E_Sys::GLO: j = G1; k = G2; break; - case E_Sys::GAL: j = F1; k = F5; break; - case E_Sys::BDS: j = B1; k = B3; break; - case E_Sys::QZS: j = F1; k = F2; break; - case E_Sys::SBS: j = F1; k = F5; break; - default: return false; - } + if (!satFreqs(sys,j,k,l)) + return false; if ( satPos.satNav_ptr->lamMap.empty() ||satPos.satNav_ptr->lamMap[j] == 0 @@ -231,7 +230,7 @@ void adjustRelativity( { E_Relativity clockHasRelativity; - if (satPos.clkSource == +E_Source::BROADCAST && satPos.Sat.sys == +E_Sys::GLO) clockHasRelativity = E_Relativity::ON; + if (satPos.clkSource == +E_Source::BROADCAST && satPos.Sat.sys == +E_Sys::GLO) clockHasRelativity = E_Relativity::ON; // Ref: RTCM STANDARD 10403.3 else clockHasRelativity = E_Relativity::OFF; if (clockHasRelativity == applyRelativity) @@ -259,12 +258,10 @@ bool satPosClk( Navigation& nav, ///< Navigation data vector posSources, ///< Source of ephemeris data vector clkSources, ///< Source of ephemeris data + const KFState* kfState_ptr, ///< Optional pointer to a kalman filter to take values from E_OffsetType offsetType, ///< Point of satellite to output position of - E_Relativity applyRelativity, ///< Option to apply relativistic correction to clock - const KFState* kfState_ptr) ///< Optional pointer to a kalman filter to take values from + E_Relativity applyRelativity) ///< Option to apply relativistic correction to clock { - tracepdeex(3, trace, "\n%-10s: teph=%s %s", __FUNCTION__, teph.to_string(3).c_str(), obs.Sat.id()); - if (obs.exclude) { obs.failureExclude = true; @@ -272,6 +269,8 @@ bool satPosClk( return false; } + tracepdeex(3, trace, "\n%-10s: teph=%s %s", __FUNCTION__, teph.to_string(3).c_str(), obs.Sat.id()); + double pr = 0; for (auto& [a, sig] : obs.Sigs) @@ -313,7 +312,7 @@ bool satPosClk( tracepdeex(5, trace, "\neph time %s %s pr=%.5f, satClk= %.5f", obs.Sat.id().c_str(), time.to_string(3).c_str(), pr / CLIGHT, obs.satClk); - time -= obs.satClk; + time -= obs.satClk; // Eugene: what if using ssr? // satellite position and clock at transmission time pass = satpos(trace, time, teph, obs, posSources, offsetType, nav, kfState_ptr); @@ -329,13 +328,14 @@ bool satPosClk( adjustRelativity(obs, applyRelativity); - tracepdeex(4, trace, "\n%s sat=%s rs=%13.3f %13.3f %13.3f dtSat=%12.3f var=%7.3f ephPosValid=%1X %s ephClkValid=%1X %s", + tracepdeex(4, trace, "\n%s sat=%s rs=%13.3f %13.3f %13.3f dtSat=%12.3f varPos=%7.3f varClk=%7.3f ephPosValid=%1X %s ephClkValid=%1X %s", obs.time.to_string(6).c_str(), obs.Sat.id().c_str(), obs.rSat[0], obs.rSat[1], obs.rSat[2], obs.satClk * 1E9, + obs.posVar, obs.satClkVar, obs.ephPosValid, obs.posSource._to_string(), diff --git a/src/cpp/common/ephemeris.hpp b/src/cpp/common/ephemeris.hpp index 649a8f467..2904d9805 100644 --- a/src/cpp/common/ephemeris.hpp +++ b/src/cpp/common/ephemeris.hpp @@ -62,15 +62,15 @@ struct Eph : BrdcEph, KeplerEph { E_NavMsgType type = E_NavMsgType::NONE; ///< message type SatSys Sat; ///< satellite number - int iode; ///< GPS/QZS: IODE, GAL: IODnav - int iodc; ///< IODC + int iode = -1; ///< GPS/QZS: IODE, GAL: IODnav + int iodc = -1; ///< IODC int aode; ///< BDS AODE int aodc; ///< BDS AODC int sva; ///< SV accuracy (URA index) E_Svh svh; ///< SV health int week; ///< GPS/QZS: gps week, GAL:gps week (i.e. galileo week + 1024), BDS: beidou week - int code; ///< GPS/QZS: code on L2, GAL: data source - int flag; ///< GPS L2 P data flag + int code = 0; ///< GPS/QZS: code on L2, GAL: data source + int flag = 0; ///< GPS L2 P data flag GTime toc; ///< time of clock GTime toe; ///< time of ephemeris GTime ttm; ///< transmission time @@ -110,8 +110,8 @@ struct Eph : BrdcEph, KeplerEph int e5b_dvs = 0; ///< GAL E5b data validity status int e1_hs = 0; ///< GAL E1 signal health status int e1_dvs = 0; ///< GAL E1 data validity status - double ttms; ///< transmission time (s) within week - int fitFlag; ///< fit flag + double ttms = 0; ///< transmission time (s) within week + int fitFlag = 0; ///< fit flag template @@ -163,7 +163,7 @@ struct Geph : BrdcEph { E_NavMsgType type = E_NavMsgType::NONE; ///< message type SatSys Sat; ///< satellite number - int iode; ///< IODE (0-6 bit of tb field) + int iode = -1; ///< IODE (0-6 bit of tb field) int frq; ///< satellite frequency number E_Svh svh; ///< satellite health int sva; ///< satellite accuracy @@ -238,9 +238,11 @@ struct Seph : BrdcEph VectorEcef acc; ///< satellite acceleration (m/s^2) (ecef) double af0 = 0; ///< satellite clock-offset/drift (s) double af1 = 0; ///< satellite clock-drift (s/s) - int iode = 0; //unused, for templating only + int iode = -1; //unused, for templating only GTime toe; //unused, for templating only -}; + + double tofs; ///< TOF (s) within the week + }; /** GPS/QZS CNAV/CNAV-2 or BDS CNAV-1/CNAV-2/CNAV-3 ephemeris */ @@ -249,8 +251,8 @@ struct Ceph : KeplerEph E_NavMsgType type = E_NavMsgType::NONE; ///< message type E_SatType orb = E_SatType::NONE; ///< BDS sat/orbit type SatSys Sat; ///< satellite number - int iode = 0; ///< BDS CNAV1/CNV2 IODE - int iodc = 0; ///< BDS CNAV1/CNV2 IODC + int iode = -1; ///< BDS CNAV1/CNV2 IODE + int iodc = -1; ///< BDS CNAV1/CNV2 IODC E_Svh svh; ///< SV health int wnop = 0; ///< GPS/QZS: GPS week number (of prediction?) with AR int flag = 0; ///< BDS B1C/B2a+B1C/B2b integrity flags @@ -277,6 +279,8 @@ struct Ceph : KeplerEph ///< GPS/QZS: tgd[0]=TGD ///< BDS CNAV1/CNV2: tgd[0]=TGD_B1Cp, tgd[1]=TGD_B2ap ///< BDS CNAV3: tgd[2]=TGD_B2bI + + double ttms = 0; ///< transmission time (s) within week }; /** system Time offset message @@ -291,9 +295,11 @@ struct STO E_SbasId sid = E_SbasId::NONE; ///< SBAS ID E_UtcId uid = E_UtcId::NONE; ///< UTC ID - double A0; ///< (sec) - double A1; ///< (sec/sec) - double A2; ///< (sec/sec^2) + double A0 = 0; ///< (sec) + double A1 = 0; ///< (sec/sec) + double A2 = 0; ///< (sec/sec^2) + + double ttms = 0; ///< transmission time (s) within week }; /** EOP message @@ -314,6 +320,8 @@ struct EOP double dut1 = 0; ///< ut1-utc or ut1-gpst (s) double dur = 0; ///< delta ut1 rate (s/day) double durr = 0; ///< delta ut1 rate rate (s/day^2) + + double ttms; ///< transmission time (s) within week }; /** ionosphere message @@ -411,9 +419,9 @@ bool satPosClk( Navigation& nav, vector posSources, vector clkSources, + const KFState* kfState_ptr = nullptr, E_OffsetType offsetType = E_OffsetType::COM, - E_Relativity applyRelativity = E_Relativity::ON, - const KFState* kfState_ptr = nullptr); + E_Relativity applyRelativity = E_Relativity::ON); void readSp3ToNav( string& file, diff --git a/src/cpp/common/erp.cpp b/src/cpp/common/erp.cpp index 804453633..e4e13620b 100644 --- a/src/cpp/common/erp.cpp +++ b/src/cpp/common/erp.cpp @@ -10,7 +10,7 @@ using std::chrono::system_clock; using std::string; -#include "peaCommitVersion.h" +#include "peaCommitStrings.hpp" #include "instrument.hpp" #include "navigation.hpp" #include "constants.hpp" @@ -150,7 +150,7 @@ void writeERP( if (erpStream.tellp() == 0) { erpStream << "VERSION 2" << std::endl; - erpStream << " Generated by GINAN " << GINAN_COMMIT_VERSION << " branch " << GINAN_BRANCH_NAME << std::endl; + erpStream << " Generated by GINAN " << ginanCommitVersion() << " branch " << ginanBranchName() << std::endl; erpStream << "----------------------------------------------------------------------------------------------------------------" << std::endl; erpStream << " MJD Xpole Ypole UT1-UTC LOD Xsig Ysig UTsig LODsig Nr Nf Nt Xrt Yrt" << std::endl; diff --git a/src/cpp/common/gTime.cpp b/src/cpp/common/gTime.cpp index d5cbd5892..b66cffcc6 100644 --- a/src/cpp/common/gTime.cpp +++ b/src/cpp/common/gTime.cpp @@ -28,6 +28,8 @@ const GTime BDS_t0 = GEpoch{2006, E_Month::JAN, 1, 0, 0, 0 + GPS_SUB_UTC_2006 const int GPS_t0_sub_POSIX_t0 = 315964800; const double MJD_j2000 = 51544.5; +const auto POSIX_GPS_t0 = boost::posix_time::from_time_t(GPS_t0_sub_POSIX_t0); + const int secondsInWeek = 60 * 60 * 24 * 7; const int secondsInDay = 60 * 60 * 24; @@ -111,7 +113,8 @@ int str2time( const char* s, int i, int n, - GTime& t) + GTime& t, + E_TimeSys tsys) { double ep[6]; char str[256],*p=str; @@ -145,16 +148,18 @@ int str2time( if (ep[0] < 100) ep[0] += ep[0] < 80 ? 2000 : 1900; - t = epoch2time(ep); + t = epoch2time(ep, tsys); return 0; } -GTime yds2time(const int* yds) +GTime yds2time( + const double* yds, + E_TimeSys tsys) { - int year = yds[0]; - int doy = yds[1]; - int sec = yds[2]; + int year = (int) yds[0]; + int doy = (int) yds[1]; + double sec = yds[2]; if ( year < 1970 ||doy < 1 @@ -169,30 +174,66 @@ GTime yds2time(const int* yds) int days = (year-1970)*365 + leapDays + doy - 1; - PTime time = {}; - time.bigTime = days * 86400.0 + sec; //.0 to prevent eventual overflow + PTime pTime = {}; + pTime.bigTime = days * 86400.0 + sec; //.0 to prevent eventual overflow + + GTime time = pTime; + switch (tsys) + { + case E_TimeSys::GPST: break; // nothing to do for now + case E_TimeSys::GST: break; // nothing to do for now + case E_TimeSys::QZSST: break; // nothing to do for now + case E_TimeSys::BDT: { time += GPS_SUB_UTC_2006; } break; + case E_TimeSys::GLONASST: { time -= 10800; } // fallthough to account for leap seconds further + case E_TimeSys::UTC: { UtcTime utcTime; utcTime.bigTime = time.bigTime; time = utcTime; } break; + case E_TimeSys::TAI: { time += GPS_SUB_TAI; } break; + default: + { + BOOST_LOG_TRIVIAL(error) << "Unsupported / Unknown time system: " << tsys._to_string() << ", use GPST by default." << std::endl; + } + } return time; } +void time2yds( + GTime time, + double* yds, + E_TimeSys tsys) +{ + GEpoch gEpoch; + time2epoch(time, gEpoch.data(), tsys); + + //make new time with only the year of the input one, + GEpoch gEpoch0(2000, 1, 1, 0, 0, 0); + gEpoch0[0] = gEpoch[0]; + + //subtract off the years + Duration toy = (GTime)gEpoch - (GTime)gEpoch0; + + yds[0] = gEpoch0[0]; + yds[1] = toy.to_int() / 86400 + 1; //(doy in bias SINEX (where yds is common) starts at 1) + yds[2] = fmod(toy.to_double(), 86400); +} + + UYds::operator GTime() const { - GTime time = yds2time(this->data()); - double leap = leapSeconds(time); - time += leap; - return time; + return yds2time(this->data(), E_TimeSys::UTC); } -GTime epoch2time(const double *ep) +GTime epoch2time( + const double* ep, + E_TimeSys tsys) { int year = (int) ep[0]; int mon = (int) ep[1]; int day = (int) ep[2]; int hour = (int) ep[3]; int min = (int) ep[4]; - double floatSec = ep[5]; + double sec = ep[5]; if ( year < 1970 || mon < 1 @@ -212,22 +253,75 @@ GTime epoch2time(const double *ep) dayOfYear++; } - int sec = (int) floor(floatSec); - double partialSec = floatSec - sec; - int secOfDay = hour * 60 * 60 + double secOfDay = hour * 60 * 60 + min * 60 + sec; - int yds[3]; + double yds[3]; yds[0] = year; yds[1] = dayOfYear; yds[2] = secOfDay; - GTime time = yds2time(yds); //todo aaron sketchy - time += partialSec; - + GTime time = yds2time(yds, tsys); + return time; } +void time2epoch( + GTime time, + double* ep, + E_TimeSys tsys) +{ + switch (tsys) + { + case E_TimeSys::GPST: break; // nothing to do for now + case E_TimeSys::GST: break; // nothing to do for now + case E_TimeSys::QZSST: break; // nothing to do for now + case E_TimeSys::BDT: { time -= GPS_SUB_UTC_2006; } break; + case E_TimeSys::GLONASST: { time += 10800; } // fallthough to account for leap seconds further + case E_TimeSys::UTC: { UtcTime utcTime = time; time.bigTime = utcTime.bigTime; } break; + case E_TimeSys::TAI: { time -= GPS_SUB_TAI; } break; + default: + { + BOOST_LOG_TRIVIAL(error) << "Unsupported / Unknown time system: " << tsys._to_string() << ", use GPST by default." << std::endl; + } + } + + PTime pTime = time; + + const int mday[] = + { + /* # of days in a month */ + 31,28,31,30,31,30,31,31,30,31,30,31, + 31,28,31,30,31,30,31,31,30,31,30,31, + 31,29,31,30,31,30,31,31,30,31,30,31, + 31,28,31,30,31,30,31,31,30,31,30,31 + }; + + /* leap year if year % 4 == 0 in 1901-2099 */ + + int days = (int) (pTime.bigTime / secondsInDayP); + double remSecs = pTime.bigTime - (time_t) days * secondsInDay; + + int doy = days % (365*4+1); + int mon; + for (mon = 0; mon < 48; mon++) + { + if (doy >= mday[mon]) + doy -= mday[mon]; + else + break; + } + ep[0] = 1970 + + days / 1461 * 4 //1461 = 365.25 * 4 + + mon / 12; + ep[1] = mon % 12 + 1; + ep[2] = doy + 1; + + ep[3] = (int) (remSecs / 3600); remSecs -= ep[3] * 3600; + ep[4] = (int) (remSecs / 60); remSecs -= ep[4] * 60; + ep[5] = (remSecs); +} + /* convert week and tow in gps time to GTime struct * args : int week I week number in gps time @@ -289,16 +383,15 @@ double time2bdt(GTime t, int *week) -PTime timeGet() +GTime timeGet() { - struct timeval timeVal{}; - gettimeofday(&timeVal, nullptr); - - PTime pTime; - pTime.bigTime = timeVal.tv_sec - + timeVal.tv_usec * 1e-6; + auto posixUtcNow = boost::posix_time::microsec_clock::universal_time(); + auto duration = posixUtcNow - POSIX_GPS_t0; // UtcTime lines up w/ GTime at GPS_t0 - return pTime; + UtcTime utcTime; + utcTime.bigTime = duration.total_microseconds() * 1e-6; + + return utcTime; } /* GPStime - UTC */ @@ -314,6 +407,7 @@ double leapSeconds( auto it = leapSecondMap.lower_bound(time); if (it == leapSecondMap.end()) { + BOOST_LOG_TRIVIAL(error) << "Error: leap seconds not available."; return 0; } @@ -324,12 +418,12 @@ double leapSeconds( UtcTime gpst2utc( - GTime t) + GTime time) { - long double leaps = leapSeconds(t); + long double leaps = leapSeconds(time); UtcTime utcTime; - utcTime.bigTime = t.bigTime - leaps; + utcTime.bigTime = time.bigTime - leaps; return utcTime; } @@ -340,7 +434,7 @@ GTime utc2gpst(UtcTime utcTime) gTime.bigTime = utcTime.bigTime; double leaps = leapSeconds(gTime); - leaps = leapSeconds(gTime - leaps); + leaps = leapSeconds(gTime + leaps); gTime.bigTime += leaps; @@ -473,44 +567,10 @@ double ymdhms2jd( GTime::operator GEpoch() const { - PTime pTime = *this; - - GEpoch ep; - - const int mday[] = - { - /* # of days in a month */ - 31,28,31,30,31,30,31,31,30,31,30,31, - 31,28,31,30,31,30,31,31,30,31,30,31, - 31,29,31,30,31,30,31,31,30,31,30,31, - 31,28,31,30,31,30,31,31,30,31,30,31 - }; + GEpoch gEpoch; + time2epoch(*this, gEpoch.data()); - /* leap year if year % 4 == 0 in 1901-2099 */ - - int days = (int) (pTime.bigTime / secondsInDayP); - double remSecs = pTime.bigTime - (time_t) days * secondsInDay; - - int doy = days % (365*4+1); - int mon; - for (mon = 0; mon < 48; mon++) - { - if (doy >= mday[mon]) - doy -= mday[mon]; - else - break; - } - ep.year = 1970 - + days / 1461 * 4 //1461 = 365.25 * 4 - + mon / 12; - ep.month = mon % 12 + 1; - ep.day = doy + 1; - - ep.hour = (int) (remSecs / 3600); remSecs -= ep.hour * 3600; - ep.min = (int) (remSecs / 60); remSecs -= ep.min * 60; - ep.sec = (remSecs); - - return ep; + return gEpoch; } GTime GTime::floorTime( diff --git a/src/cpp/common/gTime.hpp b/src/cpp/common/gTime.hpp index 2e64deeb8..3d53471a0 100644 --- a/src/cpp/common/gTime.hpp +++ b/src/cpp/common/gTime.hpp @@ -9,6 +9,8 @@ #include +#include "enums.h" + using std::ostream; using std::string; using std::array; @@ -17,7 +19,6 @@ struct PTime; struct GTime; struct UtcTime; struct GEpoch; -struct UEpoch; struct GWeek; struct GTow; struct MjDateTT; @@ -25,9 +26,9 @@ struct MjDateUtc; -#define GPS_SUB_UTC_2000 13 -#define GPS_SUB_UTC_2006 14 - +#define GPS_SUB_UTC_2000 +13 +#define GPS_SUB_UTC_2006 +14 +#define GPS_SUB_TAI -19 extern const GTime GPS_t0; extern const double MJD_j2000; @@ -35,7 +36,23 @@ extern const int secondsInDay; string time2str(GTime t, int n); -GTime epoch2time (const double *ep); +GTime yds2time( + const double* yds, + E_TimeSys tsys = E_TimeSys::GPST); + +void time2yds( + GTime time, + double* yds, + E_TimeSys tsys = E_TimeSys::GPST); + +GTime epoch2time( + const double* ep, + E_TimeSys tsys = E_TimeSys::GPST); + +void time2epoch( + GTime time, + double* ep, + E_TimeSys tsys = E_TimeSys::GPST); double leapSeconds( GTime time ); @@ -351,7 +368,7 @@ struct PTime }; -PTime timeGet(); +GTime timeGet(); struct MjDateUtc @@ -414,7 +431,7 @@ struct MjDateTT struct UtcTime { - long double bigTime; + long double bigTime; // Eugene: bigTime can be ambiguous, e.g. 1167264000.5, never know if GPST is 2017-01-01 00:00:17.5 or 2017-01-01 00:00:18.5 UtcTime operator +(const double t) const { @@ -509,16 +526,16 @@ struct GEpoch : array }; -struct UYds : array +struct UYds : array { - int& year; - int& doy; - int& sod; + double& year; + double& doy; + double& sod; UYds( - int yearval = 0, - int doyVal = 0, - int sodVal = 0) + double yearval = 0, + double doyVal = 0, + double sodVal = 0) : year{ (*this)[0]}, doy { (*this)[1]}, sod { (*this)[2]} @@ -556,20 +573,7 @@ struct UYds : array doy { (*this)[1]}, sod { (*this)[2]} { - double leap = leapSeconds(time); - GTime utc_Time = (time - leap); - GEpoch ep = utc_Time; - - //make new time with only the year of the input one, - GEpoch ep0(2000, 1, 1, 0, 0, 0); - ep0[0] = ep[0]; - - //subtract off the years - Duration toy = utc_Time - (GTime) ep0; - - year = (int) ep[0]; - doy = toy.to_int() / 86400 + 1; //(doy in bias SINEX (where yds is common) starts at 1) - sod = toy.to_int() % 86400; + time2yds(time, this->data(), E_TimeSys::UTC); } UYds& operator +=( @@ -611,7 +615,8 @@ int str2time( const char* s, int i, int n, - GTime& t); + GTime& t, + E_TimeSys tsys = E_TimeSys::GPST); void jd2ymdhms(const double jd, double *ep); diff --git a/src/cpp/common/linearCombo.cpp b/src/cpp/common/linearCombo.cpp index 6ede29054..4ac59d795 100644 --- a/src/cpp/common/linearCombo.cpp +++ b/src/cpp/common/linearCombo.cpp @@ -208,24 +208,12 @@ void obs2lc( return; } - E_FType frq1 = F1; - E_FType frq2 = F2; - E_FType frq3 = F5; - if (sys == E_Sys::GLO) - { - frq1 = G1; - frq2 = G2; - } - if (sys == E_Sys::GAL) - frq2 = F7; - if (sys == E_Sys::BDS) - { - frq1 = B1; - frq2 = B3; - frq3 = F5; - } + E_FType frq1; + E_FType frq2; + E_FType frq3; + if (!satFreqs(obs.Sat.sys,frq1,frq2,frq3)) + return; - char strprefix[64]; snprintf(strprefix, sizeof(strprefix), "%3s sat=%4s", obs.time.to_string().c_str(), obs.Sat.id().c_str()); diff --git a/src/cpp/common/metaData.hpp b/src/cpp/common/metaData.hpp index 28e490b71..3c5a63ff5 100644 --- a/src/cpp/common/metaData.hpp +++ b/src/cpp/common/metaData.hpp @@ -7,6 +7,8 @@ using std::string; +#define BSX_FILENAME_STR ((string)"bsxFilename") +#define ORBEX_FILENAME_STR ((string)"orbexFilename") #define GPX_FILENAME_STR ((string)"gpxFilename") #define ERP_FILENAME_STR ((string)"erpFilename") #define TRACE_FILENAME_STR ((string)"traceFilename") @@ -18,5 +20,3 @@ using std::string; #define ION_FILENAME_STR ((string)"ionFilename") #define SP3_FILENAME_STR ((string)"sp3Filename") #define CLK_FILENAME_STR ((string)"clkFilename") - - diff --git a/src/cpp/common/mongoRead.cpp b/src/cpp/common/mongoRead.cpp index 73aefcee3..797ad242b 100644 --- a/src/cpp/common/mongoRead.cpp +++ b/src/cpp/common/mongoRead.cpp @@ -67,6 +67,45 @@ RETTYPE getStraddle( return ssr; } +GTime mongoReadLastClock() //todo aaron delete me +{ + GTime outTime; + + auto& mongo_ptr = remoteMongo_ptr; + + if (mongo_ptr == nullptr) + { + MONGO_NOT_INITIALISED_MESSAGE; + return outTime; + } + + Mongo& mongo = *mongo_ptr; + auto c = mongo.pool.acquire(); + mongocxx::client& client = *c; + mongocxx::database db = client[acsConfig.remoteMongo.database]; + mongocxx::collection coll = db[SSR_DB]; + + auto docClk = document{} << SSR_DATA << SSR_CLOCK + << finalize; + + auto docSort = document{} << SSR_EPOCH << -1 + << finalize; + + auto findOpts = mongocxx::options::find{}; + findOpts.limit(1); + findOpts.sort(docSort.view()); + + auto cursor = coll.find(docClk.view(), findOpts); + for (auto doc : cursor) + { + PTime timeEpoch; + auto tp = doc[SSR_EPOCH ].get_date(); + timeEpoch.bigTime = std::chrono::system_clock::to_time_t(tp); + outTime = timeEpoch; + } + return outTime; +} + /** Read orbits and clocks from Mongo DB */ SsrOutMap mongoReadOrbClk( diff --git a/src/cpp/common/mongoRead.hpp b/src/cpp/common/mongoRead.hpp index 6fe4f5633..d0b3fb200 100644 --- a/src/cpp/common/mongoRead.hpp +++ b/src/cpp/common/mongoRead.hpp @@ -6,6 +6,7 @@ struct SSRMeta; +GTime mongoReadLastClock(); SsrOutMap mongoReadOrbClk( GTime referenceTime, diff --git a/src/cpp/common/mongoWrite.cpp b/src/cpp/common/mongoWrite.cpp index 6736cc7be..5c70d1384 100644 --- a/src/cpp/common/mongoWrite.cpp +++ b/src/cpp/common/mongoWrite.cpp @@ -693,7 +693,7 @@ void prepareSsrStates( vector dbEntryList; time.bigTime = (long int) (time.bigTime + 0.5); // time tags in mongo will be rounded up to whole sec - + for (E_Sys sys : E_Sys::_values()) { string sysName = boost::algorithm::to_lower_copy((string) sys._to_string()); @@ -724,24 +724,6 @@ void prepareSsrStates( GTime pTime = time + tpredict; bool pass = true; - //broadcast values - pass &= satclk(nullStream, pTime, pTime, obs, {E_Source::BROADCAST}, nav); - pass &= satpos(nullStream, pTime, pTime, obs, {E_Source::BROADCAST}, E_OffsetType::APC, nav); - if (pass == false) - { - BOOST_LOG_TRIVIAL(info) - << Sat.id() << " failed broadcast predictions.\n"; - - continue; - } - - int iodeClk = obs.iodeClk; - int iodePos = obs.iodePos; -// int iodcrc = ? - Vector3d brdcPos = obs.rSat; - Vector3d brdcVel = obs.satVel; - double brdcClkVal = obs.satClk * CLIGHT; - pass = true; pass &= satclk(nullStream, pTime, pTime, obs, acsConfig.ssrOpts.ephemeris_sources, nav, &kfState); pass &= satpos(nullStream, pTime, pTime, obs, acsConfig.ssrOpts.ephemeris_sources, E_OffsetType::APC, nav, &kfState); @@ -759,11 +741,37 @@ void prepareSsrStates( continue; } + + if (obs.iodeClk != obs.iodePos) + { + BOOST_LOG_TRIVIAL(info) + << Sat.id() << " IODE clock" << obs.iodeClk << " mismatch IODE orbit " << obs.iodePos << ".\n"; + + continue; + } Vector3d precPos = obs.rSat; Vector3d precVel = obs.satVel; double posVar = obs.posVar; + //broadcast values, must come after precise values to associate the correct IODE (when SSR in use) + pass &= satClkBroadcast(nullStream, pTime, pTime, obs, nav, obs.iodeClk); + pass &= satPosBroadcast(nullStream, pTime, pTime, obs, nav, obs.iodePos); + if (pass == false) + { + BOOST_LOG_TRIVIAL(info) + << Sat.id() << " failed broadcast predictions.\n"; + + continue; + } + + int iodeClk = obs.iodeClk; + int iodePos = obs.iodePos; +// int iodcrc = ? + Vector3d brdcPos = obs.rSat; + Vector3d brdcVel = obs.satVel; + double brdcClkVal = obs.satClk * CLIGHT; + //output the valid entries { DBEntry entry; diff --git a/src/cpp/common/ntripBroadcast.cpp b/src/cpp/common/ntripBroadcast.cpp index 7101f5781..6923fa790 100644 --- a/src/cpp/common/ntripBroadcast.cpp +++ b/src/cpp/common/ntripBroadcast.cpp @@ -26,7 +26,7 @@ namespace bp = boost::asio::placeholders; using boost::posix_time::ptime; using boost::posix_time::time_duration; -void debugSSR(GTime time, E_Sys sys); +void debugSSR(GTime t0, GTime targetTime, E_Sys sys, SsrOutMap& ssrOutMap); void NtripBroadcaster::startBroadcast() { @@ -105,9 +105,15 @@ void NtripUploader::messageTimeout_handler( SSRMeta ssrMeta; SsrOutMap ssrOutMap; - - GTime nowTime = timeGet(); - GTime targetTime = nowTime.floorTime(1); + GTime latestTime; + + if (acsConfig.ssrOpts.output_timing == +E_SSROutTiming::GPS_TIME) latestTime = timeGet(); + else if (acsConfig.ssrOpts.output_timing == +E_SSROutTiming::LATEST_CLOCK_ESTIMATE) latestTime = mongoReadLastClock(); + + if (latestTime == GTime::noTime()) + return; + + GTime targetTime = latestTime.floorTime(1); if (targetTime == previousTargetTime) { @@ -115,6 +121,8 @@ void NtripUploader::messageTimeout_handler( return; } + BOOST_LOG_TRIVIAL(debug) << "SSR OUT Targeting epoch: " << targetTime.to_string(0) << std::endl; + ssrMeta.receivedTime = targetTime; // for rtcmTrace (debugging) ssrMeta.multipleMessage = 1; // We assume there will be more messages. @@ -232,13 +240,16 @@ void NtripUploader::messageTimeout_handler( auto buffer = encodeSsrOrbClk(ssrOutMap, messCode); bool write = encodeWriteMessageToBuffer(buffer); - debugSSR(t0, sys); - - if (write == false) + if (acsConfig.trace_level > 5) { - std::cout << "RtcmMessageType::" << messCode._to_string() << " was not written" << std::endl; + debugSSR(t0, targetTime, sys, ssrOutMap); + + if (write == false) + { + std::cout << "RtcmMessageType::" << messCode._to_string() << " was not written" << std::endl; + } } - + break; } case +RtcmMessageType::GPS_SSR_URA: @@ -418,6 +429,10 @@ void NtripUploader::messageTimeout_handler( } break; } + case +RtcmMessageType::COMPACT_SSR: + { + break; + } default: BOOST_LOG_TRIVIAL(error) << "Error, attempting to upload incorrect message type: " << messCode << std::endl; } @@ -446,6 +461,8 @@ void NtripUploader::messageTimeout_handler( if (url.protocol == "https") { boost::asio::async_write(*_sslsocket, outMessages, boost::bind(&NtripUploader::write_handler, this, bp::error));} else { boost::asio::async_write(*_socket, outMessages, boost::bind(&NtripUploader::write_handler, this, bp::error));} + + previousTargetTime = targetTime; } } diff --git a/src/cpp/common/ntripSocket.cpp b/src/cpp/common/ntripSocket.cpp index 93f228967..5e7158b6b 100644 --- a/src/cpp/common/ntripSocket.cpp +++ b/src/cpp/common/ntripSocket.cpp @@ -47,7 +47,7 @@ void NtripSocket::logChunkError() // return; // } // -// outStream << (GTime) timeGet(); +// outStream << timeGet(); // outStream << " messageChunkLog" << message << std::endl; } @@ -149,7 +149,7 @@ void NtripSocket::read_handler_chunked( { int endOfLength = 0; int endOfHeader; - for (endOfHeader = start + 2; endOfHeader < last; endOfHeader++) + for (endOfHeader = start + 1; endOfHeader < last; endOfHeader++) { unsigned char c1 = receivedHttpData[endOfHeader - 1]; unsigned char c2 = receivedHttpData[endOfHeader]; @@ -173,10 +173,16 @@ void NtripSocket::read_handler_chunked( if (endOfLength == 0) { - endOfLength = endOfHeader - 1; + endOfLength = endOfHeader - 2; + } + + if (endOfLength < 0) + { + start = 2; + continue; } - string hexLength(&receivedHttpData[start], &receivedHttpData[endOfLength]); + string hexLength(&receivedHttpData[start], &receivedHttpData[endOfLength + 1]); // std::cout << "\nhexLength: " << hexLength << "\n"; int messageLength; @@ -200,17 +206,18 @@ void NtripSocket::read_handler_chunked( continue; } - if (endOfHeader + messageLength + 2 > receivedHttpData.size()) + int startOfMessage = endOfHeader + 1; + int endOfMessage = startOfMessage + messageLength - 1; + + if (endOfMessage + 2 >= receivedHttpData.size()) { //not enough data, continue from this start later break; } - int startOfMessage = endOfHeader + 1; - int endOfMessage = startOfMessage + messageLength; - char postAmble1 = receivedHttpData[endOfMessage]; - char postAmble2 = receivedHttpData[endOfMessage + 1]; + char postAmble1 = receivedHttpData[endOfMessage + 1]; + char postAmble2 = receivedHttpData[endOfMessage + 2]; if ( postAmble1 != '\r' ||postAmble2 != '\n') @@ -221,16 +228,16 @@ void NtripSocket::read_handler_chunked( } // printf("\npostamble: %02x %02x\n", postAmble1, postAmble2); - vector chunk(&receivedHttpData[startOfMessage], &receivedHttpData[endOfMessage]); + vector chunk(&receivedHttpData[startOfMessage], &receivedHttpData[endOfMessage] + 1); // printHex(std::cout, chunk); dataChunkDownloaded(chunk); - start = endOfHeader + messageLength + 3; + start = endOfMessage + 2; } if (start > 0) { - receivedHttpData.erase(receivedHttpData.begin(), receivedHttpData.begin() + start - 1); + receivedHttpData.erase(receivedHttpData.begin(), receivedHttpData.begin() + start); } start_read(true); diff --git a/src/cpp/common/ntripTrace.cpp b/src/cpp/common/ntripTrace.cpp index 225a60647..bb1a46d37 100644 --- a/src/cpp/common/ntripTrace.cpp +++ b/src/cpp/common/ntripTrace.cpp @@ -169,7 +169,7 @@ string NetworkStatistics::getNetworkStatistics( doc.append(kvp("Network", acsConfig.analysis_agency)); doc.append(kvp("Downloading", true)); - double totalTime = ((GTime)timeGet() - startTime).to_double(); + double totalTime = (timeGet() - startTime).to_double(); // double connRatio; // if (disconnectionCount == 0 @@ -213,7 +213,7 @@ string NetworkStatistics::getNetworkStatistics( // traceStr << "Start : " << std::put_time(std::localtime(&startTime.time), "%F %X") << std::endl; // traceStr << "Finish : " << std::put_time(std::localtime(&endTime.time), "%F %X") << std::endl; // -// double totalTime = (GTime)timeGet() - startTime; +// double totalTime = timeGet() - startTime; // // double connRatio; // if (disconnectionCount == 0 diff --git a/src/cpp/common/observations.hpp b/src/cpp/common/observations.hpp index d171c9567..0b0d59c7f 100644 --- a/src/cpp/common/observations.hpp +++ b/src/cpp/common/observations.hpp @@ -201,8 +201,8 @@ struct SatPos double satClkVel = 0; double satClkVar = 0; - int iodeClk = 0; ///< Issue of data ephemeris - int iodePos = 0; ///< Issue of data ephemeris + int iodeClk = -1; ///< Issue of data ephemeris + int iodePos = -1; ///< Issue of data ephemeris bool ephPosValid = false; bool ephClkValid = false; bool vsat = 0; ///< Valid satellite flag diff --git a/src/cpp/common/orbex.cpp b/src/cpp/common/orbex.cpp index 8f4d50309..29b9ffec1 100644 --- a/src/cpp/common/orbex.cpp +++ b/src/cpp/common/orbex.cpp @@ -206,21 +206,13 @@ bool readOrbexEph( if ( line[0] == '#' &&line[1] == '#') { - bool error = str2time(buff, 3, 32, time); + bool error = str2time(buff, 3, 32, time, tsys); if (error) { BOOST_LOG_TRIVIAL(error) << "Invalid epoch line in Orbex file: " << line << std::endl; return false; } - - if (tsys == +E_TimeSys::UTC) - { - UtcTime utcTime; - utcTime.bigTime = time.bigTime; - - time = utcTime; - } nsat = str2num(buff, 36, 3); diff --git a/src/cpp/common/orbexWrite.cpp b/src/cpp/common/orbexWrite.cpp index 0a96a4049..a76013f6c 100644 --- a/src/cpp/common/orbexWrite.cpp +++ b/src/cpp/common/orbexWrite.cpp @@ -56,7 +56,7 @@ void writeOrbexHeader( tracepdeex(0, orbexStream, "+FILE/DESCRIPTION\n"); tracepdeex(0, orbexStream, " DESCRIPTION %s\n", "Satellite attitude quaternions"); tracepdeex(0, orbexStream, " CREATED_BY %s %s\n", acsConfig.analysis_agency.c_str(), acsConfig.analysis_program.c_str()); - tracepdeex(0, orbexStream, " CREATION_DATE %s\n", ((GTime)timeGet()).to_string(0).c_str()); + tracepdeex(0, orbexStream, " CREATION_DATE %s\n", timeGet().to_string(0).c_str()); tracepdeex(0, orbexStream, " INPUT_DATA %s\n", ""); tracepdeex(0, orbexStream, " CONTACT %s\n", "npi@ga.gov.au"); tracepdeex(0, orbexStream, " TIME_SYSTEM %s\n", "GPS"); @@ -433,13 +433,14 @@ void writeSysSetOrbex( /** Output ORBEX files */ void outputOrbex( + string filename, GTime time, ///< Epoch time (GPST) vector orbDataSrcs, ///< Data source for satellite positions & velocities vector clkDataSrcs, ///< Data source for satellite clocks vector attDataSrcs, ///< Data source for satellite attitudes KFState* kfState_ptr) ///< Pointer to a kalman filter to take values from { - auto sysFilenames = getSysOutputFilenames(acsConfig.orbex_filename, time); + auto sysFilenames = getSysOutputFilenames(filename, time); for (auto [filename, sysMap] : sysFilenames) { diff --git a/src/cpp/common/orbexWrite.hpp b/src/cpp/common/orbexWrite.hpp index 629294c68..e60ac43aa 100644 --- a/src/cpp/common/orbexWrite.hpp +++ b/src/cpp/common/orbexWrite.hpp @@ -33,6 +33,7 @@ void writeSysSetOrbex( KFState* kfState_ptr = nullptr); void outputOrbex( + string filename, GTime time, vector orbDataSrcs, vector clkDataSrcs, diff --git a/src/cpp/common/orbits.cpp b/src/cpp/common/orbits.cpp index 094cec42e..6e7076012 100644 --- a/src/cpp/common/orbits.cpp +++ b/src/cpp/common/orbits.cpp @@ -14,7 +14,7 @@ using std::chrono::time_point; using std::string; -#include "peaCommitVersion.h" +#include "peaCommitStrings.hpp" #include "eigenIncluder.hpp" #include "coordinates.hpp" #include "navigation.hpp" @@ -279,7 +279,7 @@ void outputOrbit( GTime endTime = timeGet(); tracepdeex(0, orbitFile, "#INFO Orbit estimated by PEA\n"); - tracepdeex(0, orbitFile, "#INFO Generated from: PEA (v%s) at %s\n", GINAN_COMMIT_VERSION, endTime.to_string().c_str()); + tracepdeex(0, orbitFile, "#INFO Generated from: PEA (v%s) at %s\n", ginanCommitVersion(), endTime.to_string().c_str()); for (auto& str : nav.podInfoList) { diff --git a/src/cpp/common/packetStatistics.hpp b/src/cpp/common/packetStatistics.hpp index 31634d1a4..a33080b24 100644 --- a/src/cpp/common/packetStatistics.hpp +++ b/src/cpp/common/packetStatistics.hpp @@ -20,7 +20,7 @@ struct PacketStatistics // traceStr << "Start : " << std::put_time(std::localtime(&startTime.time), "%F %X") << std::endl; // traceStr << "Finish : " << std::put_time(std::localtime(&endTime.time), "%F %X") << std::endl; -// double totalTime = (GTime)timeGet() - startTime; +// double totalTime = timeGet() - startTime; traceStr << "ExtraBytes : " << numNonMessBytes << std::endl; traceStr << "FailCrc : " << numFramesFailedCRC << std::endl; diff --git a/src/cpp/common/rinex.cpp b/src/cpp/common/rinex.cpp index b7b4bc82b..4aed5cc01 100644 --- a/src/cpp/common/rinex.cpp +++ b/src/cpp/common/rinex.cpp @@ -52,11 +52,14 @@ map defNavMsgType = */ void setstr(char *dst, const char *src, int n) { - char *p=dst; - const char *q=src; - while (*q&&q=dst&&*p==' ') *p--='\0'; + char *p = dst; + const char *q = src; + + while (*q && q < src + n) *p++ = *q++; + + *p-- = '\0'; + + while (p >= dst && *p == ' ') *p-- = '\0'; } /** Decode obs header @@ -71,23 +74,24 @@ void decodeObsH( RinexStation* rec) { double del[3]; - int prn,fcn; + int prn; + int fcn; const char *p; char* buff = &line[0]; - char* label = buff+60; + char* label = buff + 60; auto& recOpts = acsConfig.getRecOpts(rec->id); // BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << ": ver=" << ver; - if (strstr(label,"MARKER NAME" )) + if (strstr(label, "MARKER NAME" )) { if (rec) { rec->id .assign(buff, 60); } } - else if (strstr(label,"MARKER NUMBER" )) + else if (strstr(label, "MARKER NUMBER" )) { if (rec) { @@ -96,37 +100,37 @@ void decodeObsH( } // else if (strstr(label,"MARKER TYPE" )) ; // ver.3 // else if (strstr(label,"OBSERVER / AGENCY" )) ; - else if (strstr(label,"REC # / TYPE / VERS" )) + else if (strstr(label, "REC # / TYPE / VERS" )) { if (rec) { rec->recSerial .assign(buff, 20); - rec->recType .assign(buff+20, 20); - rec->recFWVersion .assign(buff+40, 20); + rec->recType .assign(buff + 20, 20); + rec->recFWVersion .assign(buff + 40, 20); } } - else if (strstr(label,"ANT # / TYPE" )) + else if (strstr(label, "ANT # / TYPE" )) { if (rec) { rec->antSerial .assign(buff, 20); - rec->antDesc .assign(buff+20, 20); + rec->antDesc .assign(buff + 20, 20); } } - else if (strstr(label,"APPROX POSITION XYZ" )) + else if (strstr(label, "APPROX POSITION XYZ" )) { if (rec) { - for (int i = 0, j = 0; i<3 ; i++, j += 14) - rec->pos[i] = str2num(buff,j,14); + for (int i = 0, j = 0; i < 3; i++, j += 14) + rec->pos[i] = str2num(buff, j, 14); } } - else if (strstr(label,"ANTENNA: DELTA H/E/N")) + else if (strstr(label, "ANTENNA: DELTA H/E/N")) { if (rec) { for (int i = 0, j = 0; i < 3; i++, j += 14) - del[i] = str2num(buff,j,14); + del[i] = str2num(buff, j, 14); rec->del[2] = del[0]; // h rec->del[0] = del[1]; // e @@ -139,7 +143,7 @@ void decodeObsH( // else if (strstr(label,"ANTENNA: ZERODIR AZI")) ; // opt ver.3 // else if (strstr(label,"ANTENNA: ZERODIR XYZ")) ; // opt ver.3 // else if (strstr(label,"CENTER OF MASS: XYZ" )) ; // opt ver.3 - else if (strstr(label,"SYS / # / OBS TYPES" )) + else if (strstr(label, "SYS / # / OBS TYPES" )) { // ver.3 //get system from code letter @@ -175,8 +179,8 @@ void decodeObsH( codeType.type = buff[k]; char code[] = "Lxx"; - code[1] = buff[k+1]; - code[2] = buff[k+2]; + code[1] = buff[k + 1]; + code[2] = buff[k + 2]; if ( (Sat.sys == +E_Sys::BDS) &&(code[1] == '1') &&(ver == 3.02)) @@ -224,13 +228,13 @@ void decodeObsH( // } } // else if (strstr(label,"WAVELENGTH FACT L1/2")) ; // opt ver.2 - else if (strstr(label,"# / TYPES OF OBSERV" )) + else if (strstr(label, "# / TYPES OF OBSERV" )) { // ver.2 - int n = (int)str2num(buff,0,6); + int n = (int)str2num(buff, 0, 6); - for (int i = 0, j = 10; i < n; i++, j+=6) + for (int i = 0, j = 10; i < n; i++, j += 6) { if (j > 58) { @@ -280,9 +284,9 @@ void decodeObsH( } //*tobs[0][nt]='\0'; } -// else if (strstr(label,"SIGNAL STRENGTH UNIT")) ; // opt ver.3 -// else if (strstr(label,"INTERVAL" )) ; // opt - else if (strstr(label,"TIME OF FIRST OBS" )) +// else if (strstr(label, "SIGNAL STRENGTH UNIT")) ; // opt ver.3 +// else if (strstr(label, "INTERVAL" )) ; // opt + else if (strstr(label, "TIME OF FIRST OBS" )) { if (!strncmp(buff+48, "GPS", 3)) tsys = E_TimeSys::GPST; else if (!strncmp(buff+48, "GLO", 3)) tsys = E_TimeSys::UTC; @@ -290,48 +294,48 @@ void decodeObsH( else if (!strncmp(buff+48, "QZS", 3)) tsys = E_TimeSys::QZSST; // ver.3.02 else if (!strncmp(buff+48, "BDT", 3)) tsys = E_TimeSys::BDT; // ver.3.02 } -// else if (strstr(label,"TIME OF LAST OBS" )) ; // opt -// else if (strstr(label,"RCV CLOCK OFFS APPL" )) ; // opt -// else if (strstr(label,"SYS / DCBS APPLIED" )) ; // opt ver.3 -// else if (strstr(label,"SYS / PCVS APPLIED" )) ; // opt ver.3 -// else if (strstr(label,"SYS / SCALE FACTOR" )) ; // opt ver.3 -// else if (strstr(label,"SYS / PHASE SHIFTS" )) ; // ver.3.01 - else if (strstr(label,"GLONASS SLOT / FRQ #")) +// else if (strstr(label, "TIME OF LAST OBS" )) ; // opt +// else if (strstr(label, "RCV CLOCK OFFS APPL" )) ; // opt +// else if (strstr(label, "SYS / DCBS APPLIED" )) ; // opt ver.3 +// else if (strstr(label, "SYS / PCVS APPLIED" )) ; // opt ver.3 +// else if (strstr(label, "SYS / SCALE FACTOR" )) ; // opt ver.3 +// else if (strstr(label, "SYS / PHASE SHIFTS" )) ; // ver.3.01 + else if (strstr(label, "GLONASS SLOT / FRQ #")) { // ver.3.02 p = buff + 4; for (int i = 0; i < 8; i++, p += 8) { - if (sscanf(p,"R%2d %2d", &prn, &fcn) < 2) + if (sscanf(p, "R%2d %2d", &prn, &fcn) < 2) continue; if (1 <= prn &&prn <= NSATGLO) { - nav.glo_fcn[prn-1] = fcn+8; + nav.glo_fcn[prn - 1] = fcn + 8; } } } - else if (strstr(label,"GLONASS COD/PHS/BIS" )) + else if (strstr(label, "GLONASS COD/PHS/BIS" )) { // ver.3.02 p = buff; for (int i = 0; i < 4; i++, p += 13) { - if (strncmp(p+1,"C1C",3)) nav.glo_cpbias[0]=str2num(p,5,8); - else if (strncmp(p+1,"C1P",3)) nav.glo_cpbias[1]=str2num(p,5,8); - else if (strncmp(p+1,"C2C",3)) nav.glo_cpbias[2]=str2num(p,5,8); - else if (strncmp(p+1,"C2P",3)) nav.glo_cpbias[3]=str2num(p,5,8); + if (strncmp(p + 1, "C1C", 3)) nav.glo_cpbias[0] = str2num(p, 5, 8); + else if (strncmp(p + 1, "C1P", 3)) nav.glo_cpbias[1] = str2num(p, 5, 8); + else if (strncmp(p + 1, "C2C", 3)) nav.glo_cpbias[2] = str2num(p, 5, 8); + else if (strncmp(p + 1, "C2P", 3)) nav.glo_cpbias[3] = str2num(p, 5, 8); } } - else if (strstr(label,"LEAP SECONDS" )) + else if (strstr(label, "LEAP SECONDS" )) { // This would be GPS-UTC, and NOT optional as of RINEX 4 - nav.leaps=(int)str2num(buff,0,6); + nav.leaps = (int)str2num(buff, 0, 6); } -// else if (strstr(label,"# OF SALTELLITES" )) ; // opt -// else if (strstr(label,"PRN / # OF OBS" )) ; // opt +// else if (strstr(label, "# OF SALTELLITES" )) ; // opt +// else if (strstr(label, "PRN / # OF OBS" )) ; // opt } /** Decode nav header @@ -346,7 +350,7 @@ void decodeNavH( // BOOST_LOG_TRIVIAL(debug) << __FUNCTION__; - if (strstr(label,"ION ALPHA" )) + if (strstr(label, "ION ALPHA" )) { // opt ver.2 E_NavMsgType type = defNavMsgType[sys]; @@ -359,9 +363,9 @@ void decodeNavH( ionEntry.ttm = time; for (int i = 0, j = 2; i < 4; i++, j += 12) - ionEntry.vals[i] = str2num(buff,j,12); + ionEntry.vals[i] = str2num(buff, j, 12); } - else if (strstr(label,"ION BETA" )) + else if (strstr(label, "ION BETA" )) { // opt ver.2 E_NavMsgType type = defNavMsgType[sys]; @@ -374,9 +378,9 @@ void decodeNavH( ionEntry.ttm = time; for (int i = 0, j = 2; i < 4; i++, j += 12) - ionEntry.vals[i+4] = str2num(buff,j,12); + ionEntry.vals[i + 4] = str2num(buff, j, 12); } - else if (strstr(label,"DELTA-UTC: A0,A1,T,W")) + else if (strstr(label, "DELTA-UTC: A0,A1,T,W")) { // opt ver.2 E_NavMsgType type = defNavMsgType[sys]; @@ -388,8 +392,8 @@ void decodeNavH( case E_Sys::GAL: code = E_StoCode::GAUT; break; } - GTow tow = str2num(buff,31,9); - GWeek week = (int) str2num(buff,40,9); + GTow tow = str2num(buff, 31, 9); + GWeek week = (int) str2num(buff, 40, 9); GTime time(week, tow); STO& stoEntry = nav.stoMap[code][type][time]; @@ -399,11 +403,11 @@ void decodeNavH( stoEntry.tot = time; stoEntry.code = code; - stoEntry.A0 = str2num(buff, 3,19); - stoEntry.A1 = str2num(buff,22,19); + stoEntry.A0 = str2num(buff, 3, 19); + stoEntry.A1 = str2num(buff, 22, 19); stoEntry.A2 = 0; } - else if (strstr(label,"IONOSPHERIC CORR" )) + else if (strstr(label, "IONOSPHERIC CORR" )) { // opt ver.3 char sysStr[4] = ""; @@ -416,30 +420,30 @@ void decodeNavH( ionEntry.type = type; ionEntry.Sat.sys = sys; - ionEntry.Sat.prn = str2num(buff,55,3); + ionEntry.Sat.prn = str2num(buff, 55, 3); ionEntry.ttm = time; if ( buff[3] == 'A' ||buff[3] == ' ') { for (int i = 0, j = 5; i < 4; i++, j += 12) - ionEntry.vals[i] = str2num(buff,j,12); + ionEntry.vals[i] = str2num(buff, j, 12); } else if ( buff[3] == 'B') { for (int i = 0, j = 5; i < 4; i++, j += 12) - ionEntry.vals[i+4] = str2num(buff,j,12); + ionEntry.vals[i + 4] = str2num(buff, j, 12); } } - else if (strstr(label,"TIME SYSTEM CORR" )) + else if (strstr(label, "TIME SYSTEM CORR" )) { // opt ver.3 char codeStr[5] = ""; - strncpy(codeStr,buff,4); + strncpy(codeStr, buff, 4); E_StoCode code = E_StoCode::_from_string(codeStr); char id[8] = ""; - strncpy(id,buff+51,5); + strncpy(id, buff + 51, 5); SatSys Sat = SatSys(id); if (Sat.sys == +E_Sys::NONE) @@ -460,8 +464,8 @@ void decodeNavH( E_NavMsgType type = defNavMsgType[Sat.sys]; - double sec = str2num(buff,38, 7); - double week = str2num(buff,45, 5); + double sec = str2num(buff, 38, 7); + double week = str2num(buff, 45, 5); GTime time = {}; if (Sat.sys != +E_Sys::BDS) { time = GTime(GWeek(week), GTow(sec)); } else { time = GTime(BWeek(week), BTow(sec)); } @@ -474,14 +478,14 @@ void decodeNavH( stoEntry.ttm = time; stoEntry.code = code; - stoEntry.A0 = str2num(buff, 5,17); - stoEntry.A1 = str2num(buff,22,16); + stoEntry.A0 = str2num(buff, 5, 17); + stoEntry.A1 = str2num(buff, 22, 16); stoEntry.A2 = 0.0; } - else if (strstr(label,"LEAP SECONDS" )) + else if (strstr(label, "LEAP SECONDS" )) { // opt - nav.leaps=(int)str2num(buff,0,6); + nav.leaps=(int)str2num(buff, 0, 6); } } /** Decode gnav header @@ -495,11 +499,11 @@ void decodeGnavH( // BOOST_LOG_TRIVIAL(debug) << __FUNCTION__; - if (strstr(label,"CORR TO SYTEM TIME" )) ; // opt - else if (strstr(label,"LEAP SECONDS" )) + if (strstr(label, "CORR TO SYTEM TIME" )) ; // opt + else if (strstr(label, "LEAP SECONDS" )) { // opt - nav.leaps=(int)str2num(buff,0,6); + nav.leaps=(int)str2num(buff, 0, 6); } } @@ -519,7 +523,7 @@ void decodeHnavH( else if (strstr(label, "LEAP SECONDS" )) { // opt - nav.leaps= (int)str2num(buff,0,6); + nav.leaps= (int)str2num(buff, 0, 6); } } @@ -559,16 +563,16 @@ int readRnxH( { continue; } - else if (strstr(label,"RINEX VERSION / TYPE")) + else if (strstr(label, "RINEX VERSION / TYPE")) { - ver = str2num(buff,0,9); + ver = str2num(buff, 0, 9); type = buff[typeOffset]; sysChar = buff[sysCharOffset]; // possible error in generation by one manufacturer. This hack gets around it - if(ver==3.04 && type == ' ') + if(ver == 3.04 && type == ' ') { typeOffset += 1; sysCharOffset += 2; @@ -596,17 +600,17 @@ int readRnxH( } continue; } - else if (strstr(label,"PGM / RUN BY / DATE")) + else if (strstr(label, "PGM / RUN BY / DATE")) continue; - else if (strstr(label,"COMMENT")) + else if (strstr(label, "COMMENT")) { // read cnes wl satellite fractional bias - if ( strstr(buff,"WIDELANE SATELLITE FRACTIONAL BIASES") - ||strstr(buff,"WIDELANE SATELLITE FRACTIONNAL BIASES")) + if ( strstr(buff, "WIDELANE SATELLITE FRACTIONAL BIASES") + ||strstr(buff, "WIDELANE SATELLITE FRACTIONNAL BIASES")) { - block=1; + block = 1; } - if (strstr(buff,"->")) + if (strstr(buff, "->")) { //may be a conversion line, test @@ -649,15 +653,15 @@ int readRnxH( SatSys Sat; // cnes/cls grg clock - if ( !strncmp(buff,"WL",2) - &&(Sat = SatSys(buff+3), Sat) - && sscanf(buff+40,"%lf", &bias) == 1) + if ( !strncmp(buff, "WL", 2) + &&(Sat = SatSys(buff + 3), Sat) + && sscanf(buff+40, "%lf", &bias) == 1) { nav.satNavMap[Sat].wlbias = bias; } // cnes ppp-wizard clock - else if ((Sat = SatSys(buff+1), Sat) - &&sscanf(buff+6,"%lf",&bias) == 1) + else if ((Sat = SatSys(buff + 1), Sat) + &&sscanf(buff+6, "%lf", &bias) == 1) { nav.satNavMap[Sat].wlbias = bias; } @@ -675,11 +679,11 @@ int readRnxH( case 'E': //fallthrough case 'L': decodeNavH ( line, E_Sys::GAL, nav); break; // extension } - if (strstr(label,"END OF HEADER")) + if (strstr(label, "END OF HEADER")) return 1; - if (++i>=MAXPOSHEAD - &&type==' ') + if (++i >= MAXPOSHEAD + &&type == ' ') { break; // no rinex file } @@ -692,6 +696,7 @@ int decodeObsEpoch( std::istream& inputStream, string& line, double ver, + E_TimeSys tsys, GTime& time, int& flag, vector& sats) @@ -717,7 +722,7 @@ int decodeObsEpoch( return n; } - bool error = str2time(buff, 0, 26, time); + bool error = str2time(buff, 0, 26, time, tsys); if (error) { BOOST_LOG_TRIVIAL(debug) @@ -760,7 +765,7 @@ int decodeObsEpoch( return n; if ( buff[0] != '>' - ||str2time(buff, 1, 28, time)) + ||str2time(buff, 1, 28, time, tsys)) { BOOST_LOG_TRIVIAL(debug) << "rinex obs invalid epoch: epoch=" << buff; @@ -855,7 +860,7 @@ int decodeObsData( } double val = str2num(buff, j, 14); - double lli = str2num(buff, j+14, 1); + double lli = str2num(buff, j + 14, 1); lli = (unsigned char) lli & 0x03; RawSig& sig = *rawSig; @@ -884,6 +889,7 @@ int decodeObsData( int readRnxObsB( std::istream& inputStream, double ver, + E_TimeSys tsys, map>& sysCodeTypes, int& flag, ObsList& obsList) @@ -901,7 +907,7 @@ int readRnxObsB( // decode obs epoch if (i == 0) { - nSats = decodeObsEpoch(inputStream, line, ver, time, flag, sats); + nSats = decodeObsEpoch(inputStream, line, ver, tsys, time, flag, sats); if (nSats <= 0) { continue; @@ -954,22 +960,10 @@ int readRnxObs( // BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << ": ver=" << ver << " tsys=" << tsys; // read rinex obs data body - int n = readRnxObsB(inputStream, ver, sysCodeTypes, flag, obsList); - - if ( n >= 0 - &&stat >= 0) - { - if (tsys == +E_TimeSys::UTC) - for (auto& obs : only(obsList)) - { - UtcTime utcTime; - utcTime.bigTime = obs.time.bigTime; - - obs.time = utcTime; - } + int n = readRnxObsB(inputStream, ver, tsys, sysCodeTypes, flag, obsList); + if (n >= 0) stat = 1; - } return stat; } @@ -1011,7 +1005,8 @@ int decodeEph( eph.cuc = data[ 7]; eph.e = data[ 8]; eph.cus = data[ 9]; - eph.A = SQR(data[10]); + eph.sqrtA = data[10]; eph.A = SQR(eph.sqrtA); + eph.toes = data[11]; // toe (s) in gps/bdt week eph.cic = data[12]; eph.OMG0 = data[13]; eph.cis = data[14]; @@ -1020,16 +1015,16 @@ int decodeEph( eph.omg = data[17]; eph.OMGd = data[18]; eph.idot = data[19]; + eph.week =(int)data[21]; // gps/bdt week + eph.ttms = data[27]; - if ( sys == +E_Sys::GPS - ||sys == +E_Sys::QZS) + if ( sys == +E_Sys::GPS + ||sys == +E_Sys::QZS) { eph.iode =(int)data[ 3]; // IODE eph.iodc =(int)data[26]; // IODC - eph.toes = data[11]; // toe (s) in gps week - eph.week =(int)data[21]; // gps week - eph.toe = GTime((GTow)GTime(GWeek(eph.week), GTow(data[11])), eph.toc); - eph.ttm = GTime((GTow)GTime(GWeek(eph.week), GTow(data[27])), eph.toc); + eph.toe = GTime(GTow(eph.toes), eph.toc); + eph.ttm = GTime(GTow(eph.ttms), eph.toc); eph.code =(int) data[20]; // GPS: codes on L2 ch eph.svh =(E_Svh) data[24]; // sv health @@ -1040,75 +1035,73 @@ int decodeEph( if (sys == +E_Sys::GPS) { eph.fit = data[28]; } // fit interval in hours for GPS else if (sys == +E_Sys::QZS) { eph.fitFlag = data[28]; eph.fit = eph.fitFlag?0.0:2.0; } // fit interval flag for QZS - - decomposeTGDBias(Sat, eph.tgd[0]); + + if (acsConfig.use_tgd_bias) + decomposeTGDBias(Sat, eph.tgd[0]); } - else if (sys==+E_Sys::GAL) + else if ( sys == +E_Sys::GAL) { // GAL ver.3 eph.iode =(int)data[ 3]; // IODnav - eph.toes = data[11]; // toe (s) in galileo week - eph.week =(int)data[21]; // gal week = gps week - eph.toe = GTime((GTow)GTime(GWeek(eph.week), GTow(data[11])), eph.toc); - eph.ttm = GTime((GTow)GTime(GWeek(eph.week), GTow(data[27])), eph.toc); - - eph.code=(int)data[20]; // data sources - // bit 0 set: I/NAV E1-B - // bit 1 set: F/NAV E5a-I - // bit 2 set: I/NAV E5b-I - // bit 8 set: af0-af2 toc are for E5a.E1 - // bit 9 set: af0-af2 toc are for E5b.E1 + eph.toe = GTime(GTow(eph.toes), eph.toc); + eph.ttm = GTime(GTow(eph.ttms), eph.toc); + + eph.code =(int)data[20]; // data sources + // bit 0 set: I/NAV E1-B + // bit 1 set: F/NAV E5a-I + // bit 2 set: I/NAV E5b-I + // bit 8 set: af0-af2 toc are for E5a.E1 + // bit 9 set: af0-af2 toc are for E5b.E1 unsigned short iNavMask = 0x0005; unsigned short fNavMask = 0x0002; if (eph.code & iNavMask) eph.type = E_NavMsgType::INAV; else if (eph.code & fNavMask) eph.type = E_NavMsgType::FNAV; - eph.svh =(E_Svh)data[24]; // sv health - // bit 0: E1B DVS - // bit 1-2: E1B HS - // bit 3: E5a DVS - // bit 4-5: E5a HS - // bit 6: E5b DVS - // bit 7-8: E5b HS - eph.sva = sisaToSva(data[23]); + eph.svh =(E_Svh)data[24]; // sv health + // bit 0: E1B DVS + // bit 1-2: E1B HS + // bit 3: E5a DVS + // bit 4-5: E5a HS + // bit 6: E5b DVS + // bit 7-8: E5b HS + eph.sva =sisaToSva(data[23]); eph.tgd[0]= data[25]; // BGD E5a/E1 eph.tgd[1]= data[26]; // BGD E5b/E1 - - decomposeBGDBias(Sat, eph.tgd[0], eph.tgd[1]); + + if (acsConfig.use_tgd_bias) + decomposeBGDBias(Sat, eph.tgd[0], eph.tgd[1]); } - else if (sys==+E_Sys::BDS) + else if ( sys == +E_Sys::BDS) { // BeiDou v.3.02 - if (Sat.prn>5&&Sat.prn<59) eph.type = E_NavMsgType::D1; // MEO/IGSO - else eph.type = E_NavMsgType::D2; // GEO, prn range may change in the future*/ + if (Sat.prn > 5 && Sat.prn < 59) eph.type = E_NavMsgType::D1; // MEO/IGSO + else eph.type = E_NavMsgType::D2; // GEO, prn range may change in the future*/ - // eph.toc = bdt2gpst(eph.toc); // bdt -> gpst + eph.tocs = BTow(toc); eph.aode =(int)data[ 3]; // AODE eph.aodc =(int)data[28]; // AODC - eph.toes = data[11]; // toe (s) in bdt week - eph.week =(int)data[21]; // bdt week eph.iode = int(eph.tocs / 720) % 240; eph.iodc = eph.iode + 256 * int(eph.tocs / 172800) % 4; - eph.toe = GTime(BWeek(eph.week), BTow(data[11])); - eph.ttm = GTime(BWeek(eph.week), BTow(data[27])); + eph.toe = GTime(BTow(eph.toes), eph.toc); + eph.ttm = GTime(BTow(eph.ttms), eph.toc); eph.svh =(E_Svh)data[24]; // satH1 eph.sva =uraToSva(data[23]); // ura (m->index) - eph.tgd[0] = data[25]; // TGD1 B1/B3 - eph.tgd[1] = data[26]; // TGD2 B2/B3 + eph.tgd[0] = data[25]; // TGD1 B1/B3 + eph.tgd[1] = data[26]; // TGD2 B2/B3 } - if ( eph.iode<0 - ||eph.iode>1023) + if ( eph.iode < 0 + ||eph.iode > 1023) { BOOST_LOG_TRIVIAL(debug) << "rinex nav invalid: sat=" << Sat.id() << " iode=" << eph.iode; } - if ( eph.iodc<0 - ||eph.iodc>1023) + if ( eph.iodc < 0 + ||eph.iodc > 1023) { BOOST_LOG_TRIVIAL(debug) << "rinex nav invalid: sat=" << Sat.id() << " iodc=" << eph.iodc; @@ -1125,14 +1118,12 @@ int decodeGeph( vector& data, ///< Data to decode Geph& geph) ///< Glonass ephemeris { - GTime tof; - double tow,tod; - int week,dow; + double tow; // BOOST_LOG_TRIVIAL(debug) // << "decodeGeph: ver=" << ver << " sat=" << Sat.id(); - if (Sat.sys!=+E_Sys::GLO) + if (Sat.sys != +E_Sys::GLO) { BOOST_LOG_TRIVIAL(debug) << "glonass ephemeris error: invalid satellite sat=" << Sat.id(); @@ -1140,22 +1131,16 @@ int decodeGeph( return 0; } - geph.type=defNavMsgType[Sat.sys]; - geph.Sat=Sat; + geph.type = defNavMsgType[Sat.sys]; + geph.Sat = Sat; - // time of day in utc - if (ver <= 2.99) tod = data[2]; - else tod = fmod( data[2], 86400); // tod (v.2), tow (v.3) in utc + RTod toes = int(RTod(toc) + 450.0) / 900 * 900.0; + geph.toe = GTime(toes, toc); - tow = GTow(toc); - toc = (toc+450.0).floorTime(900); - tof = toc.floorTime(86400.0) + tod; - - geph.toe = utc2gpst(toc); // toc (gpst) // Eugene to fix - geph.tof = utc2gpst(tof); // tof (gpst) // Eugene to fix + geph.tofs = data[2]; // UTC + geph.tof = GTime(RTod(geph.tofs + 10800.0), toc); - // iode = tb (7bit), tb =index of UTC+3H within current day - geph.iode = (int) (fmod(tow+10800.0,86400.0)/900.0+0.5); + geph.iode = (int)toes / 900; geph.taun = -data[0]; // -taun -> +taun geph.gammaN = data[1]; // +gamman @@ -1171,11 +1156,17 @@ int decodeGeph( geph.frq = (int) data[10]; geph.age = (int) data[14]; + if (ver >= 3.05) + { + // todo Eugene: additional records from version 3.05 and on + } + // some receiver output >128 for minus frequency number if (geph.frq > 128) geph.frq -= 256; - if (geph.frq MAXFREQ_GLO) { BOOST_LOG_TRIVIAL(debug) << "rinex gnav invalid freq: sat=" << Sat << " fn=" << geph.frq; @@ -1192,12 +1183,10 @@ int decodeSeph( vector& data, Seph& seph) { - int week; - // BOOST_LOG_TRIVIAL(debug) // << "decodeSeph: ver=" << ver << " sat=" << Sat.id(); - if (Sat.sys!=+E_Sys::SBS) + if (Sat.sys != +E_Sys::SBS) { BOOST_LOG_TRIVIAL(debug) << "geo ephemeris error: invalid satellite sat=" << Sat.id(); @@ -1205,22 +1194,25 @@ int decodeSeph( return 0; } - seph.type=defNavMsgType[Sat.sys]; - seph.Sat=Sat; - seph.t0 =toc; + seph.type = defNavMsgType[Sat.sys]; + seph.Sat = Sat; + seph.t0 = toc; - // time2gpst(seph.t0,&week); - seph.tof = GTime(GTow(data[2]),seph.t0); + seph.tofs = data[2]; + seph.tof = GTime(GTow(seph.tofs), seph.t0); - seph.af0=data[0]; - seph.af1=data[1]; + seph.af0 = data[0]; + seph.af1 = data[1]; - seph.pos[0]=data[3]*1E3; seph.pos[1]=data[7]*1E3; seph.pos[2]=data[11]*1E3; - seph.vel[0]=data[4]*1E3; seph.vel[1]=data[8]*1E3; seph.vel[2]=data[12]*1E3; - seph.acc[0]=data[5]*1E3; seph.acc[1]=data[9]*1E3; seph.acc[2]=data[13]*1E3; + for (int i = 0; i < 3; i++) + { + seph.pos[i] = data[3 + i*4] * 1E3; + seph.vel[i] = data[4 + i*4] * 1E3; + seph.acc[i] = data[5 + i*4] * 1E3; + } - seph.svh=(E_Svh)data[6]; - seph.sva=uraToSva(data[10]); + seph.svh = (E_Svh)data[6]; + seph.sva = uraToSva(data[10]); return 1; } @@ -1294,12 +1286,11 @@ int decodeCeph( ceph.idot = data[19]; ceph.dn0d = data[20]; - if (sys==+E_Sys::GPS||sys==+E_Sys::QZS) + if ( sys == +E_Sys::GPS + ||sys == +E_Sys::QZS) { - int week = GWeek(ceph.toc); - ceph.toe = ceph.toc; - // ceph.toes = time2gpst(ceph.toe,&week); - ceph.toes = GTow(ceph.toe); + ceph.toe = ceph.toc; + ceph.toes = GTow(ceph.toe); ceph.ura[0] = data[21]; ceph.ura[1] = data[22]; @@ -1317,7 +1308,8 @@ int decodeCeph( if (type == +E_NavMsgType::CNAV) { - ceph.ttm = GTime((GTow)GTime(GWeek(week), GTow(data[31])), ceph.toc); + ceph.ttms = data[31]; + ceph.ttm = GTime(GTow(ceph.ttms), ceph.toc); ceph.wnop = (int)data[32]; } else if (type == +E_NavMsgType::CNV2) @@ -1325,21 +1317,17 @@ int decodeCeph( ceph.isc[4] = data[31]; ceph.isc[5] = data[32]; - ceph.ttm = GTime((GTow)GTime(GWeek(week), GTow(data[35])), ceph.toc); + ceph.ttms = data[35]; + ceph.ttm = GTime(GTow(ceph.ttms), ceph.toc); ceph.wnop = (int)data[36]; } ceph.tops = data[11]; // top (s) in seconds - ceph.top = GTime((GTow)GTime(GWeek(ceph.wnop), GTow(ceph.tops)), ceph.toc); + ceph.top = GTime(GTow(ceph.tops), ceph.toc); } - else if (sys==+E_Sys::BDS) + else if ( sys == +E_Sys::BDS) { // BeiDou v.4.00 - int week; - - time2bdt(ceph.toc,&week); - -// ceph.toc = bdt2gpst(ceph.toc); // bdt -> gpst ceph.orb = E_SatType::_from_integral(data[21]); @@ -1348,8 +1336,8 @@ int decodeCeph( ceph.sis[2] = data[25]; ceph.sis[3] = data[26]; - if ( type==+E_NavMsgType::CNV1 - ||type==+E_NavMsgType::CNV2) + if ( type == +E_NavMsgType::CNV1 + ||type == +E_NavMsgType::CNV2) { ceph.isc[0] = data[27]; ceph.isc[1] = data[28]; @@ -1362,33 +1350,37 @@ int decodeCeph( ceph.svh = (E_Svh)data[32]; // sv health ceph.flag = (int)data[33]; // integrity flag ceph.iodc = (int)data[34]; // IODC - ceph.iode = (int)data[37]; // IODE + ceph.iode = (int)data[38]; // IODE -// ceph.ttm = bdt2gpst(bdt2time(week,data[35])); adjweek(ceph.ttm,ceph.toc);// bdt -> gpst + ceph.ttms = data[35]; + ceph.ttm = GTime(BTow(ceph.ttms), ceph.toc); } - else if (type==+E_NavMsgType::CNV3) + else if (type == +E_NavMsgType::CNV3) { ceph.sis[4] = data[27]; ceph.svh = (E_Svh)data[28]; // sv health ceph.flag = (int)data[29]; // integrity flag ceph.tgd[2] = data[30]; // TGD_B2ap -// ceph.ttm = bdt2gpst(bdt2time(week,data[31])); adjweek(ceph.ttm,ceph.toc);// bdt -> gpst + ceph.ttms = data[31]; + ceph.ttm = GTime(BTow(ceph.ttms), ceph.toc); } ceph.toes = data[11]; // top (s) in seconds ceph.tops = data[22]; // top (s) in seconds -// ceph.toe = bdt2gpst(bdt2time(week,data[11])); adjweek(ceph.toe,ceph.toc);// bdt -> gpst -// ceph.top = bdt2gpst(bdt2time(week,data[22])); adjweek(ceph.top,ceph.toc);// bdt -> gpst + ceph.toe = GTime(BTow(ceph.toes), ceph.toc); + ceph.top = GTime(BTow(ceph.tops), ceph.toc); } - if (ceph.iode<0||1023 1023) { BOOST_LOG_TRIVIAL(debug) << "rinex nav invalid: sat=" << Sat.id() << " iode=" << ceph.iode; } - if (ceph.iodc<0||1023 1023) { BOOST_LOG_TRIVIAL(debug) << "rinex nav invalid: sat=" << Sat.id() << " iodc=" << ceph.iodc; @@ -1425,12 +1417,14 @@ int decodeSto( sto.sid = E_SbasId ::_from_integral(data[1]); sto.uid = E_UtcId ::_from_integral(data[2]); + sto.ttms = data[3]; + sto.A0 = data[4]; sto.A1 = data[5]; sto.A2 = data[6]; - if (sys != +E_Sys::BDS) {GWeek week = sto.tot; sto.ttm = gpst2time(week,data[3]); } -// else {time2bdt (sto.tot,&week); sto.ttm=bdt2gpst( bdt2time(week,data[3])); sto.tot=bdt2gpst(sto.tot); } + if (sys != +E_Sys::BDS) { sto.ttm = GTime(GWeek(sto.tot), GTow(sto.ttms));} + else { sto.ttm = GTime(BWeek(sto.tot), BTow(sto.ttms));} return 1; } @@ -1465,12 +1459,13 @@ int decodeEop( eop.yp = data[4] * AS2R; eop.ypr = data[5] * AS2R; eop.yprr = data[6] * AS2R; + eop.ttms = data[7]; eop.dut1 = data[8]; eop.dur = data[9]; eop.durr = data[10]; - if (sys != +E_Sys::BDS) { eop.ttm = GTime(GTow(data[7]), eop.teop);} - else { eop.ttm = GTime(BTow(data[7]), eop.teop);} + if (sys != +E_Sys::BDS) { eop.ttm = GTime(GWeek(eop.teop), GTow(eop.ttms));} + else { eop.ttm = GTime(BWeek(eop.teop), BTow(eop.ttms));} return 1; } @@ -1498,46 +1493,43 @@ int decodeIon( ion.Sat = Sat; ion.type = type; ion.ttm = toc; - -// if (sys == +E_Sys::BDS) -// ion.ttm=bdt2gpst(ion.ttm); - if ( sys==+E_Sys::GAL - &&type==+E_NavMsgType::IFNV) + if ( sys == +E_Sys::GAL + &&type == +E_NavMsgType::IFNV) { - ion.ai0=data[0]; - ion.ai1=data[1]; - ion.ai2=data[2]; + ion.ai0 = data[0]; + ion.ai1 = data[1]; + ion.ai2 = data[2]; - ion.flag=(int)data[3]; + ion.flag = (int)data[3]; } - else if ( sys==+E_Sys::BDS - &&type==+E_NavMsgType::CNVX) + else if ( sys == +E_Sys::BDS + &&type == +E_NavMsgType::CNVX) { - ion.alpha1=data[0]; - ion.alpha2=data[1]; - ion.alpha3=data[2]; - ion.alpha4=data[3]; - ion.alpha5=data[4]; - ion.alpha6=data[5]; - ion.alpha7=data[6]; - ion.alpha8=data[7]; - ion.alpha9=data[8]; + ion.alpha1 = data[0]; + ion.alpha2 = data[1]; + ion.alpha3 = data[2]; + ion.alpha4 = data[3]; + ion.alpha5 = data[4]; + ion.alpha6 = data[5]; + ion.alpha7 = data[6]; + ion.alpha8 = data[7]; + ion.alpha9 = data[8]; } - else if ( type==+E_NavMsgType::LNAV - ||type==+E_NavMsgType::D1D2 - ||type==+E_NavMsgType::CNVX) + else if ( type == +E_NavMsgType::LNAV + ||type == +E_NavMsgType::D1D2 + ||type == +E_NavMsgType::CNVX) { - ion.a0=data[0]; - ion.a1=data[1]; - ion.a2=data[2]; - ion.a3=data[3]; - ion.b0=data[4]; - ion.b1=data[5]; - ion.b2=data[6]; - ion.b3=data[7]; + ion.a0 = data[0]; + ion.a1 = data[1]; + ion.a2 = data[2]; + ion.a3 = data[3]; + ion.b0 = data[4]; + ion.b1 = data[5]; + ion.b2 = data[6]; + ion.b3 = data[7]; - ion.code=(int)data[8]; + ion.code = (int)data[8]; if (ion.code == 1) // QZS Japan area coefficients are currently skipped return 0; @@ -1563,9 +1555,9 @@ int readRnxNavB( { GTime toc; vector data; - int sp=3; + int sp = 3; string line; - char id[8]=""; + char id[8] = ""; char *p; // BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << ": ver=" << ver << " sys=" << sys; @@ -1586,15 +1578,15 @@ int readRnxNavB( { // ver.4 char typeStr[5] = ""; - strncpy(typeStr,buff+2,3); + strncpy(typeStr, buff+2, 3); recType = E_NavRecType::_from_string(typeStr); - strncpy(id,buff+6,3); + strncpy(id, buff + 6, 3); Sat=SatSys(id); sys=Sat.sys; - strncpy(typeStr,buff+10,4); - std::replace(typeStr, typeStr+4, ' ', '\0'); + strncpy(typeStr, buff + 10, 4); + std::replace(typeStr, typeStr + 4, ' ', '\0'); msgType = E_NavMsgType::_from_string(typeStr); continue; @@ -1606,38 +1598,36 @@ int readRnxNavB( ||sys == +E_Sys::QZS) { // ver.3 or GAL/QZS - strncpy(id,buff,3); + strncpy(id, buff, 3); sp = 4; if (ver < 4.0) // satellite id included in message type field in ver.4 { Sat=SatSys(id); if (ver >= 3.0) - sys=Sat.sys; + sys = Sat.sys; } } else { Sat.sys = sys; - Sat.prn = str2num(buff,0,2); + Sat.prn = str2num(buff, 0, 2); } - // decode toc field - GTime tempTime; - bool error = str2time(buff+sp, 0, 19, tempTime); - if (error == false) - { - if (sys == +E_Sys::BDS) { toc.bigTime = tempTime.bigTime + (double) GPS_SUB_UTC_2006; } - else { toc = tempTime; } - - // if (sys == +E_Sys::GLO) // todo Eugene: UEpoch - // { - // UtcTime utcTime; - // utcTime.bigTime = tempTime.bigTime; - - // toc = utcTime; - // } + E_TimeSys tsys = E_TimeSys::GPST; + switch (sys) + { + case E_Sys::GPS: tsys = E_TimeSys::GPST; break; + case E_Sys::GLO: tsys = E_TimeSys::UTC; break; + case E_Sys::GAL: tsys = E_TimeSys::GST; break; + case E_Sys::BDS: tsys = E_TimeSys::BDT; break; + case E_Sys::QZS: tsys = E_TimeSys::QZSST; break; + case E_Sys::SBS: tsys = E_TimeSys::GPST; break; + default: tsys = E_TimeSys::GPST; break; } - else + + // decode toc field + bool error = str2time(buff+sp, 0, 19, toc, tsys); + if (error == true) { // BOOST_LOG_TRIVIAL(debug) // << "rinex nav toc error: " << buff; @@ -1649,19 +1639,19 @@ int readRnxNavB( { // decode STO code, SBAS ID & UTC ID for STO message char code[19] = ""; - strncpy(code,buff+24,18); - std::replace(code, code+18, ' ', '\0'); + strncpy(code, buff + 24, 18); + std::replace(code, code + 18, ' ', '\0'); data.push_back(E_StoCode::_from_string(code)); - strncpy(code,buff+43,18); - std::replace(code, code+18, '-', '_' ); - std::replace(code, code+18, ' ', '\0'); + strncpy(code, buff + 43, 18); + std::replace(code, code + 18, '-', '_' ); + std::replace(code, code + 18, ' ', '\0'); data.push_back(*(E_SbasId::_from_string_nothrow(code))); //code may be empty - strncpy(code,buff+62,18); - std::replace(code, code+18, '(', '_' ); - std::replace(code, code+18, ')', '\0'); - std::replace(code, code+18, ' ', '\0'); + strncpy(code, buff + 62, 18); + std::replace(code, code + 18, '(', '_' ); + std::replace(code, code + 18, ')', '\0'); + std::replace(code, code + 18, ' ', '\0'); data.push_back(*(E_UtcId::_from_string_nothrow(code))); //code may be empty } else @@ -1670,7 +1660,7 @@ int readRnxNavB( p = buff+sp+19; for (int j = 0; j < 3; j++, p += 19) { - data.push_back(str2num(p,0,19)); + data.push_back(str2num(p, 0, 19)); } } @@ -1683,7 +1673,7 @@ int readRnxNavB( p = buff+sp; for (int j = 0; j < 4; j++, p += 19) { - data.push_back(str2num(p,0,19)); + data.push_back(str2num(p, 0, 19)); } // decode ephemeris if (recType == +E_NavRecType::EPH) @@ -1691,22 +1681,22 @@ int readRnxNavB( switch (msgType) { case E_NavMsgType::CNAV: //fallthrough - case E_NavMsgType::CNV3: { if (data.size() >= 35) { type = E_EphType::CEPH; return decodeCeph(ver,Sat,msgType, toc,data,ceph); } break; } + case E_NavMsgType::CNV3: { if (data.size() >= 35) { type = E_EphType::CEPH; return decodeCeph(ver, Sat, msgType, toc, data, ceph); } break; } case E_NavMsgType::CNV1: //fallthrough - case E_NavMsgType::CNV2: { if (data.size() >= 39) { type = E_EphType::CEPH; return decodeCeph(ver,Sat,msgType, toc,data,ceph); } break; } - case E_NavMsgType::FDMA: { if (data.size() >= 15) { type = E_EphType::GEPH; return decodeGeph(ver,Sat, toc,data,geph); } break; } - case E_NavMsgType::SBAS: { if (data.size() >= 15) { type = E_EphType::SEPH; return decodeSeph(ver,Sat, toc,data,seph); } break; } - default: { if (data.size() >= 31) { type = E_EphType:: EPH; return decodeEph (ver,Sat, toc,data, eph); } break; } + case E_NavMsgType::CNV2: { if (data.size() >= 39) { type = E_EphType::CEPH; return decodeCeph(ver, Sat, msgType, toc, data, ceph); } break; } + case E_NavMsgType::FDMA: { if (data.size() >= 15) { type = E_EphType::GEPH; return decodeGeph(ver, Sat, toc, data, geph); } break; } // todo Eugene: additional records from version 3.05 and on + case E_NavMsgType::SBAS: { if (data.size() >= 15) { type = E_EphType::SEPH; return decodeSeph(ver, Sat, toc, data, seph); } break; } + default: { if (data.size() >= 31) { type = E_EphType:: EPH; return decodeEph (ver, Sat, toc, data, eph); } break; } } } - else if (recType == +E_NavRecType::STO) { if (data.size() >= 7) { type = E_EphType:: STO; return decodeSto (ver,Sat,msgType, toc,data, sto); } } - else if (recType == +E_NavRecType::EOP) { if (data.size() >= 11) { type = E_EphType:: EOP; return decodeEop (ver,Sat,msgType, toc,data, eop); } } + else if (recType == +E_NavRecType::STO) { if (data.size() >= 7) { type = E_EphType:: STO; return decodeSto (ver, Sat, msgType, toc, data, sto); } } + else if (recType == +E_NavRecType::EOP) { if (data.size() >= 11) { type = E_EphType:: EOP; return decodeEop (ver, Sat, msgType, toc, data, eop); } } else if (recType == +E_NavRecType::ION) { switch (sys) { - case E_Sys::GAL: { if (data.size() >= 7) { type = E_EphType:: ION; return decodeIon (ver,Sat,msgType, toc,data, ion); } break; } - default: { if (data.size() >= 11) { type = E_EphType:: ION; return decodeIon (ver,Sat,msgType, toc,data, ion); } break; } + case E_Sys::GAL: { if (data.size() >= 7) { type = E_EphType:: ION; return decodeIon (ver, Sat, msgType, toc, data, ion); } break; } + default: { if (data.size() >= 11) { type = E_EphType:: ION; return decodeIon (ver, Sat, msgType, toc, data, ion); } break; } } } else @@ -1724,37 +1714,46 @@ int readRnxNav( E_Sys sys, ///< Satellite system Navigation& nav) ///< Navigation object { - Eph eph = {}; - Geph geph = {}; - Seph seph = {}; - Ceph ceph = {}; - STO sto = {}; - EOP eop = {}; - ION ion = {}; - int stat = {}; - E_EphType type = {}; // BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << ": ver=" << ver << " sys=" << sys; // read rinex navigation data body - while ((stat = readRnxNavB(inputStream, ver, sys, type, eph, geph, seph, ceph, sto, eop, ion)) >= 0) + while (1) { - // add ephemeris to navigation data - if (stat) + // initialise each time to avoid incomplete overwriting + Eph eph = {}; + Geph geph = {}; + Seph seph = {}; + Ceph ceph = {}; + STO sto = {}; + EOP eop = {}; + ION ion = {}; + + E_EphType type; + + int stat = readRnxNavB(inputStream, ver, sys, type, eph, geph, seph, ceph, sto, eop, ion); + + if (stat < 0) { + break; + } + else if (stat > 0) + { + // add ephemeris to navigation data switch (type) { - case E_EphType::EPH: nav.ephMap [eph.Sat] [eph.type] [eph.toe] = eph; break; - case E_EphType::GEPH: nav.gephMap [geph.Sat] [E_NavMsgType::FDMA] [geph.toe] = geph; break; - case E_EphType::SEPH: nav.sephMap [seph.Sat] [E_NavMsgType::SBAS] [seph.t0] = seph; break; - case E_EphType::CEPH: nav.cephMap [ceph.Sat] [ceph.type] [ceph.toe] = ceph; break; - case E_EphType::STO: nav.stoMap [sto.code] [sto.type] [sto.tot ] = sto; break; - case E_EphType::EOP: nav.eopMap [eop.Sat.sys] [eop.type] [eop.teop] = eop; break; - case E_EphType::ION: nav.ionMap [ion.Sat.sys] [ion.type] [ion.ttm ] = ion; break; + case E_EphType::EPH: nav.ephMap [eph. Sat] [eph. type] [eph. toe] = eph; break; + case E_EphType::GEPH: nav.gephMap [geph.Sat] [geph.type] [geph.toe] = geph; break; + case E_EphType::SEPH: nav.sephMap [seph.Sat] [seph.type] [seph.t0 ] = seph; break; + case E_EphType::CEPH: nav.cephMap [ceph.Sat] [ceph.type] [ceph.toe] = ceph; break; + case E_EphType::STO: nav.stoMap [sto.code] [sto. type] [sto. tot] = sto; break; + case E_EphType::EOP: nav.eopMap [eop.Sat.sys] [eop. type] [eop.teop] = eop; break; + case E_EphType::ION: nav.ionMap [ion.Sat.sys] [ion. type] [ion. ttm] = ion; break; default: continue; } } } + return ( nav. ephMap.empty() == false ||nav.gephMap.empty() == false ||nav.sephMap.empty() == false @@ -1784,12 +1783,12 @@ int readRnxClk( } ClkStruct; - ClkStruct typ = {0,2}; - ClkStruct as = {3,3}; - ClkStruct ar = {3,4}; - ClkStruct tim = {8,26}; - ClkStruct clk = {40,19}; - ClkStruct std = {60,19}; + ClkStruct typ = { 0, 2}; + ClkStruct as = { 3, 3}; + ClkStruct ar = { 3, 4}; + ClkStruct tim = { 8, 26}; + ClkStruct clk = {40, 19}; + ClkStruct std = {60, 19}; // special case for 3.04 rnx with 9 char AR names if (ver == 3.04) @@ -1811,7 +1810,7 @@ int readRnxClk( continue; } - string type(buff + typ.offset,typ.length); + string type(buff + typ.offset, typ.length); string idString; if (type == "AS") { idString.assign(buff + as.offset, as.length); } diff --git a/src/cpp/common/rinexNavWrite.cpp b/src/cpp/common/rinexNavWrite.cpp index 5929abd7b..170f68128 100644 --- a/src/cpp/common/rinexNavWrite.cpp +++ b/src/cpp/common/rinexNavWrite.cpp @@ -54,10 +54,19 @@ void outputNavRinexEph( auto sys = eph.Sat.sys; - GEpoch ep; - GTime fakeGTime; - if (sys == +E_Sys::BDS) { fakeGTime.bigTime = eph.toc - (double)GPS_SUB_UTC_2006; ep = fakeGTime; } //todo Eugene: BEpoch? - else { ep = eph.toc; } + E_TimeSys tsys = E_TimeSys::GPST; + switch (sys) + { + case E_Sys::GPS: tsys = E_TimeSys::GPST; break; + case E_Sys::GAL: tsys = E_TimeSys::GST; break; + case E_Sys::BDS: tsys = E_TimeSys::BDT; break; + case E_Sys::QZS: tsys = E_TimeSys::QZSST; break; + case E_Sys::SBS: tsys = E_TimeSys::GPST; break; + default: tsys = E_TimeSys::GPST; break; + } + + double ep[6] = {0}; + time2epoch(eph.toc, ep, tsys); tracepdeex(0, trace, "%-3s %04.0f %02.0f %02.0f %02.0f %02.0f %02.0f", eph.Sat.id().c_str(), ep[0], ep[1], ep[2], ep[3], ep[4], ep[5]); @@ -116,15 +125,12 @@ void outputNavRinexEph( trace << std::endl; trace << " "; - double ttm = 0; - int week = 0; - if (sys == +E_Sys::BDS) { ttm = BTow(eph.ttm); week = GWeek(eph.ttm); } /* gpst -> bdt */ - else { ttm = GTow(eph.ttm); week = GWeek(eph.ttm); } - traceFormatedFloat(trace, ttm + (week - eph.week) * 604800.0, formatStr); + if (sys != +E_Sys::BDS) { traceFormatedFloat(trace, GTow(eph.ttm), formatStr); } + else { traceFormatedFloat(trace, BTow(eph.ttm), formatStr); } if (sys == +E_Sys::GPS) { traceFormatedFloat(trace, eph.fit, formatStr); } /* fit interval in hours for GPS */ else if (sys == +E_Sys::QZS) { traceFormatedFloat(trace, eph.fitFlag, formatStr); } /* fit interval flag for QZS */ - else if (sys == +E_Sys::BDS) { traceFormatedFloat(trace, eph.iodc, formatStr); } /* BDS: AODC */ + else if (sys == +E_Sys::BDS) { traceFormatedFloat(trace, eph.aodc, formatStr); } /* BDS: AODC */ else { traceFormatedFloat(trace, 0, formatStr); } /* spare */ trace << std::endl; } @@ -149,19 +155,15 @@ void outputNavRinexGeph( return; } - // double tof = time2gpst(gpst2utc(geph.tof), nullptr); /* v.3: tow in utc */ - UtcTime utcTime; GTime fakeGTime; utcTime = geph.tof; - fakeGTime.bigTime = utcTime.bigTime; // todo Eugene: UEpoch + fakeGTime.bigTime = utcTime.bigTime; double tof = GTow(fakeGTime); - // GEpoch ep = geph.toe; - utcTime = geph.toe; - fakeGTime.bigTime = utcTime.bigTime; // todo Eugene: UEpoch - GEpoch ep = fakeGTime; + double ep[6] = {0}; + time2epoch(geph.toe, ep, E_TimeSys::UTC); tracepdeex(0, trace, "%-3s %04.0f %02.0f %02.0f %02.0f %02.0f %02.0f", geph.Sat.id().c_str(), ep[0], ep[1], ep[2], ep[3], ep[4], ep[5]); traceFormatedFloat(trace,-geph.taun, formatStr); // -taun @@ -189,6 +191,11 @@ void outputNavRinexGeph( traceFormatedFloat(trace, geph.acc[2] / 1E3, formatStr); traceFormatedFloat(trace, geph.age, formatStr); trace << std::endl; + + if (rnxver >= 3.05) + { + // todo Eugene: additional records from version 3.05 and on + } } @@ -211,9 +218,19 @@ void outputNavRinexCeph( auto sys = ceph.Sat.sys; auto type = ceph.type; - GEpoch ep; - if (sys != +E_Sys::BDS) { ep = ceph.toc; } -// else { ep = gpst2bdt(ceph.toc); } + E_TimeSys tsys = E_TimeSys::GPST; + switch (sys) + { + case E_Sys::GPS: tsys = E_TimeSys::GPST; break; + case E_Sys::GAL: tsys = E_TimeSys::GST; break; + case E_Sys::BDS: tsys = E_TimeSys::BDT; break; + case E_Sys::QZS: tsys = E_TimeSys::QZSST; break; + case E_Sys::SBS: tsys = E_TimeSys::GPST; break; + default: tsys = E_TimeSys::GPST; break; + } + + double ep[6] = {0}; + time2epoch(ceph.toc, ep, tsys); tracepdeex(0, trace, "%-3s %04.0f %02.0f %02.0f %02.0f %02.0f %02.0f", ceph.Sat.id().c_str(), ep[0], ep[1], ep[2], ep[3], ep[4], ep[5]); @@ -276,15 +293,12 @@ void outputNavRinexCeph( traceFormatedFloat(trace, ceph.isc[3], formatStr); trace << std::endl; + if (type==+E_NavMsgType::CNAV) { trace << " "; - double ttm = GTow(ceph.ttm); - // int week; - // ttm = time2gpst(ceph.ttm, &week); - - traceFormatedFloat(trace, ttm, formatStr); - traceFormatedFloat(trace, ceph.wnop, formatStr); + traceFormatedFloat(trace, GTow(ceph.ttm), formatStr); + traceFormatedFloat(trace, ceph.wnop, formatStr); trace << " "; trace << " "; trace << std::endl; @@ -299,11 +313,8 @@ void outputNavRinexCeph( trace << std::endl; trace << " "; - double ttm = GTow(ceph.ttm); - // int week; - // ttm = time2gpst(ceph.ttm, &week); - traceFormatedFloat(trace, ttm, formatStr); - traceFormatedFloat(trace, ceph.wnop, formatStr); + traceFormatedFloat(trace, GTow(ceph.ttm), formatStr); + traceFormatedFloat(trace, ceph.wnop, formatStr); trace << " "; trace << " "; trace << std::endl; @@ -348,12 +359,10 @@ void outputNavRinexCeph( trace << std::endl; trace << " "; - double ttm = GTow(ceph.ttm); - // ttm = time2bdt(gpst2bdt(ceph.ttm), &week); - traceFormatedFloat(trace, ttm, formatStr); + traceFormatedFloat(trace, BTow(ceph.ttm), formatStr); trace << " "; - traceFormatedFloat(trace, ceph.iode, formatStr); trace << " "; + traceFormatedFloat(trace, ceph.iode, formatStr); trace << std::endl; } else if (type==+E_NavMsgType::CNV3) @@ -366,9 +375,7 @@ void outputNavRinexCeph( trace << std::endl; trace << " "; - double ttm = GTow(ceph.ttm); -// ttm = time2bdt(gpst2bdt(ceph.ttm), &week); - traceFormatedFloat(trace, ttm, formatStr); + traceFormatedFloat(trace, BTow(ceph.ttm), formatStr); trace << " "; trace << " "; trace << " "; @@ -397,9 +404,20 @@ void outputNavRinexSTO( auto sys = sto.Sat.sys; - GEpoch ep; - if (sys != +E_Sys::BDS) { ep = sto.tot; } -// else { ep = gpst2bdt(sto.tot); } + E_TimeSys tsys = E_TimeSys::GPST; + switch (sys) + { + case E_Sys::GPS: tsys = E_TimeSys::GPST; break; + case E_Sys::GLO: tsys = E_TimeSys::UTC; break; + case E_Sys::GAL: tsys = E_TimeSys::GST; break; + case E_Sys::BDS: tsys = E_TimeSys::BDT; break; + case E_Sys::QZS: tsys = E_TimeSys::QZSST; break; + case E_Sys::SBS: tsys = E_TimeSys::GPST; break; + default: tsys = E_TimeSys::GPST; break; + } + + double ep[6] = {0}; + time2epoch(sto.tot, ep, tsys); tracepdeex(0, trace, " %04.0f %02.0f %02.0f %02.0f %02.0f %02.0f", ep[0], ep[1], ep[2], ep[3], ep[4], ep[5]); @@ -412,13 +430,14 @@ void outputNavRinexSTO( tracepdeex(0, trace, " %-18s %-18s %-18s", sto.code._to_string(), sbasId.c_str(), utcIdStr[sto.uid]); trace << std::endl; + double ttm = 0; + int week = 0; + int weekRef = 0; + if (sys != +E_Sys::BDS) { ttm = GTow(sto.ttm); week = GWeek(sto.ttm); weekRef = GWeek(sto.tot); } + else { ttm = BTow(sto.ttm); week = BWeek(sto.ttm); weekRef = BWeek(sto.tot); } + trace << " "; - int week; - int weekRef; - double ttm; - if (sys != +E_Sys::BDS) { weekRef = GWeek(sto.tot); week = GWeek(sto.ttm); ttm = GTow(sto.ttm); } - else { weekRef = GWeek(sto.tot); week = GWeek(sto.ttm); ttm = GTow(sto.ttm) - 14; } /* gpst -> bdt */ - traceFormatedFloat(trace, ttm + (week - weekRef) * 604800.0, formatStr); + traceFormatedFloat(trace, ttm + (week - weekRef) * 604800.0, formatStr); /* align ttm to tot week */ traceFormatedFloat(trace, sto.A0, formatStr); traceFormatedFloat(trace, sto.A1, formatStr); traceFormatedFloat(trace, sto.A2, formatStr); @@ -445,9 +464,20 @@ void outputNavRinexEOP( auto sys = eop.Sat.sys; - GEpoch ep; - if (sys != +E_Sys::BDS) { ep = eop.teop; } -// else { ep = gpst2bdt(eop.teop); } + E_TimeSys tsys = E_TimeSys::GPST; + switch (sys) + { + case E_Sys::GPS: tsys = E_TimeSys::GPST; break; + case E_Sys::GLO: tsys = E_TimeSys::UTC; break; + case E_Sys::GAL: tsys = E_TimeSys::GST; break; + case E_Sys::BDS: tsys = E_TimeSys::BDT; break; + case E_Sys::QZS: tsys = E_TimeSys::QZSST; break; + case E_Sys::SBS: tsys = E_TimeSys::GPST; break; + default: tsys = E_TimeSys::GPST; break; + } + + double ep[6] = {0}; + time2epoch(eop.teop, ep, tsys); tracepdeex(0, trace, " %04.0f %02.0f %02.0f %02.0f %02.0f %02.0f", ep[0], ep[1], ep[2], ep[3], ep[4], ep[5]); @@ -463,15 +493,14 @@ void outputNavRinexEOP( traceFormatedFloat(trace, eop.yprr * R2AS, formatStr); trace << std::endl; + double ttm = 0; + int week = 0; + int weekRef = 0; + if (sys != +E_Sys::BDS) { ttm = GTow(eop.ttm); week = GWeek(eop.ttm); weekRef = GWeek(eop.teop); } + else { ttm = BTow(eop.ttm); week = BWeek(eop.ttm); weekRef = BWeek(eop.teop); } + trace << " "; - // double ttm; - // int week, weekRef; - // if (sys != +E_Sys::BDS) { time2gpst(eop.teop, &weekRef); ttm = time2gpst(eop.ttm, &week); } -// else { time2bdt(gpst2bdt(eop.teop), &weekRef); ttm = time2bdt(gpst2bdt(eop.ttm), &week); } /* gpst -> bdt */ - double ttm = GTow(eop.ttm); - int week = GWeek(eop.ttm); - int weekRef = GWeek(eop.teop); - traceFormatedFloat(trace, ttm + (week - weekRef) * 604800.0, formatStr); + traceFormatedFloat(trace, ttm + (week - weekRef) * 604800.0, formatStr); /* align ttm to teop week */ traceFormatedFloat(trace, eop.dut1, formatStr); traceFormatedFloat(trace, eop.dur, formatStr); traceFormatedFloat(trace, eop.durr, formatStr); @@ -499,9 +528,20 @@ void outputNavRinexION( auto sys = ion.Sat.sys; auto type = ion.type; - GEpoch ep; - if (sys != +E_Sys::BDS) { ep = ion.ttm; } -// else { ep = gpst2bdt(ion.ttm); } + E_TimeSys tsys = E_TimeSys::GPST; + switch (sys) + { + case E_Sys::GPS: tsys = E_TimeSys::GPST; break; + case E_Sys::GLO: tsys = E_TimeSys::UTC; break; + case E_Sys::GAL: tsys = E_TimeSys::GST; break; + case E_Sys::BDS: tsys = E_TimeSys::BDT; break; + case E_Sys::QZS: tsys = E_TimeSys::QZSST; break; + case E_Sys::SBS: tsys = E_TimeSys::GPST; break; + default: tsys = E_TimeSys::GPST; break; + } + + double ep[6] = {0}; + time2epoch(ion.ttm, ep, tsys); tracepdeex(0, trace, " %04.0f %02.0f %02.0f %02.0f %02.0f %02.0f", ep[0], ep[1], ep[2], ep[3], ep[4], ep[5]); @@ -519,8 +559,8 @@ void outputNavRinexION( trace << " "; trace << std::endl; } - else if ( sys==+E_Sys::BDS - &&type==+E_NavMsgType::CNVX) + else if ( sys == +E_Sys::BDS + &&type == +E_NavMsgType::CNVX) { traceFormatedFloat(trace, ion.alpha1, formatStr); traceFormatedFloat(trace, ion.alpha2, formatStr); @@ -587,7 +627,6 @@ void outputNavRinexBody( auto* eop_ptr = seleph(std::cout, tsync, sys, type, nav); if (eop_ptr != nullptr) outputNavRinexEOP(*eop_ptr, rinexStream, rnxver); } - int idode = -1; for (auto& [Sat, satNav] : nav.satNavMap) { if (Sat.sys != sys) @@ -660,10 +699,10 @@ void rinexNavHeader( string prog = "PEA v2"; string runby = "Geoscience Australia"; - GTime now = timeGet(); + UtcTime now = timeGet(); - string timeDate = now.to_string(); - boost::replace_all(timeDate, "/", ""); + string timeDate = now.to_string(0); + boost::replace_all(timeDate, "-", ""); boost::replace_all(timeDate, ":", ""); timeDate += " UTC"; @@ -762,8 +801,8 @@ void rinexNavHeader( { int week; double tow; - if (sys == +E_Sys::BDS) { tow = BTow(sto.tot); week = BWeek(sto.tot); } - else { tow = GTow(sto.tot); week = GWeek(sto.tot); } + if (sys != +E_Sys::BDS) { tow = GTow(sto.tot); week = GWeek(sto.tot); } + else { tow = BTow(sto.tot); week = BWeek(sto.tot); } tracepdeex(0, rinexStream, "%s %17.10E%16.9E%7.0f%5.0f %-5s %-2s %-20s\n", code._to_string(), @@ -812,51 +851,65 @@ void outputNavRinexBodyAll( { for (auto& [code, stoCodeMap] : nav.stoMap) for (auto& [type, stoList] : stoCodeMap) - for (auto& [time, sto] : stoList) + for (auto it = stoList.rbegin(); it != stoList.rend(); it++) { - outputNavRinexSTO(sto, rinexStream, rnxver); + auto& [key, value] = *it; + + outputNavRinexSTO(value, rinexStream, rnxver); } for (auto& [sys, eopSysMap] : nav.eopMap) for (auto& [type, eopList] : eopSysMap) - for (auto& [time, eop] : eopList) + for (auto it = eopList.rbegin(); it != eopList.rend(); it++) { - outputNavRinexEOP(eop, rinexStream, rnxver); + auto& [key, value] = *it; + + outputNavRinexEOP(value, rinexStream, rnxver); } for (auto& [sys, ionSysMap] : nav.ionMap) for (auto& [type, ionList] : ionSysMap) - for (auto& [time, ion] : ionList) + for (auto it = ionList.rbegin(); it != ionList.rend(); it++) { - outputNavRinexION(ion, rinexStream, rnxver); + auto& [key, value] = *it; + + outputNavRinexION(value, rinexStream, rnxver); } } for (auto& [satId, navList] : nav.ephMap) for (auto& [nvtyp, ephList] : navList) - for (auto& [time, eph] : ephList) + for (auto it = ephList.rbegin(); it != ephList.rend(); it++) { - outputNavRinexEph(eph, rinexStream, rnxver); + auto& [key, value] = *it; + + outputNavRinexEph(value, rinexStream, rnxver); } for (auto& [satId, navList] : nav.gephMap) for (auto& [nvtyp, gephList] : navList) - for (auto& [time, geph] : gephList) + for (auto it = gephList.rbegin(); it != gephList.rend(); it++) { - outputNavRinexGeph(geph, rinexStream, rnxver); + auto& [key, value] = *it; + + outputNavRinexGeph(value, rinexStream, rnxver); } // for (auto& [satId, sephList] : nav.sephMap) - // for (auto& [time, seph] : sephList) + // for (auto it = sephList.rbegin(); it != sephList.rend(); it++) // { - // outputNavRinexSeph(seph, rinexStream, rnxver); +// auto& [key, value] = *it; + + // outputNavRinexSeph(ritSeph->second, rinexStream, rnxver); // } for (auto& [satId, cephSatMap] : nav.cephMap) for (auto& [type, cephList] : cephSatMap) - for (auto& [time, ceph] : cephList) + for (auto it = cephList.rbegin(); it != cephList.rend(); it++) { - outputNavRinexCeph(ceph, rinexStream, rnxver); + auto& [key, value] = *it; + + outputNavRinexCeph(value, rinexStream, rnxver); } } diff --git a/src/cpp/common/rinexObsWrite.cpp b/src/cpp/common/rinexObsWrite.cpp index 513c98afa..916435012 100644 --- a/src/cpp/common/rinexObsWrite.cpp +++ b/src/cpp/common/rinexObsWrite.cpp @@ -173,10 +173,10 @@ void writeRinexObsHeader( fileData.headerTimePos = 0; // Write the RINEX header. - GTime now = timeGet(); + UtcTime now = timeGet(); - string timeDate = now.to_string(); - boost::replace_all(timeDate, "/", ""); + string timeDate = now.to_string(0); + boost::replace_all(timeDate, "-", ""); boost::replace_all(timeDate, ":", ""); timeDate += " UTC"; diff --git a/src/cpp/common/rtcmDecoder.cpp b/src/cpp/common/rtcmDecoder.cpp index 64d4c095b..744506cce 100644 --- a/src/cpp/common/rtcmDecoder.cpp +++ b/src/cpp/common/rtcmDecoder.cpp @@ -39,9 +39,8 @@ GTime RtcmDecoder::rtcmTime() GTime time; if (rtcmTimestampTime != GTime::noTime()) time = rtcmTimestampTime; - // todo Eugene: time from obs - // todo Eugene: gps nav else if (tsync != GTime::noTime()) time = tsync; + // todo Eugene: gps nav else time = timeGet(); return time; @@ -99,7 +98,7 @@ E_RTCMSubmessage RtcmDecoder::decodeCustomId( return customType; } -PTime RtcmDecoder::decodeCustomTimestamp( +GTime RtcmDecoder::decodeCustomTimestamp( vector& data) { int i = 0; @@ -109,7 +108,7 @@ PTime RtcmDecoder::decodeCustomTimestamp( E_RTCMSubmessage customType = E_RTCMSubmessage::_from_integral(customMessageNumber); - PTime time; + GTime time; int reserved = getbituInc(data, i, 4); @@ -597,7 +596,8 @@ void RtcmDecoder::decodeEphemeris( eph.toe = GTime(GTow(eph.toes), nearTime); eph.toc = GTime(GTow(eph.tocs), nearTime); - decomposeTGDBias(eph.Sat, eph.tgd[0]); + if (acsConfig.use_tgd_bias) + decomposeTGDBias(eph.Sat, eph.tgd[0]); } else if (sys == +E_Sys::GLO) { @@ -749,8 +749,8 @@ void RtcmDecoder::decodeEphemeris( eph.ttm = nearTime; eph.toe = GTime(GTow(eph.toes), nearTime); eph.toc = GTime(GTow(eph.tocs), nearTime); - - decomposeTGDBias(eph.Sat, eph.tgd[0]); + if (acsConfig.use_tgd_bias) + decomposeTGDBias(eph.Sat, eph.tgd[0]); } else if (sys == +E_Sys::GAL) { @@ -830,8 +830,9 @@ void RtcmDecoder::decodeEphemeris( + (eph.e1_dvs << 0); eph.svh = (E_Svh)svh; eph.code = (1<<0)+(1<<2)+(1<<9); // data source = I/NAV+E1+E5b - - decomposeBGDBias(eph.Sat, eph.tgd[0], eph.tgd[1]); + + if (acsConfig.use_tgd_bias) + decomposeBGDBias(eph.Sat, eph.tgd[0], eph.tgd[1]); } eph.Sat = SatSys(sys, prn); @@ -865,7 +866,7 @@ void RtcmDecoder::decodeEphemeris( } else if (sys == +E_Sys::GLO) { - nav.gephMap[geph.Sat][E_NavMsgType::FDMA][geph.toe] = geph; + nav.gephMap[geph.Sat][geph.type][geph.toe] = geph; tracepdeex(6,std::cout, "\n#RTCM_BRD EPHEMR %s %s %d", geph.Sat.id().c_str(), geph.toe.to_string(2).c_str(), geph.iode); @@ -1161,16 +1162,9 @@ ObsList RtcmDecoder::decodeMSM( { int dowi = (epoch_time_ >> 27); int todi = (epoch_time_ & 0x7FFFFFF); - double utctow = 86400 * dowi - + 0.001 * todi - - 10800; //3 hours moscow time - GTime fakeGTime = GTime(GTow(utctow), nearTime); - - UtcTime utcTime; - utcTime.bigTime = fakeGTime.bigTime; - - tobs = utcTime; + RTod tk = 0.001 * todi; + tobs = GTime(tk, nearTime); } traceLatency(tobs); diff --git a/src/cpp/common/rtcmDecoder.hpp b/src/cpp/common/rtcmDecoder.hpp index 3452b224d..473e24157 100644 --- a/src/cpp/common/rtcmDecoder.hpp +++ b/src/cpp/common/rtcmDecoder.hpp @@ -65,7 +65,7 @@ struct RtcmDecoder : RtcmTrace, ObsLister, PacketStatistics void decodeSSR( vector& message); - PTime decodeCustomTimestamp( + GTime decodeCustomTimestamp( vector& message); E_RTCMSubmessage decodeCustomId( diff --git a/src/cpp/common/rtcmEncoder.cpp b/src/cpp/common/rtcmEncoder.cpp index c04c027cf..692a01177 100644 --- a/src/cpp/common/rtcmEncoder.cpp +++ b/src/cpp/common/rtcmEncoder.cpp @@ -221,7 +221,7 @@ vector RtcmEncoder::encodeTimeStampRTCM() unsigned int messCode = +RtcmMessageType::CUSTOM; unsigned int messType = +E_RTCMSubmessage::TIMESTAMP; - PTime now = timeGet(); + GTime now = timeGet(); int i = 0; int byteLen = 11; diff --git a/src/cpp/common/rtcmTrace.hpp b/src/cpp/common/rtcmTrace.hpp index 878f5e735..ac5bd2bf5 100644 --- a/src/cpp/common/rtcmTrace.hpp +++ b/src/cpp/common/rtcmTrace.hpp @@ -47,7 +47,7 @@ struct RtcmTrace return; } - outStream << (GTime)timeGet(); + outStream << timeGet(); outStream << " networkLog" << message << std::endl; } @@ -66,7 +66,7 @@ struct RtcmTrace return; } - outStream << (GTime)timeGet(); + outStream << timeGet(); outStream << " messageRtcmLog" << message << std::endl; } diff --git a/src/cpp/common/rtsSmoothing.cpp b/src/cpp/common/rtsSmoothing.cpp index 2273363d7..ebcafd3ba 100644 --- a/src/cpp/common/rtsSmoothing.cpp +++ b/src/cpp/common/rtsSmoothing.cpp @@ -14,6 +14,7 @@ using std::map; #include "algebraTrace.hpp" #include "rtsSmoothing.hpp" #include "binaryStore.hpp" +#include "orbexWrite.hpp" #include "mongoWrite.hpp" #include "GNSSambres.hpp" #include "acsConfig.hpp" @@ -61,6 +62,11 @@ void postRTSActions( writeERPFromNetwork(kfState.metaDataMap[ERP_FILENAME_STR + SMOOTHED_SUFFIX], kfState); } + if (acsConfig.output_bias_sinex) + { + writeBiasSinex(nullStream, kfState.time, kfState.metaDataMap[BSX_FILENAME_STR + SMOOTHED_SUFFIX], *stationMap_ptr, kfState); + } + if ( acsConfig.output_clocks &&( acsConfig.clocks_receiver_sources.front() == +E_Source::KALMAN ||acsConfig.clocks_satellite_sources.front() == +E_Source::KALMAN)) @@ -71,9 +77,14 @@ void postRTSActions( outputClocks (kfState.metaDataMap[CLK_FILENAME_STR + SMOOTHED_SUFFIX], acsConfig.clocks_receiver_sources, acsConfig.clocks_satellite_sources, kfState2.time, kfState2, stationMap_ptr); } - if (acsConfig.output_orbits) + if (acsConfig.output_orbex) + { + outputOrbex (kfState.metaDataMap[ORBEX_FILENAME_STR + SMOOTHED_SUFFIX], kfState.time, acsConfig.orbex_orbit_sources, acsConfig.orbex_clock_sources, acsConfig.orbex_attitude_sources, &kfState); + } + + if (acsConfig.output_sp3) { - outputSp3 (kfState.metaDataMap[SP3_FILENAME_STR + SMOOTHED_SUFFIX], kfState.time, acsConfig.orbits_data_sources, &kfState); + outputSp3 (kfState.metaDataMap[SP3_FILENAME_STR + SMOOTHED_SUFFIX], kfState.time, acsConfig.sp3_orbit_sources, acsConfig.sp3_clock_sources, &kfState); } if (acsConfig.output_trop_sinex) @@ -98,6 +109,9 @@ void postRTSActions( { for (auto& [id, rec] : *stationMap_ptr) { + rec.sol.time = kfState.time; + for (short i = 0; i < 3; i++) + kfState.getKFValue({KF::REC_POS, {}, id, i}, rec.sol.pppRRec[i]); outputPPPSolution (kfState.metaDataMap[SOL_FILENAME_STR + id + SMOOTHED_SUFFIX], rec); } } @@ -260,6 +274,7 @@ KFState RTS_Process( long int startPos = -1; double lag = 0; + std::cout << std::endl; while (lag != kfState.rts_lag) { E_SerialObject type = getFilterTypeFromFile(startPos, inputFile); @@ -559,7 +574,7 @@ KFState RTS_Process( std::rename(tempFile.c_str(), inputFile.c_str()); } - if ( kfState.rts_lag < 0 + if ( kfState.rts_lag <= 0 && acsConfig.retain_rts_files == false) { BOOST_LOG_TRIVIAL(info) diff --git a/src/cpp/common/sinex.cpp b/src/cpp/common/sinex.cpp index 92cb06390..f75cedcd5 100644 --- a/src/cpp/common/sinex.cpp +++ b/src/cpp/common/sinex.cpp @@ -34,7 +34,7 @@ Sinex theSinex(false); // the one and only sinex object. // cease to work safely around 2045! // when we write years, write out modulo 100 // This only applies to site data, for satellites it is using 4 digit years -void nearestYear(int& year) +void nearestYear(double& year) { if (year > 50) year += 1900; else year += 2000; @@ -559,7 +559,7 @@ int read_snx_header(std::ifstream& in) char data_agc[4]; char solcontents[7]; - int readcount = sscanf(p + 6, "%4lf %3s %2d:%3d:%5d %3s %2d:%3d:%5d %2d:%3d:%5d %c %5d %c %c %c %c %c %c %c", + int readcount = sscanf(p + 6, "%4lf %3s %2lf:%3lf:%5lf %3s %2lf:%3lf:%5lf %2lf:%3lf:%5lf %c %5d %c %c %c %c %c %c %c", &theSinex.ver, create_agc, &theSinex.filedate[0], @@ -667,16 +667,16 @@ void write_snx_header(std::ofstream& out) offset += snprintf(line + offset, sizeof(line) - offset, "%%=SNX %4.2lf %3s %2.2d:%3.3d:%5.5d %3s %2.2d:%3.3d:%5.5d %2.2d:%3.3d:%5.5d %c %5d %c", theSinex.ver, theSinex.create_agc.c_str(), - theSinex.filedate[0] % 100, - theSinex.filedate[1], - theSinex.filedate[2], + (int)theSinex.filedate[0] % 100, + (int)theSinex.filedate[1], + (int)theSinex.filedate[2], theSinex.data_agc.c_str(), - theSinex.solution_start_date[0] % 100, - theSinex.solution_start_date[1], - theSinex.solution_start_date[2], - theSinex.solution_end_date[0] % 100, - theSinex.solution_end_date[1], - theSinex.solution_end_date[2], + (int)theSinex.solution_start_date[0] % 100, + (int)theSinex.solution_start_date[1], + (int)theSinex.solution_start_date[2], + (int)theSinex.solution_end_date[0] % 100, + (int)theSinex.solution_end_date[1], + (int)theSinex.solution_end_date[2], theSinex.ObsCode, theSinex.numparam, theSinex.ConstCode); @@ -771,7 +771,7 @@ void parse_snx_inputHistory(string& s) siht.code = s[1]; - readcount = sscanf(p + 6, "%4lf %3s %2d:%3d:%5d %3s %2d:%3d:%5d %2d:%3d:%5d %c %5d %c %c %c %c %c %c %c", + readcount = sscanf(p + 6, "%4lf %3s %2lf:%3lf:%5lf %3s %2lf:%3lf:%5lf %2lf:%3lf:%5lf %c %5d %c %c %c %c %c %c %c", &siht.fmt, create_agc, &siht.create_time[0], @@ -833,16 +833,16 @@ void write_snx_input_history(ofstream& out) siht.code, siht.fmt, siht.create_agency.c_str(), - siht.create_time[0] % 100, - siht.create_time[1], - siht.create_time[2], + (int)siht.create_time[0] % 100, + (int)siht.create_time[1], + (int)siht.create_time[2], siht.data_agency.c_str(), - siht.start[0] % 100, - siht.start[1], - siht.start[2], - siht.stop[0] % 100, - siht.stop[1], - siht.stop[2], + (int)siht.start[0] % 100, + (int)siht.start[1], + (int)siht.start[2], + (int)siht.stop[0] % 100, + (int)siht.stop[1], + (int)siht.stop[2], siht.obs_tech, siht.num_estimates, siht.constraint); @@ -870,7 +870,7 @@ void parse_snx_inputFiles(string& s) sif.file = s.substr(18, 29); sif.description = s.substr(48, 32); - int readcount = sscanf(p + 1, "%3s %2d:%3d:%5d", + int readcount = sscanf(p + 1, "%3s %2lf:%3lf:%5lf", agency, &sif.yds[0], &sif.yds[1], @@ -900,9 +900,9 @@ void write_snx_input_files(ofstream& out) int len; snprintf(line, sizeof(line), " %3s %02d:%03d:%05d ", sif.agency.c_str(), - sif.yds[0] % 100, - sif.yds[1], - sif.yds[2]); + (int)sif.yds[0] % 100, + (int)sif.yds[1], + (int)sif.yds[2]); // if the filename length is greater than 29 (format spec limit) make into a comment line if (sif.file.length() > 29) @@ -1032,7 +1032,7 @@ void parse_snx_siteData(string& s) int readcount; - readcount = sscanf(p + 28, "%2d:%3d:%5d %2d:%3d:%5d %3s %2d:%3d:%5d", + readcount = sscanf(p + 28, "%2lf:%3lf:%5lf %2lf:%3lf:%5lf %3s %2lf:%3lf:%5lf", &start[0], &start[1], &start[2], @@ -1092,16 +1092,16 @@ void write_snx_sitedata(ofstream& out, list* pstns) ssd.site_pt.c_str(), ssd.sitesoln.c_str(), ssd.obscode, - ssd.start[0] % 100, - ssd.start[1], - ssd.start[2], - ssd.stop[0] % 100, - ssd.stop[1], - ssd.stop[2], + (int)ssd.start[0] % 100, + (int)ssd.start[1], + (int)ssd.start[2], + (int)ssd.stop[0] % 100, + (int)ssd.stop[1], + (int)ssd.stop[2], ssd.agency.c_str(), - ssd.create[0] % 100, - ssd.create[1], - ssd.create[2]); + (int)ssd.create[0] % 100, + (int)ssd.create[1], + (int)ssd.create[2]); if (pstns == nullptr) doit = true; @@ -1137,7 +1137,7 @@ void parse_snx_receivers(string& s) srt.firm = trim(s.substr(69, 11)); int readcount; - readcount = sscanf(p + 16, "%2d:%3d:%5d %2d:%3d:%5d", + readcount = sscanf(p + 16, "%2lf:%3lf:%5lf %2lf:%3lf:%5lf", &srt.start[0], &srt.start[1], &srt.start[2], @@ -1187,12 +1187,12 @@ void write_snx_receivers(ofstream& out) receiver.ptcode .c_str(), receiver.solnid .c_str(), receiver.typecode, - receiver.start[0] % 100, - receiver.start[1], - receiver.start[2], - receiver.end[0] % 100, - receiver.end[1], - receiver.end[2], + (int)receiver.start[0] % 100, + (int)receiver.start[1], + (int)receiver.start[2], + (int)receiver.end[0] % 100, + (int)receiver.end[1], + (int)receiver.end[2], receiver.type .c_str(), receiver.sn .c_str(), receiver.firm .c_str()); @@ -1212,7 +1212,7 @@ void parse_snx_antennas(string& s) ant.type = s.substr(42, 20); ant.sn = trim(s.substr(63, 5)); - int readcount = sscanf(p + 16, "%2d:%3d:%5d %2d:%3d:%5d", + int readcount = sscanf(p + 16, "%2lf:%3lf:%5lf %2lf:%3lf:%5lf", &ant.start[0], &ant.start[1], &ant.start[2], @@ -1263,12 +1263,12 @@ void write_snx_antennas(ofstream& out) ant.ptcode .c_str(), ant.solnnum .c_str(), ant.typecode, - ant.start[0] % 100, - ant.start[1], - ant.start[2], - ant.end[0] % 100, - ant.end[1], - ant.end[2], + (int)ant.start[0] % 100, + (int)ant.start[1], + (int)ant.start[2], + (int)ant.end[0] % 100, + (int)ant.end[1], + (int)ant.end[2], ant.type .c_str(), ant.sn .c_str()); } @@ -1563,7 +1563,7 @@ void parse_snx_siteEccentricity(string& s) sset.rs = s.substr(42, 3); char junk[4]; - int readcount = sscanf(p + 16, "%2d:%3d:%5d %2d:%3d:%5d %3s %8lf %8lf %8lf", + int readcount = sscanf(p + 16, "%2lf:%3lf:%5lf %2lf:%3lf:%5lf %3s %8lf %8lf %8lf", &sset.start[0], &sset.start[1], &sset.start[2], @@ -1617,12 +1617,12 @@ void write_snx_site_eccs(ofstream& out) set.ptcode.c_str(), set.solnnum.c_str(), set.typecode, - set.start[0] % 100, - set.start[1], - set.start[2], - set.end[0] % 100, - set.end[1], - set.end[2], + (int)set.start[0] % 100, + (int)set.start[1], + (int)set.start[2], + (int)set.end[0] % 100, + (int)set.end[1], + (int)set.end[2], set.rs.c_str(), set.ecc.u(), set.ecc.n(), @@ -1655,7 +1655,7 @@ void parse_snx_epochs(string& s) sst.solnnum = s.substr(9, 4); sst.typecode = s[14]; - int readcount = sscanf(p + 16, "%2d:%3d:%5d %2d:%3d:%5d %2d:%3d:%5d", + int readcount = sscanf(p + 16, "%2lf:%3lf:%5lf %2lf:%3lf:%5lf %2lf:%3lf:%5lf", &sst.start[0], &sst.start[1], &sst.start[2], @@ -1714,15 +1714,15 @@ void write_snx_epochs(ofstream& out, list* pstns) sst.ptcode.c_str(), sst.solnnum.c_str(), sst.typecode, - sst.start[0] % 100, - sst.start[1], - sst.start[2], - sst.end[0] % 100, - sst.end[1], - sst.end[2], - sst.mean[0] % 100, - sst.mean[1], - sst.mean[2]); + (int)sst.start[0] % 100, + (int)sst.start[1], + (int)sst.start[2], + (int)sst.end[0] % 100, + (int)sst.end[1], + (int)sst.end[2], + (int)sst.mean[0] % 100, + (int)sst.mean[1], + (int)sst.mean[2]); if (pstns == nullptr) doit = true; @@ -1808,7 +1808,7 @@ void parse_snx_solutionEstimates(string& s) sst.index = atoi(s.substr(1, 5).c_str()); - int readcount = sscanf(s.c_str() + 27, "%2d:%3d:%5d", + int readcount = sscanf(s.c_str() + 27, "%2lf:%3lf:%5lf", &sst.refepoch[0], &sst.refepoch[1], &sst.refepoch[2]); @@ -1869,9 +1869,9 @@ void write_snx_estimates_from_filter(ofstream& out) key.str.c_str(), ptcode.c_str(), 1, - theSinex.solution_end_date[0] % 100, - theSinex.solution_end_date[1], - theSinex.solution_end_date[2], + (int)theSinex.solution_end_date[0] % 100, + (int)theSinex.solution_end_date[1], + (int)theSinex.solution_end_date[2], "m", '9', // TODO: replace with sst.constraint when fixed theSinex.kfState.x(index), @@ -1944,7 +1944,7 @@ void parse_snx_apriori(string& s) unit[4] = '\0'; - int readcount = sscanf(s.c_str() + 27, "%2d:%3d:%5d %4s %c %21lf %11lf", + int readcount = sscanf(s.c_str() + 27, "%2lf:%3lf:%5lf %4s %c %21lf %11lf", &sst.epoch[0], &sst.epoch[1], &sst.epoch[2], @@ -2001,9 +2001,9 @@ void write_snx_apriori(ofstream& out, list* pstns = nullptr) sst.sitecode.c_str(), sst.ptcode.c_str(), sst.solnnum.c_str(), - sst.epoch[0] % 100, - sst.epoch[1], - sst.epoch[2], + (int)sst.epoch[0] % 100, + (int)sst.epoch[1], + (int)sst.epoch[2], sst.unit.c_str(), sst.constraint, sst.param, @@ -2042,9 +2042,9 @@ void write_snx_apriori_from_stations( id.c_str(), sst.id_ptr->ptcode.c_str(), 1, //sst.solnnum.c_str(), - rec.aprioriTime[0] % 100, - rec.aprioriTime[1], - rec.aprioriTime[2], + (int)rec.aprioriTime[0] % 100, + (int)rec.aprioriTime[1], + (int)rec.aprioriTime[2], "m", //sst.unit.c_str(), '3',//sst.constraint, rec.aprioriPos(i),// sst.param, @@ -2069,7 +2069,7 @@ void parse_snx_normals(string& s) unit[4] = '\0'; - int readcount = sscanf(s.c_str() + 27, "%2d:%3d:%5d %4s %c %21lf", + int readcount = sscanf(s.c_str() + 27, "%2lf:%3lf:%5lf %4s %c %21lf", &sst.epoch[0], &sst.epoch[1], &sst.epoch[2], @@ -2122,9 +2122,9 @@ void write_snx_normal(ofstream& out, list* pstns = nullptr) sst.site.c_str(), sst.pt.c_str(), sst.solnnum.c_str(), - sst.epoch[0] % 100, - sst.epoch[1], - sst.epoch[2], + (int)sst.epoch[0] % 100, + (int)sst.epoch[1], + (int)sst.epoch[2], sst.unit.c_str(), sst.constraint, sst.normal); @@ -2273,11 +2273,11 @@ void parse_snx_dataHandling(string& s) if (s.size() >= 75+4) sdt.comments = s.substr(75, 4); //4 - int readcount = sscanf(s.c_str() + 16, "%2d:%3d:%5d", + int readcount = sscanf(s.c_str() + 16, "%2lf:%3lf:%5lf", &sdt.epochstart[0], &sdt.epochstart[1], &sdt.epochstart[2]); - readcount += sscanf(s.c_str() + 29, "%2d:%3d:%5d", + readcount += sscanf(s.c_str() + 29, "%2lf:%3lf:%5lf", &sdt.epochend[0], &sdt.epochend[1], &sdt.epochend[2]); @@ -2422,7 +2422,7 @@ void parse_snx_satelliteIds(string& s) const char* p = s.c_str() + 21; - int readcount = sscanf(p, "%2d:%3d:%5d %2d:%3d:%5d", + int readcount = sscanf(p, "%2lf:%3lf:%5lf %2lf:%3lf:%5lf", &sst.timeSinceLaunch[0], &sst.timeSinceLaunch[1], &sst.timeSinceLaunch[2], @@ -2455,12 +2455,12 @@ void write_snx_satids(ofstream& out) ssi.prn.c_str() + 1, ssi.cospar.c_str(), ssi.obsCode, - ssi.timeSinceLaunch[0], - ssi.timeSinceLaunch[1], - ssi.timeSinceLaunch[2], - ssi.timeUntilDecom[0], - ssi.timeUntilDecom[1], - ssi.timeUntilDecom[2], + (int)ssi.timeSinceLaunch[0], + (int)ssi.timeSinceLaunch[1], + (int)ssi.timeSinceLaunch[2], + (int)ssi.timeUntilDecom[0], + (int)ssi.timeUntilDecom[1], + (int)ssi.timeUntilDecom[2], ssi.antRcvType.c_str()); out << line << endl; @@ -2528,7 +2528,7 @@ void parse_snx_satprns(string& s) spt.prn = s.substr(36, 3); spt.comment = s.substr(40); - int readcount = sscanf(s.c_str() + 6, "%4d:%3d:%5d %4d:%3d:%5d", + int readcount = sscanf(s.c_str() + 6, "%4lf:%3lf:%5lf %4lf:%3lf:%5lf", &spt.start[0], &spt.start[1], &spt.start[2], @@ -2557,12 +2557,12 @@ void write_snx_satprns(ofstream& out) { snprintf(line, sizeof(line), " %4s %4.4d:%3.3d:%5.5d %4.4d:%3.3d:%5.5d %3s %s", spt.svn.c_str(), - spt.start[0], - spt.start[1], - spt.start[2], - spt.stop[0], - spt.stop[1], - spt.stop[2], + (int)spt.start[0], + (int)spt.start[1], + (int)spt.start[2], + (int)spt.stop[0], + (int)spt.stop[1], + (int)spt.stop[2], spt.prn.c_str(), spt.comment.c_str()); @@ -2597,7 +2597,7 @@ void parse_snx_satfreqchannels(string& s) sfc.svn = s.substr(1, 4); sfc.comment = s.substr(40); - int readcount = sscanf(s.c_str() + 6, "%4d:%3d:%5d %4d:%3d:%5d %3d", + int readcount = sscanf(s.c_str() + 6, "%4lf:%3lf:%5lf %4lf:%3lf:%5lf %3d", &sfc.start[0], &sfc.start[1], &sfc.start[2], @@ -2625,12 +2625,12 @@ void write_snx_satfreqchn(ofstream& out) snprintf(line, sizeof(line), " %4s %4.4d:%3.3d:%5.5d %4.4d:%3.3d:%5.5d %3d %s", sfc.svn.c_str(), - sfc.start[0], - sfc.start[1], - sfc.start[2], - sfc.stop[0], - sfc.stop[1], - sfc.stop[2], + (int)sfc.start[0], + (int)sfc.start[1], + (int)sfc.start[2], + (int)sfc.stop[0], + (int)sfc.stop[1], + (int)sfc.stop[2], sfc.channel, sfc.comment.c_str()); @@ -2667,7 +2667,7 @@ void parse_snx_satelliteMass(string& s) ssm.svn = s.substr(1, 4); ssm.comment = s.substr(46); - int readcount = sscanf(s.c_str() + 6, "%4d:%3d:%5d %4d:%3d:%5d %9lf", + int readcount = sscanf(s.c_str() + 6, "%4lf:%3lf:%5lf %4lf:%3lf:%5lf %9lf", &ssm.start[0], &ssm.start[1], &ssm.start[2], @@ -2696,12 +2696,12 @@ void write_snx_satmass(ofstream& out) snprintf(line, sizeof(line), " %4s %4.4d:%3.3d:%5.5d %4.4d:%3.3d:%5.5d %9.3lf %s", ssm.svn.c_str(), - ssm.start[0], - ssm.start[1], - ssm.start[2], - ssm.stop[0], - ssm.stop[1], - ssm.stop[2], + (int)ssm.start[0], + (int)ssm.start[1], + (int)ssm.start[2], + (int)ssm.stop[0], + (int)ssm.stop[1], + (int)ssm.stop[2], ssm.mass, ssm.comment.c_str()); @@ -2738,7 +2738,7 @@ void parse_snx_satelliteComs(string& s) sct.svn = s.substr(1, 4); sct.comment = s.substr(66); - int readcount = sscanf(s.c_str() + 6, "%4d:%3d:%5d %4d:%3d:%5d %9lf %9lf %9lf", + int readcount = sscanf(s.c_str() + 6, "%4lf:%3lf:%5lf %4lf:%3lf:%5lf %9lf %9lf %9lf", &sct.start[0], &sct.start[1], &sct.start[2], @@ -2768,12 +2768,12 @@ void write_snx_satcom(ofstream& out) snprintf(line, sizeof(line), " %4s %4.4d:%3.3d:%5.5d %4.4d:%3.3d:%5.5d %9.4lf %9.4lf %9.4lf %s", sct.svn.c_str(), - sct.start[0], - sct.start[1], - sct.start[2], - sct.stop[0], - sct.stop[1], - sct.stop[2], + (int)sct.start[0], + (int)sct.start[1], + (int)sct.start[2], + (int)sct.stop[0], + (int)sct.stop[1], + (int)sct.stop[2], sct.com[0], sct.com[1], sct.com[2], @@ -2876,7 +2876,7 @@ void parse_snx_satellitePowers(string& s) spt.svn = s.substr(1, 4); spt.comment = s.substr(41); - int readcount = sscanf(s.c_str() + 6, "%4d:%3d:%5d %4d:%3d:%5d %4d", + int readcount = sscanf(s.c_str() + 6, "%4lf:%3lf:%5lf %4lf:%3lf:%5lf %4d", &spt.start[0], &spt.start[1], &spt.start[2], @@ -2905,12 +2905,12 @@ void write_snx_satpower(ofstream& out) snprintf(line, sizeof(line), " %4s %4.4d:%3.3d:%5.5d %4.4d:%3.3d:%5.5d %4d %s", spt.svn.c_str(), - spt.start[0], - spt.start[1], - spt.start[2], - spt.stop[0], - spt.stop[1], - spt.stop[2], + (int)spt.start[0], + (int)spt.start[1], + (int)spt.start[2], + (int)spt.stop[0], + (int)spt.stop[1], + (int)spt.stop[2], spt.power, spt.comment.c_str()); @@ -3016,7 +3016,7 @@ void parseSinexSatYawRates(string& line) entry.svn = line.substr(1, 4); entry.comment = line.substr(51); - int readCount = sscanf(line.c_str() + 6, "%4d:%3d:%5d %4d:%3d:%5d %c %8lf", + int readCount = sscanf(line.c_str() + 6, "%4lf:%3lf:%5lf %4lf:%3lf:%5lf %c %8lf", &entry.start[0], &entry.start[1], &entry.start[2], @@ -3420,16 +3420,23 @@ void sinex_add_comment(const string what) theSinex.blockComments["FILE/COMMENT"].push_back(what); } -void sinex_add_file(const string& who, const GTime& time, const string& filename, const string& description) +void sinex_add_files( + const string& who, + const GTime& time, + const vector& filenames, + const string& description) { - Sinex_input_file_t sif; + for (auto& filename : filenames) + { + Sinex_input_file_t sif; - sif.yds = time; - sif.agency = who; - sif.file = filename; - sif.description = description; + sif.yds = time; + sif.agency = who; + sif.file = filename; + sif.description = description; - theSinex.inputFiles.push_back(sif); + theSinex.inputFiles.push_back(sif); + } } int sinex_site_count() diff --git a/src/cpp/common/sinex.hpp b/src/cpp/common/sinex.hpp index fc8266d3c..ddad650c3 100644 --- a/src/cpp/common/sinex.hpp +++ b/src/cpp/common/sinex.hpp @@ -700,7 +700,7 @@ struct SinexSatSnx /* satellite meta data */ void nearestYear( - int& year); + double& year); int readSinex( string filepath, @@ -740,7 +740,7 @@ void sinex_add_statistic(const string& what, const double value); int sinex_check_add_ga_reference(string solType, string peaVer, bool isTrop); void sinex_add_acknowledgement(const string& who, const string& description); void sinex_add_comment(const string what); -void sinex_add_file(const string& who, const GTime& when, const string& filename, const string& description); +void sinex_add_files(const string& who, const GTime& when, const vector& filenames, const string& description); void updateSinexHeader( string& create_agc, diff --git a/src/cpp/common/sinexParser.cpp b/src/cpp/common/sinexParser.cpp index 50e1cf432..dec64b58e 100644 --- a/src/cpp/common/sinexParser.cpp +++ b/src/cpp/common/sinexParser.cpp @@ -32,7 +32,7 @@ void SinexParser::parseSinexEstimates( UYds yds; int readcount; - readcount = sscanf(s.c_str() + 27, "%2d:%3d:%5d", + readcount = sscanf(s.c_str() + 27, "%2lf:%3lf:%5lf", &yds[0], &yds[1], &yds[2]); @@ -127,7 +127,7 @@ void SinexParser::parseSinexDiscontinuities( UYds endYds; int readcount; - readcount = sscanf(s.c_str() + 16, "%2d:%3d:%5d %2d:%3d:%5d", + readcount = sscanf(s.c_str() + 16, "%2lf:%3lf:%5lf %2lf:%3lf:%5lf", &startYds[0], &startYds[1], &startYds[2], diff --git a/src/cpp/common/sinexParser.hpp b/src/cpp/common/sinexParser.hpp index 531c9e90c..a80ea3da8 100644 --- a/src/cpp/common/sinexParser.hpp +++ b/src/cpp/common/sinexParser.hpp @@ -43,7 +43,7 @@ struct SinexParser : Parser, ObsLister // when we write years, write out modulo 100 // This only applies to site data, for satellites it is using 4 digit years void nearestYear( - int& year) + double& year) { if (year > 50) year += 1900; else year += 2000; diff --git a/src/cpp/common/sp3.cpp b/src/cpp/common/sp3.cpp index f15ee9b8d..f6887a6a4 100644 --- a/src/cpp/common/sp3.cpp +++ b/src/cpp/common/sp3.cpp @@ -73,20 +73,13 @@ bool readsp3( //epoch line epochFound = true; - bool error = str2time(buff, 3, 28, time); + bool error = str2time(buff, 3, 28, time, tsys); if (error) { printf("\nInvalid epoch line in sp3 file %s\n", line.c_str()); return false; } - if (tsys == +E_TimeSys::UTC) - { - UtcTime utcTime; - utcTime.bigTime = time.bigTime; - - time = utcTime; - } continue; } @@ -239,7 +232,7 @@ bool readsp3( { //first line is time and type // type = buff[2]; - int error = str2time(buff, 3, 28, time); + int error = str2time(buff, 3, 28, time); // time system unknown at beginning but does not matter if (error) return false; diff --git a/src/cpp/common/sp3Write.cpp b/src/cpp/common/sp3Write.cpp index 5ac63b675..6c4384424 100644 --- a/src/cpp/common/sp3Write.cpp +++ b/src/cpp/common/sp3Write.cpp @@ -57,7 +57,7 @@ void writeSp3Header( outFileDat.numEpoch = 1; // note "#dV" for velocity and position. - if (acsConfig.output_orbit_velocities) tracepdeex(0, sp3Stream, "#dV%4.0f %2.0f %2.0f %2.0f %2.0f %11.8f ", ep[0], ep[1], ep[2], ep[3], ep[4], ep[5]); + if (acsConfig.output_sp3_velocities) tracepdeex(0, sp3Stream, "#dV%4.0f %2.0f %2.0f %2.0f %2.0f %11.8f ", ep[0], ep[1], ep[2], ep[3], ep[4], ep[5]); else tracepdeex(0, sp3Stream, "#dP%4.0f %2.0f %2.0f %2.0f %2.0f %11.8f ", ep[0], ep[1], ep[2], ep[3], ep[4], ep[5]); outFileDat.numEpoch_pos = sp3Stream.tellp(); @@ -71,7 +71,7 @@ void writeSp3Header( tracepdeex(0, sp3Stream, "## %4d %15.8f %14.8f %5.0f %15.13f\n", week, tow, - acsConfig.orbits_output_interval, + acsConfig.sp3_output_interval, mjdate, mjdate - floor(mjdate)); @@ -208,7 +208,7 @@ void writeSp3Header( tracepdeex(0, sp3Stream, "%%i 0 0 0 0 0 0 0 0 0\n"); // There is a minimum of four comment lines. - tracepdeex(0, sp3Stream, "/* Created using Ginan at: %s.\n", ((GTime)timeGet()).to_string().c_str()); + tracepdeex(0, sp3Stream, "/* Created using Ginan at: %s.\n", timeGet().to_string().c_str()); tracepdeex(0, sp3Stream, "/* WARNING: Not for operational use\n"); tracepdeex(0, sp3Stream, "/*\n"); tracepdeex(0, sp3Stream, "/*\n"); @@ -281,7 +281,7 @@ void updateSp3Body( predictedChar); } - if (acsConfig.output_orbit_velocities) + if (acsConfig.output_sp3_velocities) { tracepdeex(0, sp3Stream, "V%s%14.6f%14.6f%14.6f%14.6f%19s%c\n", entry.sat.id().c_str(), @@ -300,7 +300,7 @@ void updateSp3Body( sat.id().c_str(), 0, 0, 0, NO_SP3_CLK); } - if (acsConfig.output_orbit_velocities) + if (acsConfig.output_sp3_velocities) { tracepdeex(0, sp3Stream, "V%s%14.6f%14.6f%14.6f%14.6f\n", sat.id().c_str(), 0, 0, 0, NO_SP3_CLK); @@ -316,7 +316,8 @@ void writeSysSetSp3( GTime time, map& outSys, Sp3FileData& outFileDat, - vector sp3DataSrcs, + vector sp3OrbitSrcs, + vector sp3ClockSrcs, KFState* kfState_ptr, bool predicted) { @@ -332,11 +333,10 @@ void writeSysSetSp3( obs.Sat = Sat; obs.satNav_ptr = &nav.satNavMap[Sat]; - bool pass = true; - pass &= satclk(nullStream, time, time, obs, sp3DataSrcs, nav, kfState_ptr); - pass &= satpos(nullStream, time, time, obs, sp3DataSrcs, E_OffsetType::COM, nav, kfState_ptr); + bool clkPass = satclk(nullStream, time, time, obs, sp3OrbitSrcs, nav, kfState_ptr); + bool posPass = satpos(nullStream, time, time, obs, sp3ClockSrcs, E_OffsetType::COM, nav, kfState_ptr); - if (pass == false) + if (posPass == false) { BOOST_LOG_TRIVIAL(warning) << "Warning: Writing SP3 file, failed to get data for satellite " << Sat.id(); continue; @@ -354,8 +354,18 @@ void writeSysSetSp3( entry.satPos = obs.rSat; entry.satVel = obs.satVel; } - entry.satClk = obs.satClk; - entry.satClkVel = obs.satClkVel; + + if (clkPass) + { + entry.satClk = obs.satClk; + entry.satClkVel = obs.satClkVel; + } + else + { + entry.satClk = INVALID_CLOCK_VALUE / 1e6; + entry.satClkVel = INVALID_CLOCK_VALUE / 1e6; + } + entry.sigma = sqrt(obs.satClkVar); entry.predicted = predicted; @@ -369,21 +379,22 @@ void writeSysSetSp3( void outputSp3( string filename, GTime time, - vector sp3DataSrcs, + vector sp3OrbitSrcs, + vector sp3ClockSrcs, KFState* kfState_ptr, bool predicted) { time = time.floorTime(1); GTow tow = time; - if (int(tow) % acsConfig.orbits_output_interval != 0) + if (int(tow) % acsConfig.sp3_output_interval != 0) return; auto sysFilenames = getSysOutputFilenames(filename, time); for (auto [filename, sysMap] : sysFilenames) { - writeSysSetSp3(filename, time, sysMap, sp3CombinedFileData, sp3DataSrcs, kfState_ptr, predicted); + writeSysSetSp3(filename, time, sysMap, sp3CombinedFileData, sp3OrbitSrcs, sp3ClockSrcs, kfState_ptr, predicted); } } @@ -396,7 +407,7 @@ void outputMongoOrbits() map outSys; - auto sysFilenames = getSysOutputFilenames(acsConfig.predicted_orbits_filename, tsync); + auto sysFilenames = getSysOutputFilenames(acsConfig.predicted_sp3_filename, tsync); for (auto [filename, sysMap] : sysFilenames) { diff --git a/src/cpp/common/sp3Write.hpp b/src/cpp/common/sp3Write.hpp index a46082ace..77b5f25e1 100644 --- a/src/cpp/common/sp3Write.hpp +++ b/src/cpp/common/sp3Write.hpp @@ -16,7 +16,8 @@ struct KFState; void outputSp3( string filename, GTime time, - vector sp3DataSrcs, + vector sp3OrbitSrcs, + vector sp3ClockSrcs, KFState* kfState_ptr = nullptr, bool predicted = false); diff --git a/src/cpp/common/ssr.hpp b/src/cpp/common/ssr.hpp index 43882014d..61dfc9727 100644 --- a/src/cpp/common/ssr.hpp +++ b/src/cpp/common/ssr.hpp @@ -194,12 +194,12 @@ struct SSRAtmGlobal int numberLayers; map layers; double vtecQuality; - int iod; + int iod = -1; }; struct SSRSTECData { - int iod; + int iod = -1; double accr; map poly; map grid; @@ -244,7 +244,7 @@ struct SSRAtm struct EphValues { GTime time; - unsigned int iode = 0; + unsigned int iode = -1; Vector3d brdcPos = Vector3d::Zero(); Vector3d brdcVel = Vector3d::Zero(); Vector3d precPos = Vector3d::Zero(); @@ -256,7 +256,7 @@ struct EphValues struct ClkValues { GTime time; - unsigned int iode = 0; + unsigned int iode = -1; double brdcClk = 0; double precClk = 0; }; diff --git a/src/cpp/common/streamObs.hpp b/src/cpp/common/streamObs.hpp index 343e8b468..1786365ac 100644 --- a/src/cpp/common/streamObs.hpp +++ b/src/cpp/common/streamObs.hpp @@ -52,15 +52,21 @@ struct ObsStream : StreamParser { double dirty_C1W_phase = 0; for (auto& sig : sigsList) - if ( sig.code == +E_ObsCode::L1C) { - dirty_C1W_phase = sig.L; - break; + if ( sig.code == +E_ObsCode::L1C) + dirty_C1W_phase = sig.L; + + if ( sig.code == +E_ObsCode::L1W + && sig.P == 0) + { + sig.L = 0; + } } for (auto& sig : sigsList) if ( sig.code == +E_ObsCode::L1W - && sig.L == 0) + && sig.L == 0 + && sig.P != 0) { sig.L = dirty_C1W_phase; break; diff --git a/src/cpp/common/trace.cpp b/src/cpp/common/trace.cpp index 3fbfefe09..b3eab6991 100644 --- a/src/cpp/common/trace.cpp +++ b/src/cpp/common/trace.cpp @@ -3,6 +3,9 @@ #include #include +#include + +using std::unordered_map; #include #include @@ -23,7 +26,7 @@ void ConsoleLog::consume( boost::log::record_view const& rec, sinks::basic_formatted_sink_backend::string_type const& logString) { - static map warnedMap; + static unordered_map warnedMap; auto attrs = rec.attribute_values(); auto sev = attrs[boost::log::trivial::severity].get(); diff --git a/src/cpp/common/trace.hpp b/src/cpp/common/trace.hpp index 3e61f83d9..e6f671b4a 100644 --- a/src/cpp/common/trace.hpp +++ b/src/cpp/common/trace.hpp @@ -80,13 +80,6 @@ void printHex( void tracelevel(int level); void traceFormatedFloat(Trace& trace, double val, string formatStr); -void fatalerr(const char *format, ...); - - -template -std::ofstream getTraceFile(T& thing); - - struct Block { Trace& trace; diff --git a/src/cpp/gui/anode.cpp b/src/cpp/gui/anode.cpp index d239d2949..d3b4b11e1 100644 --- a/src/cpp/gui/anode.cpp +++ b/src/cpp/gui/anode.cpp @@ -118,6 +118,7 @@ void callback0() string nonNumericStack( string stack, + string& cut, bool colon = true); #include "acsConfig.hpp" @@ -150,7 +151,8 @@ void callback2() { token = stack.substr(pos_start, pos_end - pos_start); pos_start = pos_end + 1; - token = nonNumericStack(token); + string dummy; + token = nonNumericStack(token, dummy); flatStack += token; } diff --git a/src/cpp/iono/ionexWrite.cpp b/src/cpp/iono/ionexWrite.cpp index 4616f7997..130c4f38c 100644 --- a/src/cpp/iono/ionexWrite.cpp +++ b/src/cpp/iono/ionexWrite.cpp @@ -67,7 +67,7 @@ bool writeIonexHead( dhght = 0; tracepdeex(0, ionex, "%8.1f%12s%-20s%-20.20sIONEX VERSION / TYPE\n", 1.1, " ", "I", "GNS"); - tracepdeex(0, ionex, "%-20s%-20s%-20.20sPGM / RUN BY / DATE\n", acsConfig.analysis_program.c_str(), acsConfig.analysis_center.c_str(), ((GTime)timeGet()).to_string(0).c_str()); + tracepdeex(0, ionex, "%-20s%-20s%-20.20sPGM / RUN BY / DATE\n", acsConfig.analysis_program.c_str(), acsConfig.analysis_center.c_str(), timeGet().to_string(0).c_str()); tracepdeex(0, ionex, " %4s%54sMAPPING FUNCTION\n", "COSZ", ""); tracepdeex(0, ionex, "%8.1f%52sELEVATION CUTOFF\n", acsConfig.elevation_mask * R2D, " "); tracepdeex(0, ionex, "%8.1f%52sBASE RADIUS\n", RE_WGS84 / 1000.0, " "); diff --git a/src/cpp/iono/ionoMeas.cpp b/src/cpp/iono/ionoMeas.cpp index 64f5a0803..e1eaaef39 100644 --- a/src/cpp/iono/ionoMeas.cpp +++ b/src/cpp/iono/ionoMeas.cpp @@ -77,20 +77,11 @@ void update_receivr_measr( continue; } - E_FType frq1 = F1; - E_FType frq2 = F2; - - if (obs.Sat.sys == +E_Sys::GAL) { frq2 = F5; } - if (obs.Sat.sys == +E_Sys::GLO) { frq1 = G1; frq2 = G2; } - if (obs.Sat.sys == +E_Sys::BDS) { frq1 = B1; frq2 = F7; } - - // if ( obs.Sat.sys == +E_Sys::GPS - // && (obs.Sigs[F1].code != GPS_Code1 - // ||obs.Sigs[f2].code != GPS_Code2)) - // { - // obs.ionExcludeCode = 1; - // continue; - // } + E_FType frq1; + E_FType frq2; + E_FType frq3; + if (!satFreqs(obs.Sat.sys,frq1,frq2,frq3)) + continue; S_LC lc = getLC(obs, obs.satStat_ptr->lc_new, frq1, frq2); S_LC lc_pre = getLC(obs, obs.satStat_ptr->lc_pre, frq1, frq2); @@ -159,8 +150,8 @@ void update_receivr_measr( satStat.ambvar = SmtG * (varP); } obs.STECtype = 1; - obs.STECsmth = (satStat.gf_amb + lc.GF_Phas_m); - obs.STECsmvr = (satStat.ambvar + 2*varL) + SQR(PHASE_BIAS_STD); + obs.STECsmth = (satStat.gf_amb + lc.GF_Phas_m)/obs.STECtoDELAY; + obs.STECsmvr =((satStat.ambvar + 2*varL) + SQR(PHASE_BIAS_STD))/obs.STECtoDELAY/obs.STECtoDELAY; obs.STECcodeComb = obs.Sigs[frq1].code._to_integral() * 100 + obs.Sigs[frq2].code._to_integral(); satStat.prevSTEC = lc.GF_Phas_m; diff --git a/src/cpp/iono/ionoModel.cpp b/src/cpp/iono/ionoModel.cpp index f3a4d43a2..53cdac112 100644 --- a/src/cpp/iono/ionoModel.cpp +++ b/src/cpp/iono/ionoModel.cpp @@ -23,6 +23,24 @@ map ionRefRec; #define INIT_VAR_SDCB 100.0 #define INIT_VAR_SCHP 100.0 +bool overwriteIonoKF ( + KFState& kfState) +{ + bool ionoKF = false; + + for (auto& [key, index] : kfState.kfIndexMap) + if (key.type == +KF::DCB) + { + ionoKF = true; + break; + } + + if (ionoKF) + iono_KFState = kfState; + + return ionoKF; +} + void ionosphereSsrUpdate( Trace& trace, KFState& kfState) @@ -317,41 +335,29 @@ bool queryBiasDCB( double& bias, ///< Output bias value double& var) ///< Output bias variance { - E_FType frq1 = F1; - E_FType frq2 = F2; - - if (Sat.sys == +E_Sys::GAL) - frq2 = F5; - - if (Sat.sys == +E_Sys::GLO) - { - frq1 = G1; - frq2 = G2; - } - - if ( freq != frq1 - && freq != frq2) - { - return false; - } - double lamb = nav.satNavMap[Sat].lamMap[freq]; if (lamb == 0) return false; - KFKey kfKey; - kfKey.type = KF::DCB; - kfKey.str = Rec; - kfKey.Sat = Sat; - double dcbVal; double dcbVar; - bool pass = iono_KFState.getKFValue(kfKey, dcbVal, &dcbVar); + bool pass = false; + for (auto& [key, index] : iono_KFState.kfIndexMap) + if ( key.type == +KF::DCB + && key.Sat == Sat + && key.str == Rec) + { + /* We need a way to select between GAL L1X-L5X and L1C-L5Q DCBs... */ + pass = iono_KFState.getKFValue(key, dcbVal, &dcbVar); + if (pass) + break; + } + if (pass == false) return false; - - double coef = SQR(CLIGHT / lamb) / 40.3e16; + + double coef = TEC_CONSTANT * SQR(lamb / CLIGHT); bias = coef * dcbVal; var = SQR(coef) * dcbVar; diff --git a/src/cpp/iono/ionoModel.hpp b/src/cpp/iono/ionoModel.hpp index d27aef85a..012765eaf 100644 --- a/src/cpp/iono/ionoModel.hpp +++ b/src/cpp/iono/ionoModel.hpp @@ -25,6 +25,7 @@ int ginan2IonoMeas (Trace& trace, StationMap& stationMap, KFState& measKFstate) void updateIonosphereModel (Trace& trace, string ionstecFilename, string ionexFilename, StationMap& stationMap, GTime time); void ionosphereSsrUpdate(Trace& trace, KFState& kfState); +bool overwriteIonoKF(KFState& kfState); bool queryBiasDCB (Trace& trace, SatSys Sat, string Rec, E_FType freq, double& bias, double& vari); bool ionexFileWrite( string filename, diff --git a/src/cpp/iono/ionoSpherical.cpp b/src/cpp/iono/ionoSpherical.cpp index 14c938f7b..3ad32cd5c 100644 --- a/src/cpp/iono/ionoSpherical.cpp +++ b/src/cpp/iono/ionoSpherical.cpp @@ -176,7 +176,7 @@ Author: Ken Harima @ RMIT 20 May 2020 latIPP - Latitude of Ionosphere Piercing Point lonIPP - Longitude of Ionosphere Piercing Point angIPP - Angular gain for Ionosphere Piercing Point - int slant I 0: coefficient for Vtec, 1: coefficient for slant delay + int slant I 0: coefficient for VTEC, 1: coefficient for STEC ----------------------------------------------------------------------------*/ double ionCoefSphhar(int ind, GObs& obs, bool slant) { @@ -203,7 +203,7 @@ double ionCoefSphhar(int ind, GObs& obs, bool slant) if (slant) { - out *= obs.ippMap[basis.hind].ang * obs.STECtoDELAY; + out *= obs.ippMap[basis.hind].ang; } return out; diff --git a/src/cpp/orbprop/orbitProp.cpp b/src/cpp/orbprop/orbitProp.cpp index a3b11be76..913122eda 100644 --- a/src/cpp/orbprop/orbitProp.cpp +++ b/src/cpp/orbprop/orbitProp.cpp @@ -122,6 +122,8 @@ void OrbitIntegrator::computeAcceleration( { Vector3d accCF = accelCentralForce(rsat, GM_values[E_ThirdBody::EARTH], &dAdPos); +// orbInit.componentsMap[E_Component::CENTRAL_FORCE] = accCF.norm(); + acc += accCF; } @@ -135,6 +137,8 @@ void OrbitIntegrator::computeAcceleration( Vector3d accPlanet = accelSourcePoint(rsat, planetPos, GM_values[planet], &dAdPos); +// orbInit.componentsMap[E_Component::PLANETARY_PERTURBATION] = accPlanet.norm(); + acc += accPlanet; } @@ -153,6 +157,8 @@ void OrbitIntegrator::computeAcceleration( dAdPos.col(i) += eci2ecf.transpose() * (accPerturbed - accSPH) / posOffset; } + +// orbInit.componentsMap[E_Component::EGM] = accSPH.norm(); acc += eci2ecf.transpose() * accSPH; } @@ -161,6 +167,8 @@ void OrbitIntegrator::computeAcceleration( for (const auto body : {E_ThirdBody::SUN, E_ThirdBody::MOON}) { Vector3d accJ2 = accelJ2(Cnm(2,0), eci2ecf, planetsPosMap[body], GM_values[body]); + +// orbInit.componentsMap[E_Component::INDIRECT_J2] = accJ2.norm(); acc += eci2ecf.transpose() * accJ2; } @@ -199,6 +207,8 @@ void OrbitIntegrator::computeAcceleration( dAdVel.col(i) += (acc_rel_part - accRel) / velOffset; } + +// orbInit.componentsMap[E_Component::GENERAL_RELATIVITY] = accRel.norm(); acc += accRel; }; @@ -216,6 +226,8 @@ void OrbitIntegrator::computeAcceleration( dAdPos.col(i) += (acc_pert - accAnt) / posOffset; } + +// orbInit.componentsMap[E_Component::ANTENNA_THRUST] = accAnt.norm(); acc += accAnt; } @@ -234,6 +246,8 @@ void OrbitIntegrator::computeAcceleration( dAdPos += scalar * (1 / pow(R, 3) * Matrix3d::Identity() - 3 * satToSun * (satToSun.transpose() / pow(R, 5))); Vector3d accSrp = -1 * scalar * ed; + +// orbInit.componentsMap[E_Component::SRP] = accSrp.norm(); acc += accSrp; } @@ -254,8 +268,12 @@ void OrbitIntegrator::computeAcceleration( double phi = acos(cos_); double sin_ = sin(phi); double E_Vis = 2 * alpha / (3 * SQR(PI)) * Ae * E / rsat.squaredNorm() * ((PI - phi) * cos_ + sin_); - - acc += A / m * (E_Vis + E_IR) / CLIGHT * cBall * rsat.normalized(); + + Vector3d accAlbedo = A / m * (E_Vis + E_IR) / CLIGHT * cBall * rsat.normalized(); + +// orbInit.componentsMap[E_Component::ALBEDO] = accAlbedo.norm(); + + acc += accAlbedo; } if (propagationOptions.empirical_dyb) @@ -263,12 +281,9 @@ void OrbitIntegrator::computeAcceleration( double scalef = SQR(AU) / satToSun.squaredNorm(); double eclipseFrac = sunVisibility(rsat, planetsPosMap[E_ThirdBody::SUN], planetsPosMap[E_ThirdBody::MOON]); - vector axis = - { - ed * eclipseFrac * scalef, - ey * eclipseFrac * scalef, - eb * eclipseFrac * scalef - }; + double srpScalar = eclipseFrac * scalef; + + vector axis = {ed, ey, eb}; Vector3d& rSun = planetsPosMap[E_ThirdBody::SUN]; Vector3d z = (rsat .cross(vsat)) .normalized(); @@ -277,21 +292,30 @@ void OrbitIntegrator::computeAcceleration( double du = atan2(rsat.transpose() * y, rsat.transpose() * x); - Vector3d emp = Vector3d::Zero(); + Vector3d accEmp = Vector3d::Zero(); for (int i = 0; i < orbInit.empInput.size(); i++) { auto& empdata = orbInit.empInput[i]; - dAdParam.col(i) = axis[empdata.axisId]; + double scalar = 1; + + if (empdata.srpScaled) + { + scalar = srpScalar; + } + + dAdParam.col(i) = axis[empdata.axisId] * scalar; if (empdata.type == +E_TrigType::COS) dAdParam.col(i) *= cos(empdata.deg * du); else if (empdata.type == +E_TrigType::SIN) dAdParam.col(i) *= sin(empdata.deg * du); - emp += empdata.value * dAdParam.col(i); + accEmp += empdata.value * dAdParam.col(i); } + +// orbInit.componentsMap[E_Component::EMPIRICAL] = accEmp.norm(); - acc += emp; + acc += accEmp; } } @@ -322,9 +346,10 @@ void OrbitIntegrator::operator()( A.block<3,3>(3,0) = dAdPos; A.block<3,3>(3,3) = dAdVel; - orbUpdate.pos = orbInit.vel; - orbUpdate.vel = acc; - orbUpdate.posVelSTM = A * orbInit.posVelSTM; +// orbUpdate.componentsMap = orbInit.componentsMap; + orbUpdate.pos = orbInit.vel; + orbUpdate.vel = acc; + orbUpdate.posVelSTM = A * orbInit.posVelSTM; orbUpdate.posVelSTM.bottomRightCorner(3, nparam) += dAdParam; } @@ -446,15 +471,25 @@ Orbits prepareOrbits( switch (subKey.type) { - case KF::EMP_DYB_0: { orbit.empInput.emplace_back(EMP{0, subKey.num, E_TrigType::CONSTANT, subState.x(index)}); break;} - case KF::EMP_DYB_1C: { orbit.empInput.emplace_back(EMP{1, subKey.num, E_TrigType::COS, subState.x(index)}); break;} - case KF::EMP_DYB_1S: { orbit.empInput.emplace_back(EMP{1, subKey.num, E_TrigType::SIN, subState.x(index)}); break;} - case KF::EMP_DYB_2C: { orbit.empInput.emplace_back(EMP{2, subKey.num, E_TrigType::COS, subState.x(index)}); break;} - case KF::EMP_DYB_2S: { orbit.empInput.emplace_back(EMP{2, subKey.num, E_TrigType::SIN, subState.x(index)}); break;} - case KF::EMP_DYB_3C: { orbit.empInput.emplace_back(EMP{3, subKey.num, E_TrigType::COS, subState.x(index)}); break;} - case KF::EMP_DYB_3S: { orbit.empInput.emplace_back(EMP{3, subKey.num, E_TrigType::SIN, subState.x(index)}); break;} - case KF::EMP_DYB_4C: { orbit.empInput.emplace_back(EMP{4, subKey.num, E_TrigType::COS, subState.x(index)}); break;} - case KF::EMP_DYB_4S: { orbit.empInput.emplace_back(EMP{4, subKey.num, E_TrigType::SIN, subState.x(index)}); break;} + case KF::EMP_DYB_0: { orbit.empInput.emplace_back(EMP{false, 0, subKey.num, E_TrigType::CONSTANT, subState.x(index)}); break;} + case KF::EMP_DYB_1C: { orbit.empInput.emplace_back(EMP{false, 1, subKey.num, E_TrigType::COS, subState.x(index)}); break;} + case KF::EMP_DYB_1S: { orbit.empInput.emplace_back(EMP{false, 1, subKey.num, E_TrigType::SIN, subState.x(index)}); break;} + case KF::EMP_DYB_2C: { orbit.empInput.emplace_back(EMP{false, 2, subKey.num, E_TrigType::COS, subState.x(index)}); break;} + case KF::EMP_DYB_2S: { orbit.empInput.emplace_back(EMP{false, 2, subKey.num, E_TrigType::SIN, subState.x(index)}); break;} + case KF::EMP_DYB_3C: { orbit.empInput.emplace_back(EMP{false, 3, subKey.num, E_TrigType::COS, subState.x(index)}); break;} + case KF::EMP_DYB_3S: { orbit.empInput.emplace_back(EMP{false, 3, subKey.num, E_TrigType::SIN, subState.x(index)}); break;} + case KF::EMP_DYB_4C: { orbit.empInput.emplace_back(EMP{false, 4, subKey.num, E_TrigType::COS, subState.x(index)}); break;} + case KF::EMP_DYB_4S: { orbit.empInput.emplace_back(EMP{false, 4, subKey.num, E_TrigType::SIN, subState.x(index)}); break;} + + case KF::SRP_DYB_0: { orbit.empInput.emplace_back(EMP{true, 0, subKey.num, E_TrigType::CONSTANT, subState.x(index)}); break;} + case KF::SRP_DYB_1C: { orbit.empInput.emplace_back(EMP{true, 1, subKey.num, E_TrigType::COS, subState.x(index)}); break;} + case KF::SRP_DYB_1S: { orbit.empInput.emplace_back(EMP{true, 1, subKey.num, E_TrigType::SIN, subState.x(index)}); break;} + case KF::SRP_DYB_2C: { orbit.empInput.emplace_back(EMP{true, 2, subKey.num, E_TrigType::COS, subState.x(index)}); break;} + case KF::SRP_DYB_2S: { orbit.empInput.emplace_back(EMP{true, 2, subKey.num, E_TrigType::SIN, subState.x(index)}); break;} + case KF::SRP_DYB_3C: { orbit.empInput.emplace_back(EMP{true, 3, subKey.num, E_TrigType::COS, subState.x(index)}); break;} + case KF::SRP_DYB_3S: { orbit.empInput.emplace_back(EMP{true, 3, subKey.num, E_TrigType::SIN, subState.x(index)}); break;} + case KF::SRP_DYB_4C: { orbit.empInput.emplace_back(EMP{true, 4, subKey.num, E_TrigType::COS, subState.x(index)}); break;} + case KF::SRP_DYB_4S: { orbit.empInput.emplace_back(EMP{true, 4, subKey.num, E_TrigType::SIN, subState.x(index)}); break;} default: { break;} } } @@ -467,7 +502,10 @@ Orbits prepareOrbits( string svn = Sat.svn(); - //todo aaron, change to be more general than only sinex + orbit.satMass = acsConfig.orbitPropagation.sat_mass; + orbit.satPower = acsConfig.orbitPropagation.sat_power; + orbit.satArea = acsConfig.orbitPropagation.sat_area; + auto findPower_it = theSinex.map_satpowers.find(svn); if (findPower_it != theSinex.map_satpowers.end()) { @@ -485,6 +523,7 @@ Orbits prepareOrbits( orbit.satMass = firstMass.mass; } + } return orbits; @@ -607,7 +646,8 @@ void addKFSatEMPStates( } void outputOrbitConfig( - KFState& kfState) + KFState& kfState, + string suffix) { document satellites; @@ -681,7 +721,7 @@ void outputOrbitConfig( document json; json << "processing_options" << processing_options; json << "estimation_parameters" << estimation_parameters; - string filename = acsConfig.orbit_ics_filename; + string filename = acsConfig.orbit_ics_filename + suffix; PTime logtime = tsync; diff --git a/src/cpp/orbprop/orbitProp.hpp b/src/cpp/orbprop/orbitProp.hpp index ffa9a811d..683dacc6e 100644 --- a/src/cpp/orbprop/orbitProp.hpp +++ b/src/cpp/orbprop/orbitProp.hpp @@ -24,10 +24,11 @@ using namespace boost::numeric::odeint; struct EMP { - int deg = 0; - int axisId = 0; - E_TrigType type = E_TrigType::CONSTANT; - double value = 0; + bool srpScaled = false; + int deg = 0; + int axisId = 0; + E_TrigType type = E_TrigType::CONSTANT; + double value = 0; }; struct OrbitState @@ -36,11 +37,14 @@ struct OrbitState string str; double satMass = 0; double satPower = 0; + double satArea = 0; KFState subState; vector empInput; + map componentsMap; + int empnum = 0; Vector3d pos; Vector3d vel; @@ -193,5 +197,6 @@ void addKFSatEMPStates( string id); void outputOrbitConfig( - KFState& kfState); + KFState& kfState, + string suffix = ""); diff --git a/src/cpp/other_ssr/prototypeIgsSSRDecode.cpp b/src/cpp/other_ssr/prototypeIgsSSRDecode.cpp index 3da90495d..78c6c911d 100644 --- a/src/cpp/other_ssr/prototypeIgsSSRDecode.cpp +++ b/src/cpp/other_ssr/prototypeIgsSSRDecode.cpp @@ -8,8 +8,8 @@ struct SSRHeader { GTime time; - int updateInterval = 1; - int iod; + int updateInterval = 1; + int iod = -1; int numSats; int dispBiasConsis; int mwConsis; diff --git a/src/cpp/pea/main.cpp b/src/cpp/pea/main.cpp index 526a8e3ca..e81be9890 100644 --- a/src/cpp/pea/main.cpp +++ b/src/cpp/pea/main.cpp @@ -31,7 +31,7 @@ using std::string; #include "minimumConstraints.hpp" #include "networkEstimator.hpp" -#include "peaCommitVersion.h" +#include "peaCommitStrings.hpp" #include "ntripBroadcast.hpp" #include "rinexNavWrite.hpp" #include "rinexObsWrite.hpp" @@ -153,92 +153,102 @@ void removeInvalidFiles( /** Create a station object from an input */ void addStationData( - string inputName, ///< Filename to create station from - string inputFormat, ///< Type of data in file - string dataType) ///< Type of data + string stationId, + vector inputNames, ///< Filename to create station from + string inputFormat, ///< Type of data in file + string dataType) ///< Type of data { - if (streamDOAMap.find(inputName) != streamDOAMap.end()) + for (auto& inputName : inputNames) { - //this stream was already added, dont re-add - return; - } - - string mountpoint; - auto lastSlashPos = inputName.find_last_of('/'); - if (lastSlashPos == string::npos) { mountpoint = inputName; } - else { mountpoint = inputName.substr(lastSlashPos + 1); }; - - string stationId = mountpoint.substr(0,4); - boost::algorithm::to_upper(stationId); + if (streamDOAMap.find(inputName) != streamDOAMap.end()) + { + //this stream was already added, dont re-add + continue; + } + + string mountpoint; + auto lastSlashPos = inputName.find_last_of('/'); + if (lastSlashPos == string::npos) { mountpoint = inputName; } + else { mountpoint = inputName.substr(lastSlashPos + 1); }; + + string id = stationId; + + if (id == "") + { + id = mountpoint.substr(0,4); + } + + boost::algorithm::to_upper(stationId); - auto& recOpts = acsConfig.getRecOpts(stationId); + auto& recOpts = acsConfig.getRecOpts(stationId); - if (recOpts.exclude) - { - return; - } - - string protocol; - string subInputName; - auto protocolPos = inputName.find("://"); - if (protocolPos == string::npos) { protocol = "file"; subInputName = inputName; } - else { protocol = inputName.substr(0, protocolPos); subInputName = inputName.substr(protocolPos + 3); } - - std::unique_ptr stream_ptr; - std::unique_ptr parser_ptr; - - if ( protocol == "file" - ||protocol == "serial") - { - if (checkValidFile(subInputName, dataType) == false) + if (recOpts.exclude) { return; } - } - - if (protocol == "file") { stream_ptr = make_unique (subInputName); } - else if (protocol == "serial") { stream_ptr = make_unique (subInputName); } - else if (protocol == "http") { stream_ptr = make_unique (inputName); } - else if (protocol == "https") { stream_ptr = make_unique (inputName); } - else if (protocol == "ntrip") { stream_ptr = make_unique (inputName); } - else - { - BOOST_LOG_TRIVIAL(warning) - << "Warning: Invalid protocol " << protocol; - } - - if (inputFormat == "RINEX") { parser_ptr = make_unique (); } - else if (inputFormat == "UBX") { parser_ptr = make_unique (); } - else if (inputFormat == "RTCM") { parser_ptr = make_unique (); static_cast(parser_ptr.get())->rtcmMountpoint = mountpoint; } - else if (inputFormat == "SP3") { parser_ptr = make_unique (); } - else if (inputFormat == "SINEX") { parser_ptr = make_unique (); } - else if (inputFormat == "SLR") { parser_ptr = make_unique (); } - else - { - BOOST_LOG_TRIVIAL(warning) - << "Warning: Invalid inputFormat " << inputFormat; - } - - shared_ptr streamParser_ptr; - if (dataType == "NAV") streamParser_ptr = make_shared(std::move(stream_ptr), std::move(parser_ptr)); - else streamParser_ptr = make_shared (std::move(stream_ptr), std::move(parser_ptr)); + string protocol; + string subInputName; + auto protocolPos = inputName.find("://"); + if (protocolPos == string::npos) { protocol = "file"; subInputName = inputName; } + else { protocol = inputName.substr(0, protocolPos); subInputName = inputName.substr(protocolPos + 3); } + + std::unique_ptr stream_ptr; + std::unique_ptr parser_ptr; + + if ( protocol == "file" + ||protocol == "serial") + { + if (checkValidFile(subInputName, dataType) == false) + { + return; + } + } + + if (protocol == "file") { stream_ptr = make_unique (subInputName); } + else if (protocol == "serial") { stream_ptr = make_unique (subInputName); } + else if (protocol == "http") { stream_ptr = make_unique (inputName); } + else if (protocol == "https") { stream_ptr = make_unique (inputName); } + else if (protocol == "ntrip") { stream_ptr = make_unique (inputName); } + else + { + BOOST_LOG_TRIVIAL(warning) + << "Warning: Invalid protocol " << protocol; + } + + if (inputFormat == "RINEX") { parser_ptr = make_unique (); } + else if (inputFormat == "UBX") { parser_ptr = make_unique (); } + else if (inputFormat == "RTCM") { parser_ptr = make_unique (); static_cast(parser_ptr.get())->rtcmMountpoint = mountpoint; } + else if (inputFormat == "SP3") { parser_ptr = make_unique (); } + else if (inputFormat == "SINEX") { parser_ptr = make_unique (); } + else if (inputFormat == "SLR") { parser_ptr = make_unique (); } + else + { + BOOST_LOG_TRIVIAL(warning) + << "Warning: Invalid inputFormat " << inputFormat; + } + + shared_ptr streamParser_ptr; - streamParser_ptr->stream.sourceString = inputName; - - streamParserMultimap.insert({stationId, std::move(streamParser_ptr)}); - - streamDOAMap[inputName] = false; + if (dataType == "NAV") streamParser_ptr = make_shared(std::move(stream_ptr), std::move(parser_ptr)); + else streamParser_ptr = make_shared (std::move(stream_ptr), std::move(parser_ptr)); + + streamParser_ptr->stream.sourceString = inputName; + + streamParserMultimap.insert({id, std::move(streamParser_ptr)}); + + streamDOAMap[inputName] = false; + } } void reloadInputFiles() { - for (auto& ubxinputs : acsConfig.ubx_inputs) { addStationData(ubxinputs, "UBX", "OBS"); } - for (auto& rnxinputs : acsConfig.rnx_inputs) { addStationData(rnxinputs, "RINEX", "OBS"); } - for (auto& rtcminputs : acsConfig.obs_rtcm_inputs) { addStationData(rtcminputs, "RTCM", "OBS"); } - for (auto& rtcminputs : acsConfig.nav_rtcm_inputs) { addStationData(rtcminputs, "RTCM", "NAV"); } - for (auto& pseudosp3inputs : acsConfig.pseudo_sp3_inputs) { addStationData(pseudosp3inputs, "SP3", "PSEUDO"); } - for (auto& pseudosnxinputs : acsConfig.pseudo_snx_inputs) { addStationData(pseudosnxinputs, "SINEX", "PSEUDO"); } + for (auto& [id, ubxinputs] : acsConfig.ubx_inputs) { addStationData(id, ubxinputs, "UBX", "OBS"); } + for (auto& [id, rnxinputs] : acsConfig.rnx_inputs) { addStationData(id, rnxinputs, "RINEX", "OBS"); } + for (auto& [id, rtcminputs] : acsConfig.obs_rtcm_inputs) { addStationData(id, rtcminputs, "RTCM", "OBS"); } + for (auto& [id, pseudosp3inputs] : acsConfig.pseudo_sp3_inputs) { addStationData(id, pseudosp3inputs, "SP3", "PSEUDO"); } + for (auto& [id, pseudosnxinputs] : acsConfig.pseudo_snx_inputs) { addStationData(id, pseudosnxinputs, "SINEX", "PSEUDO"); } + { addStationData("Nav", acsConfig.nav_rtcm_inputs, "RTCM", "NAV"); } removeInvalidFiles(acsConfig.atx_files); for (auto& atxfile : acsConfig.atx_files) @@ -292,7 +302,7 @@ void reloadInputFiles() updated = true; BOOST_LOG_TRIVIAL(info) - << "Reading ORB file " << orbfile << std::endl; + << "Reading ORB file " << orbfile; readorbit(orbfile); } @@ -312,7 +322,7 @@ void reloadInputFiles() } BOOST_LOG_TRIVIAL(info) - << "Loading SP3 file " << sp3file << std::endl; + << "Loading SP3 file " << sp3file; readSp3ToNav(sp3file, &nav, 0); } @@ -433,7 +443,7 @@ void reloadInputFiles() } BOOST_LOG_TRIVIAL(info) - << "Loading SNX file " << snxfile << std::endl; + << "Loading SNX file " << snxfile; bool fail = readSinex(snxfile, once); if (fail) @@ -523,7 +533,7 @@ void reloadInputFiles() auto slrObsFiles = outputSortedSlrObs(); // CRD files need to be parsed before sorted .slr_obs files are exported for (auto& slrObsFile : slrObsFiles) { - addStationData(slrObsFile, "SLR", "OBS"); +// addStationData(slrObsFile, "SLR", "OBS"); //todo aaron } } @@ -725,7 +735,7 @@ bool createNewTraceFile( trace << "start_epoch: " << acsConfig.start_epoch << std::endl; trace << "end_epoch : " << acsConfig.end_epoch << std::endl; trace << "trace_level: " << acsConfig.trace_level << std::endl; - trace << "pea_version: " << GINAN_COMMIT_VERSION << std::endl; + trace << "pea_version: " << ginanCommitVersion() << std::endl; // trace << "rts_lag : " << acsConfig.pppOpts.rts_lag << std::endl; } @@ -759,6 +769,7 @@ void createDirectories( { // Ensure the output directories exist for (auto directory : { + acsConfig.sp3_directory, acsConfig.erp_directory, acsConfig.gpx_directory, acsConfig.log_directory, @@ -768,7 +779,6 @@ void createDirectories( acsConfig.orbex_directory, acsConfig.sinex_directory, acsConfig.trace_directory, - acsConfig.orbits_directory, acsConfig.clocks_directory, acsConfig.slr_obs_directory, acsConfig.ionstec_directory, @@ -938,7 +948,8 @@ void createTracefiles( if ( rts - && newTraceFile) + && newTraceFile + && rec.pppState.rts_basename.empty() == false) { spitFilterToFile(rec.pppState.metaDataMap, E_SerialObject::METADATA, rec.pppState.rts_basename + FORWARD_SUFFIX); } @@ -966,7 +977,6 @@ void createTracefiles( { newTraceFile |= createNewTraceFile("", logptime, acsConfig.ionstec_filename + suff, net.kfState.metaDataMap[IONSTEC_FILENAME_STR + metaSuff]); } - if ( ( acsConfig.output_trop_sinex) &&( acsConfig.process_ppp @@ -975,6 +985,12 @@ void createTracefiles( newTraceFile |= createNewTraceFile(net.id, logptime, acsConfig.trop_sinex_filename + suff, net.kfState.metaDataMap[TROP_FILENAME_STR + metaSuff]); } + if (acsConfig.output_bias_sinex) + { + newTraceFile |= createNewTraceFile(net.id, logptime, acsConfig.bias_sinex_filename + suff, net.kfState.metaDataMap[BSX_FILENAME_STR + metaSuff]); + newTraceFile |= createNewTraceFile(net.id, logptime, acsConfig.bias_sinex_filename + suff, iono_KFState.metaDataMap[BSX_FILENAME_STR + metaSuff]); + } + if (acsConfig.output_erp) { newTraceFile |= createNewTraceFile(net.id, logptime, acsConfig.erp_filename + suff, net.kfState.metaDataMap[ERP_FILENAME_STR + metaSuff]); @@ -992,10 +1008,10 @@ void createTracefiles( net.kfState.metaDataMap[CLK_FILENAME_STR + metaSuff] = singleFilenameMap.begin()->first + suff; } - if (acsConfig.output_orbits) + if (acsConfig.output_sp3) { - auto singleFilenameMap = getSysOutputFilenames(acsConfig.orbits_filename, tsync, false); - auto filenameMap = getSysOutputFilenames(acsConfig.orbits_filename, tsync); + auto singleFilenameMap = getSysOutputFilenames(acsConfig.sp3_filename, tsync, false); + auto filenameMap = getSysOutputFilenames(acsConfig.sp3_filename, tsync); for (auto& [filename, dummy] : filenameMap) { newTraceFile |= createNewTraceFile(net.id, logptime, filename + suff, fileNames[filename + metaSuff]); @@ -1003,6 +1019,18 @@ void createTracefiles( net.kfState.metaDataMap[SP3_FILENAME_STR + metaSuff] = singleFilenameMap.begin()->first + suff; } + + if (acsConfig.output_orbex) + { + auto singleFilenameMap = getSysOutputFilenames(acsConfig.orbex_filename, tsync, false); + auto filenameMap = getSysOutputFilenames(acsConfig.orbex_filename, tsync); + for (auto& [filename, dummy] : filenameMap) + { + newTraceFile |= createNewTraceFile(net.id, logptime, filename + suff, fileNames[filename + metaSuff], false, false); + } + + net.kfState.metaDataMap[ORBEX_FILENAME_STR + metaSuff] = singleFilenameMap.begin()->first + suff; + } if ( rts && newTraceFile) @@ -1054,20 +1082,6 @@ void createTracefiles( } } - if (acsConfig.output_orbex) - { - auto filenameMap = getSysOutputFilenames(acsConfig.orbex_filename, tsync); - for (auto& [filename, dummy] : filenameMap) - { - createNewTraceFile(net.id, logptime, filename, fileNames[filename], false, false); - } - } - - if (acsConfig.output_bias_sinex) - { - createNewTraceFile("", logptime, acsConfig.bias_sinex_filename, fileNames[acsConfig.bias_sinex_filename]); - } - for (auto& [id, streamParser_ptr] : streamParserMultimap) try { @@ -1421,6 +1435,12 @@ void outputPredictedStates( orbitsTime = time; outputMongoPredictions(trace, orbits, time, mongoOptions); + + if (acsConfig.output_orbit_ics) + for (auto& orbit : orbits) + { + outputOrbitConfig(orbit.subState, "_prop"); + } } } } @@ -1491,7 +1511,9 @@ void mainPerEpochPostProcessingAndOutputs( tempAugmentedKF.outputStates(netTrace); KFState KF_ARcopy = net.kfState; + KF_ARcopy.outputMongoMeasurements = false; + if (acsConfig.ambrOpts.NLmode != +E_ARmode::OFF) { networkAmbigResl(netTrace, stationMap, KF_ARcopy); @@ -1557,11 +1579,17 @@ void mainPerEpochPostProcessingAndOutputs( KFState KF_ARcopy; /* select ambiguity resolved KF */ - if ( acsConfig.ambrOpts.NLmode != +E_ARmode::OFF - && copyFixedKF(KF_ARcopy)) + if (acsConfig.ambrOpts.NLmode != +E_ARmode::OFF) { - tempAugmentedKF = KF_ARcopy; - } + if (copyFixedKF(KF_ARcopy)) + { + tempAugmentedKF = KF_ARcopy; + } + + mongoStates(tempAugmentedKF, "AR"); + } + + if ( acsConfig.process_minimum_constraints && acsConfig.minCOpts.once_per_epoch) @@ -1612,14 +1640,14 @@ void mainPerEpochPostProcessingAndOutputs( } } - if (acsConfig.output_orbits) + if (acsConfig.output_sp3) { - outputSp3(acsConfig.orbits_filename, tsync, acsConfig.orbits_data_sources, &tempAugmentedKF); + outputSp3(acsConfig.sp3_filename, tsync, acsConfig.sp3_orbit_sources, acsConfig.sp3_clock_sources, &tempAugmentedKF); } if (acsConfig.output_orbex) { - outputOrbex(tsync, acsConfig.orbex_orbit_sources, acsConfig.orbex_clock_sources, acsConfig.orbex_attitude_sources, &net.kfState); + outputOrbex(acsConfig.orbex_filename, tsync, acsConfig.orbex_orbit_sources, acsConfig.orbex_clock_sources, acsConfig.orbex_attitude_sources, &net.kfState); } if (acsConfig.output_ionex) @@ -1638,7 +1666,7 @@ void mainPerEpochPostProcessingAndOutputs( if (acsConfig.output_bias_sinex) { - writeBiasSinex(netTrace, tsync, fileNames[acsConfig.bias_sinex_filename], stationMap); + writeBiasSinex(netTrace, tsync, net.kfState.metaDataMap[BSX_FILENAME_STR], stationMap); } if (acsConfig.output_orbit_ics) @@ -1673,6 +1701,9 @@ void mainOncePerEpochPerSatellite( { Sat.setSvn(it->second); } + + //reinitialise the options with the updated values + satOpts._initialised = false; } if (Sat.blockType().empty()) @@ -1688,8 +1719,13 @@ void mainOncePerEpochPerSatellite( { Sat.setBlockType(it->second); } + + //reinitialise the options with the updated values + satOpts._initialised = false; } + satOpts = acsConfig.getSatOpts(Sat); + GObs obs; obs.Sat = Sat; obs.time = time; @@ -1825,6 +1861,9 @@ void mainPostProcessing( Network& net, StationMap& stationMap) { + BOOST_LOG_TRIVIAL(info) + << "Post processing... "; + auto netTrace = getTraceFile(net); if ( ( acsConfig.process_network @@ -1945,7 +1984,7 @@ int ginan( boost::log::core::get()->set_filter(boost::log::trivial::severity >= boost::log::trivial::info); BOOST_LOG_TRIVIAL(info) - << "PEA starting... (" << GINAN_BRANCH_NAME << " " GINAN_COMMIT_VERSION " from " << GINAN_COMMIT_DATE << ")" << std::endl; + << "PEA starting... (" << ginanBranchName() << " " << ginanCommitVersion() << " from " << ginanCommitDate() << ")" << std::endl; GTime peaStartTime = timeGet(); @@ -2055,6 +2094,11 @@ int ginan( iono_KFState.rts_lag = acsConfig.pppOpts.rts_lag; } + if (acsConfig.process_ionosphere) + { + iono_KFState.measRejectCallbacks.push_back(deweightMeas); + iono_KFState.stateRejectCallbacks.push_back(deweightByState); + } //initialise mongo mongoooo(); @@ -2291,10 +2335,10 @@ int ginan( switch (obsStream.obsWaitCode) { - case E_ObsWaitCode::EARLY_DATA: preprocessor(rec); obsStream.eatObs(); break; - case E_ObsWaitCode::OK: moreData = false; preprocessor(rec); obsStream.eatObs(); break; - case E_ObsWaitCode::NO_DATA_WAIT: moreData = false; break; - case E_ObsWaitCode::NO_DATA_EVER: moreData = false; break; + case E_ObsWaitCode::EARLY_DATA: preprocessor(net, rec); obsStream.eatObs(); break; + case E_ObsWaitCode::OK: moreData = false; preprocessor(net, rec); obsStream.eatObs(); break; + case E_ObsWaitCode::NO_DATA_WAIT: moreData = false; break; + case E_ObsWaitCode::NO_DATA_EVER: moreData = false; break; } } } @@ -2416,7 +2460,8 @@ int ginan( { BOOST_LOG_TRIVIAL(warning) << std::endl << "Warning: Excessive time elapsed, skipping " << excessLoops - << " epochs. Configuration 'wait_next_epoch' is " << acsConfig.wait_next_epoch; + << " epochs to epoch " << epoch + excessLoops + 1 + << ". Configuration 'wait_next_epoch' is " << acsConfig.wait_next_epoch; } loopEpochs = 1 + excessLoops; diff --git a/src/cpp/pea/orbits.cpp b/src/cpp/pea/orbits.cpp index 5b62210ce..d67763733 100644 --- a/src/cpp/pea/orbits.cpp +++ b/src/cpp/pea/orbits.cpp @@ -6,24 +6,3 @@ #include "acsConfig.hpp" #include "algebra.hpp" #include "satSys.hpp" - -void dummyOrbitPropagator( - KFState& kfState) -{ - SatSys Sat = {}; - auto& satOpts = acsConfig.getSatOpts(Sat); - - if (satOpts.orbit.estimate) - { - for (int i = 0; i < 6; i++) - { - auto init = initialStateFromConfig(satOpts.orbit, i); - - KFKey key; - key.type = KF::ORBIT; - key.num = i; - - kfState.addKFState(key, init); - } - } -} diff --git a/src/cpp/pea/peaCommitStrings.cpp b/src/cpp/pea/peaCommitStrings.cpp new file mode 100644 index 000000000..0f5fca4f6 --- /dev/null +++ b/src/cpp/pea/peaCommitStrings.cpp @@ -0,0 +1,9 @@ + +#include "peaCommitStrings.hpp" +#include "peaCommitVersion.h" + +string ginanCommitHash (){ return GINAN_COMMIT_HASH; } +string ginanCommitVersion (){ return GINAN_COMMIT_VERSION; } +string ginanBranchName (){ return GINAN_BRANCH_NAME; } +string ginanCommitDate (){ return GINAN_COMMIT_DATE; } + diff --git a/src/cpp/pea/peaCommitStrings.hpp b/src/cpp/pea/peaCommitStrings.hpp new file mode 100644 index 000000000..f7a3bb0c2 --- /dev/null +++ b/src/cpp/pea/peaCommitStrings.hpp @@ -0,0 +1,11 @@ + +#pragma once + +#include + +using std::string; + +string ginanCommitHash (); +string ginanCommitVersion (); +string ginanBranchName (); +string ginanCommitDate (); diff --git a/src/cpp/pea/pea_snx.cpp b/src/cpp/pea/pea_snx.cpp index 2754dc57c..a00c155f7 100644 --- a/src/cpp/pea/pea_snx.cpp +++ b/src/cpp/pea/pea_snx.cpp @@ -75,10 +75,10 @@ void sinexPostProcessing( } // add in the files used to create the solution - for (auto& ubxinput : acsConfig.ubx_inputs) { sinex_add_file(acsConfig.analysis_agency, time, ubxinput, "UBX"); } - for (auto& rnxinput : acsConfig.rnx_inputs) { sinex_add_file(acsConfig.analysis_agency, time, rnxinput, "RINEX v3.x"); } - for (auto& sp3input : acsConfig.sp3_files) { sinex_add_file(acsConfig.analysis_agency, time, sp3input, "SP3"); } - for (auto& snxinput : acsConfig.snx_files) { sinex_add_file(acsConfig.analysis_agency, time, snxinput, "SINEX"); } + for (auto& [id, ubxinput] : acsConfig.ubx_inputs) { sinex_add_files(acsConfig.analysis_agency, time, ubxinput, "UBX"); } + for (auto& [id, rnxinput] : acsConfig.rnx_inputs) { sinex_add_files(acsConfig.analysis_agency, time, rnxinput, "RINEX v3.x"); } + { sinex_add_files(acsConfig.analysis_agency, time, acsConfig.sp3_files, "SP3"); } + { sinex_add_files(acsConfig.analysis_agency, time, acsConfig.snx_files, "SINEX"); } // Add other statistics as they become available... sinex_add_statistic("SAMPLING INTERVAL (SECONDS)", acsConfig.epoch_interval); diff --git a/src/cpp/pea/ppp.cpp b/src/cpp/pea/ppp.cpp index 7d3bb23af..54c1386db 100644 --- a/src/cpp/pea/ppp.cpp +++ b/src/cpp/pea/ppp.cpp @@ -614,7 +614,7 @@ void outputApriori( aprioriState.stateTransition(nullStream, tsync); - mongoStates(aprioriState, "_apriori"); + mongoStates(aprioriState, "apriori"); storeStates(aprioriState, "apriori"); } @@ -646,7 +646,7 @@ void outputPPPSolution( if (fout.tellp() == 0) { - tracepdeex(1,fout," Date UTC time Sta. A priory X A priory Y A priory Z Estimated X Estimated Y Estimated Z Dif. X Dif. Y Dif. Z Dif. E Dif. N Dif. U\n"); + tracepdeex(1,fout," Date UTC time Sta. A priori X A priori Y A priori Z Estimated X Estimated Y Estimated Z Dif. X Dif. Y Dif. Z Dif. E Dif. N Dif. U\n"); } fout << rec.sol.time.to_string(2) << " "; diff --git a/src/cpp/pea/ppp.hpp b/src/cpp/pea/ppp.hpp index 2e97c3962..0951d34a4 100644 --- a/src/cpp/pea/ppp.hpp +++ b/src/cpp/pea/ppp.hpp @@ -192,6 +192,11 @@ void orbitPseudoObs( const KFState& kfState, KFMeasEntryList& kfMeasEntryList); +void initPseudoObs( + Trace& netTrace, + KFState& kfState, + KFMeasEntryList& kfMeasEntryList); + void stationPseudoObs( Trace& netTrace, Station& rec, @@ -227,6 +232,9 @@ int PPP_AR( bool copyFixedKF( KFState& fixed); +void overwriteFixedKF( + KFState& kfState); + bool queryBiasUC( Trace& trace, GTime time, diff --git a/src/cpp/pea/ppp_ambres.cpp b/src/cpp/pea/ppp_ambres.cpp index c2af9530a..b99a43803 100644 --- a/src/cpp/pea/ppp_ambres.cpp +++ b/src/cpp/pea/ppp_ambres.cpp @@ -160,9 +160,17 @@ bool copyFixedKF(KFState& fixed) { fixed = kfState_forAR; + /* add additional readiness check here if needed */ + return fixKFReady; } +void overwriteFixedKF( + KFState& kfState) +{ + kfState_forAR = kfState; +} + bool queryBiasUC( Trace& trace, ///< debug stream GTime time, ///< time of biases diff --git a/src/cpp/pea/ppp_network.cpp b/src/cpp/pea/ppp_network.cpp index 246632c67..1fcf1b067 100644 --- a/src/cpp/pea/ppp_network.cpp +++ b/src/cpp/pea/ppp_network.cpp @@ -47,7 +47,7 @@ void pppomc( // satellite positions and clocks for (auto& obs : only(obsList)) - satPosClk(trace, time, obs, nav, acsConfig.model.sat_pos.ephemeris_sources, acsConfig.model.sat_clock.ephemeris_sources, E_OffsetType::APC); + satPosClk(trace, time, obs, nav, acsConfig.model.sat_pos.ephemeris_sources, acsConfig.model.sat_clock.ephemeris_sources, nullptr, E_OffsetType::APC); // earth tides correction Vector3d dTide = Vector3d::Zero(); @@ -89,14 +89,11 @@ void pppomc( char id[8]; obs.Sat.getId(id); - E_FType frq1 = F1; - E_FType frq2 = F2; - if (obs.Sat.sys == +E_Sys::GAL) frq2 = F5; - if (obs.Sat.sys == +E_Sys::GLO) - { - frq1 = G1; - frq2 = G2; - } + E_FType frq1; + E_FType frq2; + E_FType frq3; + if (!satFreqs(obs.Sat.sys,frq1,frq2,frq3)) + continue; tracepdeex(lv, trace, "\n*---------------------------------------------------*"); tracepdeex(lv, trace, "\n%s %s recpos = %14.4f %14.4f %14.4f", timeStr.c_str(), id, rec.aprioriPos[0], rec.aprioriPos[1], rec.aprioriPos[2]); diff --git a/src/cpp/pea/ppp_obs.cpp b/src/cpp/pea/ppp_obs.cpp index 9fb1fc236..e740d26d2 100644 --- a/src/cpp/pea/ppp_obs.cpp +++ b/src/cpp/pea/ppp_obs.cpp @@ -56,7 +56,6 @@ COMMON_ARG( KFMeasEntry& ) measEntry, \ COMMON_ARG( VectorEcef& ) rRec, \ COMMON_ARG( VectorEcef& ) rSat, \ - COMMON_ARG( Vector3d& ) rRecInertial, \ COMMON_ARG( double& ) rRecSat, \ COMMON_ARG( double& ) lambda, \ COMMON_ARG( SatSys& ) sysSat, \ @@ -400,7 +399,7 @@ inline void pppIonStec2(COMMON_PPP_ARGS) bool pass = ionoModel(time, pos, satStat.azel, dummy, diono, varIono); if (pass) { - double stec = diono * SQR(FREQ1) / 40.3e16; // restore STEC + double stec = diono * SQR(FREQ1) / TEC_CONSTANT; // restore STEC ionosphere_m = factor * alpha * stec; } @@ -470,7 +469,7 @@ inline void pppIonStec3(COMMON_PPP_ARGS) bool pass = ionoModel(time, pos, satStat.azel, dummy, diono, varIono); if (pass) { - double stec = diono * SQR(FREQ1) / 40.3e16; // restore STEC + double stec = diono * SQR(FREQ1) / TEC_CONSTANT; // restore STEC double vtec = stec / fs; // restore VTEC for nMax calculation // nMax = 14.0e12 / 3.17e18 * stec*1e16; // calculate nMax, see ref [1] @@ -491,7 +490,7 @@ inline void pppIonModel(COMMON_PPP_ARGS) double ionosphere_m = 0; double varIono = 0; double freq = CLIGHT / lambda; - double alpha = 40.3e16 / SQR(freq); + double alpha = TEC_CONSTANT / SQR(freq); double sign = 1; if (measType == CODE) sign = +1; @@ -956,7 +955,9 @@ void stationPPP( GTime time = rec.obsList.front()->time; for (auto& obs : only(rec.obsList)) - satPosClk(trace, time, obs, nav, acsConfig.model.sat_pos.ephemeris_sources, acsConfig.model.sat_clock.ephemeris_sources, E_OffsetType::COM, E_Relativity::OFF, &kfState); + { + satPosClk(trace, time, obs, nav, acsConfig.model.sat_pos.ephemeris_sources, acsConfig.model.sat_clock.ephemeris_sources, &kfState, E_OffsetType::COM, E_Relativity::OFF); + } ERPValues erpv = geterp(nav.erp, time); @@ -981,18 +982,19 @@ void stationPPP( for (auto& sig : sigList) for (auto measType : {PHAS, CODE}) { - tracepdeex(1, trace, "\n\n----------------------------------------------------"); - tracepdeex(1, trace, "\nProcessing %s %s %s: ", obs.Sat.id().c_str(), sig.code._to_string(), (measType == PHAS) ? "L" : "P"); - + char measDescription[64]; + + snprintf(measDescription, sizeof(measDescription), "%s %s %s", obs.Sat.id().c_str(), sig.code._to_string(), (measType == PHAS) ? "L" : "P"); + if (acsConfig.process_sys[obs.Sat.sys] == false) { - tracepdeex(2, trace, " - System skipped"); + tracepdeex(4, trace, "\n%s - System skipped", measDescription); continue; } if (acsConfig.process_meas[measType] == false) { - tracepdeex(2, trace, " - Measurement type skipped"); + tracepdeex(4, trace, "\n%s - Measurement type skipped", measDescription); continue; } @@ -1001,10 +1003,14 @@ void stationPPP( auto prioritityIt = std::find(sysCodes.begin(), sysCodes.end(), sig.code); if (prioritityIt == sysCodes.end()) { - tracepdeex(2, trace, " - Code type skipped"); + tracepdeex(4, trace, "\n%s - Code type skipped", measDescription); continue; } + tracepdeex(1, trace, "\n\n----------------------------------------------------"); + tracepdeex(1, trace, "\nProcessing %s: ", measDescription); + + string sigName = sig.code._to_string(); SatNav& satNav = *obs.satNav_ptr; SatStat& satStat = *obs.satStat_ptr; @@ -1105,7 +1111,6 @@ void stationPPP( VectorEcef rRec = rec.aprioriPos; - VectorEci rRecInertial = frameSwapper(rRec); { for (int i = 0; i < 3; i++) { @@ -1141,6 +1146,46 @@ void stationPPP( kfState.setKFTransRate(kfKey, rateKey, 1, rateInit); } } + + if (initialStateFromConfig(recOpts.orbit).estimate) + { + bool found = false; + VectorEci rRecInertial = frameSwapper(rRec); + + for (int i = 0; i < 3; i++) + { + InitialState posInit = initialStateFromConfig(recOpts.orbit,i); + InitialState velInit = initialStateFromConfig(recOpts.orbit,i + 3); + + KFKey posKey; + posKey.type = KF::ORBIT; + posKey.num = i; + posKey.comment = posInit.comment; + + if (recOpts.sat_id.empty()) posKey.str = rec.id; + else posKey.Sat = SatSys(recOpts.sat_id.c_str()); + + KFKey velKey = posKey; + velKey.num = i + 3; + velKey.comment = velInit.comment; + + + found |= kfState.getKFValue(posKey, rRec[i]); + + if (posInit.x == 0) posInit.x = rRecInertial[i]; + + VectorEci eSatInertial = frameSwapper(satStat.e); + + measEntry.addDsgnEntry (posKey, -eSatInertial[i], posInit); + + kfState.setKFTransRate (posKey, velKey, 1, velInit, posInit); //todo aaron will create noise elements that kill something else + } + + if (found) + { + rRec = frameSwapper(rRecInertial); + } + } } auto& pos = rec.pos; @@ -1183,7 +1228,7 @@ void stationPPP( VectorEci eSatInertial = frameSwapper(satStat.e); - measEntry.addDsgnEntry (posKey, eSatInertial[i], posInit); + measEntry.addDsgnEntry (posKey, +eSatInertial[i], posInit); kfState.setKFTransRate (posKey, velKey, 1, velInit, posInit); //todo aaron will create noise elements that kill something else } @@ -1265,6 +1310,16 @@ void stationPPP( addKFSatEMPStates(satOpts.emp_dyb_3s, kfState, KF::EMP_DYB_3S, obs.Sat); addKFSatEMPStates(satOpts.emp_dyb_4c, kfState, KF::EMP_DYB_4C, obs.Sat); addKFSatEMPStates(satOpts.emp_dyb_4s, kfState, KF::EMP_DYB_4S, obs.Sat); + + addKFSatEMPStates(satOpts.srp_dyb_0, kfState, KF::SRP_DYB_0, obs.Sat); + addKFSatEMPStates(satOpts.srp_dyb_1c, kfState, KF::SRP_DYB_1C, obs.Sat); + addKFSatEMPStates(satOpts.srp_dyb_1s, kfState, KF::SRP_DYB_1S, obs.Sat); + addKFSatEMPStates(satOpts.srp_dyb_2c, kfState, KF::SRP_DYB_2C, obs.Sat); + addKFSatEMPStates(satOpts.srp_dyb_2s, kfState, KF::SRP_DYB_2S, obs.Sat); + addKFSatEMPStates(satOpts.srp_dyb_3c, kfState, KF::SRP_DYB_3C, obs.Sat); + addKFSatEMPStates(satOpts.srp_dyb_3s, kfState, KF::SRP_DYB_3S, obs.Sat); + addKFSatEMPStates(satOpts.srp_dyb_4c, kfState, KF::SRP_DYB_4C, obs.Sat); + addKFSatEMPStates(satOpts.srp_dyb_4s, kfState, KF::SRP_DYB_4S, obs.Sat); //Calculate residuals and form up the measurement diff --git a/src/cpp/pea/ppp_pseudoobs.cpp b/src/cpp/pea/ppp_pseudoobs.cpp index 9aea81c4e..61d0d4752 100644 --- a/src/cpp/pea/ppp_pseudoobs.cpp +++ b/src/cpp/pea/ppp_pseudoobs.cpp @@ -22,70 +22,6 @@ map expNoiseMap; -map> genericWavelength = -{ - { - E_Sys::GPS, - { - {F1, CLIGHT / FREQ1}, - {F2, CLIGHT / FREQ2}, - {F5, CLIGHT / FREQ5}, - {F6, CLIGHT / FREQ6}, - {F7, CLIGHT / FREQ7}, - {F8, CLIGHT / FREQ8} - } - }, - - { - E_Sys::GAL, - { - {F1, CLIGHT / FREQ1}, - {F2, CLIGHT / FREQ2}, - {F5, CLIGHT / FREQ5}, - {F6, CLIGHT / FREQ6}, - {F7, CLIGHT / FREQ7}, - {F8, CLIGHT / FREQ8} - } - }, - - { - E_Sys::BDS, - { - {B1, CLIGHT / FREQ1_CMP}, - {F2, CLIGHT / FREQ2}, - {B3, CLIGHT / FREQ3_CMP}, - {F5, CLIGHT / FREQ5}, - {F6, CLIGHT / FREQ6}, - {F7, CLIGHT / FREQ7}, - {F8, CLIGHT / FREQ8} - } - }, - - { - E_Sys::QZS, - { - {F1, CLIGHT / FREQ1}, - {F2, CLIGHT / FREQ2}, - {F5, CLIGHT / FREQ5}, - {F6, CLIGHT / FREQ6}, - {F7, CLIGHT / FREQ7}, - {F8, CLIGHT / FREQ8} - } - }, - - { - E_Sys::GLO, - { - {G1, CLIGHT / FREQ1_GLO}, - {G2, CLIGHT / FREQ2_GLO}, - {G3, CLIGHT / FREQ3_GLO}, - {G4, CLIGHT / FREQ4_GLO}, - {G6, CLIGHT / FREQ6_GLO} - } - } -}; - - struct AvBiasMonitor { int numCode = 0; @@ -108,6 +44,88 @@ typedef map> RecSetList; COMMON_ARG( KFMeasEntryList& ) kfMeasEntryList, \ COMMON_ARG( RecSetList& ) recSetList +void initPseudoObs( + Trace& trace, ///< Trace to output to + KFState& kfState, ///< Kalman filter object containing the network state parameters + KFMeasEntryList& kfMeasEntryList) ///< List to append kf measurements to +{ + if ( kfMeasEntryList.empty() == false + ||epoch != 1) + { + return; + } + + for (auto& [Sat, satNav] : nav.satNavMap) + { + if (acsConfig.process_sys[Sat.sys] == false) + { + continue; + } + + auto& satOpts = acsConfig.getSatOpts(Sat); + + if (satOpts.exclude) + { + continue; + } + + + bool newState = false; + + for (int i = 0; i < 3; i++) + { + InitialState posInit = initialStateFromConfig(satOpts.orbit, i); + InitialState velInit = initialStateFromConfig(satOpts.orbit, i + 3); + + if (posInit.estimate == false) + { + continue; + } + + KFKey satPosKey; + KFKey satVelKey; + + satPosKey.type = KF::ORBIT; + satPosKey.Sat = Sat; + satPosKey.num = i; + + satVelKey.type = KF::ORBIT; + satVelKey.Sat = Sat; + satVelKey.num = i + 3; + + newState |= kfState.addKFState(satPosKey, posInit); + newState |= kfState.addKFState(satVelKey, velInit); + + kfState.setKFTransRate(satPosKey, satVelKey, 1, velInit); + } + + if (newState == false) + { + continue; + } + + addKFSatEMPStates(satOpts.emp_dyb_0, kfState, KF::EMP_DYB_0, Sat); + addKFSatEMPStates(satOpts.emp_dyb_1c, kfState, KF::EMP_DYB_1C, Sat); + addKFSatEMPStates(satOpts.emp_dyb_1s, kfState, KF::EMP_DYB_1S, Sat); + addKFSatEMPStates(satOpts.emp_dyb_2c, kfState, KF::EMP_DYB_2C, Sat); + addKFSatEMPStates(satOpts.emp_dyb_2s, kfState, KF::EMP_DYB_2S, Sat); + addKFSatEMPStates(satOpts.emp_dyb_3c, kfState, KF::EMP_DYB_3C, Sat); + addKFSatEMPStates(satOpts.emp_dyb_3s, kfState, KF::EMP_DYB_3S, Sat); + addKFSatEMPStates(satOpts.emp_dyb_4c, kfState, KF::EMP_DYB_4C, Sat); + addKFSatEMPStates(satOpts.emp_dyb_4s, kfState, KF::EMP_DYB_4S, Sat); + + addKFSatEMPStates(satOpts.srp_dyb_0, kfState, KF::SRP_DYB_0, Sat); + addKFSatEMPStates(satOpts.srp_dyb_1c, kfState, KF::SRP_DYB_1C, Sat); + addKFSatEMPStates(satOpts.srp_dyb_1s, kfState, KF::SRP_DYB_1S, Sat); + addKFSatEMPStates(satOpts.srp_dyb_2c, kfState, KF::SRP_DYB_2C, Sat); + addKFSatEMPStates(satOpts.srp_dyb_2s, kfState, KF::SRP_DYB_2S, Sat); + addKFSatEMPStates(satOpts.srp_dyb_3c, kfState, KF::SRP_DYB_3C, Sat); + addKFSatEMPStates(satOpts.srp_dyb_3s, kfState, KF::SRP_DYB_3S, Sat); + addKFSatEMPStates(satOpts.srp_dyb_4c, kfState, KF::SRP_DYB_4C, Sat); + addKFSatEMPStates(satOpts.srp_dyb_4s, kfState, KF::SRP_DYB_4S, Sat); + } +} + void orbitPseudoObs( Trace& trace, ///< Trace to output to Station& rec, ///< Receiver to perform calculations for @@ -217,10 +235,7 @@ void orbitPseudoObs( statePosEci[i] = posInit.x; } - if (acsConfig.pppOpts.simulate_pseudos_only == false) - { - kfMeasEntry.addDsgnEntry(satPosKeys[i], 1, posInit); - } + kfMeasEntry.addDsgnEntry(satPosKeys[i], 1, posInit); kfState.setKFTransRate(satPosKeys[i], satVelKeys[i], 1, velInit); @@ -229,14 +244,15 @@ void orbitPseudoObs( - statePosEci[i]; kfMeasEntry.setInnov(omc); - kfMeasEntry.setNoise(1); - kfMeasEntry.obsKey.comment = "PseudoPos"; + kfMeasEntry.obsKey.comment = "ECI PseudoPos"; kfMeasEntry.obsKey.type = KF::ORBIT; kfMeasEntry.obsKey.Sat = obs.Sat; kfMeasEntry.obsKey.num = i; kfMeasEntry.metaDataMap["pseudoObs"] = (void*) true; + kfMeasEntry.addNoiseEntry(kfMeasEntry.obsKey, 1, SQR(satOpts.pseudo_sigmas[0])); + kfMeasEntryList.push_back(kfMeasEntry); } } @@ -250,6 +266,16 @@ void orbitPseudoObs( addKFSatEMPStates(satOpts.emp_dyb_3s, kfState, KF::EMP_DYB_3S, obs.Sat); addKFSatEMPStates(satOpts.emp_dyb_4c, kfState, KF::EMP_DYB_4C, obs.Sat); addKFSatEMPStates(satOpts.emp_dyb_4s, kfState, KF::EMP_DYB_4S, obs.Sat); + + addKFSatEMPStates(satOpts.srp_dyb_0, kfState, KF::SRP_DYB_0, obs.Sat); + addKFSatEMPStates(satOpts.srp_dyb_1c, kfState, KF::SRP_DYB_1C, obs.Sat); + addKFSatEMPStates(satOpts.srp_dyb_1s, kfState, KF::SRP_DYB_1S, obs.Sat); + addKFSatEMPStates(satOpts.srp_dyb_2c, kfState, KF::SRP_DYB_2C, obs.Sat); + addKFSatEMPStates(satOpts.srp_dyb_2s, kfState, KF::SRP_DYB_2S, obs.Sat); + addKFSatEMPStates(satOpts.srp_dyb_3c, kfState, KF::SRP_DYB_3C, obs.Sat); + addKFSatEMPStates(satOpts.srp_dyb_3s, kfState, KF::SRP_DYB_3S, obs.Sat); + addKFSatEMPStates(satOpts.srp_dyb_4c, kfState, KF::SRP_DYB_4C, obs.Sat); + addKFSatEMPStates(satOpts.srp_dyb_4s, kfState, KF::SRP_DYB_4S, obs.Sat); } } @@ -497,8 +523,8 @@ void pseudoRecDcb(COMMON_PSEUDO_ARGS) { E_FType ft1 = code2Freq [sys][code1]; E_FType ft2 = code2Freq [sys][code2]; - double lam1 = genericWavelength [sys][ft1]; - double lam2 = genericWavelength [sys][ft2]; + double lam1 = genericWavelength [ft1]; + double lam2 = genericWavelength [ft2]; if ( lam1 == 0 ||lam2 == 0) diff --git a/src/cpp/pea/ppp_user.cpp b/src/cpp/pea/ppp_user.cpp index 466da2eb3..f4c6b89ca 100644 --- a/src/cpp/pea/ppp_user.cpp +++ b/src/cpp/pea/ppp_user.cpp @@ -232,24 +232,16 @@ void udbias_ppp( } E_FType ifft = FTYPE_IF12; - E_FType ft1 = F1; - E_FType ft2 = F2; - - if ( obs.Sat.sys == +E_Sys::GAL - ||( obs.Sat.sys == +E_Sys::GPS - && acsConfig.ionoOpts.iflc_freqs == +E_LinearCombo::L1L5_ONLY)) - { + E_FType ft1; + E_FType ft2; + E_FType ft3; + if (!satFreqs(obs.Sat.sys,ft1,ft2,ft3)) + continue; + + if (ft1 == F1 + && ft2 == F5) ifft = FTYPE_IF15; - ft2 = F5; - } - - if (obs.Sat.sys == +E_Sys::GLO) - { - ft1 = G1; - ft2 = G2; - } - if ( (acsConfig.ionoOpts.corr_mode == +E_IonoMode::IONO_FREE_LINEAR_COMBO && ft != ifft) ||(acsConfig.ionoOpts.corr_mode != +E_IonoMode::IONO_FREE_LINEAR_COMBO && ft == ifft) ||(sig.L_corr_m == 0) @@ -462,21 +454,11 @@ E_Solution ppp_filter( SatStat& satStat = *(obs.satStat_ptr); SatSys sysSat = SatSys(sys); - E_FType ft1 = F1; - E_FType ft2 = F2; - - if ( obs.Sat.sys == +E_Sys::GAL - ||( obs.Sat.sys == +E_Sys::GPS - && acsConfig.ionoOpts.iflc_freqs == +E_LinearCombo::L1L5_ONLY)) - { - ft2 = F5; - } - - if (obs.Sat.sys == +E_Sys::GLO) - { - ft1 = G1; - ft2 = G2; - } + E_FType ft1; + E_FType ft2; + E_FType ft3; + if (!satFreqs(sys,ft1,ft2,ft3)) + continue; double ionfact = SQR(lam[ft1]) / (SQR(lam[ft1]) - SQR(lam[ft2])); @@ -589,30 +571,11 @@ E_Solution ppp_filter( if (acsConfig.ionoOpts.corr_mode == +E_IonoMode::IONO_FREE_LINEAR_COMBO) { - /*if ( ft != FTYPE_IF12 - &&ft != FTYPE_IF15) - { - continue; - } - - if ( (acsConfig.ionoOpts.iflc_freqs == E_LinearCombo::L1L2_ONLY && ft != FTYPE_IF12) - ||(acsConfig.ionoOpts.iflc_freqs == E_LinearCombo::L1L5_ONLY && ft != FTYPE_IF15)) - { - continue; - }*/ - - // Ken: It would be nice to be able to use both L1L2 and L1L5 combinations, but not if the correlation matrix cannot be introduced - if(sys == +E_Sys::GPS) - { - if(acsConfig.ionoOpts.iflc_freqs == +E_LinearCombo::L1L5_ONLY && ft != FTYPE_IF15) continue; - if(acsConfig.ionoOpts.iflc_freqs == +E_LinearCombo::L1L2_ONLY && ft != FTYPE_IF12) continue; - if(acsConfig.ionoOpts.iflc_freqs == +E_LinearCombo::ANY && ft != FTYPE_IF12) continue; // It would be nice to be able to use both L1L2 and L1L5 combinations, but not if the correlation matrix cannot be introduced - } - if(sys == +E_Sys::GLO && ft != FTYPE_IF12) continue; - if(sys == +E_Sys::GAL && ft != FTYPE_IF15) continue; - if(sys == +E_Sys::BDS && ft != FTYPE_IF12) continue; /* need to confirm this */ - if(sys == +E_Sys::QZS && ft != FTYPE_IF12) continue; - + if(ft != FTYPE_IF12 && ft != FTYPE_IF15) continue; + if(sys == +E_Sys::GLO && ft != FTYPE_IF12) continue; + if(sys == +E_Sys::GAL && ft != FTYPE_IF15) continue; + if(sys == +E_Sys::BDS && ft != FTYPE_IF12) continue; /* need to confirm this */ + if(sys == +E_Sys::QZS && ft != FTYPE_IF12) continue; } if (acsConfig.ionoOpts.corr_mode == +E_IonoMode::TOTAL_ELECTRON_CONTENT) @@ -1078,7 +1041,7 @@ void pppos( // satellite positions and clocks for (auto& obs : only(obsList)) - satPosClk(trace, obsList.front()->time, obs, nav, acsConfig.model.sat_pos.ephemeris_sources, acsConfig.model.sat_clock.ephemeris_sources, E_OffsetType::APC); + satPosClk(trace, obsList.front()->time, obs, nav, acsConfig.model.sat_pos.ephemeris_sources, acsConfig.model.sat_clock.ephemeris_sources, nullptr, E_OffsetType::APC); auto& pos = rec.pos; diff --git a/src/cpp/pea/ppppp.cpp b/src/cpp/pea/ppppp.cpp index 4f3236f8c..0bb35cf12 100644 --- a/src/cpp/pea/ppppp.cpp +++ b/src/cpp/pea/ppppp.cpp @@ -776,6 +776,8 @@ void PPP( biasPseudoObs(trace, kfState, kfMeasEntryList); ambgPseudoObs(trace, kfState, kfMeasEntryList); + initPseudoObs(trace, kfState, kfMeasEntryList); + //use state transition to initialise new state elements { Instrument instrument("PPP stateTransition2"); @@ -836,6 +838,9 @@ void PPP( // lambdacalcs(kfState); KFState kfStatefixed = kfState; + + kfStatefixed.suffix = "AR"; + PPP_AR(trace, kfStatefixed); for (auto& [recId, rec] : stationMap) @@ -851,7 +856,7 @@ void PPP( for (short i = 0; i < 3; i++) { - kfStatefixed.getKFValue({KF::ORBIT, {}, recId, i}, rec.sol.pppRRec[i]); + kfStatefixed.getKFValue({KF::ORBIT, {}, recId, i}, rec.sol.pppRRec[i]); //todo aaron, this is eci kfStatefixed.getKFValue({KF::ORBIT, {}, recId, i + 3}, rec.sol.pppVRec[i]); } diff --git a/src/cpp/pea/preprocessor.cpp b/src/cpp/pea/preprocessor.cpp index 05f686daa..4c28444d7 100644 --- a/src/cpp/pea/preprocessor.cpp +++ b/src/cpp/pea/preprocessor.cpp @@ -126,6 +126,7 @@ void recordSlips( } void preprocessor( + Network& net, Station& rec) { if (acsConfig.process_preprocessor == false) @@ -222,7 +223,7 @@ void preprocessor( outputObservations(trace, obsList); for (auto& obs : only(obsList)) - satPosClk(trace, rec.sol.time, obs, nav, acsConfig.model.sat_pos.ephemeris_sources, acsConfig.model.sat_clock.ephemeris_sources, E_OffsetType::APC); + satPosClk(trace, rec.sol.time, obs, nav, acsConfig.model.sat_pos.ephemeris_sources, acsConfig.model.sat_clock.ephemeris_sources, nullptr, E_OffsetType::APC); obsVariances(obsList); diff --git a/src/cpp/pea/preprocessor.hpp b/src/cpp/pea/preprocessor.hpp index 30cbf98bf..efd2af653 100644 --- a/src/cpp/pea/preprocessor.hpp +++ b/src/cpp/pea/preprocessor.hpp @@ -1,9 +1,11 @@ #pragma once +struct Network; struct Station; void preprocessor( + Network& net, Station& rec); void obsVariances( diff --git a/src/cpp/pea/spp.cpp b/src/cpp/pea/spp.cpp index b4b3e5c3e..c43178b02 100644 --- a/src/cpp/pea/spp.cpp +++ b/src/cpp/pea/spp.cpp @@ -55,29 +55,11 @@ bool prange( return false; } - E_FType f_1 = E_FType::FTYPE_NONE; + E_FType f_1; E_FType f_2; - - for (auto& code : acsConfig.code_priorities[sys]) - { - if (f_1 == E_FType::FTYPE_NONE) - { - f_1 = code2Freq[sys][code]; - continue; - } - E_FType ft = code2Freq[sys][code]; //todo aaron this reproduces something that happens in acsQC, store and reuse. - if (ft != f_1) - { - f_2 = ft; - break; - } - } - - if (acsConfig.ionoOpts.iflc_freqs==+E_LinearCombo::L1L5_ONLY) - { - f_1 = F1; - f_2 = F5; - } + E_FType f_3; + if (!satFreqs(sys,f_1,f_2,f_3)) + return false; if ( obs.Sigs[f_1].P == 0 || lam[f_1] == 0) diff --git a/src/cpp/rtklib/ionex.cpp b/src/cpp/rtklib/ionex.cpp index 3a0a94df6..a11292b5b 100644 --- a/src/cpp/rtklib/ionex.cpp +++ b/src/cpp/rtklib/ionex.cpp @@ -496,8 +496,7 @@ int interpTec( double& value, double& rms) { - // if (fdebug) - // fprintf(fdebug, "%s: k=%d posp=%.2f %.2f\n",__FUNCTION__, k, posp[0]*R2D, posp[1]*R2D); + tracepdeex(6,std::cout, "%s: k=%d posp=%.2f %.2f\n",__FUNCTION__, k, posp[0]*R2D, posp[1]*R2D); value = 0; rms = 0; @@ -544,7 +543,7 @@ int interpTec( rms = (1 - a) * (1 - b) * r[0] + a * (1 - b) * r[1] + (1 - a) * b * r[2] + a * b * r[3]; // if (fdebug) - // fprintf(fdebug, " gridpoints: %8.2f %8.2f %8.2f %8.2f -> %9.3f\n", d[0], d[1], d[2], d[3], value); + tracepdeex(6,std::cout, " gridpoints: %8.2f %8.2f %8.2f %8.2f -> %9.3f\n", d[0], d[1], d[2], d[3], value); } /* nearest-neighbour extrapolation (outside of grid) */ else if (a <= 0.5 && b <= 0.5 && d[0] > 0) { value = d[0]; rms = r[0]; } @@ -612,13 +611,12 @@ bool ionDelay( if (interpTec(tec, i, posp, vtec, rms) == false) return false; - const double fact = 40.30E16 / FREQ1 / FREQ1; /* tecu->L1 iono (m) */ + const double fact = TEC_CONSTANT / SQR(FREQ1); /* tecu->L1 iono (m) */ delay += fact * fs * vtec; var += SQR(fact * fs * rms); } - // if (fdebug) - // fprintf(fdebug, "%s: delay=%7.2f std=%6.2f\n",__FUNCTION__, delay, sqrt(var)); + tracepdeex(6,std::cout, "%s: delay=%7.2f std=%6.2f\n",__FUNCTION__, delay, sqrt(var)); return true; } diff --git a/src/cpp/slr/slrObs.cpp b/src/cpp/slr/slrObs.cpp index f6e650766..a2d2bbc9b 100644 --- a/src/cpp/slr/slrObs.cpp +++ b/src/cpp/slr/slrObs.cpp @@ -158,8 +158,9 @@ string ilrsIdToCosparId( int YY = stoi(YYXXXAA.substr(0,2)); int XXX = stoi(YYXXXAA.substr(2,3)); int AA = stoi(YYXXXAA.substr(5,2)); - int YYYY = YY; - nearestYear(YYYY); + double year = YY; + nearestYear(year); + int YYYY = (int)year; if (AA > 26) BOOST_LOG_TRIVIAL(error) << "Error converting IlrsId to CosparId - AA = " << AA; char A = 'A' + AA - 1; @@ -189,17 +190,17 @@ int cosparIdToIlrsId( * Assumes session duration is <24hrs */ GTime sessionSod2Time( - double eventSod, ///< Seconds-of-day of the event - double startSessionSod, ///< Seconds-of-day of the start of the session (which encompasses the event) - GTime startSessionMidnight) ///< Midnight of the date that the session starts + double eventSod, ///< Seconds-of-day of the event in UTC time + GTime startSession) ///< session start time { - GTime recordTime = startSessionMidnight + eventSod; - if (round(eventSod) < startSessionSod) // Event falls on the following day (e.g. if eventSod was 00:01 and startSessionSod was 23:55) - recordTime = recordTime + S_IN_DAY; - - UtcTime utcTime; - utcTime.bigTime = recordTime.bigTime; //todo aaron ew, is this something tricky, if so needs a comment - recordTime = utcTime; + UYds startYds = startSession; + + double delta = eventSod - startYds.sod; + + if (delta > +secondsInDay / 2) delta -= secondsInDay; + if (delta < -secondsInDay / 2) delta += secondsInDay; + + GTime recordTime = startSession + delta; return recordTime; } @@ -263,7 +264,7 @@ void readCrd( if (crdSession.h4.data_qual_alert_ind != 0) obsHeader.excludeAlert = true; - GEpoch startEp = + double startEp[6] = { crdSession.h4.start_year, crdSession.h4.start_mon, @@ -273,7 +274,7 @@ void readCrd( crdSession.h4.start_sec }; - GEpoch endEp = + double endEp[6] = { crdSession.h4.end_year, crdSession.h4.end_mon, @@ -283,35 +284,23 @@ void readCrd( crdSession.h4.end_sec }; - GTime startSession = startEp; - GTime endSession = endEp; + GTime startSession = epoch2time(startEp, E_TimeSys::UTC); + GTime endSession = epoch2time(endEp, E_TimeSys::UTC); double sessionLength = (endSession - startSession).to_double(); - if (sessionLength > S_IN_DAY) - BOOST_LOG_TRIVIAL(error) << "Error: CRD session spans more than 24hrs"; - - UYds startYds = startSession; - double startSessionSod = startYds[2]; - GEpoch startSessionMidnight = // 00:00 of day that session starts - { - crdSession.h4.start_year, - crdSession.h4.start_mon, - crdSession.h4.start_day, - 0, - 0, - 0 - }; + if (sessionLength > S_IN_DAY/2) + BOOST_LOG_TRIVIAL(error) << "Error: CRD session spans more than 12hrs"; for (auto& record : crdSession.d11) { LObs obs = obsHeader; // copy over header info - GTime obsTime = sessionSod2Time(record.sec_of_day, startSessionSod, startSessionMidnight); + GTime obsTime = sessionSod2Time(record.sec_of_day, startSession); // Find closest weather data entry double minDeltaSec = S_IN_DAY; for (auto& weather : crdSession.d20) { - GTime weatherTime = sessionSod2Time(weather.sec_of_day, startSessionSod, startSessionMidnight); + GTime weatherTime = sessionSod2Time(weather.sec_of_day, startSession); double deltaSec = fabs((obsTime - weatherTime).to_double()); if (deltaSec < minDeltaSec) diff --git a/src/doc_templates/Doxyfile.in b/src/doc_templates/Doxyfile.in index 305524c19..788e158d1 100644 --- a/src/doc_templates/Doxyfile.in +++ b/src/doc_templates/Doxyfile.in @@ -940,7 +940,7 @@ EXCLUDE_SYMBOLS = # that contain example code fragments that are included (see the \include # command). -EXAMPLE_PATH = ../../examples +EXAMPLE_PATH = ../../exampleConfigs # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and