Z-axis control


#1

Hi all… I was trying to put together some code to keep the drone oriented statically around the Z axis. That is, I want to keep the front of the drone pointed in the same direction. I think this should be possible, as I can read the Z axis gyro and rotate the drone to compensate, but I have 2 questions:

  1. What is the relationship between Z gyro value, and the rotation of the drone along the Z axis in degrees? If Z gyro reads X, and I want to rotate the drone to compensate, how many degrees should I rotate?

  2. (Basic question about Makeblock programming) If I write code in a button to do the Z axis correction in an infinite loop, can I still control the drone using the other joystick controls – or will the code stop executing as soon as I manually control the drone?


#2