Skip to content

Commit

Permalink
add readme
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume W. Bres <guillaume.bressaix@gmail.com>
  • Loading branch information
gwbres committed Nov 13, 2023
1 parent d644314 commit 4da2659
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
38 changes: 38 additions & 0 deletions cggtts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
CGGTTS
======

Rust library to parse and generate CGGTTS data.

[![crates.io](https://img.shields.io/crates/v/cggtts.svg)](https://crates.io/crates/cggtts)
[![Rust](https://github.com/gwbres/cggtts/actions/workflows/rust.yml/badge.svg)](https://github.com/gwbres/cggtts/actions/workflows/rust.yml)
[![crates.io](https://docs.rs/cggtts/badge.svg)](https://docs.rs/cggtts/badge.svg)
[![crates.io](https://img.shields.io/crates/d/cggtts.svg)](https://crates.io/crates/cggtts)

CGGTTS is a file format to describe a local clock behavior against a single or the combination of clocks embedded in Satellite Vehicles (SV).
Exchanging CGGTTS files enables so called "Common View" Time Transfer.

CGGTTS is specified by the Bureau International des Poids & des Mesures (BIPM):
[CGGTTS 2E specifications](https://www.bipm.org/documents/20126/52718503/G1-2015.pdf/f49995a3-970b-a6a5-9124-cc0568f85450)

This library only supports revision **2E**, and will _reject_ other revisions.

## Getting started

Add "cggtts" to your Cargo.toml

```toml
cggtts = "4"
```

Use CGGTTS to parse local files

```rust
use cggtts::prelude::CGGTTS;

let cggtts = CGGTTS::from_file("../data/dual/GZGTR560.258");
assert!(cggtts.is_ok());

let cggtts = cggtts.unwrap();
assert_eq!(cggtts.station, "LAB");
assert_eq!(cggtts.tracks.len(), 2097);
```
2 changes: 1 addition & 1 deletion cggtts/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![doc = include_str!("../../README.md")]
#![doc = include_str!("../README.md")]
#![cfg_attr(docrs, feature(doc_cfg))]
//! CGGTTS is the core structure, it comprises
//! the list of tracks (measurements) and some header information.
Expand Down

0 comments on commit 4da2659

Please sign in to comment.