MATLAB: How to consider gravity in a body sensor block

body sensorgravitymachine environment blocksimmechanicsSimscape Multibody

I am using simMechanics of R2014b. I built a machine with 1st generation simMechanics blocks and added a gravity vector to the machine environment block. If i measure accelerations on a body with a body sensor the gravity is not considered. why, at standstill i should measure the gravity? is there any hidden check box to consider the gravity in a body sensor?

Best Answer

in the zip file is a minimized example of a pendulum. If i'd mount an acceleration sensor or Inertial measurement unit (IMU) to the swinging body, i would measure the gravity as well. I fixed the problem by summing the graviy with the acceleration of the body sensor output.
Is there an easier way to consider the gravity?
...by the way, i cannot attach *.slx files into the mathworx forum...
Related Question