magnetometeraccelerometer
The magnetometer and accelerometer are two distinct but often integrated sensors found in modern electronic devices. A magnetometer measures magnetic fields, essentially acting as a digital compass. It detects the Earth's magnetic field to determine orientation and direction. This allows devices to know which way is north, a fundamental capability for navigation and orientation-related applications.
An accelerometer, on the other hand, measures acceleration, which is the rate of change of velocity. It
When combined, these two sensors, often referred to collectively as an Inertial Measurement Unit (IMU) or part