## Atmosphere and gravity modelling for CrazyFlie2

Astrobiologist
Beginner
Posts: 24
Joined: Fri Jan 19, 2018 10:35 pm

### Atmosphere and gravity modelling for CrazyFlie2

Does the Crazyflie have an atmospheric model as part of its control algorithms?

For instance, it has a barometer, so is ambient air pressure taken into account?

If the air pressure is 1020mBar one day and 980 the next day, then presumably the propellers have to compensate by a factor of 980/1020 to achieve the same lift in less dense air.
Does the Crazyflie actually do this?

A colleague asked me how far one could take such an argument, which got us into considering how propellers work at all, which is way beyond my knowledge base.

How much air do the CrazyFlie's propellers suck in per second, and to what speed do they accelerate it?
I.e in F=MA, what is M and what is A?

My colleague was asking what the absolute theoretical maximum altitude ceiling of the Crazyflie is, and how this would be calculated (and by extension, any other helicopter system)
She wanted a stratospheric drone, which I said seemed impossible, but I couldn't articulate mathematically why.

Finally, is gravity taken into account in the control algorithms?
As an extension of the above, could a drone fly on, say, Mars, even for short periods?
(much less dense air, but lower gravity)
One could, for instance, try flying a Crazyflie in an astronaut training aircraft at varying levels of gravity (a plane flying parabolic loops can simulate different gravities, not just weightlessness)

arnaud
Bitcraze
Posts: 1860
Joined: Tue Feb 06, 2007 12:36 pm

### Re: Atmosphere and gravity modelling for CrazyFlie2

Hi,

This is way over my competences so I hope someone in the community can help with the theory. Though I can comment about the current implementation: the current implementation of the thrust estimation is based on an investigation we did and that has been done by universities, for example in the ETH system identification. It is not at all taking into account the current atmospheric pressure and I was assuming the effect would be negligible.

The Kalman filter, used with the LPS and the flow deck, has a parameter for the gravity. I have a memory of adding some drag modelisation in the Kalman filter since it was found to be not negligible, though I cannot find it anymore.

Astrobiologist
Beginner
Posts: 24
Joined: Fri Jan 19, 2018 10:35 pm

### Re: Atmosphere and gravity modelling for CrazyFlie2

Mitteau
Expert
Posts: 248
Joined: Fri Jan 29, 2016 6:00 am

### Re: Atmosphere and gravity modelling for CrazyFlie2

Very interesting post!
I wrote a post about atmospheric formula in firmware, dated Mon Dec 18, 2017 4:30 pm.
But your question is more general and interesting. As I am aerospace engineer, I will have a look at.
It should be easy to introduce air gravity and gravity quantity (Mars ?) in the flight formulas...
But perhaps will we be outside of flight domain.
BR
Jean-Claude
For the fun:

Astrobiologist
Beginner
Posts: 24
Joined: Fri Jan 19, 2018 10:35 pm

### Re: Atmosphere and gravity modelling for CrazyFlie2

It is actually going to fly - but note the very high RPMs and oversize rotor blades:
https://spaceflightnow.com/2018/05/14/h ... ed-planet/

So I wonder how high a drone could go on Earth with similar adaptations?
Maybe a drone launched from a balloon with rotors optimised for Stratospheric flight?
But hard to get permission to fly since this would now be a high altitude UAV - a tethered drone from a balloon perhaps?
OR fly it somewhere with unrestricted airspace perhaps? And it just so happens that there a few such locations in Scandinavia, as I understand it...

At some point, I imagine this becomes a very marginal project. For instance, the atmospheric pressure on Mars is similar to the pressure about 30km up on Earth. But Mars gravity is only 40% of Earth's. So it might actually be very hard to fly a drone that high on Earth - it just weighs too much. But perhaps lower in the Stratosphere on Earth, where the terrestrial atmosphere is thicker than on Mars... (= more lift from the rotors)

Would be great to have some modelling for this

BW

Mitteau
Expert
Posts: 248
Joined: Fri Jan 29, 2016 6:00 am

Great!
BR