pub fn wrap_latitude<T>(latitude: T) -> TExpand description
Wrap latitude to the range -90 to 90 degrees
This function is generic and can be used with any type that implements the necessary traits. This function is useful for ensuring that latitude values remain within the valid range for WGS84 coordinates. Keep in mind that the local level frame (NED/ENU) is typically used for navigation and positioning in middling latitudes.
§Arguments
latitude- The latitude to be wrapped, which can be of any type that implements the necessary traits.
§Returns
- The wrapped latitude, which will be in the range -90 to 90 degrees.
§Example
use strapdown::wrap_latitude;
let latitude = 95.0; // degrees
let wrapped_latitude = wrap_latitude(latitude);
assert_eq!(wrapped_latitude, -85.0); // 95 degrees wrapped to -85 degrees