I had initially raised this question in Arducopter 2.x group yesterday but since no one replied and I really need help, I am posting this question in the Arducopter User Group.
Here is the situation:
I am doing a project to augment Search and Rescue operations as we know it with Semi-Autonomous UAVs. About a month ago we tried to join modules together but we hit a major problem with making the Arducopter fly in AUTO mode. We need to get the Quadcopter following the waypoints before Friday, the project presentation date.
Below is a screenshot of a log we downloaded yesterday. I have also attached the log to this post with our params file. The waypoint file for this flight only contained two waypoints and an RTL mode. Before this flight we tested Loiter mode and it worked well. In this flight however, we had multiple fly-aways with the Auto mode.
We believe that our project has potential. We have presented at the NCUR conference last week and won an award yesterday for our project, but for this project to come together we need a video of the waypoint navigation working with system by Friday.
Thank you Tsoi and Boland.
Yesterday (4/21) I did three things before flying:
1. Downgraded the FW to 3.1.5
2. Twisted the GPS wires for them to stay together and used a toroid.
3. Waited until I had connection to more than 10 sats before flying auto.
I ran two auto modes both worked well (the second ended abruptly at the second waypoint but that might be related to the problem I am about to explain).
The main issue that I am having now is the same the one discussed in the discussion forum called "AC 3.2.1 APM 2.5 Throttle pulsates in Loiter". As you can see from the image below and the log (named: 2015-04-21 20-18-29.log) attached, although the APM knows that the altitude is increasing and the error between desired alt and barAlt is increasing, it doesn't compensate.
red (barAlt) green (Desired Alt)
I flew again today (4/22) first with an Alt Hold P gain of 1 and then I increased it to 3 and tried it again.
Stabilization when Alt Hold P gain = 1:
Stabilization when Alt Hold P gain = 3:
Both flight logs are attached in the response I left today at the bottom.
Alt hold controller seems like it is broken. Not following the desired value at all.
What now? Tomorrow is my last day to test and fly...
Frame: DJI F450 kit with motors and escs (original)
Autopilot: APM 2.5+
GPS & Compass: ublox RCtimer version (Ublox LEA_6H-0-002 (19) it also says v1.2) I also have a 3DR MTK v2.0 that I can use
I have done autotune to tune the craft.
just my recommendation for such a project!
Do not use a APM, use a Pixhawk and AC 3.2.1 and It will work If all of your equipment is ok.
I have had strange anomalies in the past with some FW releases when loaded onto the 2.6 boards.
Chased the reasons around for a while, but one day I just erased and reloaded the FW and the anomalies went away.
So it appears that some thing can be not right in the FW upload or maybe a parameter pointer or something that is not picked up by the verify function.
Just a thought, easy to try, no harm done if it's not the problem.
But if you have Loiter working then missions should work fine.
I just installed the FW again would that erase the old one completely or just update it?
Thanks I will give it a try today.
Reloading the FW will erase the old version in memory.
It does not alter the parameters or calibrations though.
It is unfortunate you have chosen the APM 2.5 for this project as the APM board was already at its end of life. The newest Ardupilot software will no longer be supported on the APM board. Besides, APM was already at 2.6 yet somehow you are using 2.5? Would you not want more reliable drone for search and rescue missions? This is like knowing it is going to fail and still attempt to complete an impossible mission! What GPS unit exactly are you using. You said Ublox RCtimer, but that is not detailed enough. There are many variants. The latest is UBlox NEO-M8N chip and the antenna needs to match. There some badly made GPS out there in the market that will not work right.
That said, if you still want to continue, at the very least, you should downgrade the firmware to 3.2 and don't use 3.2.1 or 3.3.
The photo is not clear on how you mounted the APM. It is very critical that the APM board be mounted with anti-vibration damping mounts. In addition, whenever flying auto missions or any flight mode that requires good GPS signal, you must check the solar activity. One good place is solarham.net. If you had checked, you would have known the current condition is not good. Solar m-class flares and unsettled geomagnetic fields in the last 24 hours and GPS signal will be bad.
Have you compared the GPS graph of your log of the good loiter flight?
The parts were purchased during the fall/winter of 2013 therefore we just had to work with what we had when we started this semester. another problem that we had was EKF failsafe. Should DCM and EKF thresh params be set to 0 then?
The GPS Model: Ublox LEA_6H-0-002 (19) it also says v1.2
How do I downgrade the Firmware?
The APM is mounted on damping mounts.
We had not really checked for GPS signals or satellites before taking off before but logs always suggested a good amount of satellites. I will try to get a good number of satellites before testing today.
Thanks for your help
hmm I will test that today too.
Your HDop goes to 99.99, which looks like you are is simply loosing GPS signal totally. In another thread he has already been recommended to introduce some RF shielding between GPS and Raspberry Pi... I'd also recommend to cleanup and check your wiring and plugs on both ends, especially the loose GPS wires can be twisted a few times to keep them together and wound through a toroid to help reduce EMI. Then watch carefully in GCS to ensure your HDop remains good throughout all test flights.. don't even think of switching to Auto until you have a reliable HDop less than 3, ideally 2 or lower.
You also need to ensure that the GPS with onboard Magnetometer are mounted securely so they cannot move in flight, it appears you are using soft velcro which may twist and move in flight even a few degrees which is undesirable.
Where is your telemetry downlink located? I've seen others place their telemetry antenna right next to their GPS, which is a big NO-NO... poor little GPS will never hear that quiet quiet whisper of GPS satellites over that loud scream in it's ear :p there shouldn't be any real need to separate your RC Receiver from your GPS, unless the RC Receiver is a two way telemetry type like many of the FrSky ones. You need to also be aware that processors are often clocked at RF frequencies, so your Raspberry Pi may be drowning the GPS in RF output around GPS 1.5GHz range... so definitely do the RF shielding between the Pi and GPS.
As others have mentioned, you really don't want to skimp on the GPS unit used, or the flight controller either really... sorry, not what you want to hear, but I agree, not all GPS units are created equal and your upgrade path for a APM 2.5 is absolutely zero.
EKF is for Pixhawk only and has no effect for APM boards so you can ignore the params.
To downgrade, in Mission Planner, select "Pick previous firmware" at the bottom right of the screen where you normally do the firmware update. You will see a drop down box after it had successfully downloaded the previous version list. It will load a list for you to select. The known stable version for APM board is the one that said "AR2.47 AP3.1.1 AC 3.1.5".
Going back to version 3.1.5 firmware for you should be your best bet right now. The newer features you will loose is spline waypoints. Since you are not doing aerial filming, I don't believe you care to go straight line between waypoints vs spline (curved).
I do not have a telemetry downlink.
I will try cleaning up the cables but I do not have a toroid.
If we decide to start a kickstarter event we will definitely use the newer autopilots.
About RF shielding:
-We get the same GPS problem even when the raspberry pi 2 is turned off. Should I still add a foil below the GPS unit?
Thank you for helping.