15#include <Adafruit_MMC56x3.h>
16#include "../../Utils/Filter/MinFilter.h"
17#include "../../Utils/Filter/RunningAverageFilter.h"
18#include "../../Utils/Math/Vector2D.h"
19#include "../../Utils/Math/Vector3D.h"
20#include "../../Utils/Time/TimeStep.h"
31 static Adafruit_MMC5603
mag;
50 static bool Initialize(uint8_t address = MMC56X3_DEFAULT_ADDRESS);
A class for managing the Adafruit MMC56x3 magnetometer sensor.
static Vector3D EstimateMagnetPosition()
Estimates the position of a detected magnet.
static float minimum
Minimum threshold for detection.
static MinFilter< 10 > minF
Minimum filter for noise reduction.
static Vector3D GetMagneticField()
Retrieves the current magnetic field vector.
static RunningAverageFilter< 10 > xFilter
Filter for the X-axis magnetic field data.
static bool Initialize(uint8_t address=MMC56X3_DEFAULT_ADDRESS)
Initializes the MMC56x3 sensor.
static TimeStep timeStepCal
Time utility for calibration intervals.
static TimeStep timeStep
Time utility for regular updates.
static sensors_event_t magEvent
Sensor event data for magnetic field measurements.
static Adafruit_MMC5603 mag
Instance of the Adafruit MMC5603 sensor.
static float GetMagnitude()
Calculates the magnitude of the magnetic field.
static float IsDetected()
Checks if a magnet is detected.
static RunningAverageFilter< 10 > yFilter
Filter for the Y-axis magnetic field data.
static bool didBegin
Flag indicating if the sensor has been initialized.
static void Update()
Updates the magnetic field data from the sensor.
static RunningAverageFilter< 10 > zFilter
Filter for the Z-axis magnetic field data.
static Vector3D magneticField
Processed magnetic field vector.
Implements a minimum filter over a sliding window.
Smooths data values using a weighted running average.
Provides a mechanism to trigger actions at a specified frequency.
Represents a 3D vector (X, Y, Z) and provides methods for vector arithmetic.