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

306 commits

Author SHA1 Message Date
Alberto García Hierro
b67d73aeac
Merge pull request #3327 from shellixyz/fix_althold_initial_climb
Fix ALTHOLD initial climb when enabled
2018-06-07 19:20:25 +01:00
Alberto García Hierro
8e419c616a Round rather than truncate when updating GPS_directionToHome
Makes taking off in straight line north produce a home direction
of 180º rather than 179º.
2018-06-07 16:36:30 +01:00
Michel Pastor
1801d9b7eb Fix ALTHOLD initial climb when enabled
Makes the transition to ALTHOLD seamless. Tested on fixed wing.
2018-06-06 16:46:49 +02:00
Alberto García Hierro
f7c2824fc2
Merge pull request #3247 from iNavFlight/agh_home_heading_correction
Correct home yaw when a valid heading is acquired
2018-06-06 12:33:18 +01:00
Konstantin Sharlaimov
ff60ce8131
Merge pull request #3304 from giacomo892/arming_checks_rework
Disable arming in AH for FW unless launch mode is enabled
2018-06-02 19:22:51 +02:00
Konstantin Sharlaimov
e28f7fac55
Merge pull request #3303 from giacomo892/nav_launch_safety_fix
NAV_LAUNCH extra safety
2018-06-02 19:21:56 +02:00
Pawel Spychalski (DzikuVx)
a4d7cffe70 Logic simplification and bug that caused rubberbanding fixed 2018-06-02 12:01:22 +02:00
Pawel Spychalski (DzikuVx)
fbb235489f fixed compilation errors 2018-06-02 12:01:22 +02:00
Pawel Spychalski (DzikuVx)
46742997e4 Allow leaving braking always and lock positon updates during braking 2018-06-02 12:01:22 +02:00
Pawel Spychalski (DzikuVx)
43c44c78dd some minor cleanups 2018-06-02 12:01:22 +02:00
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