1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-30 08:24:11 +01:00
Commit Graph

792 Commits

Author SHA1 Message Date
peabody124
832b61ab86 OP-117 AHRS: Binary streaming of the raw data within EKF. Doesn't keep up while running this but does give accurate data that went into algorithm. Once we can dynamically change sampling rate will be good.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1655 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-16 05:26:14 +00:00
peabody124
0b8756d55c OP-148 AHRS/Comms: For now don't retransmit calibration after comms glitch as this re-zeros gyro bias and makes attitude stutter. Need to explicitly communicate when comms glitches and query if AHRS actually rebooted.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1654 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-16 05:26:12 +00:00
peabody124
885c966e53 AHRS: Added a tracker for number of ADC updates the EKF misses. Also updated the Telemetry autogenerated files to accomodate the 11500 baud rate.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1652 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-16 02:59:00 +00:00
peabody124
ff1b303083 AHRS: Only do EKF correction with mag when new data available
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1651 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-16 02:58:56 +00:00
peabody124
19e80da928 AHRS: Update UAVObject with information about AHRS rate
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1650 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-16 01:54:21 +00:00
zedamota
4d0d865c31 OP-21/Flight Bootloader - fix to paths
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1647 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 18:03:52 +00:00
pip
82be9117d6 Added USART baudrate defines into pios_board.h & '#if defined's into pios_board.c
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1646 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 17:37:50 +00:00
pip
d2bc126e68 Added PIOS_COM_AUX_BAUDRATE to pios_board.h & '#if defined' to pios_board.c for easier baudrate setting.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1645 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 17:33:00 +00:00
pip
73c8194acc Added PIOS_COM_TELEM_BAUDRATE, PIOS_COM_GPS_BAUDRATE, PIOS_COM_AUX_BAUDRATE & PIOS_COM_SPEKTRUM_BAUDRATE defines in pios_board.h with '#if defines' in pios_board.c for easier baudrate changing.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1644 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 17:18:38 +00:00
zedamota
3e89e388fa OP-21/Flight Bootloader
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1643 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 17:09:27 +00:00
zedamota
c72a5b1cfe OP-21/Flight Bootloader
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1642 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 17:08:24 +00:00
zedamota
f972b78bfb OP-21/Flight Bootloader
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1641 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 17:07:43 +00:00
pip
cf864225fe Added easier to find USART baudrate setting PIOS_USART_BAUDRATE.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1640 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 17:07:37 +00:00
zedamota
50b7931a1c OP-21/Flight Bootloader - new bootloaders
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1639 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 17:06:51 +00:00
pip
89fb0b8582 Made pios_hmc5843_data_ready volatile (accessed by both interrupts and main exec loop).
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1638 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 17:00:36 +00:00
zedamota
df88140f51 OP-21/Flight Bootloader - Remove deprecated bootloaders
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1637 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 16:58:00 +00:00
stac
1017d0294b ahrs: always enable -g for gdb debug symbols
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1635 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 15:45:41 +00:00
stac
7886a617dc Revert "ahrs: No longer support -O0 since it doesn't fit"
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1634 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 15:45:39 +00:00
pip
22b9b2512e Added a 115200 baud telemetry option to the OP main board/UAVTalk.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1632 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 14:43:42 +00:00
stac
73787f7f15 ahrs: No longer support -O0 since it doesn't fit
Leaving debug on allows the -g option to be enabled
so that we can have symbols in gdb even though we're
forcing the optimization flags to -Os.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1631 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 14:21:06 +00:00
stac
cdb8aa37a0 ahrs: Only read mag data when it has been updated
The AHRS mainloop was reading the mag data on every
loop regardless of whether new data was actually
available.  Now that the MAG_DRDY signal is monitored,
we can read only at the rate (10Hz) new data is actually
produced by the sensor.

This also enables future improvements that will remove the
filtering work that is still being done on the mag data on
every iteration.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1630 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 14:21:05 +00:00
stac
55d90970ed hmc5843: hide internal #defines and functions
Way too much was being exposed in the API for the
HMC5843.  This commit properly hides internal
details of the driver.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1629 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 14:21:04 +00:00
stac
0e7a801e9e hmc5843: Add support for DRDY signal from magnetometer
The DRDY signal from the magnetometer is connected to PB8
on the STM32.  This pin is now configured as an external
interrupt and is now used to signal when new data is
available from the magnetometer.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1628 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 14:21:02 +00:00
stac
4ac001553d hmc5843: convert line endings from CRLF to LF
No functional changes.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1627 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 14:21:00 +00:00
stac
ac6989fbeb bmp085: fix configuration of EOC interrupt
The EOC EXTI interrupt configuration was incorrectly
pointing at GPIOG pin 8 rather than GPIOC pin 15.
This was preventing the EOC interrupt from working
properly.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1626 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 14:20:59 +00:00
stac
88e73906d0 i2c: Add recovery code for i2c bus errors
I2C bus errors are now recoverable.  The bus is properly reset
and an error indication is now provided to the caller whenever
a bus error occurs during processing of the transaction list.

For now, the users of the I2C layer just retry infinitely on
failure.  The BMP085 and HMC5843 code should be changed to
report errors to its callers to allow a more sensible retry
strategy.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1625 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 14:20:57 +00:00
stac
0122394481 i2c: consolidate handling of AUTO transitions
AUTO transitions in the FSM are now handled immediately
after processing each newly injected event rather than only
at the end of the EV ISR.

This consolidation allows the upcoming addition of event
injection from both the EV and ER ISR contexts.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1624 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 14:20:56 +00:00
stac
7d5463e5e6 i2c: Move polling for bus stopped from ISR to task/mainloop
Occasionally, the I2C driver races with the STM32 I2C peripheral
at the end of a bus cycle.  This leaves the bus in an errored
state and the stop condition is not properly asserted on the bus.

The polling for the stopped condition was previously implemented
in ISR context since it was expected to be nearly instananeous.
In the error condition, however, the stop condition will never
happen.  The polling for this case is now done by the initiating
task (or mainloop on the AHRS) to prevent the timeout condition
from triggering the watchdog.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1623 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 14:20:55 +00:00
stac
65ad2caf8a i2c: Make transaction initiator available in txn list
The info field in the pios_i2c_txn list can now be used
to provide a const string which describes the context
for this transaction.

This is very helpful when diagnosing an error that occurs
somewhere in the middle of the I2C FSM since the FSM runs
primarily in the ISR where the original context for the
transactions is no longer available in the traceback.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1622 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 14:20:53 +00:00
stac
85c60479c1 i2c: rename FSM faulted state
Differentiate the _FSM_ faulted from the (soon to
exist _BUS_ faulted state.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1621 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 14:20:52 +00:00
stac
139da048f6 ahrs: remove unused debug code
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1620 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 14:20:51 +00:00
pip
cc3860daaf Added 'uint32_t PIOS_SYS_getCPUFlashSize(void)' into pios_sys.c/h files.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1616 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-14 09:18:55 +00:00
peabody124
c5fe985a45 AHRS: Gets timing working correctly to compute the EKF rate and idle time in real values
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1615 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-14 07:03:36 +00:00
peabody124
0875dc8442 AHRS: First pass refactoring the ADC code into another function. Still want to clean up a few constants make the downsampling go into a smaller circularbuffer nicely.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1614 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-14 07:03:34 +00:00
peabody124
1051d894b9 AHRS: Merged in some new code from Dschin that expliclity writes the prediction terms in the covariance matrix. Also made changes to compile with -Os. Now runs around 125 - 150 Hz depending on corrections used (this will become adjustable from GCS shortly).
Squashed commit of the following:

commit 897e3365ab6c762584c34238efd12dc144e72af0
Author: James Cotton <peabody124@gmail.com>
Date:   Mon Sep 13 22:15:21 2010 -0500

    AHRS: Getting it running nice and quickly.

commit 53d72fb849164730c89873cab81c9e09be0b112b
Author: James Cotton <peabody124@gmail.com>
Date:   Mon Sep 13 15:57:46 2010 -0500

    AHRS: Make more variables volatile for -Os.

commit 4fa90821b5d3d8c2ea5e67756313a8a63c0eeb8c
Author: James Cotton <peabody124@gmail.com>
Date:   Mon Sep 13 15:11:31 2010 -0500

    AHRS/Makefile: -O0 not added to allow me to try various space flags that don't break code.

commit 5bd17a304dc28dc271c2f3e8c6cb8ad4a830404f
Author: James Cotton <peabody124@gmail.com>
Date:   Mon Sep 13 14:44:05 2010 -0500

    AHRS: Make debuggign USART easy to disable

commit 5453f2a7939492769fe9e9cc822e69c107320670
Author: James Cotton <peabody124@gmail.com>
Date:   Mon Sep 13 14:38:37 2010 -0500

    AHRS: Explicitly expand covariance prediction.  Brings computations from 160 to 90.  Makes it not fit in AHRS though.

commit b6712da7eece2a464a2073d24b77be22bfa47094
Author: James Cotton <peabody124@gmail.com>
Date:   Sun Sep 12 22:59:42 2010 -0500

    AHRS: Make it easy to comment out the I2C/Magnetometers.

commit 8c84d0091f3d6f6bedc7a0224a4ed9cb099b022b
Author: James Cotton <peabody124@gmail.com>
Date:   Thu Sep 9 00:49:50 2010 -0500

    AHRS: Small change to INSGPS analysis tools

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1613 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-14 06:42:56 +00:00
pip
7da2fc2ba7 made ahrs_state 'volatile' in ahrs.c to prevent compiler optimization lockup
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1612 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-13 20:56:58 +00:00
pip
8bfaa997d3 made curr_state 'volatile' in pios_i2c_priv.h to prevernt compiler optimization lockup.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1611 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-13 20:52:56 +00:00
peabody124
4a4932e5ff AHRS/FSM: Small initialization detail to make compile with -Os
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1610 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-13 19:04:37 +00:00
zedamota
66560786f4 Flight - #ifdefs to make it work with both normal and bootloader packet formats.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1609 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-13 17:08:52 +00:00
chebuzz
3b5b129445 Fix POSIX simulator to work with new VTOL UAVObjects
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1607 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-13 14:00:53 +00:00
peabody124
47a7b8548b Flight: Safety feature for VTOL. Don't enable motor until throttle brought above .5 then below or to zero.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1604 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-12 22:18:21 +00:00
peabody124
76971a807c AHRS: Some more tweaking of the timings.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1603 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-12 22:18:18 +00:00
zedamota
257b4d2c95 flight - BL AHRS Comms - fixes to make it compile, not tested yet.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1601 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-12 21:08:43 +00:00
peabody124
ba34bb8c24 AHRS: Oops, didn't notice the message processing was removed from end of loop. Adding back.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1597 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-12 12:44:57 +00:00
pip
d0b8a9755d Added USB_LED_ON/USB_LED_OFF and checks to see if they are defined to the PIOS_USB_HID_ChangeConnectionState function ..
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1596 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-12 10:47:20 +00:00
pip
9fca16db41 Added an RTOS detection is 2 places because I'm using this file on the modem (without an RTOS). #if defined(PIOS_INCLUDE_FREERTOS) ...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1595 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-12 10:33:45 +00:00
peabody124
59758122e1 AHRS: Cannot process messages while idling as this makes the main loop execution time non-deterministic based on OP (i.e. could get three messages and push the time up). It would be a nice featuer since you can get a raw and EKF update in the same step, but if the AHRS_Comm loop is fast (which is should be to keep update latency low) then this will hammer the AHRS with redunant requests.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1594 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-12 02:54:51 +00:00
peabody124
e90e714c2b Flight: Tweaked the throttle handling and VTOL use of it to make sure engines can be shut off easily in stabilization mode.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1593 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-12 02:54:49 +00:00
peabody124
56131476ef AHRS: Switch to sampling at 2khz, plenty of CPU usage. However need to make EKF rate different for outdoor mode with this patch because otherwise will drop samples :-(
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1592 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-12 02:54:47 +00:00
peabody124
5d1ebf76ea Flight/VTOLmixer: Fix bug in mixer that messed up roll mixing. Also changed minimum to -1 so that neutral can be position motors come on and -1 the off position. Also made failsafe throttle value -1 to be consistent.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1591 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-12 02:54:44 +00:00
peabody124
c376711405 Flight/Stabilization: Make the derivative account for the sampling time (dAngle/dt) for the PID loop since integral does and also make the integral bounds uavobject settings. It was originally bounded by constant/Ki but I'm not sure why as you change the gain of the error integral you also want to decrease the maximum error it can cause.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1590 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-12 02:54:41 +00:00
peabody124
8999355327 Flight: Made actuator a periodic task. I don't think the queue is low enough latency - should figure out how to make this happen as callback is the right way to go.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1589 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-12 02:54:38 +00:00
peabody124
dceb20b16d Flight: VTOLStatus object that returns the thrusts on all the engines
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1588 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-12 02:54:34 +00:00
peabody124
bba3b0c64a Flight: VTOLSetings object to contain the mixer settings for VTOL crafts
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1587 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-12 02:54:30 +00:00
stac
d18e0c3ef8 ahrscomms: Add low-level message code for bootloader msgs
Implement low-level utility functions for sending/receiving
the opahrs proto v0 (bootloader) messages.  These are used
by the OP firmware loader and the AHRS bootloader.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1586 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-11 23:06:31 +00:00
stac
c3c8a30bfc ahrscomms: fix return values on error
Some functions were returning -1 instead of one of the
valud enum values.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1585 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-11 23:06:29 +00:00
stac
6bf3038f3f ahrscomms: provide helper function for simple requests
This cleans up some of the boiler plate code that is
repeasted for simple (empty) requests that expect a
response.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1584 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-11 23:06:28 +00:00
stac
7ecbb5f5b8 opahrs_proto: Add new boot and versions messages
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1583 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-11 23:06:26 +00:00
stac
d1dc300081 ahrscomms: remove unused sync and switch_proto messages
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1582 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-11 23:06:25 +00:00
stac
80c92ba54b ahrs: process SPI messages while idle
This makes the AHRS continually process SPI messages
while waiting for new samples to be ready.  This has
the side effect of making the CPU utilization on the
AHRS pin at 99-100% (ie. we make use of all of our
otherwise idle time).

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1581 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-11 23:06:23 +00:00
stac
93ef510946 ahrscomms: use relative delays to avoid slipping
Change from using vTaskDelay to using vTaskDelayUntil to
ensure that we're trying to stay periodic rather than
just waiting a fixed amount of time after each loop of
processing.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1580 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-11 23:06:22 +00:00
dschin
e6fea9bb76 Changed the feedback gain matrix K to a global variable in insgps so that it may be inspected.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1577 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-10 20:46:46 +00:00
zedamota
aa1af2b9f3 OP-21/Flight Bootloader - Changes to make it independent of RTOS
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1570 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-09 18:44:55 +00:00
peabody124
6cdb9b0b48 AHRS: Added Matlab code to analyze the INSGPS friendly data dump format and plot the important variables. This requires "DUMP_FRIENDLY" be enabled in the file.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1560 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-08 06:15:21 +00:00
peabody124
e499f33fd5 AHRS: Improved code to stream raw data from AHRS and added a matlab function to acquire and analyze the data. The QT program to analyze it should work but QextSerial seems to have a bug and drops or inserts data
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1559 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-08 06:15:18 +00:00
peabody124
9895b403c7 Ground/SerialLogging: Improved the serial dump from AHRS to have a big random frame header and to detect it on the logging program.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1556 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-07 16:33:10 +00:00
cwabbott
c2e93aa810 PiOS/win32: Made the process priority "high priority" for OpenPilot.exe to help with accurate timing. Also removed some unneeded debugging code from tasks.c.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1553 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-06 21:23:02 +00:00
peabody124
e06162fa3a Flight/AHRS: Reorganized the code a little to make sure indoor used by default unless GPS updates come
in.  Also change the velocity variance in indoor mode to lower to make it get a better attitude estimate (primarily faster convergence - probably will tweak this in the future dynamically).  Finally decreased barometer variance - in scope it's actually quite reasonable, normally within +/- .5 m.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1546 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-06 07:54:19 +00:00
peabody124
e260077247 Flight/ManualControl: Making failsafe test (which must explicitly look at receiver inputs instead of throttle values in case of reversal) also consider readonly flag to detect GCS control.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1545 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-06 02:58:41 +00:00
peabody124
61854ac6ab Flight: Support for quadcoptors. The format of this control will change to support octo's and more flexible tuning.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1544 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-06 02:58:39 +00:00
stac
95595664c3 telemetry: fix comments around #ifdef
No functional changes.

The closing comment on some of the USB_HID related
ifdefs was outdated.  Fixed.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1541 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-05 23:10:34 +00:00
zedamota
492227c916 OP-21/Flight Bootloader - Donwload function is now interrupt driven. Had to increase IN polling interval due to some problems.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1530 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-05 00:17:20 +00:00
peabody124
f9a0b799a2 Foolishly forgot object like I always do
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1529 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-04 22:01:11 +00:00
peabody124
d3b677298c Flight/ManualControl: Added a hysteresis loop to the manual control connection/disconnection status. I seem to get glitching without it - probably because of the receiver catching noise. It still occasionally glitches but I don't want to make it longer. Probably should be an adjustable setting.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1527 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-04 17:08:04 +00:00
peabody124
c21d058110 Flight: Added ability to use a third accessory input. Currently using that to select tuning roll/pitch bias and PID tuning. I also _STRONGLY_ recommend if you enable these accessory channels (and thus these features) you make the saved meta data for the StabilizationSettings and AttitudeSettings read-only, so only on flights where you mean to can you change these settings. I'm also not convinced about the interface - it seems like flicking TX switches to get into adjustments is a recipe for disaster. Probably need to just control through GCS.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1526 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-04 17:08:02 +00:00
peabody124
45e8131a30 Flight: Added ability to use additional TX inputs to tune attitude bias. Note this form of the calibration is temporary and will likely be replaced by a rotation matrix to deal with more general rotations.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1525 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-04 17:07:59 +00:00
peabody124
8dbc382e5b Ground/CoordinateConversions: Shows correct location now. I just typed in a 3.14 constants and forgot to change to M_PI.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1520 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-04 05:58:43 +00:00
peabody124
b4ff14b725 Ground/GCSControl: Swapped sign conventions of sticks to match the sign convention of roll/pitch/yaw. I.e. now right on the roll causes a + roll, pulling down on the pitch causes + pitch.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1518 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-04 02:19:06 +00:00
peabody124
404e0c2f44 OP-132 AHRS: Changes to the Indoor flight handling to only use the barometer indoors and update with a zero for velocity and high variance.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1517 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-04 02:19:04 +00:00
peabody124
a406034ed9 OP-132 Flight/AHRS: Changed the heuristics regarding GPS quality and INSGPS updates. Now if satellites < 7 or PDOP > 3.5 it does not perform GPS updates. Professor is working on some code to fix parts of the covariance matrix. If indoor updates high a 0 position and velocity and high variance.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1515 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-04 02:19:00 +00:00
zedamota
8233f87b0a OP-21/Flight Bootloader - Download function fixed.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1513 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-04 01:06:40 +00:00
dschin
84d054c4ed gdb command file to enable debugging with interrupts in Eclipse
See http://forums.openpilot.org/topic/1671-debugging-with-interrupts-in-eclipse/
for details.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1511 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-03 13:10:04 +00:00
cwabbott
d7a3ffb464 flight/PiOS.win32: update Makefile.win32 with new UAVObjects, also change UAVObject headers to have a newline at the end.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1510 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-02 23:55:24 +00:00
zedamota
749267aee5 OP-21/Flight Bootloader - Minor bug fix.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1508 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-02 22:43:32 +00:00
zedamota
7a66232be0 OP-21/Flight Bootloader - Complete recoding. WARNING- As with all flash memories, the one in your OP HW as limited write cycles. Errors in this bootloader may damage your HW if it falls under a write or erase dead loop. This is still under development, for devs only.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1507 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-02 20:13:41 +00:00
peabody124
d3bb821e82 Flight/ManualControl: Change to ManualControl module to make warning only kick in if input is less than the max and min for throttle. Disable going to (unimplemented) auto mode. Commiting based on one yay and no nay.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1505 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-02 16:33:02 +00:00
peabody124
a377bea862 Ground/CoordinateConversions: Found out from Dschin that rotation matrix inverse is rotation matrix transpose. Now should convert correctly from NED to ECEF. I will check tomorrow by frolicking around with a plane.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1494 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-01 03:12:06 +00:00
peabody124
ec7d059de8 Posix: Corrected makefile after UAVObjects mashup
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1489 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-31 17:21:44 +00:00
peabody124
b853c392f3 Flight: Was only returning half of the serial number (thanks for catching that Pip)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1476 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-31 02:33:47 +00:00
peabody124
12657440c3 OP-132 AHRS: Added an indoor flight mode and also add an ad-hoc quality heuristic to the GPS signal to increase the measurement variance from GPS when fix quality is poor or when in indoor flight mode. In addition corrected the indentation to conform to the tab/space convention forum discussion.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1474 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-31 02:11:09 +00:00
pip
7813414f29 added casting to prevent int overflows when calculating the watchdog delay
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1467 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-30 16:48:33 +00:00
pip
ba5f1b37ee changed pios watchdog from 8-bit to 16-bit ms capability, plus moved the .h file from the .c folder into the inc folder
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1466 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-30 16:29:36 +00:00
andrew
65dc5e9b04 Yaw stabilisation for the simple algorithm was calculating the error and not taking into account that 350º error is the same as -10º error.
The resultant error could range from -360º -> +360º
Since this is only used for Helicopters / multi rotors, and the aircraft can rotate in any direction, I added the modulo logic so that it is now from -180º -> +180º this should now take quickest path to correct the error.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1464 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-30 01:20:43 +00:00
andrew
3c6d9d6976 manual control was mapping tx input as -180º -> 180º for AttitudeDesired.Yaw.
The Wiki (http://wiki.openpilot.org/Unit_Standards) states this should be 0 - 360º
Made the code match the wiki.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1463 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-30 01:16:00 +00:00
cwabbott
f55e9cf819 Fixed a slight problem with the .metadata folder, the flight project wasn't pointing to the correct folder again.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1462 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-29 23:16:19 +00:00
dankers
7a1353506e Just added my plugins dir to what was already there, no guarantees to fix things!
Might just make them worse!


git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1460 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-29 22:15:38 +00:00
stac
78befcba73 conversions: fix return code for ECEF2LLA
As pointed out by osnwt in the forum, the
criteria for success of this function was
wrong.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1456 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-29 14:51:07 +00:00
peabody124
f202884ce8 AHRS: Numerous changes. Added CPU load monitoring for AHRS as well as some friendly debugging output options. Also added a new CalibrationMode setting to AHRS (Echo) to speed up sensor calibration. Cleaned up the 6 point calibration interface to make it more friendly, but I think Edouard will clobber it with something nice and sexy :).
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1455 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-29 06:38:30 +00:00
stac
ecac1fb79d nmea: parse GSV sentences and populate GPSSatellites object
This creates a new UAVObject called GPSSatellites to hold
information about which satellites the GPS receiver can see
and the quality of their signals.

NMEA GSV sentences are now parsed.  The full set of GSV data
may be split across multiple GSV sentences, each containing
info for at most 4 satellites.  Once an entire set of GSV
records has been collected, the GPSSatellites UAVObject is
updated.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1453 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-29 01:46:14 +00:00
stac
2ead641136 nmea: minor bug fixes and robustness improvements
Remove asserts on bad data, only assert on coding errors.
Remove unnecessary inline qualifier to reduce code size.
Handle more lat/lon precisions in conversion to fixed-point.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1452 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-29 01:46:11 +00:00