How to detect shotgun and strike forward with an accelerometer?

The accelerometer has three values: x, y, z.

Imagine a racket equipped with an accelerometer. if I put the racket face up, I know where the x, y, and z directions are. However, if I turn the racket over and put it up. The value of x, y, z is in opposite directions.

In other words, if I hit the ball in the x direction with my shot, I might get a positive or negative value of x. (It depends on whether I throw the racket or not. [The racket has two faces]).

My question is: How can a sensor tell me that I am hitting the ball using the back hand, but not the front, since I can get the same accelerometer values ​​for both the strike and the forward strike.

Thanks Jimmy

+6
source share
3 answers

EDIT: changed my mind about this, following @Sami's comments :)

Imagine that the X and Y axes are in the plane of the rows of the racket (for example, X is along the handle line, Y up / down), and Z is in the direction of the ball. Then most of the acceleration when you swing and hit will be on the Z axis (+ or - depending on which face of the racket hits the ball); there’s a bit of acceleration along the X axis if you are swinging along an arc, but always in the same direction, depending on which face you hit. There is a constant acceleration of the Y axis up.

enter image description here

So, you can look at the value of the Z-accelerometer to determine which face is hit, and you can look at the Y value to determine which path the racket is on. From this, you can determine whether the “front” or “back” hits (as to which orientation the racket is oriented to) and, therefore, tell whether the forehand or back kick will be played.

Of course, you also need to know if the player was right or left :)

For a given manualness, you can calculate the type of oscillation as follows:

enter image description here

For another manual result will be canceled. The "+" and "-" values ​​refer to how your accelerometer is installed, so you need to calibrate.

+2
source

There are two coordinate systems: accelerometer and world. The accelerometer will have fixed x / y / z directions in its worldview, but they change relative to world coordinates based on orientation.

If you use the accelerometer values ​​as is, then you can get positive or negative impulses when hit. But when you convert them into a world coordinate system, that is, always down to the center of the Earth, you will always get the same values ​​for the back and the opposite for forehand.

Suppose that the direction of the accelerometer x corresponds to the normal of the network, z is parallel to the handle, and y is “up” when the racket is its normal lateral position.

Since in tennis the racket is basically on the same plane (for example, you don’t get into the net down), and if you don’t do overhead (in this case, I think that there can be no question in the background), you will always indicate 1 or -1 when the racket is at rest. The simplest (but not the most accurate!) Way is to check which sign y has and change x accordingly. This way you will not get exact vectors, but you will get information about whether it was a striker or a forward.

The problem with this also is that you have to track the racket before the strike, since if the strike is not absolutely even (rarely), the acceleration y will also change when the racket moves up or down on impact and will not show the orientation of the racket in moment of impact.

For more accurate readings you will need to determine the difference between the coordinate systems and rotate accordingly.

+1
source

For the “Formand” picture, - Y has a minus value of the acceleration of gravity and z has any value (regardless of positive or negative)

For a shot in the opposite direction, - If y has a positive value for the acceleration of gravity, and z has any value (regardless of positive or negative)

0
source

Source: https://habr.com/ru/post/985403/


All Articles