pub fn calculate_pseudodecibel_velocity(
    historical_pdb: Vec<f64>
) -> Result<f64, Error>
Expand description

Calculates the rate of change across a vector of dB measurements by determining the slope of the line of best fit using least squares regression. Return is technically dB(f64)/t where t is the unit of time used in the vector. Returns error if integer overflows.

Note: This is the linear velocity (not the logarithmic velocity), but it is a useful abstraction for monitoring real-world signal changes.

Intended to be used for RSSI Values, ranging from -128 to -1.