Wednesday, April 9, 2014

Second and third flight tests today.  We are almost there people.  Most of the wall avoidance did perform as expected.  I think I saw something in the logic of the code though so I tested that possible failure out later.  I see that the code as it was written is not doing anything with the sensor data if there is no updated input from the user.  I was afraid of that but assumed, yeah bad thing, that the Transmitter constantly updated the receiver whether the operator changed something or not.  This is not the case.

I was able to run the quad into the wall by letting it drift.  In other words, I started it moving towards the wall and then stopped giving it commands.  What occured was that the quad went to level out, but because we were testing in a hallway the momentum and eddy currents from the props let the quad drift towards the wall allowing the quad to hit the wall.  Never fear, I think I have a solution for this.
The way I had the code written before it only updated the data sent to the flight controller if it received input from the transmitter.  I have rearranged the if else statements to be driven more so by the ultrasonic sensors.  So first it checks to see which distance is closer in each axis, then it checks for the update flag and updates the flight controller.  if no update is seen then in the 45 cm range it still backs away from the wall and at the 60 cm range it tells the flight controller to stay put unless the TX/RX has an update that tells it to move away.

Posting version 1.04beta below.  More testing tomorrow.

text version of 1.04 beta


No comments:

Post a Comment