完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
嗨,我正在试着理解我在电路板上为LSM9DS0读取的数据。如果我把电路板放在我的桌子上,根据数据表,我应该读取Z-AXIS的负值,因为Z-AXIS矢量指向上,而不是我读取1g的正值。
其他两个轴也是如此。 所有的读数都是倒置的吗?或者我错了什么? 以上来自于谷歌翻译 以下为原文 Hi, I'm trying to understand the readings I got for a LSM9DS0 on my board. If I hold the board on my desk, according to the datasheet I should read a negative value for the Z-AXIS, because Z-AXIS vector points up, instead I read a positive 1g value. The same happens with the other two axes. Are all the readings inverted? Or am I wrong with something? |
|
相关推荐
3个回答
|
|
|
我问了同样的事情,但这是一个无用的论坛。
/public/STe2ecommunities/mems_sensors/Lists/Accelerometers/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mems_sensors/Lists/Accelerometers/LSM303D%20Z-axis%20Direction&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580004224A862E061BB4BADDEF313D70857E6¤tviews = 17 注意:原始帖子包含大量线程对话,只能迁移到第9级 以上来自于谷歌翻译 以下为原文 I have asked same thing, but this is a useless forum. /public/STe2ecommunities/mems_sensors/Lists/Accelerometers/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mems_sensors/Lists/Accelerometers/LSM303D%20Z-axis%20Direction&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580004224A862E061BB4BADDEF313D70857E6¤tviews=17 Note: the original post contained a large number of threaded conversations and was only able to be migrated to the 9th level |
|
|
|
|
|
你好,
你在使用linux驱动吗? 如果是,则必须使用init数据: #if defined(CONFIG_LSM9DS0) static struct lsm9ds0_acc_platform_data lsm9ds0_acc_data = { .fs_range = LSM9DS0_ACC_FS_2G, .rot_matrix = { {1,0,0}, {0,1,0}, {0,0,1}, }, .poll_interval = 500, .min_interval = LSM9DS0_ACC_MIN_POLL_PERIOD_MS, .aa_filter_bandwidth = ANTI_ALIASING_773, .gpio_int1 = 149, .gpio_int2 = 151, }; static struct lsm9ds0_mag_platform_data lsm9ds0_mag_data = { .poll_interval = 500, .min_interval = LSM9DS0_MAG_MIN_POLL_PERIOD_MS, .fs_range = LSM9DS0_MAG_FS_2G, .rot_matrix = { {1,0,0}, {0,1,0}, {0,0,1}, }, }; static struct lsm9ds0_gyr_platform_data lsm9ds0_gyr_data = { .poll_interval = 500, .min_interval = LSM9DS0_GYR_MIN_POLL_PERIOD_MS,/ * 2ms * / .fs_range = LSM9DS0_GYR_FS_250DPS, / *用于中断垫的gpio端口* / .gpio_int1 = 152, .gpio_int2 = 153,/ * int for fifo * / .axis_map_x = 0, .axis_map_y = 1, .axis_map_z = 2, .negate_x = 0, .negate_y = 0, .negate_z = 0, }; static struct lsm9ds0_main_platform_data lsm9ds0_acc_mag_data = { .pdata_acc =& lsm9ds0_acc_data, .pdata_mag =& lsm9ds0_mag_data, }; #endif / * CONFIG_LSM9DS0 * / 以上来自于谷歌翻译 以下为原文 Hello, are you using the linux driver? If yes you must play with the init data: #if defined(CONFIG_LSM9DS0) static struct lsm9ds0_acc_platform_data lsm9ds0_acc_data = { .fs_range = LSM9DS0_ACC_FS_2G, .rot_matrix = { {1, 0, 0}, {0, 1, 0}, {0, 0, 1}, }, .poll_interval = 500, .min_interval = LSM9DS0_ACC_MIN_POLL_PERIOD_MS, .aa_filter_bandwidth = ANTI_ALIASING_773, .gpio_int1 = 149, .gpio_int2 = 151, }; static struct lsm9ds0_mag_platform_data lsm9ds0_mag_data = { .poll_interval = 500, .min_interval = LSM9DS0_MAG_MIN_POLL_PERIOD_MS, .fs_range = LSM9DS0_MAG_FS_2G, .rot_matrix = { {1, 0, 0}, {0, 1, 0}, {0, 0, 1}, }, }; static struct lsm9ds0_gyr_platform_data lsm9ds0_gyr_data = { .poll_interval = 500, .min_interval = LSM9DS0_GYR_MIN_POLL_PERIOD_MS, /* 2ms */ .fs_range = LSM9DS0_GYR_FS_250DPS, /* gpio ports for interrupt pads */ .gpio_int1 = 152, .gpio_int2 = 153, /* int for fifo */ .axis_map_x = 0, .axis_map_y = 1, .axis_map_z = 2, .negate_x = 0, .negate_y = 0, .negate_z = 0, }; static struct lsm9ds0_main_platform_data lsm9ds0_acc_mag_data = { .pdata_acc = &lsm9ds0_acc_data, .pdata_mag = &lsm9ds0_mag_data, }; #endif /* CONFIG_LSM9DS0 */ |
|
|
|
|
|
我觉得你误会了什么。
加速度计测量相对于自由落体参考系的加速度。也就是说,如果加速度计处于自由落体状态,则可以测量零加速度。相对于此,当加速度计在桌面上平放时,加速度计以1 g的速度向上加速。因此,您将读取+1 g。 以上来自于谷歌翻译 以下为原文 I think you've misunderstood something. The accelerometer measures acceleration relative to the free fall reference frame. That is, if the accelerometer had been in free fall, you would measure zero acceleration. Relative to this, the accelerometer is accelerating upwards at a rate of 1 g when it is flat on your desk.. Therefore you will read +1 g. |
|
|
|
|
只有小组成员才能发言,加入小组>>
stm32mp157的异核通信的rpmsg_sdb的m4固件和a7驱动该如何编写?
1454 浏览 0 评论
stm32f103用freertos对一个采样率为1kHz的传感器,进行采样,数据出差
1503 浏览 0 评论
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
3650 浏览 1 评论
3842 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
2461 浏览 1 评论
STM32H7打开DCache后,出现了串口接收信息为空的现象,是哪里出了问题?
728浏览 5评论
用NANO STM32F103RBT6的开发板烧录不了是哪里出了问题?
663浏览 5评论
710浏览 5评论
外部中断触发类型为双边沿触发,进入中断回调后有什么办法判断该边沿是上升沿还是下降沿?
941浏览 5评论
STM32L071CBT6低温环境下无法正常工作是什么原因引起的?
745浏览 5评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 18:51 , Processed in 0.678081 second(s), Total 78, Slave 61 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
1963