Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
380ef16
trial
shota3527 Aug 9, 2023
20bfb88
initial cut on tail sitter support
shota3527 Aug 10, 2023
34f6690
tailsitter support
shota3527 Aug 11, 2023
0840203
update tailsitter documents
shota3527 Aug 12, 2023
378664c
add compass changing aliment
shota3527 Sep 28, 2023
097b913
Merge branch 'master' into sh_mixerprofile_tail
shota3527 Oct 6, 2023
1ea7aa7
moved tailsitter platform type to tailsitter_board_orientation
shota3527 Oct 7, 2023
4fd6772
bug fixes
shota3527 Oct 7, 2023
b5e3cb2
update docs
shota3527 Oct 7, 2023
cfb63dd
parameter rename
shota3527 Oct 16, 2023
0349bd7
logic condition RCcommand overide also works for angle mode
shota3527 Oct 20, 2023
e17ae02
ahrs mag gps fusion
shota3527 Oct 22, 2023
69ac080
minor fix
shota3527 Oct 22, 2023
8e3ee38
development of posestimator fusion
shota3527 Oct 22, 2023
00b46bc
development of posestimator fusion
shota3527 Oct 22, 2023
a4c9599
development of posestimator fusion
shota3527 Oct 22, 2023
04a9d8c
modify the weights
shota3527 Oct 24, 2023
b16cb60
Merge remote-tracking branch 'origin/sh_posz' into sh_ahrs
shota3527 Oct 24, 2023
c1c4b83
update the imu heading estimation
shota3527 Oct 24, 2023
1c5a42c
gps baro mag mix
shota3527 Oct 24, 2023
cd0206a
gps baro mag mix
shota3527 Oct 24, 2023
4af73a7
bug fixes on mag gps mix
shota3527 Oct 24, 2023
4f518e7
minor adjuestments
shota3527 Oct 24, 2023
9dbbd25
adjuestable gps yaw weight
shota3527 Oct 24, 2023
600d0ad
update documents
shota3527 Oct 24, 2023
195a062
minor fix
shota3527 Oct 25, 2023
4c4a74c
fix pos estimator acc weight
shota3527 Oct 25, 2023
3978947
update docs
shota3527 Oct 25, 2023
8e7cc6b
fixes display issue in configurator sensors tab
shota3527 Oct 25, 2023
918e658
Merge remote-tracking branch 'origin/master' into sh_ahrs
shota3527 Oct 26, 2023
daef398
Merge remote-tracking branch 'origin/master' into sh_ahrs
shota3527 Oct 26, 2023
59d1cae
add_iflight f7
shota3527 Sep 10, 2021
eb6634d
minor fix on cog yaw estimation
shota3527 Oct 26, 2023
b911185
adjustments
shota3527 Oct 27, 2023
a0f353e
separate the nav climb rate settings for fw and mc
shota3527 Oct 29, 2023
edf9cca
update documents
shota3527 Oct 29, 2023
03a6043
Merge remote-tracking branch 'origin/master' into sh_ahrs
shota3527 Oct 29, 2023
c2577e4
Put getConfigMixerProfile as the last byte in message
DzikuVx Oct 31, 2023
fdb61d3
Merge pull request #9431 from iNavFlight/fix-the-MSP2_INAV_STATUS-frame
DzikuVx Oct 31, 2023
fac64ce
Update navigation.c
breadoven Oct 31, 2023
24c24c4
Merge pull request #9435 from breadoven/abo_mc_nav_arm_safety_fix
breadoven Nov 2, 2023
3a9624b
sync updateActualHeading with other topic
shota3527 Nov 3, 2023
3ff9371
combine IFLIGHTF7
shota3527 Nov 3, 2023
6f1ad0a
add more gps dynamic model
shota3527 Nov 3, 2023
4f7dd03
Merge branch 'sh_ahrs' into sh_dev
shota3527 Nov 3, 2023
f10c0c4
Merge tag '7.0.0-RC1' into sh_mixerprofile_tail
shota3527 Nov 3, 2023
708f5bf
Merge branch 'sh_mixerprofile_tail' into sh_dev
shota3527 Nov 4, 2023
cc87dcc
Merge branch 'sh_vtol_nav' into sh_dev
shota3527 Nov 4, 2023
4c451f4
Merge branch 'sh_addmy_target' into sh_dev
shota3527 Nov 4, 2023
52579eb
[GPS] fix GPS discovery for M6 and earlier
stronnag Nov 5, 2023
d135f3e
[GPS] update discovery fix for M7N as well
stronnag Nov 5, 2023
9dd85e2
Merge pull request #9446 from iNavFlight/jh_fix_Neo6N_recognition
DzikuVx Nov 5, 2023
50930ee
Add DPS310 and SPL06 to FLYWOOF745 target
mmosca Nov 6, 2023
f4003ae
Merge pull request #9448 from iNavFlight/mmosca-flywoo-add-baro-flywo…
mmosca Nov 6, 2023
9783a7b
Remove PPM entry with conflicting timer.
mmosca Nov 6, 2023
1f59708
cleanup
mmosca Nov 6, 2023
3ef172d
Various PWM output changes. Mainly to get rid of potential conflicts …
DzikuVx Nov 6, 2023
5cee2d4
Merge remote-tracking branch 'origin/release_7.0.0' into dzikuvx-vari…
DzikuVx Nov 6, 2023
a47afe2
Show system message when linear descent begins
MrD-RC Nov 6, 2023
62d78ae
Bug fix
MrD-RC Nov 7, 2023
c6d1573
change to ANYFCF7
DzikuVx Nov 7, 2023
168906c
Merge pull request #9452 from iNavFlight/dzikuvx-various-output-fixes
DzikuVx Nov 7, 2023
a54849b
Merge pull request #9453 from iNavFlight/MrD_Add-message-when-transit…
MrD-RC Nov 8, 2023
9c085ee
Merge tag '7.0.0-RC2' into sh_dev
shota3527 Nov 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"files.associations": {
"chrono": "c",
"cmath": "c",
"ranges": "c"
"ranges": "c",
"platform.h": "c",
"timer.h": "c"
},
"editor.tabSize": 4,
"editor.insertSpaces": true,
Expand Down
3 changes: 3 additions & 0 deletions docs/MixerProfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ TailSitter is supported by add a 90deg offset to the board alignment. Set the bo
- Rate Settings
- ·······

### TailSitter support
TailSitter is supported by add a 90deg offset to the board alignment. Set the board aliment normally in the mixer_profile for FW mode(`set platform_type = AIRPLANE`), The motor trust axis should be same direction as the airplane nose. Then, in the mixer_profile for takeoff and landing `set platform_type = TAILSITTER`. The `TAILSITTER` platform type is same as `MULTIROTOR` platform type, expect for a 90 deg board alignment offset. In `TAILSITTER` mixer_profile, when motor trust/airplane nose is pointing to the sky, 'airplane bottom'/'multi rotor front' should facing forward in model preview. Set the motor/servo mixer according to multirotor orientation, Model should roll around geography's longitudinal axis, the roll axis of `TAILSITTER` will be yaw axis of `AIRPLANE`. In addition, When `MIXER TRANSITION` input is activated, a 45deg offset will be add to the target angle for angle mode.

## Happy flying

Remember that this is currently an emerging capability:
Expand Down
94 changes: 57 additions & 37 deletions docs/Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,16 @@ Inertial Measurement Unit KP Gain for compass measurements

---

### ahrs_gps_yaw_weight

Arhs gps yaw weight when mag is avaliable, 0 means no gps yaw, 100 means equal weight as compass

| Default | Min | Max |
| --- | --- | --- |
| 100 | 0 | 500 |

---

### ahrs_gps_yaw_windcomp

Wind compensation in heading estimation from gps groundcourse(fixed wing only)
Expand Down Expand Up @@ -1474,11 +1484,11 @@ Enable automatic configuration of UBlox GPS receivers.

### gps_dyn_model

GPS navigation model: Pedestrian, Air_1g, Air_4g. Default is AIR_1G. Use pedestrian with caution, can cause flyaways with fast flying.
GPS navigation model: Pedestrian, Automotive, Air<1g, Air<2g, Air<4g. Default is AIR_2G. Use pedestrian/Automotive with caution, can cause flyaways with fast flying.

| Default | Min | Max |
| --- | --- | --- |
| AIR_1G | | |
| AIR_2G | | |

---

Expand Down Expand Up @@ -1912,33 +1922,23 @@ Decay coefficient for estimated velocity when GPS reference for position is lost

---

### inav_w_xyz_acc_p

_// TODO_

| Default | Min | Max |
| --- | --- | --- |
| 1.0 | 0 | 1 |

---

### inav_w_z_baro_p

Weight of barometer measurements in estimated altitude and climb rate
Weight of barometer measurements in estimated altitude and climb rate. Setting is used on both airplanes and multirotors.

| Default | Min | Max |
| --- | --- | --- |
| 0.35 | 0 | 10 |
| 0.4 | 0 | 10 |

---

### inav_w_z_gps_p

Weight of GPS altitude measurements in estimated altitude. Setting is used only of airplanes
Weight of GPS altitude measurements in estimated altitude. Setting is used on both airplanes and multirotors.

| Default | Min | Max |
| --- | --- | --- |
| 0.2 | 0 | 10 |
| 0.4 | 0 | 10 |

---

Expand All @@ -1948,7 +1948,7 @@ Weight of GPS climb rate measurements in estimated climb rate. Setting is used o

| Default | Min | Max |
| --- | --- | --- |
| 0.1 | 0 | 10 |
| 0.8 | 0 | 10 |

---

Expand Down Expand Up @@ -2762,16 +2762,6 @@ Craft name

---

### nav_auto_climb_rate

Maximum climb/descent rate that UAV is allowed to reach during navigation modes. [cm/s]

| Default | Min | Max |
| --- | --- | --- |
| 500 | 10 | 2000 |

---

### nav_auto_disarm_delay

Delay before craft disarms when `nav_disarm_on_landing` is set (ms)
Expand Down Expand Up @@ -3092,6 +3082,16 @@ PosHold radius. 3000 to 7500 is a good value (30-75m) [cm]

---

### nav_fw_manual_climb_rate

Maximum climb/descent rate firmware is allowed when processing pilot input for ALTHOLD control mode [cm/s]

| Default | Min | Max |
| --- | --- | --- |
| 300 | 10 | 2500 |

---

### nav_fw_max_thr

Maximum throttle for flying wing in GPS assisted modes
Expand Down Expand Up @@ -3362,16 +3362,6 @@ Allows immediate landing detection based on G bump at touchdown when set to ON.

---

### nav_manual_climb_rate

Maximum climb/descent rate firmware is allowed when processing pilot input for ALTHOLD control mode [cm/s]

| Default | Min | Max |
| --- | --- | --- |
| 200 | 10 | 2000 |

---

### nav_manual_speed

Maximum speed allowed when processing pilot input for POSHOLD/CRUISE control mode [cm/s] [Multirotor only]
Expand Down Expand Up @@ -3422,6 +3412,16 @@ If set to STICK the FC remembers the throttle stick position when enabling ALTHO

---

### nav_mc_auto_climb_rate

Maximum climb/descent rate that UAV is allowed to reach during navigation modes. [cm/s]

| Default | Min | Max |
| --- | --- | --- |
| 500 | 10 | 2000 |

---

### nav_mc_bank_angle

Maximum banking angle (deg) that multicopter navigation is allowed to set. Machine must be able to satisfy this angle without loosing altitude
Expand Down Expand Up @@ -3532,6 +3532,16 @@ Multicopter hover throttle hint for altitude controller. Should be set to approx

---

### nav_mc_manual_climb_rate

Maximum climb/descent rate firmware is allowed when processing pilot input for ALTHOLD control mode [cm/s]

| Default | Min | Max |
| --- | --- | --- |
| 200 | 10 | 2000 |

---

### nav_mc_pos_deceleration_time

Used for stoping distance calculation. Stop position is computed as _speed_ * _nav_mc_pos_deceleration_time_ from the place where sticks are released. Braking mode overrides this setting
Expand Down Expand Up @@ -5762,6 +5772,16 @@ Delay before disarming when requested by switch (ms) [0-1000]

---

### tailsitter_orientation_offset

Apply a 90 deg pitch offset in sensor aliment for tailsitter flying mode

| Default | Min | Max |
| --- | --- | --- |
| OFF | OFF | ON |

---

### telemetry_halfduplex

S.Port telemetry only: Turn UART into UNIDIR for usage on F1 and F4 target. See Telemetry.md for details
Expand Down
5 changes: 5 additions & 0 deletions src/main/blackbox/blackbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ static const blackboxDeltaFieldDefinition_t blackboxMainFields[] = {
{"accSmooth", 0, SIGNED, .Ipredict = PREDICT(0), .Iencode = ENCODING(SIGNED_VB), .Ppredict = PREDICT(AVERAGE_2), .Pencode = ENCODING(SIGNED_VB), FLIGHT_LOG_FIELD_CONDITION_ACC},
{"accSmooth", 1, SIGNED, .Ipredict = PREDICT(0), .Iencode = ENCODING(SIGNED_VB), .Ppredict = PREDICT(AVERAGE_2), .Pencode = ENCODING(SIGNED_VB), FLIGHT_LOG_FIELD_CONDITION_ACC},
{"accSmooth", 2, SIGNED, .Ipredict = PREDICT(0), .Iencode = ENCODING(SIGNED_VB), .Ppredict = PREDICT(AVERAGE_2), .Pencode = ENCODING(SIGNED_VB), FLIGHT_LOG_FIELD_CONDITION_ACC},
{"accVib", -1, UNSIGNED, .Ipredict = PREDICT(0), .Iencode = ENCODING(UNSIGNED_VB), .Ppredict = PREDICT(AVERAGE_2), .Pencode = ENCODING(SIGNED_VB), FLIGHT_LOG_FIELD_CONDITION_ACC},
{"attitude", 0, SIGNED, .Ipredict = PREDICT(0), .Iencode = ENCODING(SIGNED_VB), .Ppredict = PREDICT(AVERAGE_2), .Pencode = ENCODING(SIGNED_VB), FLIGHT_LOG_FIELD_CONDITION_ATTITUDE},
{"attitude", 1, SIGNED, .Ipredict = PREDICT(0), .Iencode = ENCODING(SIGNED_VB), .Ppredict = PREDICT(AVERAGE_2), .Pencode = ENCODING(SIGNED_VB), FLIGHT_LOG_FIELD_CONDITION_ATTITUDE},
{"attitude", 2, SIGNED, .Ipredict = PREDICT(0), .Iencode = ENCODING(SIGNED_VB), .Ppredict = PREDICT(AVERAGE_2), .Pencode = ENCODING(SIGNED_VB), FLIGHT_LOG_FIELD_CONDITION_ATTITUDE},
Expand Down Expand Up @@ -487,6 +488,7 @@ typedef struct blackboxMainState_s {
int16_t gyroPeaksYaw[DYN_NOTCH_PEAK_COUNT];

int16_t accADC[XYZ_AXIS_COUNT];
int16_t accVib;
int16_t attitude[XYZ_AXIS_COUNT];
int32_t debug[DEBUG32_VALUE_COUNT];
int16_t motor[MAX_SUPPORTED_MOTORS];
Expand Down Expand Up @@ -917,6 +919,7 @@ static void writeIntraframe(void)

if (testBlackboxCondition(FLIGHT_LOG_FIELD_CONDITION_ACC)) {
blackboxWriteSigned16VBArray(blackboxCurrent->accADC, XYZ_AXIS_COUNT);
blackboxWriteUnsignedVB(blackboxCurrent->accVib);
}

if (testBlackboxCondition(FLIGHT_LOG_FIELD_CONDITION_ATTITUDE)) {
Expand Down Expand Up @@ -1182,6 +1185,7 @@ static void writeInterframe(void)

if (testBlackboxCondition(FLIGHT_LOG_FIELD_CONDITION_ACC)) {
blackboxWriteArrayUsingAveragePredictor16(offsetof(blackboxMainState_t, accADC), XYZ_AXIS_COUNT);
blackboxWriteSignedVB(blackboxCurrent->accVib - blackboxLast->accVib);
}

if (testBlackboxCondition(FLIGHT_LOG_FIELD_CONDITION_ATTITUDE)) {
Expand Down Expand Up @@ -1601,6 +1605,7 @@ static void loadMainState(timeUs_t currentTimeUs)
blackboxCurrent->mcVelAxisOutput[i] = lrintf(nav_pids->vel[i].output_constrained);
}
}
blackboxCurrent->accVib = lrintf(accGetVibrationLevel() * acc.dev.acc_1G);

if (STATE(FIXED_WING_LEGACY)) {

Expand Down
5 changes: 3 additions & 2 deletions src/main/cms/cms_menu_navigation.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ static const OSD_Entry cmsx_menuNavSettingsEntries[] =
OSD_SETTING_ENTRY("MC NAV SPEED", SETTING_NAV_AUTO_SPEED),
OSD_SETTING_ENTRY("MC MAX NAV SPEED", SETTING_NAV_MAX_AUTO_SPEED),
OSD_SETTING_ENTRY("MAX CRUISE SPEED", SETTING_NAV_MANUAL_SPEED),
OSD_SETTING_ENTRY("MAX NAV CLIMB RATE", SETTING_NAV_AUTO_CLIMB_RATE),
OSD_SETTING_ENTRY("MAX AH CLIMB RATE", SETTING_NAV_MANUAL_CLIMB_RATE),
OSD_SETTING_ENTRY("MAX NAV CLIMB RATE", SETTING_NAV_MC_AUTO_CLIMB_RATE),
OSD_SETTING_ENTRY("MAX MC AH CLIMB RATE", SETTING_NAV_MC_MANUAL_CLIMB_RATE),
OSD_SETTING_ENTRY("MAX FW AH CLIMB RATE", SETTING_NAV_FW_MANUAL_CLIMB_RATE),
OSD_SETTING_ENTRY("MC MAX BANK ANGLE", SETTING_NAV_MC_BANK_ANGLE),
OSD_SETTING_ENTRY("MC ALTHOLD THROT", SETTING_NAV_MC_ALTHOLD_THROTTLE),
OSD_SETTING_ENTRY("MC HOVER THR", SETTING_NAV_MC_HOVER_THR),
Expand Down
2 changes: 1 addition & 1 deletion src/main/drivers/compass/compass_fake.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static bool fakeMagInit(magDev_t *magDev)
{
UNUSED(magDev);
// initially point north
fakeMagData[X] = 4096;
fakeMagData[X] = 1024;
fakeMagData[Y] = 0;
fakeMagData[Z] = 0;
return true;
Expand Down
16 changes: 10 additions & 6 deletions src/main/fc/fc_msp.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,9 +462,9 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
sbufWriteU16(dst, packSensorStatus());
sbufWriteU16(dst, averageSystemLoadPercent);
sbufWriteU8(dst, (getConfigBatteryProfile() << 4) | getConfigProfile());
sbufWriteU8(dst, getConfigMixerProfile());
sbufWriteU32(dst, armingFlags);
sbufWriteData(dst, &mspBoxModeFlags, sizeof(mspBoxModeFlags));
sbufWriteU8(dst, getConfigMixerProfile());
}
break;

Expand All @@ -478,7 +478,7 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
}
for (int i = 0; i < 3; i++) {
#ifdef USE_MAG
sbufWriteU16(dst, mag.magADC[i]);
sbufWriteU16(dst, lrintf(mag.magADC[i]));
#else
sbufWriteU16(dst, 0);
#endif
Expand Down Expand Up @@ -1310,9 +1310,9 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
case MSP_NAV_POSHOLD:
sbufWriteU8(dst, navConfig()->general.flags.user_control_mode);
sbufWriteU16(dst, navConfig()->general.max_auto_speed);
sbufWriteU16(dst, navConfig()->general.max_auto_climb_rate);
sbufWriteU16(dst, navConfig()->mc.max_auto_climb_rate);
sbufWriteU16(dst, navConfig()->general.max_manual_speed);
sbufWriteU16(dst, navConfig()->general.max_manual_climb_rate);
sbufWriteU16(dst, mixerConfig()->platformType != PLATFORM_AIRPLANE ? navConfig()->mc.max_manual_climb_rate:navConfig()->fw.max_manual_climb_rate);
sbufWriteU8(dst, navConfig()->mc.max_bank_angle);
sbufWriteU8(dst, navConfig()->mc.althold_throttle_type);
sbufWriteU16(dst, currentBatteryProfile->nav.mc.hover_throttle);
Expand Down Expand Up @@ -2321,9 +2321,13 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src)
if (dataSize == 13) {
navConfigMutable()->general.flags.user_control_mode = sbufReadU8(src);
navConfigMutable()->general.max_auto_speed = sbufReadU16(src);
navConfigMutable()->general.max_auto_climb_rate = sbufReadU16(src);
navConfigMutable()->mc.max_auto_climb_rate = sbufReadU16(src);
navConfigMutable()->general.max_manual_speed = sbufReadU16(src);
navConfigMutable()->general.max_manual_climb_rate = sbufReadU16(src);
if (mixerConfig()->platformType != PLATFORM_AIRPLANE) {
navConfigMutable()->mc.max_manual_climb_rate = sbufReadU16(src);
}else{
navConfigMutable()->fw.max_manual_climb_rate = sbufReadU16(src);
}
navConfigMutable()->mc.max_bank_angle = sbufReadU8(src);
navConfigMutable()->mc.althold_throttle_type = sbufReadU8(src);
currentBatteryProfileMutable->nav.mc.hover_throttle = sbufReadU16(src);
Expand Down
1 change: 1 addition & 0 deletions src/main/fc/runtime_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ typedef enum {
ANTI_WINDUP_DEACTIVATED = (1 << 25),
LANDING_DETECTED = (1 << 26),
IN_FLIGHT_EMERG_REARM = (1 << 27),
TAILSITTER = (1 << 28), //offset the pitch angle by 90 degrees
} stateFlags_t;

#define DISABLE_STATE(mask) (stateFlags &= ~(mask))
Expand Down
Loading