betaflight / blackbox-tools

Tools for working with blackbox flight logs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reading IMU in quasi-realtime

seanjkanderson opened this issue · comments

Hi there,

I am trying to read the IMU in (close to) real-time using an Odroid (similar to Raspberry Pi). It's clearly possible to stream the IMU data as it's visualized in Betaflight Configurator. Is this something that is possible via the CLI or how can I generally access this data via either the usb port or outputting from my flight controller (via rx)?

Thanks for any tips!

Sean

@seanjkanderson: CLI is not a good option for this. But MSP is the protocol that is used for the non-CLI communication in configurator, and it's quite simple (and there are libraries out there that implement clients in a number of platforms).
Have a look at https://github.com/betaflight/betaflight-configurator/blob/aeda56ba407ba54068bad90d7cc069b67d2cd8e4/src/js/msp/MSPHelper.js#L165-L169, this is the call that configurator uses to get the attitude to control the 3D model, or https://github.com/betaflight/betaflight-configurator/blob/aeda56ba407ba54068bad90d7cc069b67d2cd8e4/src/js/msp/MSPHelper.js#L116-L131, which gives you access to the raw IMU data.

commented

This issue / pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within a week.

commented

This issue / pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within a week.

commented

Automatically closing as inactive.

@mikeller can you please give more low-level details about how to get raw IMU data?

Looking at MSPHelper.js is not helping me much. I am trying to read the raw IMU data of drones and process it in real-time on a raspberry pi using python.

Thank you!