tdot00c / ardupirates

Automatically exported from code.google.com/p/ardupirates
0 stars 0 forks source link

GPS Hold: gps_err_lon and gps_err_lat may cause a large tilt at second activiation. #37

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
With default parametrization of GPS Hold, I noticed that it oscillates heavily 
around its position. Other issues here have listed better settings for PID, 
which I have not tried yet, but will soon. Here are some results of my analysis 
that may help to develop even further stability:

gps_err_lon and gps_err_lat are not reset prior to entering the GPS Hold loop 
for the first time (when the switch is flicked). If it was active before and 
reactivated, it will use the old "error" values and compare this with new ones 
that it will develop. This will, in the first iteration of the GPS Hold loop, 
develop very high (non-limited) values for gps_lat_D and/or gps_lon_D. In my 
code, I now reset gps_err_lon and err_lat to 0 in the reset_I_terms to make 
sure the first iteration is always zero for the D-term.

Original issue reported on code.google.com by gtoons...@gmail.com on 16 Jun 2011 at 7:49