Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add latest fixed wing control bits, multi rotors supported. #137

Merged
merged 289 commits into from
Jan 11, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
289 commits
Select commit Hold shift + click to select a range
61c97b1
Ooops... last version of file was still in editor
Oct 28, 2012
71fad98
Finish implemention of ELF loader static constructor support. Still …
Oct 29, 2012
5681b61
C++ constructors work with ELF load now
Oct 29, 2012
b48508c
C++ static destructors work with ELF load too now
Oct 29, 2012
5c160fa
libm compilation fixes from Darcy Gong
Oct 29, 2012
228c77b
Update documentation to at least reference the ELF loader.
Oct 29, 2012
ce26531
More documentation updated to reference the ELF loader.
Oct 29, 2012
5022f81
Add documentation for the binary loader
Oct 30, 2012
20ede8d
Documentation update
Oct 30, 2012
26cbab4
Add apps/netutils/codecs and associated NSH commands from Darcy Gong
Oct 31, 2012
33a3edb
Add apps/examples/wgetjson from Darcy Gong
Oct 31, 2012
a74dd08
Documentation update
Oct 31, 2012
66aae45
Add misc/uClibc++ and build hooks in nuttx/
Oct 31, 2012
05a1bb2
Add apps/examples/cxxtest from Qiang Yu
Oct 31, 2012
25136e9
Convert configs/sim/ostest to use mconf tool; Add configs/sim/cxxtest
Oct 31, 2012
683e54b
Fix DRAM size in STM32f4discovery defconfig files
Oct 31, 2012
e60d448
Put uClibc++ header files in a different directory from NuttX header …
Nov 1, 2012
76e6bb6
Correct name of another uClibc++ directory
Nov 1, 2012
3ceeb8f
Fix uClibc++ wstrlen bug
Nov 1, 2012
a5b1899
Add support for ferror(), feof(), and clearerr()
Nov 1, 2012
1214744
ST32F4Discovery board.h patches from Freddie Chopin
Nov 1, 2012
eb26187
Add __cxa_atexit(); atexit() is now built on top of on_exit()
Nov 1, 2012
f5776de
uClibc++ compiles... but it is a long way from linking
Nov 1, 2012
d7aefb0
Fixes for warnings from Freddie Chopin
Nov 1, 2012
73bd482
uClibc++ updates
Nov 1, 2012
d1d50b4
Add libsupc++ to sim/cxxtest configuration
Nov 2, 2012
4960d58
Fixes to STM32 definitions from Freddie Chopin
Nov 2, 2012
1850aff
Another fix to STM32 definitions from Freddie Chopin
Nov 2, 2012
708ebb5
More uClibc++ build fixes
Nov 2, 2012
23e8d53
Create an STM32F4Discovery configuration for testing uClibc++
Nov 2, 2012
df77815
Add support for wget POST interface; from Darcy Gong
Nov 3, 2012
1336ed8
uClibc++ updates
Nov 3, 2012
bae3b4f
Several small things
Nov 3, 2012
0062c03
More STM32 Value Line updates from Freddie Chopin
Nov 3, 2012
f561a5a
RGMP 4.0 update from Qiang Yu
Nov 4, 2012
9583fa1
Relay example from Darcy Gong
Nov 4, 2012
baeabac
Massive clean-up of linker scripts from Freddie Chopin
Nov 4, 2012
f6de06f
Add interfaces flags, extend ifconfig, add ifup and ifdown commands (…
Nov 4, 2012
396d678
Missed a few ld.script files in Freddie Chopin's last big change
Nov 4, 2012
bb96124
Changes to get a clean build of apps/examples/cxxtest with the STM32 …
Nov 4, 2012
516633d
Change = to += in setting of LDFLAGS in all architecture Makefiles
Nov 4, 2012
e67d8af
uClibc++ exceptions are working
Nov 5, 2012
5d0999c
Prep for 6.23 release
Nov 5, 2012
7961d6c
Make ostest RR scheduler test use less memory from Freddie Chopin; Pl…
Nov 5, 2012
9fa8d5d
STM32 F100 High Density support and generic board configuration from …
Nov 6, 2012
e99deb5
Patch to removed MMCSD NSLOTS warning from Freddie Chopin
Nov 6, 2012
a1d2cc2
Fix apps/netutils/webclient build problem
Nov 6, 2012
ae6c7f8
STM32 OTG FS device fix from Petteri Aimonen
Nov 7, 2012
44b76a4
Add driver for Univision UG-2864AMBAG01
Nov 7, 2012
0bb1b8c
Convert configs/stm32f4discovery/nxlines to use Kconfig tool
Nov 7, 2012
c9750ef
Add UG-2864AMBAG01 initialization for use on STM32F4Discovery
Nov 8, 2012
169012e
STM32 OTG FS fix from Petteri Aimonen; Finish off some UG-2864AMBAG01…
Nov 8, 2012
bf340e0
Support for non-common vectors from Freddie Chopin
Nov 8, 2012
d04ce72
Several patches from Petteri Aimonen (mostly NxWidgets)
Nov 9, 2012
b5167ec
UG-2864AMBAG01 driver is basically functional
Nov 9, 2012
07c9ee7
Misc changes to accept setenv.bat; Add UG-2864AMBAG01 reverse landsca…
Nov 9, 2012
0c04402
Update to kconfig-frontends-3.6.0, Expand the tarball so that we can …
Nov 10, 2012
a69a97b
move lib/ to libc/ to make room for a true lib/ directory. Rename li…
Nov 10, 2012
a09a1f2
Trying to recover from deleted directory contents
Nov 10, 2012
6d8270f
Still trying to recover directory contents
Nov 10, 2012
5b5b007
OK.. I think the directory has been recovered and renamed
Nov 10, 2012
3bf4cd0
Generated libraries are now installed in a new lib/ directory
Nov 11, 2012
3ceb882
arch/../src/Makefiles now use only libraries in lib/
Nov 11, 2012
a2926f6
Remove bash fragments that test for board/Makefile
Nov 11, 2012
a18d038
Partial change: Removing bash ARCHIVE loop
Nov 11, 2012
24a0389
Partial change: Removing bash ARCHIVE loop
Nov 11, 2012
2e97e07
Partial change: Removing bash ARCHIVE loop
Nov 11, 2012
a42dcee
Completes removal bash ARCHIVE loop; Adds basic Makefile for native w…
Nov 11, 2012
63e8e1b
Correct some issues with last check-in; ez80 still does not build
Nov 11, 2012
fe19d5b
A few more build fixes
Nov 12, 2012
d3ac724
Changes to get a clean ez80 build using the ZDS 5.1.1 toolchain
Nov 12, 2012
923d1e4
Add tools/mkdeps.bat and tools/mkdeps.c
Nov 13, 2012
ccc5929
Fix some mkdeps.c issues; Incorporate mkdeps.c build in Makefiles
Nov 13, 2012
b74772e
Mostly cosmetic changes
Nov 13, 2012
9324847
Oops.. nested strtok in mkdeps.c, need to use strtok_r
Nov 13, 2012
c1e28f5
first version of yaw control loop, needs testing
thomasgubler Nov 11, 2012
5ea79ad
Merge branch 'master' of https://github.com/PX4/Firmware into fw_control
thomasgubler Nov 13, 2012
bcdd793
Centralized the definition of the INCDIR script in tools/Config.mk
Nov 13, 2012
50d55ef
Add tools/incdir.bat; Rename top-level Makefile to Makefile.unix
Nov 13, 2012
2e8ca5c
This is the new, top-level, redirecting Makefile
Nov 13, 2012
693a708
mkdeps.c: Fix some strtok logic; fix some system() return value check
Nov 13, 2012
372c7ce
mkdeps.c: Oops MinGW does not have WEXITSTATUS; Now all of NuttX on …
Nov 13, 2012
81caf90
ModBus fixes from Freddie Chopin
Nov 14, 2012
7213ccf
More native build fixes -- still problems in apps/ directory
Nov 14, 2012
21f3485
Kconfig updates from Freddie Chopin
Nov 14, 2012
2afceac
Qencoder fixes from Ryan Sundberg
Nov 14, 2012
5bba2c1
Simple window natives OS test build now works; Probabaly more to do f…
Nov 14, 2012
f0e3939
fw control: work in progress, heading rate control loop
thomasgubler Nov 14, 2012
1f798ef
Merge branch 'master' of https://github.com/PX4/Firmware into fw_control
thomasgubler Nov 14, 2012
2581506
Move some (hopefully) un-necessary quotes in Makefiles for Mike
Nov 15, 2012
98c0270
More changes for Mike
Nov 15, 2012
afda776
Fix various build-related typos
Nov 15, 2012
9129fb7
Fix a place that had a '\' but needed a '/'
Nov 15, 2012
e24f408
Mirtoo differences from Konstantin; File system fix from Lorenz Meier
Nov 15, 2012
da3dd04
Changes from Mike
Nov 16, 2012
8b823f6
Mostly cosmetic build changes
Nov 16, 2012
48247aa
Fixes for CCycleButton unit test; Add CNumericEdit. Both from Petter…
Nov 16, 2012
0ac67b4
Patches 4-6 from Petteri Aimonen
Nov 16, 2012
e74eed6
Patches 7-9 from Petteri Aimonen
Nov 17, 2012
cc09919
Patches 7-9 from Petteri Aimonen
Nov 17, 2012
d4dca58
Most of the changes needed to support Windows native clean; distclean…
Nov 17, 2012
e7b122c
Finishes all Makefile file changes for Windows native clean
Nov 17, 2012
a98248b
Fix typol in Config.mk that would effect non-Windows builds
Nov 18, 2012
7a68d93
Fix typo introduced into many Makefiles with last changes
Nov 19, 2012
2754c39
0001-RS-485-support-for-STM32-serial-driver.patch from Freddi Chopin
Nov 20, 2012
6833671
0001-some-fixes-for-FreeMODBUS-and-MODBUS-example.patch from Freddi C…
Nov 20, 2012
f552862
Missing comma in EVERY DELFILE/DELDIR macro call in every Makefile
Nov 20, 2012
8c84369
Change how UARTs are enabled for i.MX, M16C, and ez80 to make them co…
Nov 20, 2012
bd050bd
Convert configs/ez80f910200kitg/RCS/ostest to use the newer mconf-bas…
Nov 20, 2012
90b0f6d
Implement pause()
Nov 21, 2012
b665308
Update for ez80 Windows native build (still does not work)
Nov 21, 2012
62432f1
configs/cloudctrl and tools/prebuild.py from Darcy Gong
Nov 21, 2012
057c41d
Big refactoring of toolchain definitions by Mike Smith
Nov 21, 2012
27ec212
/configs/stm32f4discovery/winbuild and configs/cloudctrl upated to us…
Nov 21, 2012
6fb54ec
manual merge of origin/master into fw_control
thomasgubler Nov 21, 2012
cbf2eea
A few more fixes for ez80 Windows Native build (still not enough)
Nov 21, 2012
00f711c
Move some PHY initialization logic for Darcy
Nov 22, 2012
1cb21dd
A few more Windows native build fixes for eZ80
Nov 22, 2012
a3842eb
Merge branch 'master' of file:///Users/Shared/NuttX/NuttX into nuttx-…
px4dev Nov 23, 2012
adb04f6
Local changes to match upstream changes.
px4dev Nov 23, 2012
c184d7b
Enabled aux manual control channels
LorenzMeier Nov 24, 2012
dd05426
manual merge of origin/master into fw_control
thomasgubler Nov 24, 2012
faa672f
mode switching for all platforms, additional fixed wing modes
LorenzMeier Nov 25, 2012
346d93b
Merged
LorenzMeier Nov 25, 2012
20a29bf
Fixes for roll/pitch feedforward
LorenzMeier Nov 25, 2012
2ca09ab
Merged with coordinated turn effort
LorenzMeier Nov 25, 2012
4366d9e
fw_controller testing
thomasgubler Nov 25, 2012
7cc712b
More fixed wing improvements
LorenzMeier Nov 26, 2012
9bc044e
More fixed wing improvements
LorenzMeier Nov 26, 2012
eca1234
Merge branch 'io_arming' into fixedwing_outdoor
LorenzMeier Nov 26, 2012
80b8481
Merged fixed wing branches
LorenzMeier Nov 26, 2012
7d485c1
Merge branch 'rates_setpoint' into fixedwing_outdoor
LorenzMeier Nov 26, 2012
7777d44
Changed to actuators effective in mavlink app
LorenzMeier Nov 27, 2012
90b94b5
Ported all mixers to actuator_controls_effective topic, mixers do not…
LorenzMeier Nov 27, 2012
67fbe41
Merge branch 'delay_test' into fixedwing_outdoor
LorenzMeier Nov 27, 2012
98283e1
Merged
LorenzMeier Nov 27, 2012
e5177b3
Merge branch 'master' into fixedwing_outdoor
LorenzMeier Nov 27, 2012
cc1e0ef
Removed old fixed wing control process
LorenzMeier Nov 27, 2012
54d624f
Added feedforward throttle to pitch compensation, heading from positi…
LorenzMeier Nov 27, 2012
520f335
fix for ground speed minimum, untested
LorenzMeier Nov 28, 2012
9fa628c
Merge branch 'master' of github.com:PX4/Firmware into fixedwing_outdoor
LorenzMeier Nov 28, 2012
00b7976
minor code cleanup, not changing functionality
LorenzMeier Nov 28, 2012
121a9fc
Merge branch '#61-px4io-spektrum-decoder' into fixedwing_outdoor
LorenzMeier Dec 1, 2012
fd14084
Merged with master
LorenzMeier Dec 1, 2012
aa1d57c
Allowed mode switching via command
LorenzMeier Dec 1, 2012
2bfb672
Cleaned up mode indication
LorenzMeier Dec 1, 2012
126e6ac
Enabled manual override switch, work in progress. Added initial demix…
LorenzMeier Dec 1, 2012
1ebb3b4
Merged DSM fixes
LorenzMeier Dec 5, 2012
26faab6
Merge branch 'master' of github.com:PX4/Firmware into fixedwing_outdoor
LorenzMeier Dec 9, 2012
03076a7
Added required additional fields: If system is ok to launch (required…
LorenzMeier Dec 13, 2012
1fc0a65
Merged IO feature branch
LorenzMeier Dec 13, 2012
42ffb41
Merge branch 'master' of github.com:PX4/Firmware into fixedwing_outdoor
LorenzMeier Dec 15, 2012
f81d005
Made PX4IO FMU timeout based on IOs HRT, updating mixers now on every…
LorenzMeier Dec 15, 2012
e56911b
Fixed signal loss detection on S.Bus parsing, stripped PX4IO code par…
LorenzMeier Dec 16, 2012
b9606d0
Reverted arming state machine back to its original state, operational…
LorenzMeier Dec 16, 2012
df5c09e
Fixed MAVLink parameter initialization
LorenzMeier Dec 16, 2012
97a94e3
Fixed MAV_TYPE parameter readout
LorenzMeier Dec 16, 2012
4c2862f
Merged PWM fixes
LorenzMeier Dec 18, 2012
f41e572
Correct demixing scaling for v-tail mixers
LorenzMeier Dec 18, 2012
bc3b660
Cleaned up HIL on FMU / IO combo
LorenzMeier Dec 19, 2012
4676b71
Cleanup in ADC driver, re-add all inputs that are present
LorenzMeier Dec 19, 2012
fe6496a
Correctly do position lock led signalling on IO and position lock mea…
LorenzMeier Dec 19, 2012
28b3ecd
I don't want a switch for failsafe for the copter
Dec 20, 2012
06407b1
My PID integral part fixes
Dec 20, 2012
8053b4b
Revert "I don't want a switch for failsafe for the copter"
Dec 20, 2012
4cf2266
Robustified actuator output topic, added number of mixed outputs
LorenzMeier Dec 21, 2012
6d34211
Merge branch 'gyros_parallel' into fixedwing_outdoor
LorenzMeier Dec 21, 2012
f2fb8c7
Fix typo
LorenzMeier Dec 23, 2012
720a114
Merged NuttX
LorenzMeier Dec 23, 2012
9102b25
Merge branch 'master' of github.com:PX4/Firmware into fixedwing_outdoor
LorenzMeier Dec 24, 2012
d4edf2e
Override is now really disabled for multirotors, also I don't think t…
Dec 24, 2012
c259a34
Allowed rc.txt files as well
LorenzMeier Dec 27, 2012
b2068b4
WIP on mode switching input
LorenzMeier Dec 27, 2012
a6f2c60
Merge branch 'fixedwing_outdoor' of https://github.com/julianoes/Firm…
LorenzMeier Dec 27, 2012
61d7e1d
Reverted changes to multirotor rate controller, changing to a discret…
LorenzMeier Dec 27, 2012
f5bad08
Cleaned up control mode state machine / flight mode / navigation stat…
LorenzMeier Dec 27, 2012
e2196bc
Added position lock check
LorenzMeier Dec 27, 2012
7526dd4
Added header for common priority bands
LorenzMeier Dec 27, 2012
45a4bcb
Merged relay activation
LorenzMeier Dec 27, 2012
8b8330a
Reverted nuttx merge, back to master
LorenzMeier Dec 28, 2012
cc582b2
Only send actuator HIL commands if armed
LorenzMeier Dec 28, 2012
38a1076
Cleaned up attitude control in HIL, implemented very simple guided / …
LorenzMeier Dec 28, 2012
e01c0e1
Reverting more nuttx merge
LorenzMeier Dec 28, 2012
d96add5
Even more cleanup, diff now clean
LorenzMeier Dec 28, 2012
a1e1e7b
Cleaning up calibration requests
LorenzMeier Dec 28, 2012
913f5a7
Cleared last diff items between origin/master and fixedwing_outdoor
LorenzMeier Dec 28, 2012
9e2076b
Cleared last differences, ready for testing
LorenzMeier Dec 28, 2012
be85589
Fixed some typos
LorenzMeier Dec 28, 2012
c652f71
Minor fixes, pushing WIP
LorenzMeier Dec 29, 2012
b240e31
Safer fixed wing mode switching
LorenzMeier Dec 29, 2012
4976a3a
Added accel magnitude check, added conversion functions for various s…
LorenzMeier Dec 29, 2012
0298714
Merge branch 'fixedwing_outdoor' of github.com:PX4/Firmware into fixe…
LorenzMeier Dec 29, 2012
62a95bf
Stabilization enabling / switching
LorenzMeier Dec 30, 2012
142556b
merged
LorenzMeier Dec 30, 2012
abe1b97
Merged IO mixing branch
LorenzMeier Dec 30, 2012
2577e1a
Removed compile errors, removed non-wanted MAVLink dependency in comm…
LorenzMeier Dec 30, 2012
1da1b8f
Merge branch 'fixedwing_outdoor' into fixedwing_io_mixing
LorenzMeier Dec 30, 2012
234af06
Fixed merge error
LorenzMeier Dec 30, 2012
36d5562
Merge branch '#111-px4io-integrated-mixing' into fixedwing_io_mixing
LorenzMeier Dec 30, 2012
1b82dbb
Merge branch '#111-px4io-integrated-mixing' of github.com:PX4/Firmwar…
LorenzMeier Dec 30, 2012
7972a56
State machine / switching improvements
LorenzMeier Dec 30, 2012
8d1b135
A wrong parameter name in commander was responsible for manual overri…
Dec 31, 2012
805c088
The multirotor mixer return 0 instead of the number of channels, my H…
Jan 1, 2013
1b81724
Manually remap the channel assignements for testing.
sjwilks Jan 5, 2013
0a89ab7
Send rc channel ordering and channel attributes from FMU to IO
sjwilks Jan 5, 2013
aaa9af2
Reverting EKF change, as it did not really help.
LorenzMeier Jan 5, 2013
d593820
Allow text files (rc.txt) in addition to rc files. We will get a very…
LorenzMeier Jan 6, 2013
ab85d20
Merge branch 'text_startscripts' into fixedwing_io_mixing
LorenzMeier Jan 6, 2013
83039e7
Reverted unwanted S.Bus changes
LorenzMeier Jan 6, 2013
ad76378
Merge branch 'master' of github.com:PX4/Firmware into fixedwing_io_mi…
LorenzMeier Jan 6, 2013
7842caf
Moved the channel mappings and attributes to the config section
sjwilks Jan 6, 2013
3c85f82
merged relay changes from master
LorenzMeier Jan 6, 2013
a9e87c7
Fixed header for sbus input
LorenzMeier Jan 6, 2013
f89cd31
Used correct datatype, removed unwanted cast
LorenzMeier Jan 6, 2013
1b2e886
Removed unwanted cast
LorenzMeier Jan 6, 2013
e2317ed
Code style fix
LorenzMeier Jan 6, 2013
7922f56
Merge branch 'sbus_rcloss_fix' of github.com:PX4/Firmware into fixedw…
LorenzMeier Jan 6, 2013
0ef1d6d
Merge branch 'master' of github.com:PX4/Firmware into fixedwing_io_mi…
LorenzMeier Jan 6, 2013
d3fd3d8
Merged, compiling
LorenzMeier Jan 6, 2013
359989a
Merge branch 'master' of github.com:PX4/Firmware into fixedwing_io_mi…
LorenzMeier Jan 6, 2013
4462a25
Merge branch 'master' of github.com:PX4/Firmware into fixedwing_io_mi…
LorenzMeier Jan 6, 2013
f788d45
Merged
LorenzMeier Jan 6, 2013
2bd4301
Merge branch 'master' of github.com:PX4/Firmware into fixedwing
LorenzMeier Jan 6, 2013
ac784dc
Merge branch 'master' into fixedwing
LorenzMeier Jan 6, 2013
ef2efab
Removed unlimited printing status message
LorenzMeier Jan 6, 2013
0945a2c
Fixed RC mapping transmission, tested. Fixed RC scaling in manual mode
LorenzMeier Jan 6, 2013
f55beb6
Merge branch 'master' of github.com:PX4/Firmware into fixedwing
LorenzMeier Jan 7, 2013
451b38b
Removed commented-out lines (EXP support)
LorenzMeier Jan 7, 2013
fe5f9d4
Merge branch 'master' into fixedwing
LorenzMeier Jan 7, 2013
8cc9fb9
Merge branch 'master' of github.com:PX4/Firmware into fixedwing
LorenzMeier Jan 8, 2013
780087a
Merged with master
LorenzMeier Jan 8, 2013
b48f99b
Updated state switching to most recent state machine rev
LorenzMeier Jan 8, 2013
6c93cbf
Merge branch 'master' of github.com:PX4/Firmware into fixedwing
LorenzMeier Jan 9, 2013
4435bef
Added offset parameters for roll, pitch and yaw
LorenzMeier Jan 9, 2013
447bcb9
Merge branch 'fixedwing' of github.com:PX4/Firmware into fixedwing
LorenzMeier Jan 9, 2013
d601732
Merge branch 'master' of github.com:PX4/Firmware into fixedwing
LorenzMeier Jan 9, 2013
1a107bd
Added warning, needs more work on the rotation matrix output
LorenzMeier Jan 9, 2013
1d4feb6
Merged sdlog_buffering branch
LorenzMeier Jan 10, 2013
65c8028
Working on override channel mapping, allowed trim cal only with RC on
LorenzMeier Jan 11, 2013
d6116d9
Merge branch 'master' of github.com:PX4/Firmware into fixedwing
LorenzMeier Jan 11, 2013
9ab20b1
Code style
LorenzMeier Jan 11, 2013
dc100f2
Fixedwing controller code style
LorenzMeier Jan 11, 2013
cf563ed
px4io code style
LorenzMeier Jan 11, 2013
cded278
Fixed code style for multirotor_att_control app
LorenzMeier Jan 11, 2013
970ae0c
Fixed code style for attitude estimator
LorenzMeier Jan 11, 2013
fdf1c71
Fixed code style for conversions
LorenzMeier Jan 11, 2013
b52402d
Fixed code style for mavlink app
LorenzMeier Jan 11, 2013
cf8eed9
Merge branch 'master' of github.com:PX4/Firmware into fixedwing
LorenzMeier Jan 11, 2013
9608dfe
Stripped a lot of text from commander app
LorenzMeier Jan 11, 2013
31ca806
More print cleanups in commander app
LorenzMeier Jan 11, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions ROMFS/scripts/rcS
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ if [ -f /fs/microsd/etc/rc ]
then
echo "[init] reading /fs/microsd/etc/rc"
sh /fs/microsd/etc/rc
else
echo "[init] script /fs/microsd/etc/rc not present"
fi
# Also consider rc.txt files
if [ -f /fs/microsd/etc/rc.txt ]
then
echo "[init] reading /fs/microsd/etc/rc.txt"
sh /fs/microsd/etc/rc.txt
fi

#
Expand Down
78 changes: 45 additions & 33 deletions apps/attitude_estimator_ekf/attitude_estimator_ekf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

/*
* @file attitude_estimator_ekf_main.c
*
*
* Extended Kalman Filter for Attitude Estimation.
*/

Expand Down Expand Up @@ -79,18 +79,18 @@ static float dt = 0.005f;
static float z_k[9] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 9.81f, 0.2f, -0.2f, 0.2f}; /**< Measurement vector */
static float x_aposteriori_k[12]; /**< states */
static float P_aposteriori_k[144] = {100.f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 100.f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 100.f, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 100.f, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 100.f, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 100.f, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 100.f, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 100.f, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 100.f, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0.0f, 100.0f, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0.0f, 0, 100.0f, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0.0f, 0, 0, 100.0f,
}; /**< init: diagonal matrix with big values */
0, 100.f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 100.f, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 100.f, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 100.f, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 100.f, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 100.f, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 100.f, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 100.f, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0.0f, 100.0f, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0.0f, 0, 100.0f, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0.0f, 0, 0, 100.0f,
}; /**< init: diagonal matrix with big values */

static float x_aposteriori[12];
static float P_aposteriori[144];
Expand All @@ -99,9 +99,9 @@ static float P_aposteriori[144];
static float euler[3] = {0.0f, 0.0f, 0.0f};

static float Rot_matrix[9] = {1.f, 0, 0,
0, 1.f, 0,
0, 0, 1.f
}; /**< init: identity matrix */
0, 1.f, 0,
0, 0, 1.f
}; /**< init: identity matrix */


static bool thread_should_exit = false; /**< Deamon exit flag */
Expand All @@ -123,6 +123,7 @@ usage(const char *reason)
{
if (reason)
fprintf(stderr, "%s\n", reason);

fprintf(stderr, "usage: attitude_estimator_ekf {start|stop|status} [-p <additional params>]\n\n");
exit(1);
}
Expand All @@ -131,7 +132,7 @@ usage(const char *reason)
* The attitude_estimator_ekf app only briefly exists to start
* the background job. The stack size assigned in the
* Makefile does only apply to this management task.
*
*
* The actual stack size should be set in the call
* to task_create().
*/
Expand All @@ -150,11 +151,11 @@ int attitude_estimator_ekf_main(int argc, char *argv[])

thread_should_exit = false;
attitude_estimator_ekf_task = task_spawn("attitude_estimator_ekf",
SCHED_DEFAULT,
SCHED_PRIORITY_MAX - 5,
12000,
attitude_estimator_ekf_thread_main,
(argv) ? (const char **)&argv[2] : (const char **)NULL);
SCHED_DEFAULT,
SCHED_PRIORITY_MAX - 5,
12000,
attitude_estimator_ekf_thread_main,
(argv) ? (const char **)&argv[2] : (const char **)NULL);
exit(0);
}

Expand All @@ -166,9 +167,11 @@ int attitude_estimator_ekf_main(int argc, char *argv[])
if (!strcmp(argv[1], "status")) {
if (thread_running) {
printf("\tattitude_estimator_ekf app is running\n");

} else {
printf("\tattitude_estimator_ekf app not started\n");
}

exit(0);
}

Expand Down Expand Up @@ -235,7 +238,7 @@ int attitude_estimator_ekf_thread_main(int argc, char *argv[])
/* advertise debug value */
// struct debug_key_value_s dbg = { .key = "", .value = 0.0f };
// orb_advert_t pub_dbg = -1;

float sensor_update_hz[3] = {0.0f, 0.0f, 0.0f};
// XXX write this out to perf regs

Expand Down Expand Up @@ -263,8 +266,8 @@ int attitude_estimator_ekf_thread_main(int argc, char *argv[])
while (!thread_should_exit) {

struct pollfd fds[2] = {
{ .fd = sub_raw, .events = POLLIN },
{ .fd = sub_params, .events = POLLIN }
{ .fd = sub_raw, .events = POLLIN },
{ .fd = sub_params, .events = POLLIN }
};
int ret = poll(fds, 2, 1000);

Expand All @@ -273,10 +276,12 @@ int attitude_estimator_ekf_thread_main(int argc, char *argv[])
} else if (ret == 0) {
/* check if we're in HIL - not getting sensor data is fine then */
orb_copy(ORB_ID(vehicle_status), sub_state, &state);

if (!state.flag_hil_enabled) {
fprintf(stderr,
fprintf(stderr,
"[att ekf] WARNING: Not getting sensors - sensor app running?\n");
}

} else {

/* only update parameters if they changed */
Expand Down Expand Up @@ -308,6 +313,7 @@ int attitude_estimator_ekf_thread_main(int argc, char *argv[])
gyro_offsets[1] /= offset_count;
gyro_offsets[2] /= offset_count;
}

} else {

perf_begin(ekf_loop_perf);
Expand Down Expand Up @@ -336,6 +342,7 @@ int attitude_estimator_ekf_thread_main(int argc, char *argv[])
sensor_update_hz[1] = 1e6f / (raw.timestamp - sensor_last_timestamp[1]);
sensor_last_timestamp[1] = raw.timestamp;
}

z_k[3] = raw.accelerometer_m_s2[0];
z_k[4] = raw.accelerometer_m_s2[1];
z_k[5] = raw.accelerometer_m_s2[2];
Expand All @@ -347,6 +354,7 @@ int attitude_estimator_ekf_thread_main(int argc, char *argv[])
sensor_update_hz[2] = 1e6f / (raw.timestamp - sensor_last_timestamp[2]);
sensor_last_timestamp[2] = raw.timestamp;
}

z_k[6] = raw.magnetometer_ga[0];
z_k[7] = raw.magnetometer_ga[1];
z_k[8] = raw.magnetometer_ga[2];
Expand All @@ -368,8 +376,7 @@ int attitude_estimator_ekf_thread_main(int argc, char *argv[])
static bool const_initialized = false;

/* initialize with good values once we have a reasonable dt estimate */
if (!const_initialized && dt < 0.05f && dt > 0.005f)
{
if (!const_initialized && dt < 0.05f && dt > 0.005f) {
dt = 0.005f;
parameters_update(&ekf_param_handles, &ekf_params);

Expand All @@ -395,13 +402,15 @@ int attitude_estimator_ekf_thread_main(int argc, char *argv[])
}

uint64_t timing_start = hrt_absolute_time();

attitudeKalmanfilter(update_vect, dt, z_k, x_aposteriori_k, P_aposteriori_k, ekf_params.q, ekf_params.r,
euler, Rot_matrix, x_aposteriori, P_aposteriori);
euler, Rot_matrix, x_aposteriori, P_aposteriori);

/* swap values for next iteration, check for fatal inputs */
if (isfinite(euler[0]) && isfinite(euler[1]) && isfinite(euler[2])) {
memcpy(P_aposteriori_k, P_aposteriori, sizeof(P_aposteriori_k));
memcpy(x_aposteriori_k, x_aposteriori, sizeof(x_aposteriori_k));

} else {
/* due to inputs or numerical failure the output is invalid, skip it */
continue;
Expand All @@ -413,9 +422,11 @@ int attitude_estimator_ekf_thread_main(int argc, char *argv[])

/* send out */
att.timestamp = raw.timestamp;
att.roll = euler[0];
att.pitch = euler[1];
att.yaw = euler[2];

// XXX Apply the same transformation to the rotation matrix
att.roll = euler[0] - ekf_params.roll_off;
att.pitch = euler[1] - ekf_params.pitch_off;
att.yaw = euler[2] - ekf_params.yaw_off;

att.rollspeed = x_aposteriori[0];
att.pitchspeed = x_aposteriori[1];
Expand All @@ -431,6 +442,7 @@ int attitude_estimator_ekf_thread_main(int argc, char *argv[])
if (isfinite(att.roll) && isfinite(att.pitch) && isfinite(att.yaw)) {
// Broadcast
orb_publish(ORB_ID(vehicle_attitude), pub_att, &att);

} else {
warnx("NaN in roll/pitch/yaw estimate!");
}
Expand Down
20 changes: 16 additions & 4 deletions apps/attitude_estimator_ekf/attitude_estimator_ekf_params.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

/*
* @file attitude_estimator_ekf_params.c
*
*
* Parameters for EKF filter
*/

Expand Down Expand Up @@ -65,13 +65,17 @@ PARAM_DEFINE_FLOAT(EKF_ATT_R0, 0.01f);
PARAM_DEFINE_FLOAT(EKF_ATT_R1, 0.01f);
PARAM_DEFINE_FLOAT(EKF_ATT_R2, 0.01f);
/* accelerometer measurement noise */
PARAM_DEFINE_FLOAT(EKF_ATT_R3, 1e1f);
PARAM_DEFINE_FLOAT(EKF_ATT_R4, 1e1f);
PARAM_DEFINE_FLOAT(EKF_ATT_R5, 1e1f);
PARAM_DEFINE_FLOAT(EKF_ATT_R3, 1e2f);
PARAM_DEFINE_FLOAT(EKF_ATT_R4, 1e2f);
PARAM_DEFINE_FLOAT(EKF_ATT_R5, 1e2f);
/* magnetometer measurement noise */
PARAM_DEFINE_FLOAT(EKF_ATT_R6, 1e-1f);
PARAM_DEFINE_FLOAT(EKF_ATT_R7, 1e-1f);
PARAM_DEFINE_FLOAT(EKF_ATT_R8, 1e-1f);
/* offsets in roll, pitch and yaw of sensor plane and body */
PARAM_DEFINE_FLOAT(ATT_ROLL_OFFS, 0.0f);
PARAM_DEFINE_FLOAT(ATT_PITCH_OFFS, 0.0f);
PARAM_DEFINE_FLOAT(ATT_YAW_OFFS, 0.0f);

int parameters_init(struct attitude_estimator_ekf_param_handles *h)
{
Expand Down Expand Up @@ -99,6 +103,10 @@ int parameters_init(struct attitude_estimator_ekf_param_handles *h)
h->r7 = param_find("EKF_ATT_R7");
h->r8 = param_find("EKF_ATT_R8");

h->roll_off = param_find("ATT_ROLL_OFFS");
h->pitch_off = param_find("ATT_PITCH_OFFS");
h->yaw_off = param_find("ATT_YAW_OFFS");

return OK;
}

Expand Down Expand Up @@ -127,5 +135,9 @@ int parameters_update(const struct attitude_estimator_ekf_param_handles *h, stru
param_get(h->r7, &(p->r[7]));
param_get(h->r8, &(p->r[8]));

param_get(h->roll_off, &(p->roll_off));
param_get(h->pitch_off, &(p->pitch_off));
param_get(h->yaw_off, &(p->yaw_off));

return OK;
}
6 changes: 5 additions & 1 deletion apps/attitude_estimator_ekf/attitude_estimator_ekf_params.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

/*
* @file attitude_estimator_ekf_params.h
*
*
* Parameters for EKF filter
*/

Expand All @@ -44,11 +44,15 @@
struct attitude_estimator_ekf_params {
float r[9];
float q[12];
float roll_off;
float pitch_off;
float yaw_off;
};

struct attitude_estimator_ekf_param_handles {
param_t r0, r1, r2, r3, r4, r5, r6, r7, r8;
param_t q0, q1, q2, q3, q4, q5, q6, q7, q8, q9, q10, q11;
param_t roll_off, pitch_off, yaw_off;
};

/**
Expand Down
Loading