1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-25 17:25:18 +03:00
Commit graph

246 commits

Author SHA1 Message Date
Pawel Spychalski (DzikuVx)
2fa3132e9a Braking enabled only on a switch 2018-06-02 12:01:22 +02:00
Pawel Spychalski (DzikuVx)
97ee1c86b3 More advanced state pseudo-machine for braking 2018-06-02 12:00:36 +02:00
Pawel Spychalski (DzikuVx)
6a7995a028 Improved configuration and state split 2018-06-02 12:00:36 +02:00
Pawel Spychalski (DzikuVx)
4d8fea95f7 limit time of braking mode 2018-06-02 12:00:36 +02:00
Pawel Spychalski (DzikuVx)
dcd8a24bd6 configurable boost fastor during braking 2018-06-02 11:58:04 +02:00
Pawel Spychalski (DzikuVx)
db3ddd939d configurable speed threshold to enter braking mode 2018-06-02 11:58:04 +02:00
Pawel Spychalski (DzikuVx)
a13f749eb2 Store current position as desired after braking has been finished 2018-06-02 11:57:15 +02:00
Pawel Spychalski (DzikuVx)
4400c0af0f Detect braking in cruise mode 2018-06-02 11:57:15 +02:00
giacomo892
680bf8b424 Disable arming in AH for FW unless launch mode is enabled 2018-05-31 17:27:36 +02:00
giacomo892
05c5f0f866 Extra safety for NAV_LAUNCH if enabled via BOX 2018-05-31 16:37:58 +02:00
Konstantin Sharlaimov
e45cf00820
Merge pull request #3274 from iNavFlight/agh_fix_nav_state_numbers
Fix NAV_STATE enum values
2018-05-31 15:14:08 +10:00
Michel Pastor
b2ef281619 Fix and simplify applyFixedWingPitchRollThrottleController()
Should only control pitch and throttle when nav stateFlags & NAV_CTL_ALT
Needed for upcoming CRUISE 2D mode
2018-05-31 01:17:00 +02:00
Alberto García Hierro
db31090a1f Rename from "public state" to "persistent ID"
- NAV_PUBLIC_STATE_* -> NAV_PERSISTENT_ID_*
- .publicState -> .persistentId
- .navPublicState -> .navPersistentId
2018-05-30 21:15:39 +01:00
Michel Pastor
b01d904aaa Fix typos: calcualteAndSetActiveWaypoint() and calcualteAndSetActiveWaypointToLocalPosition() 2018-05-25 23:23:47 +02:00
Alberto García Hierro
48a05476a8 Add a new field to each navigation state with its public ID
This ID will be permanent from now on, so we cahn freely change
navigationFSMState_t without having to adjust external logs
dealing with blackbox logs.
2018-05-25 14:18:48 +01:00
Alberto García Hierro
d624f65b20 Rename yawRotation to fakeToRealYawOffset
Also, add a small comment explaining the logic behind the home
yaw adjustment.
2018-05-22 13:27:36 +01:00
Alberto García Hierro
200a85a2ca Make setHomePosition() accept a new argument indicating the home flags
Callers can specify wether XY, Z and HEADING are valid for the new
home position.
2018-05-22 13:27:32 +01:00
Alberto García Hierro
3e0ae8b23d Correct home yaw when a valid heading is acquired
This is specially relevant in FW without compass, since the home
location will typically be stored while the craft hasn't yet moved
and a CoG derived heading is not determined yet.

The navigation code checks when the heading transitions from invalid
to valid in updateActualHeading(), calculates the rotation from the old
invalid heading (using bootup heading as 0º) to the real one and
applies to posControl.homePosition.yaw.

In order to save a bit of memory, isHomeValid has been replaced
with a bitmask which stored several flags relative to the home
location.
2018-05-22 13:05:51 +01:00
Konstantin Sharlaimov
0fb3d8a3cc
Merge pull request #3202 from iNavFlight/de_poshold_surface_mode
Navigation mods and SURFACE mode playground
2018-05-22 14:21:23 +10:00
Michel Pastor
1311147c58 Fix typo in function name: swithNavigationFlightModes() 2018-05-20 00:40:18 +02:00
Konstantin Sharlaimov (DigitalEntity)
73f773f23e Remove POSHOLD_2D mode (POSHOLD now implies ALTHOLD); Initial cut on surface tracking modifier
Direct altitude control
2018-05-13 20:20:45 +10:00
Konstantin Sharlaimov
0dce1907c4
Merge pull request #3183 from iNavFlight/agh_home_reset
Add new parameter for controlling home position reset
2018-05-10 00:34:12 +10:00
Alberto García Hierro
daec1b9aff Add navigationGetHomeHeading()
Returns the heading for the home point, as recorded when home was
stored. Note that it won't work properly on FW without a mag yet,
since we'll need to adjust the value after we acquire a valid
heading.
2018-05-08 10:12:19 +01:00
Alberto García Hierro
954ae18086 Add new parameter for controlling home position reset
Add new inav_reset_home setting with the same possible values and
semantics as inav_reset_altitude (as suggested by @stronagg),
but with a default value of EACH_ARM to keep backwards compatibility.

Fixes #3143
2018-05-08 00:35:33 +01:00
Konstantin Sharlaimov (DigitalEntity)
8b9d6e092b Refactor arming; Add configurable switch-disarm delay 2018-04-25 18:27:02 +10:00
Konstantin Sharlaimov
e174e5a48d
Initial cut on full quaternion IMU conversion (#2894)
* Initial cut on full quaternion/vector IMU conversion
* More accurate quaternion integration
* Refactor vector struct per @ledvinap suggection
* Implement rotation matrix from axis/angle; Refactor mag declination to have orientation correspond to RPY angles
* Use magnetic North vector as a reference
2018-03-15 00:19:53 +10:00
giacomo892
fab16951d5 sticks > pos_hold_deadband cleanup 2018-02-08 11:24:11 +01:00
giacomo892
c3464ed48a FEATURE FW_LAUNCH initial commit 2018-02-06 13:18:00 +01:00
giacomo892
2d7a224810 NAV LAUNCH: code tidy and add max launch altitude 2018-02-03 09:18:53 +01:00
Konstantin Sharlaimov
9b4a217134
Merge pull request #2677 from shellixyz/nav_launch_min_time
NAV_LAUNCH: add min time before leaving
2018-02-01 11:57:52 +10:00
shellixyz
fd40892d8e Replace PASSTHROUGH with MANUAL flight mode (FW) (#2661)
* FW: add manual flight mode
* manual mode: separate roll and pitch expo
* manual flight mode: cleaning
* replace PASSTHRU mode with MANUAL mode
* manual mode: merge pitch and roll expo
* manual mode: add OSD menu for manual rates and expo
* manual mode: forgot to add yaw rate adjustment in OSD menu
* manual mode: add adjustments
* manual mode: move rates applications in fc_core
* group controlRateConfig settings by function
* group controlRateConfig settings by function: fix ALIENFLIGHTF3 default rates config
* manual mode rc adjustments: adapt to fc723121 changes
* manual mode: clean rc adjustments
* add new MSPv2 messages: MSP2_INAV_RATE_PROFILE and MSP2_INAV_SET_RATE_PROFILE
2018-01-31 19:44:43 +10:00
Michel Pastor
9d469f8d9c NAV_LAUNCH: add min time before leaving 2018-01-22 18:25:06 +01:00
Konstantin Sharlaimov (DigitalEntity)
a60e9f63d4 Refactor position estimation code
Remove position estimate history code
Remove rangefinder median filtering
Change VEL_XY PID to allow more authority
2017-12-22 17:21:00 +10:00
Alberto García Hierro
d5ba9c4eec Rename a few more flags
NAV -> USE_NAV
FIXED_WING_LANDING -> NAV_FIXED_WING_LANDING
ASYNC_GYRO_PROCESSING -> USE_ASYNC_GYRO_PROCESSING
BOOTLOG -> USE_BOOTLOG
STATS -> USE_STATS
2017-12-04 15:28:31 +00:00
Alberto García Hierro
7a1491e158 Prepend USE_ prefix to CPP directives for enabling features
Prepended to: 'ACC', 'GYRO', 'BARO', 'MAG', 'LED_STRIP',
'SPEKTRUM_BIND', 'SERIAL_RX', 'BLACKBOX', 'GPS', 'GPS_PROTO_UBLOX',
'TELEMETRY', 'TELEMETRY_LTM', 'TELEMETRY_FRSKY', 'CMS',
'GPS_PROTO_NMEA', 'GPS_PROTO_I2C_NAV', 'GPS_PROTO_NAZA',
'GPS_PROTO_UBLOX_NEO7PLUS', 'GPS_PROTO_MTK', 'TELEMETRY_HOTT',
'TELEMETRY_IBUS', 'TELEMETRY_MAVLINK', 'TELEMETRY_SMARTPORT',
'TELEMETRY_CRSF', 'PWM_DRIVER_PCA9685', 'PITOT', 'OSD',
2017-12-04 13:01:24 +00:00
Konstantin Sharlaimov
b9fe92e8a9
Merge pull request #1873 from iNavFlight/de_failsafe_nav_fix
Fix failsafe & navigation clash
2017-11-30 21:19:14 +10:00
Tim Eckel
3050886f69
Merge branch 'development' into te_no_homereset_on_failsafe 2017-11-23 18:02:29 -05:00
teckel12
03b63e00ad Rebase 2017-11-23 17:58:28 -05:00
Konstantin Sharlaimov
98aea3813f
Merge pull request #2380 from krzysztofmatula/rth-robustness
make RTH climb->cruise transition more robust
2017-11-21 21:00:16 +10:00
Konstantin Sharlaimov (DigitalEntity)
6ae679e647 Unify altitude/agl update handling 2017-11-15 22:20:13 +10:00
Konstantin Sharlaimov (DigitalEntity)
2c65d2273e Initial cut of AGL
Optimize and refactor

Refactoring
2017-11-15 12:40:12 +10:00
teckel12
cc298d075e Don't do home reset if in failsafe mode 2017-10-27 09:42:53 -04:00
Krzysztof Matula
b1282a0416 make RTH climb->cruise transition more robust:
- apply additional "overshoot" height (1m) to assure we actually reach the target alt.
- relax the "margin" to 15%
2017-10-21 10:19:24 +02:00
Krzysztof Matula
3e7c6de226 Correct RTH initial climb end condition. 2017-10-18 19:14:27 +02:00
Alberto García Hierro
26938321d9 Add a 3rd state for nav_rth_allow_landing
New state FS_ONLY allows landing only when RTH is enabled at the
same time as the failsafe mode. This allows the aircraft to land
itself when there's no way to regain control.

Fixes #2344
2017-10-16 11:42:22 +01:00
Konstantin Sharlaimov (DigitalEntity)
0778619547 Disable user-activated motor-stop if navigation system is in autonomous mode (RTH or WP) 2017-10-05 22:37:47 +10:00
Alberto García Hierro
deb3385616 Better detection for THR control from the NAV system
As requested by @digitalentity. Previous code was returning a
false positive on MC when only 2D position hold was active.
2017-10-04 10:36:17 +01:00
Alberto García Hierro
47fc453727 Add OSD_THROTTLE_POS_AUTO_THR indicator
Displays stick THR position when the user controls THR directly,
actual applied THR when the navigation system controls THR.

Fixes #2031
2017-10-03 13:08:38 +01:00
Konstantin Sharlaimov
d40fb2bdf4 Merge pull request #1978 from iNavFlight/de_fw_tecs_1
Fixed wing TECS controller preparation (stage 1)
2017-09-06 10:08:39 +10:00
Konstantin Sharlaimov (DigitalEntity)
8666edc80e Fix bugs in gain scaling; Allow gain scaling for NAV PID 2017-09-05 23:52:42 +10:00