Commit Graph
382 Commits
Author SHA1 Message Date
Peter Barker c25e857983 APM_Control: replace atof with strtof for float assignments
atof() returns double which causes implicit narrowing to float.
strtof() directly returns float, avoiding the conversion.
2026-01-21 18:59:45 +11:00
Peter Barker 4df61b941f APM_Control: rename airspeed methods on AHRS to include EAS or TAS
mixing these up has caused confusion in the past.

"estimate" could also be confused as to mean "synthetic", when it will often come from a sensor.
2025-11-17 18:46:52 -06:00
Leonard Hall 8f7dfb3e7b APM_Control: Convert to postype 2025-09-26 10:35:25 +09:00
Andrew Tridgell 0de1946dce APM_Control: added an in_recovery flag to roll controller
allows for very rapid recovery for quadplanes
2025-08-20 15:45:06 +10:00
Gilmar Tuta 110da16208 APM_Control: Update FF and DFF scaling for plane controllers 2025-08-06 17:37:36 +10:00
Peter Barker 3708936c62 global: correct shebang lines to refernce python3
also remove the odd encoding line which is not required in Py3
2025-07-22 10:45:57 +10:00
Stephen Dade 05dbacebd2 APM_Control: Add steering deceleration parameter for pivot turns 2025-07-05 21:28:43 +10:00
Christian Clauss dc9446af62 wscript: Add # flake8: noqa linter directive 2025-06-20 20:30:15 +10:00
Christian Clauss fb7e0cd2a6 APM_Control: Fix check-executables-have-shebangs
% `pre-commit run --all-files check-executables-have-shebangs ` # currently fails on localhost (a developer's machine).
* https://github.com/pre-commit/pre-commit-hooks?tab=readme-ov-file#check-executables-have-shebangs

With the suggested change in this pull request, that test passes.

The linter directive `# flake8: noqa` was added to ensure that
 `pre-commit run flake8` also passed on some Python files.
2025-06-15 22:28:53 +10:00
Peter Barker 402bb08756 APM_Control: link example against AP_Avoidance
Fixes:
/usr/bin/ld: lib/libAP_FW_Controller_test_libs.a(RC_Channel.cpp.1.o): in function `RC_Channel::do_aux_function_avoid_adsb(RC_Channel::AuxSwitchPos)':
RC_Channel.cpp:(.text._ZN10RC_Channel26do_aux_function_avoid_adsbENS_12AuxSwitchPosE+0xd): undefined reference to `AP::ap_avoidance()'
collect2: error: ld returned 1 exit status

several other tools (eg. Replay) do the same thing
2025-06-11 17:03:20 +10:00
Peter Barker 0f837ab44d APM_Control: rename AHRS get_roll etc accessors to include _rad 2025-06-05 17:28:41 +10:00
Peter Barker a86fa8bd4d APM_Control: use get_roll_deg in place of roll_sensor (etc.) 2025-06-03 09:48:53 +10:00
Peter Barker 74746eb7bf APM_Control: replace ToRad with radians and ToDeg with degrees 2025-05-29 11:24:56 +10:00
Leonard Hall d9274f76f8 APM_Control: Use NED Vector2p input to AC_P_2D 2025-05-24 09:23:35 +09:00
Peter Barker 562f11e8a2 APM_Control: rename get_relative_position_NED_origin methods to include 'float'
can't have both postype and these methods, something has to shift names
2025-05-24 09:23:35 +09:00
Ryan Friedman dcba349010 APM_Control: Correct copy-paste error in roll/pitch param docstring
Signed-off-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com>
2025-04-21 10:39:09 +09:00
Peter Barker eb02e4c021 APM_Control: remove un-needed GCS_MAVLINK_Parameters::var_info instantiations
structure which required this has been removed
2025-04-07 10:58:41 +10:00
Andrew Tridgell fb7c40cadf APM_Control: avoid indecision in the roll controller
when we are close to a 180 degree error, go with the last direction if
we are in a 40 degree angle wedge of 180 degree error
2025-04-02 07:05:04 +11:00
Randy Mackay aa0c23d441 AR_PosControl: remove velocity slew rate accessor 2025-03-26 18:47:52 +11:00
Iampete1 63fecc76d4 APM_Control: examples: AP_FW_Controller_test: update to use HAL SITL 2025-02-04 10:41:56 +11:00
Iampete1 44d2fc1ac1 AMP_Control: move pitch and roll autotune_start into base AP_FW_Controller 2025-02-04 10:41:56 +11:00
Iampete1 790290d359 APM_Control: AP_AutoTune: add static axis_string method 2025-02-04 10:41:56 +11:00
Iampete1 f8dd0b2d76 APM_Control: add AP_FW_Controller as common base class to roll and pitch controllers 2025-02-04 10:41:56 +11:00
Iampete1 4db73d3883 APM_Control: add test for roll and pitch controllers 2025-02-04 10:41:56 +11:00
Stephen Dade 3764f377d8 APM_Control: Correct use of deceleration 2024-11-04 11:55:28 +09:00
Leonard HallandRandy Mackay 4d116ceefe AR_PosControl: integrate PSC logging update
Co-authored-by: Randy Mackay <rmackay9@yahoo.com>
2024-10-04 09:25:56 +09:00
Peter Barker b3c1cd1a5e APM_Control: add missing include for AP::ins() 2024-09-06 08:52:01 +10:00
Peter Barker 4e623bd384 APM_Control: avoid use of AP_Logger.h in library headers
this pulls in many more headers, we should avoid using it whereever we can
2024-09-04 09:51:49 +10:00
Iampete1 5cc63d7e6f APM_Control: move to new constant dt low pass filter class 2024-08-20 09:09:41 +10:00
Andrew Tridgell ad6502c9f1 APM_Control: use NEW_NOTHROW for new(std::nothrow) 2024-06-04 09:20:21 +10:00
Peter Barker 1e0c56b5b9 APM_Control: move AC_Avoidance defines into libraries 2024-03-11 18:07:18 +11:00
Peter Barker d0cc35af3e AR_PosControl: adjust for logging having moved into AC_AttitudeControl 2024-02-29 19:27:47 +11:00
Andrew Tridgell 0430923639 APM_Control: change LIM_ROLL_CD to ROLL_LIMIT_DEG 2024-01-23 15:00:30 +11:00
Andrew Tridgell 93c4b75a60 APM_Control: convert LIM_PITCH_MIN/MAX -> PTCH_LIM_MIN/MAX_DEG 2024-01-23 15:00:30 +11:00
Peter Barker f930c38712 APM_Control: allow compilation with HAL_LOGGING_ENABLED false 2024-01-17 18:25:55 +11:00
Peter Barker 71a00dc733 APM_Control: make AHRS attitude member variables private 2024-01-14 12:47:47 +11:00
Randy Mackay 62dfe0f04b AR_PosControl: no min speed when stopping 2023-11-28 12:46:46 +09:00
Randy Mackay 2d89f835e5 AR_PosControl: fix PSC_VEL_I param range 2023-11-28 07:54:45 +09:00
Andrew Tridgell 69bfe9b837 APM_Control: added D_FF support for fixed wing 2023-11-21 13:26:23 +11:00
Andy Piper cfebae5857 APM_Control: update for new AC_PID settings
enable filters with AP_FILTER_ENABLED
2023-11-21 13:26:23 +11:00
Andy Piper 9211dba484 APM_Control: update docs for new AC_PID parameters
add advanced flag to PIDs and selectively compile advanced PID options
2023-11-21 13:26:23 +11:00
Michael du Breuil f1b6a7d586 APM_Control: Allow autotune level 0 to actually reach the lowest entries of the autotune level table 2023-10-31 11:42:27 +11:00
Leonard Hall 029950ef05 APM_Control: Support PD Max 2023-09-26 10:41:05 +10:00
Andy Piper ab24f97275 APM_Control: implement single-cycle feed-forward scaler for roll and pitch 2023-09-13 18:02:44 +10:00
Andy Piper ee883b6ad0 APM_Control: allow autotune FLTD and FLTT updates to be disabled 2023-08-23 18:06:22 +10:00
Randy Mackay 57b54a4263 AR_PosControl: add singleton and get_srate 2023-08-01 09:16:17 +10:00
Randy Mackay 68e1769cc1 AR_AttitudeControl: add singleton and get_srate 2023-08-01 09:16:17 +10:00
Randy Mackay 9c15dcb206 AR_PosControl: limit and zero velocity I-term
zero in forward-back direction
limit in lateral direction
2023-07-05 20:27:54 +09:00
Randy Mackay 6f52eaf9a7 AR_AttitudeContol: add steering_limited checks 2023-07-05 20:27:54 +09:00
Randy Mackay 385e828fdd AR_PosControl: add input_pos_vel_accel target 2023-05-30 10:17:13 +10:00