Skip to main content
Associate
July 8, 2026
Question

LSM6DSV80X SFLP quaternion adaptation issue for racket game posture reset

  • July 8, 2026
  • 2 replies
  • 62 views

Hi ST team,

We are using the LSM6DSV80X SFLP quaternion output for a smart racket project. The quaternion is used by the mobile APP to control the game character posture.

During our test, we found that when the racket is powered on in a flat/horizontal position, the SFLP Yaw output can stay close to 0°, which is expected. However, when the racket is powered on or reset in a tilted position, the Yaw value is affected by the current Pitch/Roll posture and cannot remain at 0°.

For example, when the racket is powered on in a tilted position, the output is:

Roll = -0.58°
Pitch = -37.61°
Yaw = -9.40°

For our racket game application, the expected behavior is:

When the game starts or when the user performs posture reset, the current racket facing direction should be defined as the game coordinate system Yaw = 0°. At the same time, Roll and Pitch should still reflect the real physical tilt of the racket.

So the requirement is not a full orientation reset. We only need a Yaw-only reset:

  • Yaw should be reset to 0° at game start/reset;
  • Roll and Pitch should keep following the real racket posture;
  • The initial tilted Roll/Pitch should not be reset to 0°.

Currently, we cannot find a related SFLP register configuration to achieve this behavior directly. Therefore, we would like to ask whether ST can provide a recommended quaternion post-processing method for this use case.

Could you please help provide:

  1. A yaw-only reset algorithm based on the SFLP quaternion output;
  2. The correct method to remove only the initial Yaw offset without affecting Roll/Pitch;
  3. The recommended coordinate system definition and quaternion multiplication order;
  4. C reference code or pseudocode that we can integrate into the customer firmware or APP side.

This issue is important for the smart racket game posture alignment, because the current SFLP output cannot directly meet the expected game coordinate reset behavior when the racket starts from a tilted posture.

 

2 replies

Federica Bossi
ST Technical Moderator
July 30, 2026

Hi ​@Hank Xiao ,

A suitable way to perform approach this task it to save the initial attitude estimation and use it to apply a rotation along yaw axis.

Attached an example library that you can try.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
Visitor
August 6, 2026

This is a very interesting use case. A yaw-only reset while preserving the actual roll and pitch values seems like the right approach for a smart racket application. I think capturing the initial quaternion at game start and applying a relative quaternion transformation could be a practical solution, but it would be great if the ST team could provide an official recommendation or reference implementation. Looking forward to seeing their guidance and any sample code they can share.