Skip to content

Commit e47d514

Browse files
authored
Merge pull request #1 from rtk-rs/sources
Move sources
2 parents c29d798 + 48f0c58 commit e47d514

25 files changed

+2419
-8
lines changed

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: cargo
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "12:00"
8+
open-pull-requests-limit: 10

.github/workflows/daily.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Daily
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 0 * * *" # midnight, every day
7+
8+
env:
9+
RUST_BACKTRACE: 1
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
build:
14+
name: Build
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: true
18+
matrix:
19+
include:
20+
- name: Default build
21+
opts: -r
22+
- name: All Features
23+
opts: --all-features
24+
25+
steps:
26+
- uses: actions/checkout@v3
27+
- uses: actions-rs/toolchain@v1
28+
name: Install Rust
29+
with:
30+
toolchain: stable
31+
override: true
32+
- name: Install Dependencies
33+
run: |
34+
sudo apt-get update
35+
36+
- name: ${{ matrix.name }}
37+
run: |
38+
cargo clean && cargo update && cargo build ${{ matrix.opts }}
39+
40+
tests:
41+
name: Tests
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v3
45+
- uses: actions-rs/toolchain@v1
46+
name: Install Rust
47+
with:
48+
toolchain: stable
49+
override: true
50+
- name: Install Dependencies
51+
run: |
52+
sudo apt-get update
53+
- uses: actions-rs/cargo@v1
54+
name: Test (all features)
55+
with:
56+
command: test
57+
args: --all-features

.github/workflows/release.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
publish_crates:
13+
name: Release
14+
runs-on: ubuntu-latest
15+
continue-on-error: true
16+
if: github.ref_type == 'tag'
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
- name: Install stable
21+
uses: actions-rs/toolchain@v1
22+
with:
23+
toolchain: stable
24+
- name: Publish
25+
env:
26+
TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
27+
run: |
28+
cargo login $TOKEN
29+
cargo publish --allow-dirty
30+
31+
build:
32+
steps:
33+
- name: Checkout repository
34+
uses: actions/checkout@v4
35+
36+
- name: Determine archive name
37+
shell: bash
38+
run: |
39+
echo "ARCHIVE=sinex-${{ github.ref_name }}" >> $GITHUB_ENV
40+
41+
- name: Creating directory for archive
42+
shell: bash
43+
run: |
44+
mkdir -p "$ARCHIVE"
45+
cp {README.md,LICENSE} "$ARCHIVE"
46+
47+
- name: Gzip archive (Unix)
48+
shell: bash
49+
run: |
50+
tar czf "$ARCHIVE.tar.gz" "$ARCHIVE"
51+
shasum -a 256 "$ARCHIVE.tar.gz" > "$ARCHIVE.tar.gz.sha256"
52+
echo "ASSET=$ARCHIVE.tar.gz" >> $GITHUB_ENV
53+
echo "ASSET_SUM=$ARCHIVE.tar.gz.sha256" >> $GITHUB_ENV
54+
55+
- name: Upload artifacts
56+
uses: actions/upload-artifact@v3
57+
with:
58+
name: ${{ env.ASSET }}
59+
path: |
60+
${{ env.ASSET }}
61+
62+
- name: Upload artifacts (cksum)
63+
uses: actions/upload-artifact@v3
64+
with:
65+
name: ${{ env.ASSET_SUM }}
66+
path: |
67+
${{ env.ASSET_SUM }}
68+
69+
release:
70+
runs-on: ubuntu-latest
71+
needs: ['build']
72+
# continue even though we failed to download or upload one
73+
# or more artefacts
74+
continue-on-error: true
75+
steps:
76+
- name: Create Release
77+
id: create_release
78+
env:
79+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80+
uses: actions/create-release@v1
81+
with:
82+
draft: true
83+
tag_name: ${{ github.ref_name }}
84+
release_name: ${{ github.ref_name }}
85+
86+
- name: Download Artifact
87+
uses: actions/download-artifact@v3
88+
with:
89+
name: sinex-${{ github.ref_name }}
90+
91+
- name: Upload asset
92+
uses: actions/upload-release-asset@v1
93+
env:
94+
GITHUB_TOKEN: ${{ github.token }}
95+
with:
96+
upload_url: ${{ steps.create_release.outputs.upload_url }}
97+
asset_path: sinex-${{ github.ref_name }}
98+
asset_name: sinex-${{ github.ref_name }}
99+
asset_content_type: application/gzip

.github/workflows/rust.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
tags:
7+
- "*"
8+
pull_request:
9+
branches: [ "main" ]
10+
11+
env:
12+
CARGO_TERM_COLOR: always
13+
14+
jobs:
15+
build:
16+
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v3
21+
- name: Build
22+
run: cargo build
23+
- name: Build
24+
run: cargo build --all-features
25+
- name: Run tests
26+
run: cargo test --all-features
27+
- name: Coding style
28+
run: cargo fmt --all -- --check
29+
- name: Documentation
30+
run: cargo doc --all-features

.gitignore

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ Cargo.lock
1313
# MSVC Windows builds of rustc generate these, which store debugging information
1414
*.pdb
1515

16-
# RustRover
17-
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
18-
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
19-
# and can be added to the global gitignore or merged into this file. For a more nuclear
20-
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
21-
#.idea/
16+
data/
17+
*.swo
18+
*.swp

Cargo.toml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[package]
2+
name = "sinex"
3+
version = "0.2.4"
4+
license = "MPL-2.0"
5+
authors = ["Guillaume W. Bres <[email protected]>"]
6+
description = "SINEX format parser"
7+
homepage = "https://github.com/rtk-rs"
8+
repository = "https://github.com/rtk-rs/sinex"
9+
keywords = ["geo", "gnss", "gps"]
10+
categories = ["science", "science::geo", "parsing"]
11+
edition = "2021"
12+
readme = "README.md"
13+
14+
[features]
15+
16+
[build-dependencies]
17+
18+
[dependencies]
19+
chrono = "0.4"
20+
thiserror = "1"
21+
strum_macros = "0.26"
22+
strum = { version = "0.26", features = ["derive"] }
23+
gnss-rs = { version = "2.3.1", features = ["serde"] }

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,20 @@
1-
# sinex
2-
SINEX (Bias Solutions) format parser
1+
SINEX
2+
=====
3+
4+
[![Rust](https://github.com/rtk-rs/sinex/actions/workflows/rust.yml/badge.svg)](https://github.com/rtk-rs/sinex/actions/workflows/rust.yml)
5+
[![Rust](https://github.com/rtk-rs/sinex/actions/workflows/daily.yml/badge.svg)](https://github.com/rtk-rs/sinex/actions/workflows/daily.yml) [![crates.io](https://img.shields.io/crates/v/sinex.svg)](https://crates.io/crates/sinex)
6+
[![crates.io](https://docs.rs/sinex/badge.svg)](https://docs.rs/sinex/badge.svg)
7+
8+
[![License](https://img.shields.io/badge/license-MPL_2.0-orange?style=for-the-badge&logo=mozilla)](https://github.com/rtk-rs/sinex/blob/main/LICENSE)
9+
10+
SINEX is an open source format to describe Bias Solutions, needed in a high precision PPP geodetic pipeline.
11+
12+
This library provides a parser for this very format.
13+
14+
Behavior:
15+
16+
* this parser does not care about file naming conventions
17+
* the parser expects proper Header and SINEX structures
18+
* the parser only cares about the Header position
19+
* the parser does not care about the Description / Solution order
20+
* the parse does not care about the Description fields order, as specified by standards

data/BIA/V1/example-1a.bia

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
%=BIA 1.00 COD 2016:327:30548 IGS 2016:296:00000 2016:333:00000 A 00000194
2+
*-------------------------------------------------------------------------------
3+
* Bias Solution INdependent EXchange Format (Bias-SINEX)
4+
*-------------------------------------------------------------------------------
5+
* CODE’S 30-DAY BIAS SOLUTION (OBSERVED UNTIL 2016:325) 22-NOV-16 08:28
6+
*-------------------------------------------------------------------------------
7+
+FILE/REFERENCE
8+
*INFO_TYPE_________ INFO________________________________________________________
9+
DESCRIPTION CODE, Astronomical Institute, University of Bern
10+
OUTPUT CODE IGS 30-day bias solution for G/R satellites
11+
12+
SOFTWARE Bernese GNSS Software Version 5.3
13+
HARDWARE UBELIX: Linux, x86_64
14+
INPUT CODE IGS 1-day final and rapid bias solutions for G/R
15+
-FILE/REFERENCE
16+
*-------------------------------------------------------------------------------
17+
+FILE/COMMENT
18+
*PRODUCT_REFERENCE______________________________________________________________
19+
CODE final product series for the IGS.
20+
Published by Astronomical Institute, University of Bern.
21+
URL: http://www.aiub.unibe.ch/download/CODE
22+
DOI: 10.7892/boris.75876
23+
-FILE/COMMENT
24+
*-------------------------------------------------------------------------------
25+
+INPUT/ACKNOWLEDGMENTS
26+
*AGY DESCRIPTION________________________________________________________________
27+
COD Center for Orbit Determination in Europe, AIUB, Switzerland
28+
IGS International GNSS Service
29+
-INPUT/ACKNOWLEDGMENTS
30+
*-------------------------------------------------------------------------------
31+
+BIAS/DESCRIPTION
32+
*KEYWORD________________________________ VALUE(S)_______________________________
33+
OBSERVATION_SAMPLING 300
34+
PARAMETER_SPACING 86400
35+
DETERMINATION_METHOD COMBINED_ANALYSIS
36+
BIAS_MODE ABSOLUTE
37+
TIME_SYSTEM G
38+
SATELLITE_CLOCK_REFERENCE_OBSERVABLES G C1W C2W
39+
SATELLITE_CLOCK_REFERENCE_OBSERVABLES R C1P C2P
40+
-BIAS/DESCRIPTION
41+
*-------------------------------------------------------------------------------
42+
+BIAS/SOLUTION
43+
*BIAS SVN_ PRN STATION__ OBS1 OBS2 BIAS_START____ BIAS_END______ UNIT __ESTIMATED_VALUE____ _STD_DEV___ __ESTIMATED_SLOPE____ _STD_DEV___
44+
OSB G063 G01 C1C 2016:296:00000 2016:333:00000 ns 10.2472 0.0062
45+
OSB G063 G01 C1W 2016:296:00000 2016:333:00000 ns 11.6848 0.0052
46+
OSB G063 G01 C2C 2016:296:00000 2016:333:00000 ns 10.4707 0.0218
47+
OSB G063 G01 C2W 2016:296:00000 2016:333:00000 ns 19.2442 0.0066
48+
OSB G061 G02 C1C 2016:296:00000 2016:333:00000 ns -12.8012 0.0063
49+
OSB G061 G02 C1W 2016:296:00000 2016:333:00000 ns -14.0674 0.0052
50+
OSB G061 G02 C2W 2016:296:00000 2016:333:00000 ns -23.1682 0.0067
51+
OSB G069 G03 C1C 2016:296:00000 2016:333:00000 ns 6.6195 0.0062
52+
OSB G069 G03 C1W 2016:296:00000 2016:333:00000 ns 7.9813 0.0052
53+
OSB G069 G03 C2C 2016:296:00000 2016:333:00000 ns 6.8733 0.0216
54+
OSB G069 G03 C2W 2016:296:00000 2016:333:00000 ns 13.1448 0.0066
55+
...
56+
OSB G064 G30 C1C 2016:296:00000 2016:333:00000 ns 10.2746 0.0062
57+
OSB G064 G30 C1W 2016:296:00000 2016:333:00000 ns 9.8828 0.0051
58+
OSB G064 G30 C2C 2016:296:00000 2016:333:00000 ns 9.9357 0.0226
59+
OSB G064 G30 C2W 2016:296:00000 2016:333:00000 ns 16.2764 0.0065
60+
OSB G052 G31 C1C 2016:296:00000 2016:333:00000 ns -8.0699 0.0063
61+
OSB G052 G31 C1W 2016:296:00000 2016:333:00000 ns -7.1540 0.0052
62+
OSB G052 G31 C2C 2016:296:00000 2016:305:00000 ns -19.1332 0.0598
63+
OSB G052 G31 C2W 2016:296:00000 2016:333:00000 ns -11.7822 0.0067
64+
OSB G070 G32 C1C 2016:296:00000 2016:333:00000 ns 5.3363 0.0063
65+
OSB G070 G32 C1W 2016:296:00000 2016:333:00000 ns 6.8952 0.0052
66+
OSB G070 G32 C2C 2016:296:00000 2016:333:00000 ns 4.9872 0.0246
67+
OSB G070 G32 C2W 2016:296:00000 2016:333:00000 ns 11.3560 0.0066
68+
OSB R730 R01 C1C 2016:296:00000 2016:333:00000 ns 8.9156 0.0071
69+
OSB R730 R01 C1P 2016:296:00000 2016:333:00000 ns 9.0864 0.0055
70+
OSB R730 R01 C2P 2016:296:00000 2016:333:00000 ns 15.0203 0.0074
71+
OSB R747 R02 C1C 2016:296:00000 2016:333:00000 ns -0.0239 0.0070
72+
OSB R747 R02 C1P 2016:296:00000 2016:333:00000 ns 0.8287 0.0055
73+
OSB R747 R02 C2P 2016:296:00000 2016:333:00000 ns 1.3699 0.0073
74+
OSB R744 R03 C1C 2016:296:00000 2016:333:00000 ns -4.1631 0.0070
75+
OSB R744 R03 C1P 2016:296:00000 2016:333:00000 ns -5.5382 0.0055
76+
OSB R744 R03 C2P 2016:296:00000 2016:333:00000 ns -9.1550 0.0073
77+
...
78+
OSB R802 R09 C1C 2016:296:00000 2016:312:00000 ns -5.8091 0.0085
79+
OSB R802 R09 C1C 2016:323:00000 2016:333:00000 ns -5.5794 0.0556
80+
OSB R802 R09 C1P 2016:296:00000 2016:312:00000 ns -4.2120 0.0063
81+
OSB R802 R09 C1P 2016:323:00000 2016:333:00000 ns -5.0339 0.0291
82+
OSB R802 R09 C2P 2016:296:00000 2016:312:00000 ns -6.9627 0.0089
83+
OSB R802 R09 C2P 2016:323:00000 2016:333:00000 ns -8.3213 0.0478
84+
...
85+
OSB R731 R22 C1C 2016:296:00000 2016:333:00000 ns 1.1425 0.0070
86+
OSB R731 R22 C1P 2016:296:00000 2016:333:00000 ns 1.3014 0.0055
87+
OSB R731 R22 C2P 2016:296:00000 2016:333:00000 ns 2.1513 0.0073
88+
OSB R732 R23 C1C 2016:296:00000 2016:333:00000 ns 12.8989 0.0070
89+
OSB R732 R23 C1P 2016:296:00000 2016:333:00000 ns 11.4900 0.0055
90+
OSB R732 R23 C2P 2016:296:00000 2016:333:00000 ns 18.9937 0.0073
91+
OSB R735 R24 C1C 2016:296:00000 2016:333:00000 ns -7.5262 0.0072
92+
OSB R735 R24 C1P 2016:296:00000 2016:333:00000 ns -8.2674 0.0056
93+
OSB R735 R24 C2C 2016:296:00000 2016:323:00000 ns 4.5014 0.2309
94+
OSB R735 R24 C2P 2016:296:00000 2016:333:00000 ns -13.6665 0.0075
95+
OSB R801 R26 C1P 2016:296:00000 2016:333:00000 ns -0.2722 0.0158
96+
OSB R801 R26 C2P 2016:296:00000 2016:333:00000 ns -0.4500 0.0256
97+
-BIAS/SOLUTION
98+
%=ENDBIA

0 commit comments

Comments
 (0)