5
It is possible to determine the spatial orientation of the smartphone using only the values x
, y
, and z
magnetic sensor?
5
It is possible to determine the spatial orientation of the smartphone using only the values x
, y
, and z
magnetic sensor?
2
First, the values x
, y
and z
that you refer to, are not magnetic sensor, but rather a component called accelerometer. The magnetic sensor you referred to is a Hall Effect Sensor, which measures the presence and intensity of a magnetic field, and therefore can measure magnetic north magnetism (geographical south). There are accelerometers that work using Hall Effect Sensors, but I won’t go into those details.
Roughly speaking, an accelerometer is an electronic component capable of measuring acceleration in one or more axes from the forces acting on it. It should be noted that this acceleration is measured in relation to the force of gravity and therefore the acceleration is measured in g and can be easily converted to m/s².
So suppose we have one UAV (Unmanned Aerial Vehicle), which is taking off from home, from a beautiful runway in an Airport Club somewhere in Brazil:
According to Aguiar, the actual acceleration of this aircraft’s displacement is measured by the formula:
Where Ax(v) is the resulting acceleration of the axis on which you intend to measure and A(v) is the total acceleration received. The g(Φ) is due to the incidence of the force of gravity, due to the angle of inclination Φ, since the force of gravity also acts on the accelerometer.
Aguiar states that to make the equating of the resulting acceleration on the aircraft, it is necessary to obtain the angle of inclination (tilt) made by the inclination of pitch (arfagem), for the acceleration to be calculated.
Another very interesting thing that you should remember from high school physics classes, is that it is possible to measure speed and position from the acceleration, since the derivative of the acceleration in function of the time is the speed, and if you derive again, you will have the position in meters from the origin.
To answer your question, yes! It is possible, but to do this from an accelerometer is something much more complex, because you will need to monitor the time and you will have to drift to get the position, besides that you will need to use a set of other types of sensors and your application will not be accurate. I recommend that you use GPS, because besides being easier to work, you will have a very precise position of the user, on a global scale. The possibility of detecting the position of a certain user, can bring very interesting applications, one of them is the concept of Mobile Games Locative, demonstrated in this article from my friend Pablo Roxo. If you provide more details of your application, maybe I can help you choose which are the best sensors for what you want to do. Soon I will be adding more details to my response, I will talk about other sensors that can help you monitor position.
That answer is only an outline, I will answer it in more detail as soon as possible.
It is not clear in the question, but perhaps the GPS suggestion is not very useful to the user because he may be interested in device location in indoor environments. So I think you better charge an exclamation from it before spending too much time improving the question in that direction. :)
@Avelino, I don’t know if this is what the user wants with the question, but his answer "sketch" is very interesting, I read it in full, I traveled in 90% of it, but I felt but smart at that moment (I am writing) after reading it. Just a suggestion for when to improve it, when to quote some author, please link the original article (if it is available virtually right (Still use books? hehe)) because I was curious to know "Aguiar", and your article or book on the subject. Hehe. Anyway already wins my +1, to encourage to perfect it.
Browser other questions tagged android
You are not signed in. Login or sign up in order to post.
Guy maybe, if you can create a Cartesian grand plan around you, this algorithmically speaking, the indicated is the same, simpler GPS, just pick its position at geographical coordinates on the planet longitude and latitude and ready.
– bp002
Could you provide more details of what would be the use of these values in your application? What do you want to do?
– Avelino