I work at a Rock Climbing gym and we are attempting to setup a system for measuring the degree of a hydraulic climbing wall that moves in and out from a vertical to create varying angles for the climber to climb. I need to create a system for measuring the angle and reporting it to the operator for setting the wall to certain degrees. With no easy place to mount a pot, I would like to try to accomplish this with an accelerometer/magnetometer setup. Is this possible and could you give me some insight on how to use the raw data from one of these types of sensors (outputting x,y,z) in order to find the inclination angle. Also, when the setup is powered off and powered on (like during a surge) will it need recalibration or will it be able to give the current angle upon startup?
I have been reading on the subject, however I am worried about if the accelerometer was to lose power and re-establish a reference point upon powering that all of my angle measurements would be incorrect. Can I used the direction of earths magnetic field as a reference for down so that I don’t have to worry about power cycles?
I guess what I am trying to figure out is that if the wall is calibrated straight up and down (|) and then tilted out to 45 degrees towards the climber (/) then if a power cycle happened, as long as the accelerometer was not recalibrated would I still get 45 degrees as the output?
I am placing the sensor against the back side of the climbing wall. The only value I care about is pitch, roll and yaw are impossible given the wall only has one axis of rotation.
Where ax, ay and az are the raw accelerometer values, as floating point numbers.
Again, this formula requires you to carefully mount the accelerometer such that inclination=zero when the wall is straight up and down.
If you don’t want to worry about mounting the accelerometer carefully, mount it any way you like and take a reading with the wall straight up. Call those raw accelerometer values ax0, ay0 and az0 (as floats) and put the numbers in your final program.
Then for any other orientation, the inclination in degrees is: