Skip to content

Latest commit

 

History

History
60 lines (41 loc) · 1 KB

File metadata and controls

60 lines (41 loc) · 1 KB

AZPOS Rust Implementation

Rust implementation of the azpos library for azimuthal position calculations.

Installation

cargo build

Usage

use azpos::{calculate_position, PositionInput};

fn main() {
    let input = PositionInput {
        latitude: 40.7128,
        longitude: -74.0060,
        azimuth: 45.0,
        distance: 1000.0,
    };
    
    let result = calculate_position(input);
    println!("Result: {:.6}, {:.6}", result.latitude, result.longitude);
}

Development

# Build
cargo build

# Run tests
cargo test

# Run tests with output
cargo test -- --nocapture

# Build documentation
cargo doc

# Format code
cargo fmt

# Lint
cargo clippy

# Release build
cargo build --release

Testing

This implementation uses the shared test vectors from ../test-vectors/positions.json to ensure consistency with other language implementations.

Crates.io Publication

This library can be published to crates.io for easy distribution and consumption in Rust projects.