nav-types 0.4.1

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
extern crate nav_types;

use nav_types::{ENU, WGS84};

fn main() {
    // We start with the position of our "vehicle"
    let pos_a = WGS84::new(36.12, -86.67, 0.0);
    // Next we have the vector from the "vehicle" to the desired object,
    // it is assumed that the vector is rotated into proper ENU or NED
    // format
    let vec = ENU::new(10.0, 11.0, 0.0);

    // We then calculate the position of our mystery object
    let object = pos_a + vec;

    println!("Position of object is: {:?}", object);
}