Adjust gravity, g, in imuSensor object accelerometer

3 views (last 30 days)
The imuSensor accelerometer uses a gravity acceleration of 9.81 [m/s^2], but the local gravity in my area is 9.7922 [m/s^2], and I would like to change the value that the imuSensor accelerometer uses for simulation of the accelerometer data to compare with an actual accelerometer. How can this be done?
For background information, the gravity at your location can be calculated using the WGS-84 gravity model:
% from, based on the
% WGS84 ellipsoid, the WGS (World Geodetic System) 1984 Ellipsoidal
% Gravity formula
theta = your latitude in radians
g_theta = 9.7803253359 * ((1 + 0.00193185265241 * sin(theta)^2)/ ...
(sqrt(1 - 0.00669437999013 * sin(theta)^2 )));

Accepted Answer

Ryan Salvo
Ryan Salvo on 27 Apr 2021
Hi Gregory,
Unfortunately, it is not currently possible to change the gravity acceleration in imuSensor. I've created an enhancement request for a future release.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!