# How to detect orientation with accelerometer when vehicle has variable acceleration?

According to my research, in order to detect angular orientation, AHRSs use gyros and accelerometers.

Using a gyro on its own does not work well because of integration drift, and only using an accelerometer also does not work well because of vibrations and vehicle accelerations. This is why sensor fusion algorithms like Kalman filters are used.

But what if we have a fighter jet that operates at excessive accelerations? In that case, is it possible to extract the gravitation vector from the accelerometer data? If we can't, that means that in that case, we can only rely on gyros which will drift after a while.

What kind of algorithms are used in these vehicles to fix this issue?

• your question seems a bit confusing. Yes, integration drift does have a negative impact on gyro performance (but not accelerometers) and yes, vibration and acceleration does have a negative impact on accelerometers (but not so much gyros), and so yes, sensor fusion algorithms are used so that you get the best of both worlds. Yes, this does still work when the vibration is more pronounced like in a fighter jet. You can learn more about how sensor fusion works here (mathworks.com/help/fusion/ug/…) Commented Nov 1, 2022 at 9:13
• @BeB00: The question is not about a fighter jet's vibration, but its acceleration along any axis, and finding its orientation despite this. Commented Nov 1, 2022 at 9:16
• @ocrdu the point is that yes, even in this case, sensor fusion still works, in the same way as it would otherwise work. It doesn't matter that the acceleration is more pronounced, and can last for longer - that just changes some of the parameters of the sensor fusion algorithms. (afaik) it shouldn't require any fundamental changes to the way the algorithms work Commented Nov 1, 2022 at 9:19
• My point was, gyro and accelerometer both contributes to sensor fusion. While vehicle accelerating (it may be in a single or multiple axis with variable direction and mangitude) accelerometer feeds wrong data because it cant measure gravity vector properly. At this point algorithm can ignore accelerometer but than it should rely on gyro. In this case result will be drift after a while. Fighter jet is just an example that shows vehicle cant move with constant velocity and need accelerate for long times. Commented Nov 1, 2022 at 10:44
• We can say to a pilot, move with constant velocity after a while to fix the gyro drift with accelerometer and it will work. But we cant say this to a figher jet pilot beceuse he/she may not have this opportunity. Fighter jet example was just for exaggerating the issue. Commented Nov 1, 2022 at 12:00