From 762c2fc9f4cc6446752469a9d8477416001c0c03 Mon Sep 17 00:00:00 2001 From: Niklas Kapelle Date: Tue, 10 Feb 2026 12:36:54 +0100 Subject: [PATCH] added convert to gaus function --- src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 73b8c9e..0487443 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -168,6 +168,13 @@ pub struct MagneticMessurement { pub z: f32, } +impl MagneticMessurement { + /// Convert the µT from the measurement to Gaus. It's just x0.01. + pub fn convert_micro_tesla_to_gaus(tesla: f32) -> f32 { + tesla * 0.01 + } +} + /// At what rate to output data pub enum DataRate { Unset,