pelorus 0.1.0

A high-performance GPS map-matching library for geospatial road network processing
Documentation
/// Calculates transition probability between consecutive candidates.
/// Uses exponential distribution: (1/β) * e^(-|difference|/β)
///
/// # Arguments
/// * `great_circle` - Direct distance between GPS points in meters
/// * `route` - Actual route distance via road network in meters
/// * `beta` - Parameter controlling the exponential distribution
///
/// # Returns
/// * Probability value between 0 and 1
pub fn transition_probability(great_circle: f64, route: f64, beta: f64) -> f64 {
    // Return 0.0 for route distances > great_circle + 2000m
    if route > great_circle + 2000.0 {
        return 0.0;
    }

    let difference = (route - great_circle).abs();
    (1.0 / beta) * (-difference / beta).exp()
}