如果我们想从ISM330DLC ACC和GYRO传感器中滚动,音高和偏航数据,我们应该使用哪个库?

发布于 2025-02-07 19:25:56 字数 379 浏览 3 评论 0原文

目前,我正在从事一个项目,我的工作是要使用加速度计,陀螺仪数据并将其转换为滚动,音高和偏航。

因此,为了实现这一目标,我们开始使用ISM330DLC传感器。为了获取原始数据,我们成功地将示例代码连接起来,然后包括DI库将原始数据转换为滚动,音高和偏航。最后,我们在UART上打印了卷,音高和偏航角。

打印数据后,我们观察到可疑数据,例如,我们将传感器保持稳定位置,然后观察到偏斜值在同一时间滚动和俯仰角也随机变化。

因此,在此之后,我们倾倒了Unico GUI文件夹中提供的.bin文件。再一次,我们观察到卷,俯仰和偏航。这次,我们观察到这些值正在根据位置变化。

现在有人可以帮助我了解这是图书馆问题还是其他问题?如果我想要ISM330DLC传感器的滚动,音高和偏航角,我必须使用哪个库。

Currently, I'm working on a project where my job is to take Accelerometer, Gyroscope data and convert it into Roll, Pitch and Yaw.

So to achieve this we started working on the ISM330DLC sensor. To get the raw data we interfaced the example code successfully and then we included the DI library to convert the raw data into Roll, Pitch and Yaw. Lastly, we were printing the Roll, Pitch and Yaw angles on the UART.

After printing data, we observed suspicious data, for example, we kept the sensor in a steady position and then we observed Yaw angle value was 360 degrees at the same time roll and pitch angles were also changing randomly.

So after this, we dumped the .bin file which is provided in the Unico GUI folder. and again we observed the Roll, Pitch and Yaw. This time we observed that the values were changing according to the position.

Now can anyone please help me to understand whether it is a library issue or something else? which library exactly do I have to use if I want the Roll, Pitch and Yaw angles from the ISM330DLC sensor.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

甜柠檬 2025-02-14 19:25:56

最近,我发现我们真的不需要任何图书馆才能找到滚动,音调。

  • 我从加速度计的原始值中获得了俯仰和滚动角度。below是我使用的方程式。使用Math.h in incluct。

      float ax = float(accel.x);
     float ay = float(Accel.y);
     float az = float(Accel.z);
     int pitch = atan2(-ax,az) * 180 / pi; //在y轴上旋转
     int roll = atan2(-ay,az) * 180 / pi; // x轴上旋转
     

pi是3.14 ...

请浏览以下链接(这确实帮助了我),以获得更清晰的想法。

https:// https:/// docs.idew.org/code-internet-of-things/references/physical-inputs/accelerometor#start-accelerometormetormeter-in-setup

#ism330dlc #accelerometer #pitch#roll

I lately found the we dont really need any library for find Roll ,Pitch.

  • I got Pitch and Roll angle from raw value of Accelerometer.Below is the Equation i used.Use need math.h in includes.

     float aX = float(accel.x);
     float aY = float(accel.y);
     float aZ = float(accel.z);
     int pitch = atan2(-aX, aZ) * 180 / PI; // rotation on Y axis
     int roll = atan2(-aY, aZ) * 180 / PI; // rotation on X axis
    

where PI is 3.14...

Please go through the below link(which really helped me) to get more clear idea.

https://docs.idew.org/code-internet-of-things/references/physical-inputs/accelerometer#start-accelerometer-in-setup

#ISM330DLC #Accelerometer #Pitch #roll

海风掠过北极光 2025-02-14 19:25:56

现在解决了问题,我们正在使用Motion FX库获取滚动,Pitch&偏航。

Now the issue is solved and we are using the Motion FX Library to get Roll, Pitch & Yaw.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文