LibrePilot Forum

Users => Applications - Autonomous Flight => Topic started by: Ryenze on June 13, 2020, 08:21:03 pm

Title: Can CC3D hold altitude ? Parks in the air?
Post by: Ryenze on June 13, 2020, 08:21:03 pm
Hi, I'm working on a semi-autonomous drone with Arduino and CC3D. I can control CC3D via RC receiver > Arduino > CC3D. But my CC3D keep flying up and down, and it just won't stay on a same place and keep moving around. Even without Arduino. I tried reboot it with a different firmware, it is still the same. Some ppl tell me CC3D couldn't hold attitude and needs manual input on throttle every time? How can I fix this? Much appreciate if I could solve my problem been bugging me for weeeeksssss. Thanks !
Title: Re: Can CC3D hold altitude ? Parks in the air?
Post by: utoedter on June 13, 2020, 09:08:09 pm
If you like to park in the air, you need GPS and a barometer, the classic  CC3D can’t handle it, a revolution board is needed.


Gesendet von iPhone mit Tapatalk Pro
Title: Re: Can CC3D hold altitude ? Parks in the air?
Post by: TheOtherCliff on June 14, 2020, 05:17:17 am
CC3D in Attitude mode (self leveling mode, the easiest to fly that CC3D can do) only knows bank angle and throttle setting.  Like driving a car on a straight road at exactly 50 kph or mph with only knowing steering wheel position and throttle pedal position and without vision.  Quad will always be drifting at least a little this way or that, probably more than a little.

As UToedter said, you need a Revo or Revo class FC.  Then FC knows GPS position and movement velocity.  The Revo mode that you want is VelocityRoam.  With all sticks centered, it is parked in one place, even with the wind blowing.  You configure the maximum speed and then for example full left stick travels left at that speed.  Half left stick travels left at half that speed.  Etc.

It controls the bank angle to achieve the desired speed.  If you instantly request half speed it will use full bank angle to get up to speed quickly, then reduce the bank angle to maintain the desired speed.  It will use more bank angle if flying into the wind.  Etc.  Same with forwards and backwards and up and down.  The sticks control the velocity from -Max to 0 to +Max.

In this mode, if your Arduino program tells Revo to travel forward at 50% stick for 5 seconds, pause to let it stop, then travel backwards at 25% stick for 10 seconds, you will be back where you started within some small amount of error.

There is also a 3D compass on the Revo, so it knows what direction it is pointed.  There are other GPS flight modes; for instance one mode always flies west when you push the stick left.  Another mode always flies away from the take off location when you give forward (pitch) stick and flies toward take off location with back stick.  Etc.

With additional work, you can see the Revo messages and it will tell you where it is (GPS) or you can send Revo commands like to tell it to fly straight to new GPS coordinates.  These features are already built in to Revo and don't require Arduino, but you see the basics and can add features on Arduino.  You can even program inside the Revo FC in C and C++, but the system is event driven and so you must understand event programming to do it.