完善资料让更多小伙伴认识你,还能领取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. |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2725 浏览 1 评论
3237 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1807 浏览 1 评论
3646 浏览 6 评论
6034 浏览 21 评论
1336浏览 4评论
197浏览 3评论
对H747I-DISCO写程序时将CN2的st-link复用为usart1,再次烧录时无法检测到stlink怎么解决?
350浏览 2评论
STM32G474RE芯片只是串口发个数据就发烫严重是怎么回事?
442浏览 2评论
STM32处理增量式编码器Z信号如何判断中断是正转的还是反向转的?
273浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-22 16:00 , Processed in 1.945645 second(s), Total 83, Slave 66 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号