Commit Graph

22714 Commits

Author SHA1 Message Date
Peter Barker ec7bde2be4 SITL: rename APMrover2 to Rover 2020-04-14 09:50:34 +09:00
Peter Barker 4245ee6543 RC_Channel: rename APMrover2 to Rover 2020-04-14 09:50:34 +09:00
Peter Barker 1b99cfb10a AP_Vehicle: rename APMrover2 to Rover 2020-04-14 09:50:34 +09:00
Peter Barker b7a03ae5ad AP_RangeFinder: rename APMrover2 to Rover 2020-04-14 09:50:34 +09:00
Peter Barker d390126b93 AP_Rally: rename APMrover2 to Rover 2020-04-14 09:50:34 +09:00
Peter Barker d19f8db06f AP_NavEKF3: rename APMrover2 to Rover 2020-04-14 09:50:34 +09:00
Peter Barker f1fc05d357 AP_NavEKF2: rename APMrover2 to Rover 2020-04-14 09:50:34 +09:00
Peter Barker efbf929bc0 AP_InertialSensor: rename APMrover2 to Rover 2020-04-14 09:50:34 +09:00
Peter Barker e67347f011 AP_HAL_SITL: rename APMrover2 to Rover 2020-04-14 09:50:34 +09:00
Peter Barker 7d7a7d126c AP_Follow: rename APMrover2 to Rover 2020-04-14 09:50:34 +09:00
Peter Barker e1f8af1653 AP_BattMonitor: rename APMrover2 to Rover 2020-04-14 09:50:34 +09:00
Peter Barker 6046aa3625 AP_Airspeed: rename APMrover2 to Rover 2020-04-14 09:50:34 +09:00
Peter Barker e545a429a0 AC_Fence: rename APMrover2 to Rover 2020-04-14 09:50:34 +09:00
Peter Barker 002d47447e AC_Avoidance: rename APMrover2 to Rover 2020-04-14 09:50:34 +09:00
Randy Mackay 3ccb3c69a6 SITL: add vicon position offsets 2020-04-14 10:28:03 +10:00
Randy Mackay 2164293cc0 AP_VisualOdom: remove sensor position from call to ahrs writeExtNavData 2020-04-14 10:28:03 +10:00
Randy Mackay 79afc70cdb AP_AHRS: remove writeExtNavData sensOffset argument
EKF pulls this directly from AP_VisualOdom
2020-04-14 10:28:03 +10:00
Randy Mackay 8749f30c64 AP_NavEKF2: external nav pos offsets from AP_VisualOdom library 2020-04-14 10:28:03 +10:00
Randy Mackay c39fef6c56 GCS_MAVLink: pass vision-position-estimate reset_counter to AP_VisualOdom handler 2020-04-14 10:28:03 +10:00
Randy Mackay 3557104787 AP_VisualOdom: log corrected position instead of raw position 2020-04-14 10:28:03 +10:00
Randy Mackay 6622927a23 AP_VisualOdom: support position resets 2020-04-14 10:28:03 +10:00
Randy Mackay 83e48b575e AP_VisualOdom: add SCALE parameter
Applied to positions from vision-position-estimate messages
2020-04-14 10:28:03 +10:00
Randy Mackay 852325c8e4 AP_VisualOdom: remove unused method declarations 2020-04-14 10:28:03 +10:00
Randy Mackay ccf96cf0a5 AP_VisualOdom: rename MAV to MAVLink in TYPE param desc 2020-04-14 10:28:03 +10:00
Randy Mackay 4f639481c1 AP_Logger: VISP msg adds reset_counter 2020-04-14 10:28:03 +10:00
Randy Mackay fb7e68c53a AP_NavEKF2: writeExtNavData reset handles system time wrap 2020-04-14 10:28:03 +10:00
Andrew Tridgell 74f33d57c5 HAL_ChibiOS: avoid unnecessary H7 flash writes 2020-04-14 10:02:51 +10:00
Andrew Tridgell 8dabd6cefc HAL_ChibiOS: expect a long delay on flash page erase
this prevents the display of errors on flash page erase
2020-04-14 10:02:51 +10:00
Andrew Tridgell 4b236e52b2 HAL_ChibiOS: added MatekH743 port 2020-04-14 10:02:51 +10:00
Andrew Tridgell 2165fd66f1 HAL_ChibiOS: define FLASH_RESERVE_END_KB 2020-04-14 10:02:51 +10:00
Andrew Tridgell 8e83783b18 AP_FlashStorage: support H7 flash storage
this generalises AP_FlashStorage to support the 32 byte write
restrictions of the STM32H7
2020-04-14 10:02:51 +10:00
Andrew Tridgell 5125fc1a64 HAL_SITL: added checks for flash storage 2020-04-14 10:02:51 +10:00
Andrew Tridgell efe78fe3e1 AP_HAL: allow SITL to emulate 3 different types of flash storage 2020-04-14 10:02:51 +10:00
Andrew Tridgell e1792f89db AP_HAL: fixed default HAL_STORAGE_SIZE for flash storage 2020-04-14 10:02:51 +10:00
Andrew Tridgell c0039c85e0 HAL_SITL: emulate sector size for flash storage properly 2020-04-14 10:02:51 +10:00
Peter Barker 2988c70627 AP_FlashStorage: clarify space-available-for-write check 2020-04-14 10:02:51 +10:00
Andy Piper c4217f329b AP_RPM: allow harmonic notch driver to appear as RPM values. 2020-04-14 09:43:16 +10:00
Henry Wurzburg e5319397b4 AP_HAL_ChibiOS: eliminate EKF2 from F4 builds not using HAL_MINIMIZE_FEATURES 2020-04-14 09:19:28 +10:00
Andrew Tridgell 5c399fce41 AP_AHRS: auto-switch to EK3/EK2 if selected option disabled
if we have an EKF backend selected and that backend doesn't exist then
auto-switch to the other backend.

This fixes MatekF405-Wing which has EKF2 disabled and was falling back
to DCM
2020-04-14 09:15:43 +10:00
Peter Barker c36e06e7fa AP_Compass: add documentation for COFS, compass-learning message 2020-04-14 07:34:59 +10:00
Peter Barker 54292c5443 AP_Tuning: add documentation for PRTN message 2020-04-14 07:34:59 +10:00
Peter Barker 061c3ecb7f AP_RCProtocol: add documentation for RCDA message 2020-04-14 07:34:59 +10:00
Peter Barker 767c010332 AP_Logger: add documentation for WENC, CESC, PRX, ADSB, BCN, BCL, OABR, OADF 2020-04-14 07:34:59 +10:00
murata 124d8c7fdf AP_HAL_ChibiOS: Changing the timeout detection 2020-04-14 07:32:46 +10:00
murata 10b7988092 AP_Baro: Fix timestamp wrapping 2020-04-14 07:30:58 +10:00
Randy Mackay 9f81da1bf9 AP_NavEKF2: minor comment fix 2020-04-13 14:39:53 +09:00
Andrew Tridgell db4f1a1473 HAL_ChibiOS: enable ADIS16470 on SPI1 2020-04-13 15:26:02 +10:00
CUAVcaijie 942b2fd29f HAL_ChibiOS: Added support for CUAV X7 flight controller 2020-04-13 15:26:02 +10:00
Andrew Tridgell d772289b0d AP_InertialSensor: added driver for ADIS16470 2020-04-13 11:57:04 +10:00
Peter Barker ede87d49f6 AP_InternalError: add a bit for infinite recursion in switch_full_sector 2020-04-12 09:43:13 +10:00
Peter Barker a2b4713008 AP_FlashStorage: protect against infinite recursion in switch_full_sector 2020-04-12 09:43:13 +10:00
Peter Barker 851d9ae1ef AP_Compass: log message information for MMC3416 2020-04-12 08:36:48 +10:00
Peter Barker c3b8db95b8 AP_Logger: add DSTL log message documentation 2020-04-12 08:36:48 +10:00
Peter Barker d23d4768f1 AP_Landing: add LAND log message documentation 2020-04-12 08:36:48 +10:00
Peter Barker e5b634cdd0 AP_IOMCU: add IOMC log message documentation 2020-04-12 08:36:48 +10:00
Peter Barker 88d61b9d3c AP_Follow: add FOLL log message documentation 2020-04-12 08:36:48 +10:00
Peter Barker 194d3c280f AP_EFI: add EFI log message documentation 2020-04-12 08:36:48 +10:00
Peter Barker f9c4976f93 AP_BoardConfig: add HEAT log message documentation 2020-04-12 08:36:48 +10:00
Peter Barker 1a148afe1b AC_AutoTune: add ATDE log message documentation 2020-04-12 08:36:48 +10:00
Peter Barker afc0fbc516 AC_AttitudeControl: add CTRL log message documentation 2020-04-12 08:36:48 +10:00
Andrew Tridgell 1f8cd830ea AP_NavEKF3: fixed use of tabs 2020-04-11 21:14:31 +10:00
Paul Riseborough f68f355852 AP_NavEKF3: Fix timestamp wrapping 2020-04-11 21:14:31 +10:00
Paul Riseborough 33ab1a7b15 AP_NavEKF3: Ensure yaw fusion commences when starting from rest 2020-04-11 21:14:31 +10:00
Paul Riseborough a3725e2581 AP_NavEKF3: Fix bug in calculation of rotation order 2020-04-11 21:14:31 +10:00
Paul Riseborough eeac0a05b9 AP_NavEKF3: Improvements to on ground movement check
Reduce sensitivity and log test ratios.
Reduce base logging rate to 5Hz and log when status changes.
2020-04-11 21:14:31 +10:00
Paul Riseborough ebb8bb4f6f AP_NavEKF3: Enable use of yaw fusion before external yaw sensor starts 2020-04-11 21:14:31 +10:00
Andrew Tridgell 83ad1c17a8 AP_AHRS: disable DCM yaw consistency check when using external yaw
when EKF3 is using an external (typically GPS) supplied yaw then we
don't expect DCM to have the right yaw so should not do the DCM yaw
consistency check
2020-04-11 21:14:31 +10:00
Andrew Tridgell 3ae0b0d446 AP_NavEKF3: added using_external_yaw() method
needed by AHRS for attitudes_consistent() check
2020-04-11 21:14:31 +10:00
Andrew Tridgell 6f04fae4a0 AP_NavEKF3: added fallback to mag option with external yaw
this allows for a magnetometer to be used as a fallback yaw source in
flight when using an external yaw source such as a GPS. The
magnetometer bias is learned while the GPS yaw is available and
fallback is only done if the mag yaw and GPS yaw are consistent when
fallback is enabled

This also learns the Z gyro bias until first yaw alignment when
MAG_CAL is EXTERNAL_YAW_FALLBACK. This prevents large gyro bias
building while waiting for GPS lock
2020-04-11 21:14:31 +10:00
Andrew Tridgell a3100251a8 AP_NavEKF3: use enum class for EK3_MAG_CAL values
and use effective_magCal() everywhere for consistency
2020-04-11 21:14:31 +10:00
Andrew Tridgell e8fb082a9a HAL_SITL: fixed simulation of roll/pitch of moving baseline ublox 2020-04-11 21:14:31 +10:00
Andrew Tridgell b90b4f9157 HAL_SITL: implement moving baseline for ublox
this allows testing of the moving baseline dual ublox code
2020-04-11 21:14:31 +10:00
Andrew Tridgell 778532d556 SITL: added SIM_GPS2_HDG and rationalise the GPS position variables 2020-04-11 21:14:31 +10:00
Andrew Tridgell ff112a726b AP_Battery: fixed bug in SUI driver
fixed bug in total voltage
2020-04-10 11:46:01 +10:00
bugobliterator a31f2e5d90 hwdef: add validation checks for CubeOrange 2020-04-10 07:04:21 +10:00
bugobliterator ef91f1634b HAL_ChibiOS: add support for adding board validation test 2020-04-10 07:04:21 +10:00
bugobliterator 8a77ddf8c6 AP_BoardConfig: run validation test if declared under hwdef 2020-04-10 07:04:21 +10:00
Randy Mackay 1ba036169f AP_VisualOdom: align sensor displays yaw shift in 0 to 360 range 2020-04-09 19:41:08 +09:00
Randy Mackay 9fd39f3768 AP_Math: alternative quaternion rotation test 2020-04-09 19:41:08 +09:00
Randy Mackay 26e4dd6fef AP_Math: correct quaternion::from_rotation for pitch-180 2020-04-09 19:41:08 +09:00
Randy Mackay dc2e0f328b AP_VisualOdom: fix handle_vision_position_delta_msg
position and angle deltas were swapped when passed into the EKF
time passed into the EKF was scaled as usec when it should be sec
2020-04-09 19:41:08 +09:00
Randy Mackay c18fce6714 AP_Math: add quaternion rotation test 2020-04-09 19:41:08 +09:00
Randy Mackay d1aa3858f0 AP_Vehicle: add visual odometry 2020-04-09 19:41:08 +09:00
Randy Mackay 1b1687f43d AP_Arming: integrate visual odometry pre_arm_check 2020-04-09 19:41:08 +09:00
Randy Mackay 2f5a8fd6b9 RC_Channel: add aux function for visodom-calibrate 2020-04-09 19:41:08 +09:00
Randy Mackay 9769f08fd9 GCS_MAVLink: visual odometry build fixes 2020-04-09 19:41:08 +09:00
Randy Mackay a9c1eb5af4 GCS_MAVLink: fill in sys_status vision position bits 2020-04-09 19:41:08 +09:00
Randy Mackay a1ddd55ea5 GCS_MAVlink: AP_integrate of rename to handle_vision_position_delta_msg 2020-04-09 19:41:08 +09:00
Randy Mackay 728e8b45a9 GCS_MAVLink: use AP_VisualOdom to handle vision-position-estimate messages 2020-04-09 19:41:08 +09:00
Randy Mackay aa720b0ae6 AP_VisualOdom: pre-arm failure string prefix moved to AP_Arming 2020-04-09 19:41:08 +09:00
Randy Mackay 3d75dc7815 AP_VisualOdom: add HAL_VISUALODOM_ENABLED 2020-04-09 19:41:08 +09:00
Randy Mackay 8f94a0cfb0 AP_VisualOdom: integrate IntelT265 backend 2020-04-09 19:41:08 +09:00
Randy Mackay f0e11d9a5c AP_VisualOdom: add IntelT265 backend 2020-04-09 19:41:08 +09:00
Randy Mackay a41b169635 AP_VisualOdom: front-end implements handle_vision_position_estimate with eulers 2020-04-09 19:41:08 +09:00
Randy Mackay 3530d5b348 AP_VisualOdom: MAV driver implements handle_vision_position_estimate 2020-04-09 19:41:08 +09:00
Randy Mackay c78b1ab3bf AP_VisualOdom: rename handle_vision_position_delta_msg 2020-04-09 19:41:08 +09:00
Randy Mackay b519d285a6 AP_VisualOdom: get_orientation made public
also remove unnecessary friends
2020-04-09 19:41:08 +09:00
Randy Mackay c36dfc448d AP_VisualOdom: handle_msg directly updates EKF 2020-04-09 19:41:08 +09:00
Randy Mackay 0eb1ef1f08 AP_VisualOdom: add handle_vision_position_estimate
also add pre_arm_check
2020-04-09 19:41:08 +09:00
Randy Mackay 1cf9655b4a AP_VisualOdom: TYPE param becomes enable flag and reboot required 2020-04-09 19:41:08 +09:00
Randy Mackay 61a06bbb04 AP_Math: add quaternion rotate, from_rotation and invert 2020-04-09 19:41:08 +09:00
Randy Mackay 338548c5eb AP_Math: move HALF_SQRT_2 def to rotation.h
This allows it to be used by the Quaternion class
2020-04-09 19:41:08 +09:00
Randy Mackay b0b78e974b AP_AHRS: add get_quaternion 2020-04-09 19:41:08 +09:00
Randy Mackay e1c623183e AP_AHRS: minor comment fix and move var_info lower 2020-04-09 19:41:08 +09:00
Randy Mackay 24bb4876a8 AP_AHRS: move is_ext_nav_used_for_yaw to parent 2020-04-09 19:41:08 +09:00
Randy Mackay c0187fe05f AP_Logger: add log message description for VISO 2020-04-09 19:41:08 +09:00
Randy Mackay f18be824ea AP_Logger: add VISP message 2020-04-09 19:41:08 +09:00
chobits 63320f140a AP_Logger: constraints time spend in header writing, more complete 2020-04-09 19:17:17 +10:00
chobits b829384fdf AP_Logger: constraints time spended in header writing 2020-04-09 19:17:17 +10:00
Andrew Tridgell dd4cf6ccdd AP_Compass: change RM3100 device ID
changed scale factor means users need to recalibrate
2020-04-08 11:21:51 +10:00
Andrew Tridgell 18c3efc377 AP_Compass: fixed scaling of RM3100
scale factor was off by 200/256, resulting in COMPASS_SCALE of about
1.28

thanks to Arace for noticing
2020-04-08 11:21:51 +10:00
Peter Barker 5e4cbb0a3f AP_EFI: correct duplicate-label problem in EFI2 log message 2020-04-08 11:17:41 +10:00
Samuel Tabor 4a39a43c10 AP_Soaring: Add log documentation. 2020-04-08 09:11:54 +10:00
Samuel Tabor b9daae062c AP_Soaring: Use enum class rather than typedef enum for states and hide details of these. 2020-04-08 09:11:54 +10:00
Samuel Tabor 3228cc3309 AP_TECS: Update descriptions of pitch feed-forward parameters. 2020-04-08 09:11:54 +10:00
Samuel Tabor 6e75890bd9 AP_Soaring: Add a low pass of target position from EKF before using it. 2020-04-08 09:11:54 +10:00
Samuel Tabor f23efdd13b AP_Soaring: Make vario time constant public. 2020-04-08 09:11:54 +10:00
Samuel Tabor d04c6cb02e TECS: Don't override the speedweight to 0 if synthetic airspeed is in use. 2020-04-08 09:11:54 +10:00
Samuel Tabor 56649fa8eb AP_Soaring: Fix too-long status message. 2020-04-08 09:11:54 +10:00
Samuel Tabor d54c7f1b7a AP_Soaring: Fix bug when no soaring activation RC channel set. 2020-04-08 09:11:54 +10:00
Samuel Tabor fbd0df81a7 AP_Soaring: Report changes in active status. 2020-04-08 09:11:54 +10:00
Samuel Tabor e1f7122566 AP_Soaring: Improve tracking of enabled/disabled status. 2020-04-08 09:11:54 +10:00
Samuel Tabor 5ac801b2ac AP_Soaring: Use 64 bit variable for time to avoid overflow. 2020-04-08 09:11:54 +10:00
Samuel Tabor 2260fda4ec AP_Soaring: Detect changes in active parameter/switch position. 2020-04-08 09:11:54 +10:00
Samuel Tabor fdf7eae01c AP_Soaring: Adjust initial EKF values and limit R to 40.0m. 2020-04-08 09:11:54 +10:00
Samuel Tabor ff1725b549 AP_Soaring: Make enable channel 3 position. PWM above 1400us allows most soaring features, but above 1700us is required before any automatic switch to LOITER mode. 2020-04-08 09:11:54 +10:00
Samuel Tabor 1160c59a89 AP_Soaring: Remove dsp bias and log this. 2020-04-08 09:11:54 +10:00
Samuel Tabor c28c573da1 AP_Soaring: Also log acceleration. 2020-04-08 09:11:54 +10:00
Samuel Tabor 7555f5abf8 AP_Soaring: Fix incorrect trig function and log the expected sink. 2020-04-08 09:11:54 +10:00
Samuel Tabor 17f1fa9600 AP_Soaring: Fix use of double precision sqrt. 2020-04-08 09:11:54 +10:00
Samuel Tabor 7d3ff28974 AP_Soaring: Correct bug with reversed arguments. 2020-04-08 09:11:54 +10:00
Samuel Tabor 16b7de4029 AP_Soaring: Cleanup variometer. 2020-04-08 09:11:54 +10:00
Samuel Tabor 62a34e0f8d AP_Soaring: Calculate filter time constant based on airspeed and loiter radius, using 3x circline rate. 2020-04-08 09:11:54 +10:00
Samuel Tabor 2b40182b34 AP_Soaring: Reduce drift feed-forward by ratio of climb rate to thermal core strength. This is consistent with assumption that each packet of air, rising at core strength, is convected with the ambient wind speed. 2020-04-08 09:11:54 +10:00
Samuel Tabor 15cef55e97 SITL: Make thermal drift relative to 100m alt to avoid so much change with wind speed and direction." 2020-04-08 09:11:54 +10:00
Samuel Tabor 8072f6b858 AP_Soaring: Make the trigger VSPEED take account of thermalling sink. 2020-04-08 09:11:54 +10:00
Samuel Tabor 650b464831 AP_Soaring: Move drift check to separate function and check drift with reference to mission segment, allowing drift in right direction. LOITER target, not current position, is now used. 2020-04-08 09:11:54 +10:00
Samuel Tabor 45cb663d73 AP_Math: Add template for Vector2f::projected. 2020-04-08 09:11:54 +10:00
Samuel Tabor fab74f8927 AP_Soaring: Calculate expected thermalling sink live and avoid divide by zero by limiting airspeed to that corresponding to CL max (generously assumed 1.5 for glider). 2020-04-08 09:11:54 +10:00
Samuel Tabor 75f772b269 AP_Soaring: Add SOAR_MAX_RADIUS parameter, that defines when a RTL will be used when exiting LOITER. 2020-04-08 09:11:54 +10:00
Samuel Tabor 684ee11fc3 AP_TECS: Add flags to indicate gliding flight, and use these with AP_Soaring. 2020-04-08 09:11:54 +10:00
Samuel Tabor dc8c062fbe AP_TECS: Correct an error in the SEBdot FF term. 2020-04-08 09:11:54 +10:00
Samuel Tabor 247738518e AP_TECS: Add a feed-forward term from adjusted demanded airspeed to nav pitch. 2020-04-08 09:11:54 +10:00
Samuel Tabor a27c99fab9 AP_TECS: Return the adjusted demanded airspeed. The aspd_error mavlink message now shows the rate-limited airspeed. 2020-04-08 09:11:54 +10:00
Samuel Tabor ae27f96361 SITL: Make soaring thermals slanted. 2020-04-08 09:11:54 +10:00
Samuel Tabor 013628bd1d Plane: Soaring - better reporting of exit due to drift. 2020-04-08 09:11:54 +10:00
Samuel Tabor e1b2360781 AP_Soaring: Add a maximum allowable drift distance when thermalling. 2020-04-08 09:11:54 +10:00
Samuel Tabor 936d4232c9 AP_Soaring: Add a 60s first order filter on climb rate. If this becomes negative exit thermalling. 2020-04-08 09:11:54 +10:00
Samuel Tabor 30249e8006 AP_Soaring: Add a check of whether altitude has been lost overall when thermalling. 2020-04-08 09:11:54 +10:00
Samuel Tabor 5082c9be8b SITL: Add plane-soaring type, including parameters, mission, simulated thermals and glider sim settings. 2020-04-08 09:11:54 +10:00