ebelski / rust-copter

A quadcopter build using a Teensy running Rust and some other cool stuff that's yet to be determined.
MIT License
6 stars 1 forks source link

Variable sensor sampling rates #44

Open mciantyre opened 3 years ago

mciantyre commented 3 years ago

Our 0.1 demo queries all readings (accelerometer, gryoscope, magnetometer) from an MPU9250 at 100Hz. This happens

There's no reason we're doing this, other than it was simple to put together.

A future embedded platform should support variable sensor sampling rates. This will let us express sensor reading strategies like "poll acc at 2KHz, gyro at 250Hz, and mag at 4Hz."

We should be able to change sampling rates during runtime, before takeoff. Supporting sampling rate changes during flight are not supported. Let me know if changing sensor sampling rates during flight might be useful. I'd need some help thinking through the details.

ebelski commented 3 years ago

I don't think we need to vary sampling rates during flight. That'd be scary actually 😨 we'd probably get a situation like this

A 747 was flying along and was full of Polish people. 
As they were going past some beautiful landmarks, the pilot came over 
the intercom and instructed all who were interested in seeing the 
landmark to look out the right side of the plane. Many 
passengers did so, and the plane promply crashed. Why?
Too many poles in the right hand plane.