andrew
da1a762072
Added basic code for Yaw stabilisation in manual mode for Helis.
...
This is functionally the same as having a heading hold gyro in hardware.
Code is copied from the simple stabilisation routine and is a bit rough at the minute, but initial testing looks good.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1670 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-17 05:52:34 +00:00
peabody124
41b7a99883
Flight/Stabilization: Yaw rate stabilization error should be normalized by dt
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1669 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-17 02:00:55 +00:00
zedamota
e8d6e7c557
Flight - Centralized board specific files, BL and User FW uses the same board definitions, no need to have 2.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1663 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-16 19:19:38 +00:00
peabody124
3b015b41c5
Flight: Got a much nicer arming/disarming system going. Made it a separate flag in the end to allow testing the stabilization code with motors not running. Also changes maxRoll/maxPitch/maxYaw to uint8 to keep object size smaller - no reason for float precision for this.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1660 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-16 15:41:11 +00:00
peabody124
a6e71177e4
AHRS: Yaw stabilization now supports rate stabilization or heading hold. Also need to cleanly support rate stabilization on all the other axis. Les suggested this be in manual mode which will require changing the logic somewhat (essentially for vtol it will always be running through the Stabilization module) in an aircraft dependent manner. An alternative would be a stabilization flag indicating to do full attitude hold, attitude + yaw stabilization, or all axis gyro stabilization. This would be my preference.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1659 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-16 15:41:08 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
stac
679f59f19d
uavobjectparser: fix alignment of field init in generated code
...
Change from spaces to <TAB> to match the formatting in
the template. No functional changes, just whitespace.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1451 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-29 01:46:09 +00:00
peabody124
8128c3bbfa
OP-118 AHRS: Added 6 point calibration routine to AHRS config widget. To use it, click "Cal Mode", then place the AHRS on each of 6 sides of a cube then click save position. Finally click compute to push the updated scale abd bias terms to the AHRS. Also fixed a bug in UAVObjectField that would not allow you to setDouble for extra fields.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1449 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-28 18:48:51 +00:00
andrew
3530428982
Fixed the bounding of servo outputs for the case when max < min
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1444 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-28 05:11:19 +00:00
peabody124
00cad250ea
Adding gpstime.h for flight.
...
Seriously - I'm sorry I missed all these files. I suck.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1443 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-28 00:58:04 +00:00
peabody124
ced0a4b952
AHRS: Fixed silly bug that made the default mag variance be zero - explains "hopping around" default behavior. Still should run calibration though.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1439 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-27 21:05:41 +00:00
peabody124
5f9289f0c0
Flight: Keep getting WMM memory usage down
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1438 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-27 21:05:38 +00:00
peabody124
16361dea12
AHRS: Making AHRS populate the NED/Vel fields of PositionActual. May rename object to PositionVelocityActual. Also created a GPSTime object which is populated from the GPRMC command. Also added a GPZDA parsing command, but by default OP GPS doesn't send this command. Made the computation of the world magnetic model use the current time to set the magnetic vector. Note: currently if you set your home location and save it to SD, this will not recompute the vector over time. I'm not sure how sensitive this is.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1435 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-27 19:59:25 +00:00
stac
24a4c6b791
gps: Update GPSPosition instead of PositionActual
...
GPS module now updates GPSPosition UAVObject
rather than the PositionActual object. The
GPSPosition object is intended to be consumed
only by the AHRS. The AHRS will use this (and
other inputs) to compute a filtered version of
the position in the PositionActual object.
This commit will cause temporary breakage of the
GPS functionality in the GCS until the PositionActual
object is properly updated by the AHRS. Most of the
GCS should continue to use PositionActual. The only
exception to this might be any tool for specifically
visualizing the raw GPS state.
GPS.c is now only responsible for receiving a
complete NMEA sentence from the COM interface.
NMEA parsing is now factored out into NMEA.[ch]
which is where GPSPosition is now updated based
on the complete NMEA sentences obtained from the
GPS.
Latitude and Longitude are now encoded in a
fixed-point notation in units of degrees x 10^-7
to prevent truncation of precision due to encoding
into a float.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1431 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-27 02:15:00 +00:00
stac
47df1faa8d
ahrs: whitespace adjustments
...
No functional changes. Whitespace/tab fixups only.
Use TRUE/FALSE instead of 1/0.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1430 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-27 02:14:58 +00:00
peabody124
a0b21bef45
Flight: Got read only check working for UAVObjects and modified the ManualControl Module to use it. Edouard - please check over this.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1427 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-27 00:15:48 +00:00
peabody124
a8df6e2c4d
OP-128 Flight Documentation: Added description to all the UAVObject (now mandatory) and changed the parser to populate this information into the autogenerated files. Also added a function to test if an object is read only for flight.
...
Since there are a lot of autogenerated changes the important ones are:
flight/OpenPilot/UAVObjects/inc/uavobjecttemplate.h - added description and define to make the ObjectReadOnly query
flight/OpenPilot/UAVObjects/uavobjecttemplate.c
flight/OpenPilot/UAVObjects/uavobjectmanager.c - added the UAVObjReadOnly query
ground/src/libs/uavobjgenerator/uavobjectparser.cpp - added parsing of description field
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1425 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-27 00:15:42 +00:00