110 likes | 201 Views
Wash Uav Final Demo. Sean Reynolds. CX2. Show Throttle Control Show Rudder Control Show Cyclic Proximity Control Show Hover with proximity Crash! . Code. // accelerometers gyro #define AccelerometerMode 0 // throttle rudder #define ThrottleRudderMode 2 // user input
E N D
Wash Uav Final Demo Sean Reynolds
CX2 • Show Throttle Control • Show Rudder Control • Show Cyclic Proximity Control • Show Hover with proximity • Crash!
Code • // accelerometers gyro • #define AccelerometerMode 0 • // throttle rudder • #define ThrottleRudderMode 2 • // user input • #define LaptopInputMode 1 • // mote holds heli control routines. • #define HelicopterControlMode 2 • // control the swashplate with 3 servos • #define HelicopterSwashMixing 0 • // use proximity sensors as • #define ProximityCyclic 1 • // use accelerometer to demo cyclic control • #define AccelerometerCyclic 0
Code • void calculateOutput() { • #if AccelerometerCyclic > 0 • inputLeftRight = 90 + sensors.HoverElevator(); • inputForwardBackward = 90 + sensors.HoverAileron(); • #endif • #if HelicopterSwashMixing > 0 • degreeThrottle = inputThrottle; • degreeAileron = 90 + (90 - inputBladePitch) - (2 * (90 - inputLeftRight)) + (90 - inputForwardBackward); • degreeAuxSwash = 90 - (90 - inputBladePitch) - (2 * (90 - inputLeftRight)) - (2 * (90 - inputForwardBackward)); • degreeElevator = 90 + (90 - inputBladePitch) - (2 * (90 - inputForwardBackward)); • degreeRudder = inputRudder; • #else • if(!takeOff){ • if(takenOff){ • degreeThrottle = sensors.HoverThrottle(); • } • } • degreeElevator = 90 + sensors.HoverElevator(); • degreeAileron = 90 + sensors.HoverAileron(); • degreeRudder = 90 + sensors.HoverRudder(); • #endif • fixDegrees(degreeThrottle); • fixDegrees(degreeElevator); • fixDegrees(degreeAileron); • fixDegrees(degreeAuxSwash); • }
Code • degreeThrottle = inputThrottle; • degreeAileron = 90 + (90 - inputBladePitch) - (2 * (90 - inputLeftRight)) + (90 - inputForwardBackward); • degreeAuxSwash = 90 - (90 - inputBladePitch) - (2 * (90 - inputLeftRight)) - (2 * (90 - inputForwardBackward)); • degreeElevator = 90 + (90 - inputBladePitch) - (2 * (90 - inputForwardBackward)); • degreeRudder = inputRudder;
B400 • Show Rig • Show Control With Accelerometer Controller • Demo Weapons System!
Problem Videos • In case all else fails: