nav-types 0.5.0

Easily work with global positions and vectors
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
extern crate nav_types;

use nav_types::{ECEF, WGS84};

fn main() {
    // We start with a position given in latitude, longitude and altitude
    let position = WGS84::from_degrees_and_meters(36.12, -86.67, 0.0);

    // This can then easily be converted into ECEF by changing the type
    let ecef = ECEF::from(position);

    // NOTE: To do the same as Gade we could do:
    // `ECEF::from(NVector::from(position)`, however all types in
    // this library can be converted from one another and so this is
    // not strictly necessary

    println!("Position: {:?} in ECEF: {:?}", position, ecef);
}