Hi, Roman,
In Andreys video I see altitude value lag for 1-2s. Trees are about 20m, power lines also.
So, today was third water day (my CUB with floats) and I am happy to share my fork with some new NAV functions: GPS_HOLD and GPS_NAV.
In GPS_HOLD mode plane tries to keep fixed altitude and flies to fixed point continously. Fixing occurs when entering in GPS_HOLD mode.
In GPS_NAV mode plane flies from wp[1] to wp[3] coordinates and tries to keep wp_alt[i] altitude. After last wp plane flies to wp[0], in this wp are stored home pos and alt.
If navigation lasts more than MAX_NAV_MIN minutes, plane goes to wp[0] imediatelly.
If to swith from GPS_NAV mode to GPS_HOLD mode, nav pauses, but counter for MAX_NAV_MIN still works and after switching back to GPS_HOLD counter value is compared to MAX_NAV_MIN.
All nav modes (GPS_HOME, GPS_HOLD, GPS_NAV) modes now works only with HORIZON and ANGLE modes.
All nav modes have options:
NAV_BARO - averaged barometer value for altitude control. If option off, GPS altitude used.
NAV_MAG - navigation by compass and GPS_ground_curse. If option off, navigation only by GPS ground curse.
Until now no NAV PID's - for field testing I set scallers for ALT, THRO, ROLL and YAW like this:
//conf.pid[PIDALT].P8/10.0; ALTCORR scaller
//conf.pid[PIDNAVR].P8/10.0; SCALER_THROTTLE
//conf.pid[PIDNAVR].I8/10.0; ROLL scaller
//conf.pid[PIDNAVR].D8/10.0; YAW scaller
So, it was possible to adjust scallers by BT link, not by uploading new firmware.
If not PASSTHRU mode, all RC inputs in nav modes are muted.
If baro alt les than SAFE_ALT_TO_NAV, nav stops and plane must land with IDLE_THROTTLE. (this is not safe, but because I affraid that if I set MINCOMAND, my CUB gas engine stops and there will be no chances to recover from this situation)
In all naw functions, when they are activated and in GPS_NAV, when eatch wp was reached, plane tries to climb with CLIMB_TROTTLE to programmed altitude + ALT_OVERSHOOT. This can be very useable to gliders and also for nav debugging - it is signal that wp was "taken".
If someone wan to try, download for my fork:
https://docs.google.com/file/d/0B2QJcuD ... sp=sharingP.S. GPS waypoints now are hardcoded in firmware, so, for every new mission you need to recompile fw. Maybe later, when winter comes, and all debugging was done, maybe will be time to program some GUI for wp setting and mission planning.
Akinys.