In 1972, with the help of a moon buggy Apollo 17 astronauts could measure gravity on the lunar surface. The buggy had a special instrument which was used to measure the gravity while driving across the moon’s surface.
Similarly, Curiosity is equipped with accelerometer and gyroscopes to determine its location and the way it is going. The accelerometer works like Apollo 17’s gravimeter which was used to detect the gravity on the lunar surface in 1972. Likewise, the accelerometer measures the gravity on the Martian surface when the rover stands still at a particular place.
Source of shared Link