NGOS-0.60
Release Notes
NGOS version 0.60
Tim ported libng to Windows. We are able to generate Windows executables now.
Michael fixed ‘api ngctrl-dump’ command. Arguments are working properly now. Added HW.led-swap which allows to swap the LEDs (left<->right). Optimzed ads1255 handling. Switched to continues read, which elimates one FSMstate and a NOP delay within the ISR. Added a RESET command at init of ADS1255. The reset starts selfcalibration and ensures proper startup. Prepared eeprom conf storage, similar to sb controller, not yet finished.
Amir changed controller amir-ng and switched the angle conversation for nick and roll: nick (pitch) now correctly has range -90..90 degrees as it’s coming from a asin().
Amir implemented “HW.gyro.scaling” allowing to scale the gyro measurement in promilles. This looks very promising! Be sure to use qngctrl to make sure gyro integration has identical scaling as the acc (eg. verify that when pitching for 45 degrees the reached angle in qngctrl is reached and hold like a plateau and that the acc does not have to pull the integral somewhere else!).
Changed ACC_MEANCNT from 128 to 32. The delay was too big and irritated our filters. No need for such a large mean. Gyro scaling now works and we have wonderfull angles.
Timo implemented optional usage of openocd 0.4.x configurations (instead of openocd-0.3.x). openocd-0.4 configuration files will be used when configure is called with –enable-openocd4 .
Fixed small jtag flash problem introduced in r4823.
‘conf store’ on RCC is working now. Michael finished command ’edit servo [0..4]’.
settings can be changed with keyboard. zeropos, lower limit, upperlimit, zeropos
and direction. So far only variables are written.
Implemented new controller parameters KalmanDCM_Corr_weightNR,
KalmanDCM_Corr_weightY for controller amir-ng. The decide on the weight of
the two corrections calculated (nick/roll-correction and yaw-correction).
Activated compass. Compass now points towards north with angle 0. Compass yaw
drift stabilization with attitude compensation seems to work. Optimized compass
yaw drift compensation: only calculating new correction every 20th cycle.
Splitted calculation into 3 parts, each done in a separate cycle. Added
cs.in.Y_n calculation so that old compass commands work.
Moved location of CTRL.use.* parameters in show conf in controller amir.
Lowered ACC_MEANCNT to 1. we do not want any delays.
Implemented three separate scaling parameters HW.gyro.scale.N, HW.gyro.scale.R,
HW.gyro.scale.Y for gyro scaling. Please take care! Gyro scaling is most
important for good performance of the filters! Be sure to check qngctrl and
make sure that gyro integration is scaled exactly the same as the guessed
angles! You can verify this by moving your NG from attitude 1 to attitude 2
while checking that the angles ‘jump’ from angle 1 to 2 and do net get pulled
into any direction afterwards, meaning you draw “plateaus” in qngctrl’s graphs.
Extended maximal shell command line length to 160 characters.
Ralf implemented new behavior conditions: when.rc.sticks.both,
when.landed.rc.sticks.both, when.rc.sticks.both.delay,
when.landed.rc.sticks.both.delay. cleanup in stick behavior conditions.
Many improvements in the amir-ng controller. Attitude and orientation essentially work, also with attitude compensated compass support. GPS position estimation works as well using 3x Kalman filters guessing position and velocity. GPS navigation tries to calculate the deviation angle to the target position… see debug output.
Extended qngctrl to support a dump intervall in [ms]. It can be configured using the GUI and gets stored with the other parameters in ~/.config. Replaced the nice copter model from Wooz with a simple tie flighter model which while not looking as sexy as the previous model at least turns correctly around all three axes. Something in the old model seems to be wrongly scaled resulting in one axis not moving.
Implemented “debug floatspeed”. It shows massive speed improvements between float3232 and float.
Updated DCM and Position default controller dependent parameters.
Finished GPS navigation code in controller amir-ng. Implemented new behavior actions nav.position.hold(on|off), nav.coming.home(on|off), nav.store.target() and nav.set.target(lon,lat). Added new controller dependant parameters NAV.angle.max and NAV.angle.attack to configure navigation maximum angle and it’s attack. The code was airborne and at was able to hold position.
Tim added a new Makefile target ‘docs’ to NGOS.
Implemented a compass heading spike filter. Will accept >5 degree changes only after the second measurement. Implemented a navigation spike filter: more that 5 degrees of change only get accepted after the second time seen. Implemented GPS position spike filter.
Fixed bug in float3232_sin(): angles >90 degrees gave a wrong result.
Moved DSL parsing and polling from ISR to task, servo jitter is slightly better now.
Qngctrl will load images either from /usr/share/qngctrl/ or cwd() now.
New behavior action conf.load.store (load from and store to).
Fixed DCM orientation: z-axis now points to the center of earth, fixed PIDs accordingly.
Fixed command line history.
Fixed qngctrl 3D model: It now correctly turns around all axes.
Fixed more DCM problems showing up after changing the coordinate system. We did several test flights and it seems that the amir-ng controller in + mode now flys quite well. Please be aware the x-mode still has problems!
Added new behavior conf.store.last.loaded() which stores conf to the slot it was loaded from.
Added support for Mikrokopter’s mk3mag connected on i2c0. tests standing out. controllers can’t use the sensor output yet.
BLC HAL also works for a single controller now. Fixed bug in hexa HAL, convert correctly from float3232 to int.
Implemented controller dependant commands (eg. “show nav” when controller amir-ng is active).
Fixed GPS navigation which was broken by our DCM coordinate system fix.
Removed HAL based PT1 compensation and replaced it with a controller framework based PT1 compensation for nick/roll only.
Merged Michael’s mk3mag support: He added device detection on the I2C bus for the mk3mag and implemented the command ’loop mk3mag’. The mk3mag gets automatically used when compass support is enabled.
Added a spike filter for compass calibration.
Cleanup in HALs: pt1 compensation moved to ctrl.c general to all controllers.
Implemented the ‘quad45’ HAL, intended for NGs with SBs turned by 45 degrees.
Moved parameters use_dtc, use_pt1comp and the pt1 parameters from HALs to globals. This makes more sense as pt1 compensation and dtc is implemented in ctrl and no longer in the HALs. The new parameters are called CTRL.use.dtc and CTRL.use.PT1.comp.
Implemented the new command ‘behavior do <action>(<aargs>). it allows us to trigger a behavior action by hand from a shell. Added alias ‘do’ for ‘behavior do’.
Implemented height filter in ctrl-amir-gps.c for the amir-ng controller. We now correctly fuse acc-z in the earth system with the baro measurements. Added PID on throttle for height control. Added needed heigh controller parameters to amir-ng controller parameter list.
Added separate Kalman parameter Baro_R for Baro in amir-ng.
Implemented ‘dump corr’ to debug rc calibration.
Implemented a new behavior condition called when.flying.rc.pot.binary().
Implemented a Heading Hold (HH) mode for the amir-ng controller. The new controller dependant parameter CTRL.use.HH chooses if the HH mode is activated or not.
Fixed initialization of as.headingY in the amir-ng controller.
Implemented a new HAL called quadFH. It’s a rc-input fixed heading HAL, allowing the user to turn the copter by the yaw axis while still having rc controls working towards the defined direction. Current the direction is hardcoded to the configured HAL parameter called HAL.fixed.heading.
Adjusted default values. Fixed shell parser error which did no longer handle unknown commands correctly in all cases.
Implemented new shell command ‘scale integral [nick|roll|yaw]’. It expects the user to turn the NG around the respective axis choosen and then outputs the calculated new scaling for that axis. It then asks if that scaling should be stored in the respective global variables.
We now use the gps velocity when updating the position Kalman filter in amir-ng. This results in a much more stable velocity and eliminiates the effect of the accumulating velocity.
Fixed several sign and axis problems in amir-ng’s position code.
Implemented new controller dependand commands for amir-ng: ‘show dcm’, ‘show dcm-kalman’, ‘show pos’, ‘show pos-kalman’, ‘show home’ besides ‘show nav’.
Fixed typo for blc16 in device table. The last blc should work now as well.
Michael fixed bug in behavior_condition_when_rc_pot_lt(N8 arg[], N8 *state).
Added warning to ‘scale integral [nick|roll|yaw]’ should the result be out of bounds. Improved integral scaling: Implemented timeout and the user can abort the scaling process with a keypress. Implemented controller and HAL checks. The command complains now, should no controller or no HAL be set. Improved current scaling state output, it now works in all shells.
Splitted gps and height Kalman filters in amir-ng into two parts. Implemented global parameter HW.use.baro and controller dependant parameter CTRL.use.baro. We are now able to run the x/y (position) Kalman separately from the z (height) Kalman.
Implemented new amir-ng controller dependant commands ‘show height’ and ‘show height-kalman’ showing the calculated controller height and their respective Kalman filter data structure.
Splitted DCM kalman into two seperate systems: acc / compass. Introduced a new controller dependant parameter called DCM.Kalman.Compass.R for the second system.
Fixed GPS tick for statistics. Now correctly checking gps meta data and ticking only when newdata toggles.
Enabled DCM Kalman filter covariance calculation disabling. This makes sure that we no longer calculate covariances, when they have coverged. Also implemented covariance disabling for gps position and height Kalman filters.
Changed defaults: I.yaw=35, Acc.R=0.001 and Compass.R=0.1. This means we made acc correction for attitude faster and compass correction for orientation slower.
Implemented yaw integral activation delay. Introduced new controller dependant parameter I.yaw.delay defining the activation delay in [ms].
Eliminated conf.TRIMnick, conf.TRIMroll, conf.TRIMyaw and adjusted all controllers.
Fixed GPS navigation: nick/roll override was still swapped. Corrected and checked by hardcoding different deviation curses.
Fixed acc body->earth rotation for acc measurement which was plain wrong since the coordinate system change! No wonder acc integration did not work as expected!
Fixed height Kalman. Now calculating in [m]. scaling to [mm] in output. Holding velocity with zero which is plain wrong. Strangly velocity is still accumulating.
Fixed acc integration in position filter which still had x/y swapped.
Fixed target deviation angle which was wrong since the coordinate system change. We tested it with all body orientations, this time it’s flaming right.
Adjusted default parameters: set I.yaw=0, CompassR=0.0001, POS.Kalman.Q=0.2, POS.GPS.R=0.05, NAV.angle.attack=50.
Refactorated ctrl.c: Ripped out all dump related code except for the shell commands and moved them to dump.c
Introduced cs.out.nav[NRY] for navigation output. Introduced cs.out.navSig which flags position hold on/off.
Renamed dump.c to ctrl-dump.c and created a ctrl-dump.h which contains exported functions. dump.h is used for the API only now. Moved dump commands from ctrl.c to dump.c and renamed them accordingly. updated command table. We now support dumping on serveral ttys at the same time. Refactored most of the code.
Prelimary implementation of the new request based dumping protocol for NG clients. Implemented the first 12 packet types and their payload creation. Implemented ‘api ngctrl-v2-list’. The new command ‘api ngctrl-v2-dump’ works. The command ‘api ngctrl-v2-list’ shows it’s current state.
We now are able to dump on all terminals simultaniously using the ngctrl v2 protocol. The protocol is message based, where each message type can be requested with an arbitrary interval. A message consists of a number of associated values of the same type. We currently have 12 message type ranging from ‘gyroscopes’ over ‘attitude’ to ‘gps position’.
Fixed typo in dump_api_ngctrl_dump() which prevented qngctrl from working.
Ajusted per gyro-type default settings. Lowered D. Lowered P for adxr. set I.yaw to 0 for all.
Made stick factors the same in defaults for adxr and mlx.
Renamed ‘debug corr’ into ‘debug calibration’. Implemented rc calibration means for N/R and MN/MR. currently taking a 20 points running mean. Using that in rc calibration now.
Changed in-flight calibration: Now subtracting correction angle directly from guessed angle (in the controller) and putting that into cs.out.[NR]. So the controllers essentially output corrected angles (cs.out.[NR]).
The new in-flight calibration only works while flying. ctrl_calibrate_rc_bearing() and ctrl_calibrate_rc_throttle() will return with a error beep when called while the flight state is not in flying state.
Fixed HAL quadX to use the new in-flight calibration. X-mode should now work as well.
Dropped table based asin() in amir-ng as it’s resolution is too low. we need a better table.
Implemented warning message when setting a controller which quality is lower than “proven”.