James Cotton
5b3cc4876e
In simulations a higher GPS noise is required for the INS
2012-04-03 03:42:35 -05:00
James Cotton
32f76db8ae
Only update position desired when you change waypoints active
2012-04-03 03:42:35 -05:00
James Cotton
ba1ade33cb
Get navigation working and program hardcoded flight path
2012-04-03 03:42:34 -05:00
James Cotton
62117430cf
Flip the sign of throttle in the guidance altitude control
2012-04-03 03:42:34 -05:00
James Cotton
7f226867c6
Some bug fixes for revo attitude estimation.
2012-04-03 03:42:33 -05:00
James Cotton
d4488512c0
Add RTH waypoint action
2012-04-03 03:42:33 -05:00
James Cotton
3eac69e953
Create stub for waypoint navigation
2012-04-03 03:42:32 -05:00
James Cotton
af9f36d7df
Improve the attitude initialization for all of the modes
2012-04-03 03:42:32 -05:00
James Cotton
3888d6ff69
Changed settings that makes updates smoother
2012-04-03 03:42:31 -05:00
James Cotton
319b53a342
Make sure full initialization routine for INSGPS occurs each time it is
...
restarted.
2012-04-03 03:42:31 -05:00
James Cotton
372f959c37
Refine some stack sizes
2012-04-03 03:42:30 -05:00
James Cotton
54880c83a0
Fix some task sizes and the memory limits
2012-04-03 03:42:30 -05:00
James Cotton
a83fb019f6
When in complimentary filter mode pass the GPS information straight
...
through to Position Actual
2012-04-03 03:42:29 -05:00
James Cotton
98b1a21921
Fixup: Shouldn't update gps until home location is set
2012-04-03 03:42:29 -05:00
James Cotton
7a3ec3e173
Some code cleanup to get rid of some warning messages
2012-04-03 03:42:29 -05:00
James Cotton
23625904c5
Remove the now unused ECEF and Rne fields from HomeLocation. Also reenable
...
calculation of the WMM and HomeLocation from the GPS code for revolution.
2012-04-03 03:42:28 -05:00
James Cotton
71d0180d45
Use the sensor variances from object
2012-04-03 03:42:28 -05:00
James Cotton
ce2d1f94f6
Better hardcoded constants for INS variances
2012-04-03 03:42:27 -05:00
James Cotton
de7fc81795
Fixes to the GPS LLA to NED translation
2012-04-03 03:42:27 -05:00
James Cotton
e32ab9342c
Shuffle some stack sizes around
2012-04-03 03:42:26 -05:00
James Cotton
4cadb7ec0e
Forgot to initialize revo settings object
2012-04-03 03:42:26 -05:00
James Cotton
337d5b7079
Enable guidance in revo. Update manual control to set the position desired
...
when the switch is flipped.
2012-04-03 03:42:25 -05:00
James Cotton
0eedaa1250
Change how we convert LLA to NED. Now it is done with a taylor expansion
...
around the home LLA coordinate to avoid the conversion into ECEF coordinates.
This has the benefit of not requiring double precision math and uses less
operations.
Now we should remove the Rne and ECEF fields from HomeLocation as they are
unused
2012-04-03 03:42:25 -05:00
James Cotton
e8cc7748af
Clean up some unused variables in attitude code
2012-04-03 03:42:24 -05:00
James Cotton
a9aa6b696b
Add object for setting the fusion algorithm
2012-04-03 03:42:24 -05:00
James Cotton
1911c7360d
New NEDPosition object which is the transformed GPS location
2012-04-03 03:42:24 -05:00
James Cotton
e3c36ac99a
Change requires for GSP updated to be set to true (wrong sign on PDOP check)
2012-04-03 03:42:23 -05:00
James Cotton
9e4651ab80
INS working on Revo
2012-04-03 03:42:22 -05:00
James Cotton
96edea9d4b
Some fixes to GPS parsing
2012-04-03 03:42:21 -05:00
James Cotton
55ee568fe2
Work on the INS algorithm
2012-04-03 03:42:21 -05:00
James Cotton
8c8224c122
Use a bigger event queue for overo logging to avoid event system warnings, and
...
add code to shortcircuit formatting a packet if it will not fit.
2012-04-03 03:42:19 -05:00
James Cotton
e82323af32
Make revolution work with the FreeRTOS queue based MPU6000 driver
2012-04-03 03:41:52 -05:00
James Cotton
3346e848e0
Attitude error timeout was 2 ms when sensors at 500 Hz. Caused lots of errors
...
and overwhelmed event system.
2012-04-03 02:07:04 -05:00
James Cotton
8032130769
Slow down gyro a bit on CC to give the CPU some breathing room. Might need to
...
come down more.
2012-04-03 02:07:03 -05:00
James Cotton
a960f3d07e
Switch the MPU6000 driver to using a FreeRTOS queue. Need to update Revo code
...
to take advantage of this.
2012-04-03 02:07:03 -05:00
James Cotton
1415728762
Get the MPU6000 CC3D working. Right now the ADC system is commented out, which
...
will break regular CC.
2012-04-03 02:07:03 -05:00
James Cotton
a0b7453580
Make the firmwareIAP variable not a global
2012-04-03 02:07:03 -05:00
Corvus Corax
0742c88a98
enabled optional rtation of Revolution board
2012-03-26 05:25:52 +02:00
Corvus Corax
d32dd0ccd4
Fixed fmod() versus fmodf() usage in flight/...
2012-03-26 04:16:54 +02:00
James Cotton
c7ff2a46c7
Merge remote-tracking branch 'origin/laurent/modelview' into revolution
...
Conflicts:
flight/CopterControl/Makefile
ground/openpilotgcs/src/plugins/config/config.pro
ground/openpilotgcs/src/plugins/config/configgadgetwidget.h
2012-03-22 02:58:24 -05:00
James Cotton
2f8049e20a
Update the bootloader hw version for the mpu6000 board and make the sensor code
...
and initialization respond appropriately. Enable hte L3GD20 and BMA180.
Let the board type determine which is used.
2012-03-22 00:41:37 -05:00
James Cotton
a77a859e5c
Using some config switches to get this board up and running
2012-03-21 00:48:31 -05:00
James Cotton
6b88a278b3
Disable overosync by default. It was triggering event system warnings due to
...
the extra updates from altholdsmoothed. Increase queue size when reenabled.
Also AltHold is is trigger warnings because other tasks starve it during
startup.
2012-03-21 00:29:09 -05:00
James Cotton
f4663b98e4
When the event system or object manager has an error store the object ID in the
...
SystemStats.
2012-03-20 23:18:07 -05:00
James Cotton
0d42303d37
Fix some compilation errors/warnings in attitude.c
2012-03-11 16:30:18 -05:00
James Cotton
820ca6a970
Initialize loop variable OUTSIDE loop so that baro is used still for altitude
...
hold.
2012-03-10 11:28:51 -06:00
James Cotton
f4705551b6
Update task info to cover the AltitudeHold module
2012-03-10 11:14:30 -06:00
James Cotton
61d59828dc
Disable the new features if not revolution and set an error flag. Fixes
...
compilation errors.
2012-03-05 00:24:11 -06:00
James Cotton
7961aba83c
Clean up a few more compiler warnings
...
Conflicts:
flight/PiOS/Common/pios_ms5611.c
2012-03-03 13:32:56 -06:00
James Cotton
91a226fc12
Sometimes the mag stops updating so kickstart it
2012-03-03 13:31:46 -06:00
James Cotton
bc8b72623e
Get rid of some unused variables
2012-03-03 11:54:09 -06:00
James Cotton
e3df261213
Merge branch 'stac/revo-usb' into revolution
...
Conflicts:
flight/Revolution/System/pios_board.c
2012-03-02 13:00:13 -06:00
Oleg Semyonov
e62cc8914c
Merge remote branch 'origin/next' into os/features/pid-tuning-from-transmitter-next
...
Conflicts:
flight/CopterControl/Makefile
ground/openpilotgcs/src/plugins/config/config.pro
ground/openpilotgcs/src/plugins/config/configtaskwidget.cpp
ground/openpilotgcs/src/plugins/uavobjects/uavobjects.pro
shared/uavobjectdefinition/hwsettings.xml
2012-02-22 23:03:17 +02:00
Oleg Semyonov
403e9cd220
TxPID module: add ILimit values to the list of settings
2012-02-21 19:57:10 +02:00
James Cotton
7b548eaa54
Fix bug in the integral for altitude hold where it was accumulating wrong variable.
2012-02-21 00:40:55 -06:00
James Cotton
900780e10c
Add bias estimation to the altitude fusion algorithm. Necessary to increase
...
the gains on acceleration and velocity feedback terms (they are a problem when
biased).
2012-02-19 11:38:09 -06:00
James Cotton
47fac7e31c
Move the throttle setting code for alt hold into the fast accel loop.
2012-02-18 18:16:15 -06:00
James Cotton
7d4582e5f0
Update the altitude KF to use the updated measurements appropriately and check
...
in the relevant matlab code to check it and genererate it. Produces quite
smooth traces.
2012-02-16 05:33:47 -06:00
James Cotton
c957172f8f
In the case of swapping in userspace due to the buffer being blocked during
...
ISR, make sure the latency is less than 50 us to avoid framesync errors. Still
seeing a few nonsense packets on Overo side but fairly few. Probably need to
add CRC to whole packet now and call it done.
2012-02-14 11:06:16 -06:00
James Cotton
1930d092eb
In the case where the overo scheduler cannot swap buffers (userspace loading
...
it) then set a flag so as soon as the buffer is loaded then we schedule it.
2012-02-14 11:00:29 -06:00
James Cotton
f04c58b0f4
Make the overo transaction occur based on the rising edge of the NSS line.
...
This fixes most of the frame sync problems. However, it's a bit hacky as
there is currently hardware information inside a module.
2012-02-14 10:37:30 -06:00
James Cotton
d018d93e88
Clean up previous commit a bit and make the sampling rate a variable (and adapt
...
the sampling time accordingly).
2012-02-13 01:49:54 -06:00
James Cotton
3acbfbe96c
Convert the pressure sensor code to most of the calculations as int64 to retain
...
precision.
2012-02-13 01:22:48 -06:00
James Cotton
f23f53dc4e
Add settings for the altitude kalman filter settings and init the state when
...
first measurement arrives
2012-02-12 09:07:27 -06:00
James Cotton
34ca5777dd
Kalman filter for altitude
2012-02-11 21:08:19 -06:00
James Cotton
d8f0494e57
Merge branch 'revolution' into revolution_overo
2012-02-11 20:02:20 -06:00
James Cotton
3026527801
Now the desired altitude is relative to when the switch was flipped so that the
...
baro altitude module can use a smoothed altitude estimate for the starting
point.
2012-02-08 23:02:29 -06:00
James Cotton
80d602ef7b
Switch order of some commands to make sure it loads the correct hover throttle
2012-02-08 20:47:10 -06:00
James Cotton
ab41bae071
Separately smooth the error estimate from the derivative
2012-02-08 11:15:33 -06:00
James Cotton
60c951843d
Use backtracking to limit integral in altitude hold and smooth the velocity
...
error. Initialize the throttle integral better.
2012-02-08 10:39:31 -06:00
James Cotton
c6b1d6b8df
Rework the altitude hold code a bit
2012-02-08 09:42:10 -06:00
James Cotton
49a03a868b
Merge branch 'altitudehold' into revolution_overo
...
Conflicts:
flight/OpenPilot/UAVObjects.inc
flight/Project/OpenPilotOSX/OpenPilotOSX.xcodeproj/project.pbxproj
flight/Revolution/Makefile
flight/Revolution/ins.c
2012-02-07 23:00:29 -06:00
James Cotton
6ec0f06c80
Back to 1024 byte packets
2012-02-07 13:02:11 -06:00
James Cotton
2c60447200
Switch back to 512 byte packets and fix bug when writing the header size that
...
was smashing the crc
2012-02-07 11:32:04 -06:00
James Cotton
221a0c5e53
Add the number of dropped updates to the overosync stats
2012-02-07 09:13:26 -06:00
James Cotton
a89d425b23
Reset the received rate for overo sync object
2012-02-07 09:01:58 -06:00
James Cotton
02bec750bd
In the attitude loop need to check all the queues even if unused or the event
...
system will have warnings
2012-02-07 08:46:34 -06:00
Stacey Sheldon
e2939dae2a
revo usb: Add support for USB to Revo
2012-02-07 02:25:31 -05:00
James Cotton
ae01936808
Add the portTickTime into the OveroSync stream
2012-02-06 10:00:02 -06:00
James Cotton
dbcb499d7f
Add object to monitor the overo link status. Current just records the bytes/s
...
being sent and the connected status (based on sending more than 500 bytes per
second)
2012-02-06 09:37:31 -06:00
James Cotton
5b2376dbee
Remove the semaphore for buffer swapping and make this occur during the receive
...
ISR. This leads to a possible condition where a copy is taking place in
userspace and then a buffer swap interrupts it. However, the copy should
always finish before the SPI DMA slave catches up to that place in memory at 10
MHz.
This fixes a common condition where the userspace task (low priority) was not
swapping buffers in time from user space and logs were corrupted.
2012-02-06 08:21:24 -06:00
James Cotton
179e66b754
Refactor how new packets are scheduled to avoid trying to start a transaction
...
from an ISR. This was causing lock ups. It's a bit higher latency probably
(trivially slow) but if we aren't keeping up with the Overo transactions then
using a proper DMA double buffer will be required.
2012-02-04 20:11:31 -06:00
James Cotton
665801662d
In cc3d update sensors add accelbias before scaling to allow more precision in
...
levelinIn cc3d update sensors add accelbias before scaling to allow more
precision in levelingg
2012-02-04 12:12:41 -06:00
James Cotton
4e190f99e2
Improved the revo overosync code to put multiple uavobjects into a packet
2012-02-04 12:06:03 -06:00
James Cotton
c26154f303
Switch back to 256 byte packets and 0xFF pad the end
2012-02-02 11:40:49 -06:00
James Cotton
8b1137c6a0
Align the tx and rx SPI buffers from Overosync
2012-02-02 11:23:40 -06:00
James Cotton
0a71a48c57
Sending all FF finally again
2012-02-02 10:36:09 -06:00
James Cotton
95abb56d5e
Added module to send updates out the SPI port
2012-02-02 09:19:25 -06:00
James Cotton
a778c45d6f
For L3GD20 sensor task run at the sensor speed
2012-01-28 10:11:30 -06:00
James Cotton
13447ac907
Fix the MPU6000 implementation
2012-01-28 00:21:58 -06:00
James Cotton
b4435d0b35
For L3GD20 sensor task on revo update gyro once per physical sample
2012-01-26 23:29:12 -06:00
James Cotton
84dd1dbc40
A bit more lenient settings for CC sensor timings
2012-01-26 13:00:06 -06:00
James Cotton
727f0befc5
Make the gyro go a bit more regularly to stabilization but needs updating
...
regular CC
2012-01-25 22:50:19 -06:00
James Cotton
e4df3202e0
L3GD20: Update sensor task for revo to use the new queue
2012-01-25 22:50:19 -06:00
James Cotton
205aabe895
L3GD20: Make this sensor push data onto a FreeRTOS queue so that the sensor
...
reading task can block according. Also now the gyro data is sent to
stabilization multiple times per update of the attitude loop.
2012-01-25 01:20:07 -06:00
James Cotton
1971ba30dc
No longer hardcode baudrate
2012-01-24 23:42:43 -06:00
James Cotton
104c091590
Correct the range constants for the L3GD20 driver
2012-01-24 19:48:14 -06:00
James Cotton
a25d52785b
Change the bus speed for the L3GD20 to 10MHz and some small cleanups
2012-01-24 19:17:49 -06:00
James Cotton
b6c056fef2
Use the updated L3GD20 format and make attitude.c use the gyro data from the
...
fifo
2012-01-24 15:52:17 -06:00
James Cotton
5efbfb02fa
Make the BMA180 sensor system acquire from the queue. Correct the orientation
...
and speed it up to 10 MHz communications.
2012-01-24 15:09:20 -06:00