1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 04:45:24 +03:00
Commit graph

135 commits

Author SHA1 Message Date
Curtis Bangert
8950eb1f68 Moved updateGPSRescueState to imuUpdateAttitude. gps_rescue.c tidy. 2018-06-14 02:21:12 -04:00
Michael Keller
4ead807edd
Revert "Moved updateGPSRescueState to imuUpdateAttitude. gps_rescue.c tidy." 2018-06-14 13:25:52 +12:00
Curtis Bangert
953e2ad0e9 Moved updateGPSRescueState to imuUpdateAttitude. gps_rescue.c tidy. 2018-06-13 11:36:49 -04:00
Diego Basch
c46be03047 added gps for altitude estimation, remove most unused code, rename altitude.c to position.c, add hdop to nmea 2018-05-04 08:45:26 -07:00
blckmn
a9f74cd6df Removed excess trailing spaces before new lines on licenses. 2018-04-25 20:58:00 +10:00
s0up
feba4c329d set courseoverground to unused on simulator build 2018-04-23 17:21:32 -07:00
s0up
ff247c3817 fix missing blocks 2018-04-23 15:02:26 -07:00
s0up
4e3a21d2b3 imu changes to allow for GPS rescue mode & fix home error 2018-04-23 14:56:05 -07:00
blckmn
46fe22b4bd Direct license replacement 2018-04-22 09:22:46 +10:00
etracer65
abe5b61ff8 IMU attitude estimate accelerated convergence after disarming (#5425)
After disarming and allowing the gyros to settle with no motion, temporarily increase the dcmKpGain to rapidly converge on the correct attitude as indicated by the accelerometer (if present).

Addresses the case of the attitude estimate becoming significantly incorrect after a crash due to high gyro rates.  While the estimate will eventually converge, it does so quite slowly.  The pilot may re-arm before the estimate has corrected leading to instant flips in self-leveling modes.  By speeding up the convergence when disarmed we help reduce this risk.
2018-03-15 20:17:19 +13:00
etracer65
f674b01bc8 Change ACC health check to use averaged rather than only the last (#5413)
The function imuIsAccelerometerHealthy() was only using the last ACC sample to determine if the sensor was returning "healthy" data.  This then controlled whether the IMU attitude calculation considered ACC data at all.  There were two problems with this:

1. A single sample from the ACC can be very noisy and exceed the check threshold resulting in a false negative on the health of the sensor.
2. The attitude calculations exclusively used the averaged ACC samples so there was an inconsistency in checking only the last sample to determine if the data was useful.

This change should lead to fewer occurences of the ACC sensor data being ignored in the attitude estimation which should in turn improve the overall estimate.
2018-03-15 02:19:13 +13:00
etracer65
18b857de65 Correct nested if else for USE_MAG and USE_GPS (#5414)
If USE_MAG was undefined but USE_GPS was defined, then the "else if" would incorrectly apply to a condition above making the USE_GPS section unlikely to execute.
2018-03-08 09:48:22 +13:00
Martin Budden
d7ccd2488c Avoid compass calculation in IMU when USE_MAG not defined 2018-02-01 10:48:05 +00:00
Martin Budden
3116ef4008 Moved compass health check into compass.c 2018-01-21 14:51:59 +00:00
George Gougoudis
3884d9383c Fix IMU mutex lock 2018-01-21 05:58:24 +02:00
Martin Budden
d90b42970c Acc fn/variable renames to align with iNav 2017-12-29 10:23:51 +00:00
jflyper
11c47c631b Port iNav's rangefinder 2017-12-20 12:54:19 +09:00
mikeller
b489d0ba9d Renamed 'parameter_group' to 'pg'. 2017-12-19 23:36:31 +13:00
Martin Budden
c0b1572175 Fix to acc gyro accumulation code 2017-11-28 16:04:00 +00:00
Martin Budden
22c672fa7d Add acc and gyro accumulators to improve attitude estimation 2017-11-28 06:26:57 +00:00
Martin Budden
d3d5b107cc
Merge pull request #4656 from martinbudden/bfa_imu_acc_alt_hold
Removed unnecessary acc calculation when no alt hold
2017-11-28 00:51:28 +00:00
Martin Budden
b6c3a9f19a Use float for imuIsAccelerometerHealthy calculation 2017-11-25 08:45:57 +00:00
Martin Budden
cfca75204f Removed unnecessary acc calculation when no alt hold 2017-11-25 08:37:25 +00:00
mikeller
a8d34dabb0 Changed defines for GYRO/ACC/MAG/BARO/GPS/SONAR/OSD/BLACKBOX/CMS to conform to the USE_ convention. 2017-11-05 10:15:24 +13:00
Adrian Miriuta
7146c40ca8 HEADFREE true 3D (second edition)...
reduced memory footprint ...
	rebased squashed cleanup
2017-09-23 07:35:30 +02:00
Steffen Windoffer
03aa31acdd remove not needed whitespaces 2017-08-24 11:33:39 +02:00
Martin Budden
a86ac89448 Whitespace tidy 2017-07-05 09:34:44 +01:00
Martin Budden
3d4f0bb137 Whitespace tidy 2017-07-05 06:36:22 +01:00
Martin Budden
564e0c94b8 Move some GPS variables into struct. Some alignment with iNav 2017-06-25 14:44:04 +01:00
Dan Nixon
3dae29611e Refactor IMU unit test 2017-06-11 11:44:52 +01:00
Martin Budden
23f158913e Moved time functions out of system.h into time.h 2017-05-26 14:03:28 +01:00
Martin Budden
0219d6adc7 Updated accgyro locking. Printf tidy 2017-04-10 14:54:25 +01:00
cs8425
efbb7520a8 some fix & should be usable
use quaternion directly & we can fly in 3D mode now

rename uartPort_t to tcpPort_t

fix race on ACC, GYRO, IMU

fix gyro scale & disable SystemLoad calculate

update README.md

remove some unused

fix scale on 3D mode
2017-04-09 10:58:01 +08:00
cs8425
120fa21693 implement SITL in gazebosim with ArduCopterPlugin
need implement fake eeprom & fake IO

need implement fake system function

can compile, stuck in isEEPROMContentValid()

EEPROM in memory work

EEPROM as file should work

fix some complie warning

MSP over TCP work (add dyad.c)

a little clean up

fix FLASH_CONFIG_Size in ld script & implement some pwmout

IO to simulator work!! need to check direction & scale!!

can fly but Gyro buggy

move dyad.c

fix busy-loop (limit to max 20kHz)

can simulatie in different speed now! (hard code)

add option for IMU calculation

add README.md

move dyad.c and fix F3 overrun the flash size

explanation SITL in README.md and reuse CFLAGS, ASFLAGS
2017-04-05 18:22:59 +08:00
Martin Budden
18145c9d47 Fixed compiler warnings 2017-03-03 16:36:40 +00:00
Martin Budden
c92679f454 Added PG config definitions 4 2017-02-25 18:19:56 +00:00
Martin Budden
4c435fccae Preparation for conversion to parameter groups 6 2017-02-15 08:05:37 +00:00
Martin Budden
3d1e42d1aa Tidy of IMU header 2017-02-06 00:27:08 +00:00
Martin Budden
79d4b2146d Preparation for conversion to parameter groups 2017-02-01 08:46:19 +00:00
Martin Budden
ee8a1676c4 Moved accelerometerTrims into accelerometerConfig() 2016-12-17 22:30:03 +00:00
Martin Budden
8d3c825646 Converted currentTime to currentTimeUs 2016-12-01 20:00:44 +00:00
Martin Budden
b8b9c95f57 Moved sensor global data into sensor_s structs 2016-12-01 17:47:17 +00:00
Martin Budden
590e569375 Changed gyro init and read functions to take a gyro_t* parameter.
Scaled gyro values to degrees per second in gyroUpdate.
2016-11-30 16:59:55 +00:00
Martin Budden
6ff265ec62 Moved masterConfig imu items into a struct 2016-11-29 22:28:11 +00:00
Martin Budden
58c85029d6 Removed unnecessary #includes 2016-10-26 05:15:26 +01:00
Martin Budden
2f9ca4355c currentTime passed in scheduler task call 2016-09-17 16:01:37 +01:00
Martin Budden
541f4d4018 Directory rearrangement to reflect cleanflight changes 2016-08-07 13:44:00 +01:00
Martin Budden
ea283ab98c Converted tabs to spaces 2016-07-09 14:39:39 +01:00
Martin Budden
74d20a276f Made filter naming, parameters and state consistent 2016-07-03 06:45:11 +01:00
Martin Budden
e9a46c6ebb Cleanup of acc device drivers extern usage CF PR#2117 2016-06-16 18:09:05 +01:00