Skip to content

Commit

Permalink
Merge pull request #151 from IPGP/ps_rnx2_gzip_01a
Browse files Browse the repository at this point in the history
raw2rinex: handle gzip compression for RNX2
  • Loading branch information
beaudu authored May 5, 2024
2 parents 51a798b + 5bf6c47 commit 935c541
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions CODE/shells/raw2rinex
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@
#
# **** Updates
# ** 2023-08-07 Pierre Sakic
# - Handle the RINEX3 at it is
# - Handle the RINEX3 as it is
# (no downgrade to RNX2, but no modification of the header either)
# ** 2024-05-05 Pierre Sakic
# - Handle gzip compression for RINEX2
# (NB: RINEX3 are always gzipped by design)
#

### comment the variable to disable the verbose mode
Expand Down Expand Up @@ -108,12 +111,12 @@ if [ ! -z "$rf" ]; then
fi

# --- try RINEX2 Hatanaka files
rf=$(find $tmpdir -name "*.??d.Z" -o -name "*.??d" | sort )
rf=$(find $tmpdir -name "*.??d.Z" -o -name "*.??d.gz" -o -name "*.??d" | sort )
if [ ! -z "$rf" ]; then
echo " Found some RINEX2 Hatanaka files in $rawdir: proceeding..."
# must convert ??d to ??o
for f in $rf; do
if [[ $f == *".Z" ]]; then
if [[ $f == *".Z" ]] || [[ $f == *".gz" ]]; then
gunzip -f $f
f=${f%.*}
fi
Expand Down

0 comments on commit 935c541

Please sign in to comment.