284 Commits

Author SHA1 Message Date
Randy Mackay
0e44baae85 Copter: rename requires_GPS to requires_position
Co-authored-by: Andy Piper <github@andypiper.com>
2026-02-05 14:24:44 -05:00
Andy Piper
36e6aef981 Copter: allow copter to yaw to velocity target
add set_target_angle_and_rate_and_throttle() for precise vehicle control
don't allow set_target_angle_and_rate_and_throttle() to be called unless in guided mode.
2025-12-17 16:31:37 +00:00
Leonard Hall
986c4a4e19 Copter: NEU to NED renaming - Conversion 2025-12-17 08:03:10 +09:00
Leonard Hall
7a8cc3815f Copter: NEU to NED renaming - No compiler change 2025-12-17 08:03:10 +09:00
Leonard Hall
7e03cfb3a9 Copter: Convert to postype 2025-09-26 10:35:25 +09:00
Leonard Hall
2ead0f59f4 Copter: PR Feedback 2025-08-20 17:01:44 +09:00
Leonard Hall
bf7e74d969 Copter: Convert simple and super simple to radians 2025-08-20 17:01:44 +09:00
Leonard Hall
4141bf4675 Copter: Fix Vector3f () to {} 2025-08-13 11:06:41 +09:00
Leonard Hall
9799b6b7a0 Copter: Add missing is_terrain_alt 2025-08-13 11:06:41 +09:00
Leonard Hall
b0b8ab07ea Copter: Convert Mode Circle to meters 2025-08-13 11:06:41 +09:00
Leonard Hall
93a767026c Copter: Add units to start_takeoff 2025-08-13 11:06:41 +09:00
Leonard Hall
1a4f8b738e Copter: Convert Mode Guided to meters 2025-08-13 11:06:41 +09:00
Leonard Hall
9def2ecf62 Copter: Convert LUA Guided accessors to meters 2025-08-13 11:06:41 +09:00
Leonard Hall
b90b23e1e7 Copter: Convert set_speed setters to meters 2025-08-13 11:06:41 +09:00
Leonard Hall
8beb1b030e Copter: Address PR feedback 2025-08-05 11:04:37 +09:00
Leonard Hall
c52a95b7d2 Copter: Guided: Fix/Add units and axis 2025-08-05 11:04:37 +09:00
Leonard Hall
561cfe2c1c Copter: Support - AC_WPNav: add units to crosstrack_error 2025-07-25 14:20:19 +09:00
Iampete1
2c0c074b71 ArduCopter: move RPM lib to vehicle 2025-07-22 10:33:55 +10:00
Peter Barker
c8868a9b73 ArduCopter: add and use AP_RC_TRANSMITTER_TUNING_ENABLED 2025-07-22 08:14:19 +09:00
Leonard Hall
1141fedc6f Copter: LUA: Support - Guided: Change cd to rad 2025-07-08 09:24:39 +09:00
Iampete1
f91d001803 Copter: DO_CHANGE_SPED: use enum and add cms postfix to setters 2025-07-08 08:57:02 +09:00
Peter Barker
e6f3c6a88e ArduCopter: move rudder-arming up to RC_Channel library 2025-07-08 08:28:31 +10:00
Leonard Hall
f8f720a0c0 Copter: remove most of the _cd() functions 2025-07-07 09:28:56 +09:00
Peter Barker
831078bbc2 ArduCopter: add and use AP_ADSB_AVOIDANCE_ENABLED
this gates the "ADSB" avoidance feature used for macro-level avoidance.  It's not actually limited to ADSB as input...
2025-06-26 16:32:22 +10:00
Leonard Hall
030714aecc Copter: inertial nav replaced with AHRS
Co-authored-by: Randy Mackay <rmackay9@yahoo.com>
2025-05-31 08:21:51 +09:00
Bob Long
b23d65a3bc ArduCopter: fix SCHED_TASK rate_hz name 2025-05-30 10:36:09 +10:00
Leonard Hall
f4069f57d9 Copter: Use cd_to_rad and remove radians(XXX * 0.01f); 2025-05-28 20:16:26 +09:00
Peter Barker
63d7973471 Copter: avoid updating simple-mode values when RC input is invalid
if we are at bind-time values then we still get new radio frames, they're just not something we should use
2025-05-14 20:41:27 +10:00
muramura
514e71b850 Copter: Add units to the method that calculates the distance meter between WAYPOINTs 2025-05-12 11:37:04 +09:00
Leonard Hall
69f563c36d Copter: add units and frames to AC_WPNav methods
Copter

Copter
2025-05-02 21:47:07 +10:00
Leonard Hall
c11d93b36f ArduCopter: add units and frames to AC_AttitudeControl methods
Co-authored-by: Peter Barker <pbarker@barker.dropbear.id.au>
2025-04-23 10:02:29 +10:00
Thomas Watson
331d8653b3 Copter: avoid rounding to degree in super-simple bearing calculation
Multiply by float instead of dividing by integer to get a float result.
2025-04-08 22:06:37 +10:00
Randy Mackay
695949ef4f Copter: remove call to control monitor logging 2025-03-26 14:10:35 +11:00
co63oc
d24da9e854 ArduCopter: correct typos and mis-spellings 2025-03-03 08:47:03 +09:00
Peter Barker
b9a83a6201 ArduCopter: use aux switch to trigger AHRS-trim-via-RC-input 2025-02-06 16:03:52 +11:00
Peter Barker
c3f2b4013f Copter: free allocations in case of allocation failure
these would be leaked if the "new" call for the ModeGuidedCustom object failed.

Since resgister_custom_mode may be called multiple times we could leak memory continuously
2025-01-31 08:53:20 +09:00
Peter Barker
8425bf46dd Copter: remove unused hgt_variance_filt
this filter is populated but never checked when checking variances
2025-01-29 18:52:35 +11:00
Gone4Dirt
00e5f4001f Copter: Autorotation mode restructure and tidy 2025-01-22 18:53:44 +11:00
Andy Piper
3ed6ada2e3 Copter: allocation failure on rate thread start 2024-12-04 07:45:05 +11:00
Andy Piper
3d43f2053f Copter: move RTDT logging to fast path
log after motor output in fast rate thread
2024-12-04 07:45:05 +11:00
Andy Piper
f84c855dd1 Copter: run copter attitude control with separate rate thread
run motors output at rate thread loop rate
allow rate thread to be enabled/disabled at runtime for in-flight impact testing
setup the right PID notch sample rate when using the rate thread the PID notches
 run at a very different sample rate
call update_dynamic_notch_at_specified_rate() in rate thread
log RTDT messages to track rate loop performance
set dt each cycle of the rate loop thread
run rate controller on samples as soon as they are ready
detect overload conditions in both the rate loop and main loop
decimate the rate thread if the CPU appears overloaded
decimate the gyro window inside the IMU
add in gyro drift to attitude rate thread
add fixed-rate thread option
configure rate loop based on AP_INERTIALSENSOR_FAST_SAMPLE_WINDOW_ENABLED
better rate loop thread decimation management
ensure fix rate attitude is enabled on arming
add rate loop timing debug
update backend filters rather than all the backends
provide more options around attitude rates
only log attitude and IMU from main loop
force trigger_groups() and reduce attitude thread priority
migrate fast rate enablement to FSTRATE_ENABLE
remove rate thread logging configuration and choose sensible logging rates
conditionally compile rate thread pieces
allow fast rate decimation to be user throttled
if target rate changes immediately jump to target rate
recover quickly from rate changes
ensure fixed rate always prints the rate on arming and is always up to date
add support for fixed rate attitude that does not change when disarmed
only push to subsystems at main loop rate
add logging and motor timing debug
correctly round gyro decimation rates
set dshot rate when changing attitude rate
fallback to higher dshot rates at lower loop rates
re-factor rate loop rate updates
log rates in systemid mode
reset target modifiers at loop rate
don't compile in support on tradheli
move rate thread into its own compilation unit
add rate loop config abstraction that allows code to be elided on non-copter builds
dynamically enable/disable rate thread correctly
add design comment for the rate thread

Co-authored-by: Andrew Tridgell <andrew@tridgell.net>
2024-12-04 07:45:05 +11:00
Iampete1
840507970e Copter: tell the gcs that the number of available modes has changed when registering a custom mode 2024-11-26 08:44:31 +09:00
Iampete1
1ed57deab6 Copter: return custom_mode_state for registered modes 2024-11-26 08:44:31 +09:00
Iampete1
512f620e6e Copter: add support for adding a custom mode from scripting 2024-11-26 08:44:31 +09:00
snktshrma
20aeae1a09 ArduCopter: Enabled external control for takeoff
Co-authored-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com>
2024-11-23 09:00:27 +09:00
Peter Barker
e29b6c3036 ArduCopter: create and use a singleton for SRV_Channels
avoid creation of static pointers to objects held within SRV_Channels
2024-11-13 19:47:49 +11:00
Peter Barker
2c401ccec5 Copter: rename ADVANCED_FAILSAFE to AP_COPTER_ADVANCED_FAILSAFE_ENABLED
to make integration with custom build server work
2024-11-12 12:44:34 +11:00
Peter Barker
e4859599cf Copter: stop using global ap variable as bitmask 2024-11-06 16:31:38 +09:00
Iampete1
94944427da Copter: Scripting: add support for set_target_rate_and_throttle 2024-09-25 08:47:30 +10:00
Peter Barker
db767ce0dd ArduCopter: re-order initialiser lines so -Werror=reorder will work 2024-09-24 22:50:28 +10:00