James Cotton
3d1a6cbcba
Attitude: Make sure the EKF can init if HomeLocation is not set but the
...
magnetic field is. Good for switching between indoor and outdoor mode.
2012-08-12 16:11:04 -05:00
James Cotton
75db0fcb35
Merge branch 'next' into revo
...
Conflicts:
flight/Modules/GPS/GPS.c
shared/uavobjectdefinition/manualcontrolsettings.xml
shared/uavobjectdefinition/systemalarms.xml
2012-08-12 14:38:38 -05:00
Stacey Sheldon
29ab1d8cf3
actuator: factor out settings updates from main loop
2012-08-11 19:46:00 -04:00
Stacey Sheldon
b505602c15
Merge remote-tracking branch 'origin/stac/rc-tx-joystick-emulation' into next
2012-08-11 11:21:18 -04:00
Stacey Sheldon
49c153003c
hid joystick: use linearly scaled channels
...
Scales each channel only based on max and min calibrated values.
The neutral value is now ignored so the joystick sees a linear
range between min and max.
This is particularly useful to allow the full range of values for
throttle to be passed through to the joystick.
2012-08-10 23:36:06 -04:00
James Cotton
06a6e367b0
Merge remote-tracking branch 'origin/hyper/OP-661' into next
2012-08-08 13:49:48 -05:00
Stacey Sheldon
ef0c12b1b6
hid joystick: emulate a USB HID joystick using RC Transmitter
...
Adds a new RCTransmitter setting for the USB HID interface which
emulates a USB HID joystick. The scaled RC receiver channels
from any RCVR protocol are passed through to the various emulated
joystick controls.
The main use for this feature is to allow you to use your own RC
transmitter with any RC simulator on a PC.
This is known to work with CRRCsim but should work with any simulator
that supports joystick input.
2012-08-05 21:45:27 -04:00
James Cotton
9f3c8dddd3
Add a version of the sin lookup table that is in ram instead of flash
2012-08-03 12:15:57 -05:00
James Cotton
490955dbea
Use cos_lookup instead of sin_looup(x+90)
2012-08-03 11:34:05 -05:00
James Cotton
fc2f8376bc
Prevent an alarm from ManualControlCommand when using autotuning mode.
2012-08-03 09:37:47 -05:00
James Cotton
50c7641162
Move the PID methods into a standalone library
2012-08-03 09:37:46 -05:00
James Cotton
2723ff4be3
Factor the virtual flybar code out of the stabilization module
2012-08-03 09:37:46 -05:00
James Cotton
aae0e562c6
Create a sine lookup table that is cached in flash and make relay tuning start
...
ot use this.
2012-08-03 09:37:46 -05:00
James Cotton
924c91ce1e
Fix mistake from previous merge with duplicate the STABILIZATIONOMDE_ATTITUDE
...
case
2012-08-03 09:37:46 -05:00
James Cotton
8565dfbcc3
Factor the relay tuning out of the main stabilization.c file into it's own
...
tool.
2012-08-03 09:37:46 -05:00
James Cotton
ee4bb84e36
Fix: Increase teh memory for autotune back to 1024 which leaves 100 free.
2012-08-03 09:37:46 -05:00
James Cotton
561cf994b0
Reduce the memory footprint of the sin lookup table by using sin(x+pi) =
...
-sin(x). Still just needs to move into flash and have some options about
precision when in its own library function.
2012-08-03 09:37:46 -05:00
James Cotton
652647fc87
Make autotuning module optional
2012-08-03 09:37:46 -05:00
James Cotton
d0ef95ff9a
Fix idiotic bug in the stab_refactor
2012-08-03 09:37:46 -05:00
James Cotton
2ccd6605a4
Now the stabilization refactor is in we can make swapping between tuning the
...
system in rate or attitude mode software configurable.
2012-08-03 09:37:45 -05:00
James Cotton
24d9e50c08
Based on the selected behavior either apply or save the stabilization settings
2012-08-03 09:37:45 -05:00
James Cotton
7ea14ecc22
Track the output gain instead of amplitude so the measured values are
...
consistent if the settings are changed afterwards.
2012-08-03 09:37:45 -05:00
James Cotton
17878b32f3
Make autotune run within an attitude loop instead of direct rate mode. Easier
...
for beginners.
2012-08-03 09:37:44 -05:00
James Cotton
a9af53b4f3
Create new autotuning module which rotates through the axes for autotuning and
...
then computes new stabilization settings.
2012-08-03 09:37:44 -05:00
James Cotton
44e72d0a70
A big refactoring of stabilization.c to get rid of the two separate loops and
...
move them into one big structure. This makes it easier to implement other
modes.
2012-08-03 09:37:44 -05:00
James Cotton
e01c5d5f87
Get online estimation of period and amplitude working
2012-08-03 09:37:44 -05:00
James Cotton
4ac8df6aa8
Make the system perform an online estimate of the period and amplitude of the
...
oscillation during relay tuning
2012-08-03 09:37:44 -05:00
James Cotton
17a0d3ebb4
Add a relay stabilization mode
2012-08-03 09:37:44 -05:00
Richard Flay (Hyper)
6d34795494
Re-enabled simposix SDCard support, and removed obsolete SDCard alarm usage from System module
2012-08-01 19:53:59 +09:30
Werner Backes
e32152386a
Increased stack for PIOS_SETS_HOMELOCATION case to avoid running into low stack warnings when settings the home location from GPS was actually used.
2012-07-31 11:10:23 +02:00
James Cotton
dde9de080e
Need to increase the GPS stack size when I include the GPZDA message
2012-07-29 12:41:20 -05:00
James Cotton
24636eb5f4
Add a waypoint above home for the box pattern.
2012-07-28 22:55:59 -05:00
James Cotton
9bd49ded4f
OSX Simulator - get model type correctly
2012-07-28 13:35:31 -05:00
James Cotton
221ae05ef6
Perform the update every cycle. Mag rate of 0.001 seems to work well.
2012-07-27 13:20:30 -05:00
James Cotton
abb0caa6bd
Try a different mag nulling algorithm.
2012-07-27 13:14:18 -05:00
James Cotton
9f00eda1b4
Add the mag offset compensation into into the simulated sensor code
2012-07-26 21:00:30 -05:00
James Cotton
880d58e4d9
Changes to mag nulling from D-Lite. Perform update only when we have a new
...
vector sufficiently different from the previous one.
2012-07-26 20:38:16 -05:00
James Cotton
6867068b9e
Merge branch 'saving_queue' into next
2012-07-25 13:28:17 -05:00
James Cotton
c587ceebfd
Make the mag offset nulling convergence rate come from the UAVO. When it is
...
set to zero nulling does not occur to allow us to still calibrate the sensors.
2012-07-25 11:23:27 -05:00
James Cotton
3b57b492d0
Mag bias tracking seems to work
2012-07-25 11:19:39 -05:00
James Cotton
1a5af9dafb
Remove some old debugging code
2012-07-25 11:10:10 -05:00
James Cotton
d1e6dcc2f0
First pass implementation of William Premerlani's magnetometer bias correction
2012-07-25 11:07:40 -05:00
James Cotton
36fcdcc107
Make PH use axis lock by default
2012-07-24 14:10:05 -05:00
James Cotton
6561b9b164
For now make it an error when GPS is enabled but missing. However, no warnings
...
when it's present.
2012-07-24 11:28:31 -05:00
James Cotton
9865466da9
Make sure to create the system queue BEFORE calling task start. Systemmod
...
initializes differently than other threads and I missed htat. Huge thanks to
Hyper for making me realize that despite the fact I didn't see it :D.
2012-07-24 09:51:03 -05:00
James Cotton
d75fef52ee
Increase the overo event queue size to try and stop getting warnings. Only
...
allocate when using overosync.
2012-07-24 09:48:24 -05:00
James Cotton
ea5c3be026
Need to add hooks in sendObject and receiveObject to actually transmit _TS objects
2012-07-24 02:57:51 -05:00
James Cotton
858c2cd512
Increase the size of the overo queue
2012-07-24 01:54:04 -05:00
James Cotton
8f8ae5bacb
For revolution we MUST initialize teh GPS objects all the time or attitude will
...
fail
2012-07-23 10:01:32 -05:00
James Cotton
e38325c745
Should check that the queue allocates and initialize shoudl return -1 if not
2012-07-23 08:47:43 -05:00
James Cotton
545018244c
Make saving occur within the system thread instead of the event system thread
2012-07-22 23:03:27 -05:00
Oleg Semyonov
f3f34e8f9f
AeroSimRC: fix CC3D virtual sensor readings in simulation mode
2012-07-22 14:18:49 +03:00
James Cotton
d8e0cbc78f
Make inadequate lock a warning instead of error/critical from GPS. This allows
...
flying indoors.
2012-07-22 02:17:58 -05:00
James Cotton
42501d6312
Merge branch 'nosave_while_armed' into revo
2012-07-22 02:13:25 -05:00
James Cotton
bcebced609
Merge branch 'revo_gps_merge' into revo
2012-07-22 01:21:50 -05:00
James Cotton
a559286d0b
A few of the UBX types were missing a struct for the type.
2012-07-22 01:21:12 -05:00
James Cotton
fa4adf1630
A few of the UBX types were missing a struct for the type.
2012-07-22 01:17:06 -05:00
James Cotton
9c512261e6
When in indoor mode reset the baro offset to zero
2012-07-22 01:02:14 -05:00
James Cotton
93faf131b0
Merge branch 'next' into revo
...
Conflicts:
flight/Modules/GPS/GPS.c
flight/Modules/GPS/NMEA.c
flight/Modules/GPS/UBX.c
flight/Modules/GPS/inc/NMEA.h
flight/Modules/GPS/inc/UBX.h
flight/Revolution/System/inc/pios_config.h
flight/Revolution/UAVObjects.inc
ground/openpilotgcs/src/plugins/uavobjects/uavobjects.pro
ground/openpilotgcs/src/plugins/waypointeditor/waypointeditorplugin.h
shared/uavobjectdefinition/gpsvelocity.xml
2012-07-22 00:43:19 -05:00
James Cotton
5649813c2b
Make sure to always compare BiasCorrectedRaw against its enum. Also reversed
...
the order of TRUE,FALSE in the definition to make it safer anyway.
2012-07-21 17:24:58 -05:00
James Cotton
d36663dbbd
Treat the GyroBias UAVO like a state estimate of the actual gyro bias so now we
...
subtract that from the raw sensor readings to get the Gyros UAVO value
2012-07-21 15:14:45 -05:00
James Cotton
3e33bb49a2
EKF gyro bias into the object now working propely
2012-07-21 15:11:04 -05:00
James Cotton
02dfa7bd82
Change how the updated settings in attitude are changed to make it easier to
...
initialize them all
2012-07-21 14:31:14 -05:00
James Cotton
3f4706ad4c
Make it a critical error when an invalid attitude algorithm is selected
2012-07-21 14:00:52 -05:00
James Cotton
69057a1373
No reason to get homeLocation every cycle
2012-07-21 13:57:25 -05:00
James Cotton
7cdf47c1d4
Make the sensors code only apply the GyroBias from the UAVO which is now coming
...
consistently only from the attitude module
2012-07-21 13:51:20 -05:00
James Cotton
e5bd999975
Process the settings updates more discretely in revo attitude
2012-07-21 13:50:16 -05:00
Stacey Sheldon
123f199160
gps: fix case on GPS.h file
2012-07-21 14:42:04 -04:00
Stacey Sheldon
fc78d9f7d8
nmea: fix typo in DEBUG macro name
2012-07-21 14:23:14 -04:00
Stacey Sheldon
eafd525323
Merge remote-tracking branch 'origin/D-Lite/ubx-parser-next' into next
2012-07-21 14:22:10 -04:00
James Cotton
797a4def6a
Do not use the data from the magnetometer if it contains NAN
2012-07-21 11:43:31 -05:00
Werner Backes
d4a401ce30
Removed Revolution specific code
2012-07-21 07:58:00 +02:00
James Cotton
bcdd5a8bba
Fixes to the overo module where it was thinking the fifo buffer writes failed
2012-07-20 13:45:31 -05:00
James Cotton
5091b16065
Needs work but it's sending data now
2012-07-20 11:36:49 -05:00
James Cotton
6a3c067c18
Zero out the packet counter when pios_over is initialized.
2012-07-20 10:45:20 -05:00
James Cotton
6b3e5573a0
The overosync module now uses pios_com interface.
2012-07-20 09:46:28 -05:00
Werner Backes
bcee75a270
Added comment to explain the gpsDataUpdated flag
2012-07-20 11:56:40 +02:00
James Cotton
3eb41d3ef2
When the systemmod callback happens exit if the operation is error or completed
2012-07-19 22:18:36 -05:00
James Cotton
27ad0fcf6f
Don't allow the system to save while armed
2012-07-19 21:51:31 -05:00
Werner Backes
6db2c949a3
Report GPS NO_FIX status only once per message set and not with every
...
single message.
2012-07-20 00:23:05 +02:00
Werner Backes
d3962f3303
Removed message counter from nmea_parsers structure and made it const to
...
save some RAM.
2012-07-19 23:37:11 +02:00
Werner Backes
15fa42058e
Unified statistics counters between UBX and NMEA parser and moved them
...
to GPS.c.
2012-07-19 22:00:24 +02:00
Werner Backes
307626d1de
Fixed typo
2012-07-19 20:46:44 +02:00
Werner Backes
926e3d93b7
Removed unused variables
2012-07-19 20:14:51 +02:00
James Cotton
7492d34d25
Merge branch 'overo_control' into revo
2012-07-19 08:35:39 -05:00
Werner Backes
a22a11d973
Cleanups:
...
- removed unused nav_status parser function
- enum coding style change
2012-07-19 13:05:55 +02:00
James Cotton
4306afa841
Update the module and overosyncstats to track buffer underruns
2012-07-17 17:21:51 -05:00
James Cotton
9c91436428
Clean up some cruft from Overo module and add a packet counter
2012-07-17 16:17:56 -05:00
James Cotton
db27653859
Make the Overo module use the new driver
2012-07-17 16:11:23 -05:00
James Cotton
a6ba379af9
PIOS_OVERO driver which handles the communications to the overo and ensures the
...
data stays in frame.
2012-07-17 15:34:54 -05:00
James Cotton
bc075c5d2c
Only schedule overo packets on the NSS line rising to avoid the frame sync
...
errors we were seeing previously
2012-07-17 11:45:45 -05:00
James Cotton
6b101d71af
Merge remote-tracking branch 'origin/Brian-PipXtreme-V2' into revo
2012-07-15 12:32:35 -05:00
Brian Webb
a252b78fea
Fixed transparent comms on PipX.
2012-07-14 17:14:43 -07:00
James Cotton
9eee4f1bc7
Made OverSynce an optional module.
...
Conflicts:
shared/uavobjectdefinition/hwsettings.xml
2012-07-14 09:07:22 -05:00
James Cotton
d150fd5331
Merge branch 'next' into revo
...
Conflicts:
flight/Modules/ManualControl/manualcontrol.c
ground/openpilotgcs/src/plugins/config/input.ui
ground/openpilotgcs/src/plugins/uavtalk/telemetry.cpp
shared/uavobjectdefinition/manualcontrolsettings.xml
2012-07-13 10:40:14 -05:00
Werner Backes
bc7defe21f
Changed usage of UBX structures to follow changed structure
...
declarations. (see commit e6f62f)
2012-07-13 14:48:11 +02:00
Werner Backes
7207d2bb98
Fixed typos in comments.
2012-07-13 14:43:26 +02:00
Werner Backes
6ae9db8cb7
Removed typedefs for structures to be consistent with style guide.
2012-07-13 14:40:11 +02:00
Werner Backes
e6f62f5806
Deleted commented-out code
2012-07-13 13:22:27 +02:00
Brian Webb
3fabdb9963
Fixed conflicted merge with origin/next.
2012-07-11 19:25:05 -07:00