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

671 Commits

Author SHA1 Message Date
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
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
zedamota
2142467751 OP-21/Flight Bootloader - Added more Led status modes. Fixed downloading for bigger packet format.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1436 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-27 20:03:51 +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
a19c225697 ahrscomms: reduce retries and retry delay
The number of retries and delay between retries was
increased in a previous commit.  This doesn't appear
to be necessary so I'm reverting the increases.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1432 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-27 02:15:02 +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
stac
670452307d ahrs: remove unnecessary memset() of rx message buffer
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1429 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-27 02:14:56 +00:00
stac
0a7088c24a ahrs: fix type on flags, remove redundant code
No need to have boolean flags being floats.
Some of the attitude message was being populated twice.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1428 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-27 02:14:54 +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
zedamota
7f76b7f5a0 OP-21/Flight Bootloader - Fixed an error introduced on last rev.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1417 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-26 16:26:51 +00:00
peabody124
c07e1416b7 AHRS: Serial output option for AHRS and corresponding serial logger.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1414 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-26 06:25:11 +00:00
andrew
2361af19fb First attempt at ccpm mixing for single rotor helicopter.
This has throttle and pitch curves implemented and can be configured for many swashplate configurations.

This has flown a 450 clone (with training wheels) and the ccpm worked well.

Still need to neaten up some stuff and work out how to implement yaw stabilisation in manual mode.


git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1412 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-26 06:00:57 +00:00
zedamota
d71ade8227 OP-21/Flight Bootloader - Now if USB not connected it jumps directly to FW. If connected it will wait 5 seconds for command, then jumps. Also changed led flashing to PWM and created a timer for the delays.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1409 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-25 22:31:14 +00:00
peabody124
8dd81443be OP-122 Flight: Same changes regarding 62 byte limit applied to the receiving code on the device.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1405 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-25 05:32:56 +00:00
peabody124
dd491160c5 OP-121 OP-122 Flight: Improved the Blocking/Nonblocking behavior for USB to be correct. I'd like a mutex still around the transmission buffer but don't want to slow down the interrupt.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1404 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-25 05:32:54 +00:00