I wanted to test my set-up this weekend and share, well I tested a bit and this is what I can share:
Aerial security platform with a OSD onboard.(The funny part)
My old Gentle Lady glider as a development platform with modified wing. I reduced the tip dihedral to match each main wing, about 10 degrees dihedral total. Ailerons added to the main wings (it was actually used as flaps) but it worked well. Motor mounted to front with new ply bulkhead. Total weight 972g and flew well on ½ to ¾ throttle.
E-Sky 6 channel radio and receiver with 4 servo’s. Rudder, elavator and one ea. on ailerons y-lead connected.
Tower Pro 2409 motor with 40A speed controller and E-sky 1000 mAh. Lipo. @ 11.1v
Plugging co-pilot (CPD-4) in down stream of Ardupilot. Stabilization then achieved on channels controlled by Ardupilot .
Ardupilot2 code is really great but it looked liked a bit of a problem with the Sirf-binary mode and OSD system. So I decided to stick to Ardupilot1 code for now.
In code rudder was set-up for ailerons and throttle for elevator, I added elevator reverse function in code like this:
First tab added
#define reverse_pitch 1 // normal = 0 and reverse = 1
PID & Control tab:
//Now checking if the user have selected normal or reverse mode elevator (servo)...
if(reverse_pitch = = 1)
return (int) (altitude_output); //Returns the result
Then played around with servo max and min to ensure I would get about 30 degree roll and 10-15 degree pitch up and down.
Reading all the different posts on simulation I decided that a full hardware in the loop was not really practical for me. Mainly because R/C planes fly different in real life.
I rigged up Microsoft flight simulator to send NMEA strings over serial by adding GPSout by Pete Dowson as per this
post. In configuration settings note pad I did the following:
Sentences=RMC,RMA,PGRMZ,GLL,VTG,GGA,GSA,GSV (Most of not required for Ardupilot)
Then using Virtual Serial Ports Emulator
a free download I created a connector type port 10. My port connecting Ardupilot is 2 on my laptop, so 2 and 10 was then connected. With this config. I could send NMEA to port 10 and monitor Ardupilot with serial monitor on 10 as well.
Getting it all together:
Test flying my old Lady I noted how much elevator is required to give a decent climb for a given throttle position and same with roll, this I memorized mentally as I would fine tune it later.
Starting by powering Ardupilot as per normal with receiver(Ardupilot, stabilization etc. all flight ready in my Gal), connecting Ardupilot to my laptop, opening Arduino IDE then VSP emulator and finally FS9 the blue GPS lock led would lock-up and Ardupilot spitting out every thing as advertised in serial monitor.(My GPS unplugged of course)
In FS9 I use Slew function to fly my way points manually the nice thing is it can be done slowly and on one axis at a time, this made observing servo position to a way point or altitude a breeze. I use A & Q for alt. control and < & > for yaw.
So turning down Co-pilot sensitivity all the way there is no stability and interferance with simulation I flew my way points and ensure I got adequate aileron and elevator movement, not too much because stabilization must be able to handle bank and pitch excesses. If I want a 30 degree bank and Ardupilot turns to a new heading stabilization would correct anything more than that.(My servo min and max came to this after some fiddling: max16_yaw 2900, min16_yaw 800, max16_throttle 1500 & min16_throttle 900).
Note I had to do the following to be able to load a modified code after simulation and corrections: Close FS9 in Arduino IDE, stop serial monitor select a different com port say 2, stop VSP emulator and then load the code to Ardupilot and check every thing in simulation again(Because VSPE split com2 it cannot be used in till stopped and same for com10 and FS9)
My next step was to check stabilization I turned it up all the way, disconnecting Ardupilot from the laptop reconnecting GPS I went outside waited for a GPS fix and blue light, switched on Ardupilot and at fast walking aileron movement to 1st waypoint was observed with stab. I was very satisfied with pitch and bank stabilization and only allowed for a +/- 30 degree bank and 10 – 15 degree pitch anything more would be corrected for.
So there we go, after Co-pilot calibration as per book I launched her climbing out to a altitude I recon was about 50 or 70m AGL. and trimming her nicely Ardupilot was armed. She Immediately responded and started turning towards 1st waypoint and turned nicely over it to 2nd point , it looked like she was running on rails. While en route it started to rain very lightly mmm should I abort and land nope lets see what she does… Next moment about 300 meters away very close to waypoint she started a decent of about 20 degrees nose down I observed for a moment followed by turning Ardupilot off. She disappeared behind some terrain before I could recover. Dammm.
Immediately I went for the recovery it looked like she came down very close to a double carriage road never the less I had to cross it and search in some tall grass. 5 min later and no sign of her I noted a pick-up and two guys getting back in and drive off, because the road is higher than the grass area I could not make out what they were doing and for how long they have been there. Well I cannot find her searching in tall grass for nearly 5 hours and a area of about 300 square meters a 2m yellow and red glider is missing. Don’t laugh I even sat in a tree for 15min and nothing…….gone.
While searching I noted that I did not turn Ardupilot off, my reaction was full throttle and elevator. I use a proportional knob on my radio and I did not turn it not past the center position.
Most likely a rain drop fell on the forward IR sensor followed by a nose down attitude as if it was sensing cooler air and not warm Earth….is this possible?
Pick your flying area well so the plane can be monitored at all times. That was my only dodgy waypoint out of three.
The pick-up most likely saw her coming down stopped did not see me in the grass of about 1.5meters tall and sloping ground, picked her up and drove off.
I hope this could help some one else.