Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing rinex-cli -m -h help and incorrect merging example in wiki #247

Open
Raviu56 opened this issue May 25, 2024 · 2 comments
Open

Comments

@Raviu56
Copy link

Raviu56 commented May 25, 2024

Hi,
Running rinex-cli -m -h produces confusing help;
How may I pass the input files to be merged?
Does it support many files to be merged together?
What is the correct order of -f -m -d ?
On rnx.gz Navigation files, how may I Filters out all IRNSS vehicles or so? -I does not work?

The example in wiki https://github.com/georust/rinex/wiki/file-merging

rinex-cli \
   -f test_resources/CRNX/V3/ESBC00DNK_R_20201770000_01D_30S_MO.crx.gz \ 
   -m test_resources/CRNX/V3/MOJN00DNK_R_20201770000_01D_30S_MO.crx.gz \
   -o test.rnx.crx

[INFO rinex_cli] "WORKSPACE/ESBC00DNK_R_20201770000_01D_30S_MO/test.rnx.crx" has been generated

Does not work error: unexpected argument '-o' found wherever I put -o

@gwbres
Copy link
Collaborator

gwbres commented May 26, 2024

Hello,

First off, thank you for reporting your usecase! that's the only way for us to improve our tools.
Being currently focused on the surveying mode (-p), it's not surprizing other modes could use an update.

Running rinex-cli -m -h produces confusing help;

I have learned recently how to provide more thorough and detailed Help by the command line directly.

The latest pr #248 provides more details on how to use -m, it will enable rinex-cli -m --help.
rinex-cli -h will always let you know such information exists.
We use --help to provide examples from the Wiki that users can directly copy/paste to get started.

How may I pass the input files to be merged?
[...] What is the correct order of -f -m -d ?

The command line is -f to load File (A) and -m to load File (B) to be merged into (A).

Flags or options that are related to one opmode, for example --ffu for -m, need to come after the opmode (so -m _then -ffu).

Any other flag, must come before the opmode, otherwise it is interpretated as a flag belonging to that operation
(so -f before -m).

This is how the Rust::Cli (clap) library behaves, not particularly intuitive at first, but we try to explain that thoroughly in the wiki.
In the newest File Merge Wiki, I give

  • one example where we also process the data with -P , demonstrating that any preprocessor can still apply
  • one example with filenaming customization, demonstrating how opmode related arguments are applied

Does it support many files to be merged together?

In theory it should, but in practice, never been tested and I just gave it a quick shot and was unable to generate the correct results. So until then, its better for Wiki page to clearly say we do not support it.

This will be unlocked when we have examples where working with more than 24h time frames and other more advanced or exotic use cases

On rnx.gz Navigation files, how may I Filters out all IRNSS vehicles or so? -I does not work?

We have barely used IRNSS so it's not surprizing we experience issues.

Note that -I is here to reproduce TEQC like arguments, in our toolbox another option to produce similar behavior
would be -P "!=IRNSS". But if one does not work, there's no reason the other does.

I have verified that -I does filter out IRNSS vehicles from Observation RINEX files. test_resources/CRNX/V3/{MOJDNK,ESBCDNK} are the only two files we have that contain this constellation.

I have looked into the code for Navigation RINEX processing and I don't see any reasons why it would not apply correctly.

But I don't have Navigation RINEX files that have contain IRNSS ephemerides, so cannot really confirm that.
If you can share one of your data files, I can test it on my side, make sure it does work

@Raviu56
Copy link
Author

Raviu56 commented May 27, 2024

Thanks @gwbres , actually I've already switched to another tool - mentioned below - but got back here due to you careful/verbose/helpful reply, keep moving forward :)
Thanks for updating wiki it's much more clearer now
For -I I was not putting it in the right position, now I know how, like this for example - it may help some one -;
rinex-cli -f ./BRDC00IGS_R_20241440000_01D_MN.rnx.gz -J -S -I -m ./BRDM00DLR_S_20241440000_01D_MN.rnx.gz

You can use this command to get a 2 NAV rnx which contain everything including IRNSS

wget --ftp-user=anonymous --ftp-password='anonymous@' ftps://gdc.cddis.eosdis.nasa.gov/gnss/data/daily/2024/brdc/{BRDM00DLR_S,BRDC00IGS_R}_20241440000_01D_MN.rnx.gz

But here are the issues I'm having now - assuming you're testing with same files and example above-:

  1. rinex-cli does not print out or allow output file name, which would need some extra work to find the WORKSPACE/ folder, which may already exist causing more confusion.
  2. Output file seems invalid, try loading it with goerinex python module for example
import georinex
georinex.load('WORKSPACE/BRDC00IGS_R_20241440000_01D_MN/BRDM00DLR_S_20241440000_01D_MN.rnx.gz')

You would get similar error to:
ValueError: System E NAV data is not the same length as the number of fields.
3. Merging same file with the go based ringo tool - not open source - as explained here https://terras.gsi.go.jp/software/ringo/en/document/

ringo merge --sort --deepMerge --exclSat 'JSI' ./BRDC00IGS_R_20241440000_01D_MN.rnx.gz ./BRDM00DLR_S_20241440000_01D_MN.rnx.gz | gzip > ./merged.rnx.gz

Seems faster, and actually valid can be loaded successfully.
It also can nice options like --sort --deepMerge which would be so nice if rinex-cli has
4. Actually the missing feature that makes me switch to ringo is that it can merge too many files - up to ~128 - on a single command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants