There is a preview on GIT right now. I flew a version of this
The PWM output has been set to 400hz (to counter the low pass filter in most Turnigy PWMs)
The DCM's Roll and Pitch gains were lowered to .03 (recommendation of Hein Hollander)
Mavlink has gotten a re-work for performance and memory savings.
Added a scaling factor to camera Roll And Pitch CAM_P_G, CAM_R_G in the params list.
Fixed some bad PID values for Alt hold that were giving folks trouble.
Exiting a WP for another is faster and more controlled now.
Added user hooks for those who want to execute their own code inline.
Increased loiter speed to center when the copter is flown > 400cm (now 800cm).
Loiter in action.
Jason et al. a possible bug in the calc_loiter function:
float temp = radians((float)g_gps->ground_course/100.0);
If you get the ground course of the GPS while in loiter you will probably get wrong results, ground course in GPS is reliable only when travelling at speed > 5 km/h. How can you get it while Loitering?
You then use this to calculate rate error:
x_actual_speed = (float)g_gps->ground_speed * sin(temp);
and calculate PI on it.
y_rate_error = y_target_speed - y_actual_speed;
nav_lat = g.pi_nav_lat.get_pi(y_rate_error, dTnav);
This probably explains why the copter flies around. When it reaches a decent speed, it gets the correct bearing and then heads to the correct location, resulting in a sort of circle.
Please correct me if I'm wrong.
In the CLI it is decimal degrees. 14.25 is the declination in the CLI for San Francisco. This is how it's stored internaly.
i use 2.0.49 firmwar, all work fine but my GPS give me error coordinate, my location is lat46.802997, long-71.176128 and the gps (MediaTek MT3329 GPS 10Hz) give me that lat 46.802997,long 146.187650, always error on long ( signal 6 Sat and GPS Lock solid), what can i do befor changing GPS ?
Tested a mission with 2.0.49 today and it went well until the second waypoint. The copter seemed to have missed it and turned around, back to it, pretty aggressively. It then started hunting the waypoint VERY aggresively and I aborted. It went very smootly from waypoint 1 to 2 though and RTL is also very smooth. It seemed like once it had missed its waypoint, all restrictions were off and it could go crazy :-)
This exactly describes my Loiter results. Nudging the sticks helps very temporarily and then the circling starts again.
Tuning. Lowering Loiter_P worked for me.
I lowered mine substantially to 2.18 (Loiter P) and while this helped I think it still tries to get into a circle routine.
Hmmm... Can your quad hover hands-off? I just wonder if it's also fighting a tendency to to move, like if it's out of level or out of square. While tuning has me loitering like I'm asking for a ticket at a convenience store, I do have problems after "landing" on an arm until I square things back up... Sorry that didn't help for you!
Actually, I think you may be on to something in my case. The fact is that I finally got a chance to fly with a low wind this afternoon and I did sense some drifting that required stick input to correct. I have never crashed, the arms are 90deg and the motors are straight. I leveled to see if this caused it to no avail. So, the only thing I can think of is that perhaps it is time to re-calibrate the ESC's. I probably have 80-90 flights or so on the ardu frame.... I'll try to re-calibrate the ESC's unless you can think of something that I may be missing. Thanks for the help.
The GPS velocity is tied to the GPS vector. The compass is meaningless in this situation.
I have always assumed the GPS would be wrong in this situation as well. That's why it took me so long to implement. I simply doubted it was possible. Then I realized is that the GPS internal rep is more accurate than the lat and long output. And the heading and velocity of the MTK chipset are better representations of reality.
Yesterday while doing some wireless tests, using APM Planner 1.0.84 I was switching between modes Stabilize, AltHold, and loiter, when I switched to loiter although the motors were not armed suddenly the motors started to spin. Is it a bug