forked from PX4/PX4-Autopilot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged in offboard (pull request PX4#2)
Custom glide mode + RTPS integration with Smart Loiter Approved-by: Alexandre Borowczyk
- Loading branch information
Showing
23 changed files
with
635 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
branch = master | ||
[submodule "Tools/sitl_gazebo"] | ||
path = Tools/sitl_gazebo | ||
url = https://github.com/PX4/PX4-SITL_gazebo.git | ||
url = [email protected]:notostechnologies/sitl_gazebo.git | ||
branch = master | ||
[submodule "src/drivers/gps/devices"] | ||
path = src/drivers/gps/devices | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
#!/bin/sh | ||
# | ||
# @name Magellan | ||
# | ||
# @type Plane V-Tail | ||
# @class Plane | ||
# | ||
# @output MAIN1 aileron right | ||
# @output MAIN2 aileron left | ||
# @output MAIN3 v-tail right | ||
# @output MAIN4 v-tail left | ||
# @output MAIN5 throttle | ||
# @output MAIN6 flaps right | ||
# @output MAIN7 flaps left | ||
# | ||
# @output AUX1 feed-through of RC AUX1 channel | ||
# @output AUX2 feed-through of RC AUX2 channel | ||
# @output AUX3 feed-through of RC AUX3 channel | ||
# | ||
# @maintainer Alexandre Borowczyk <[email protected]> | ||
# | ||
|
||
. ${R}etc/init.d/rc.fw_defaults | ||
|
||
if [ $AUTOCNF = yes ] | ||
then | ||
|
||
# battery | ||
param set BAT_SOURCE 0 | ||
param set BAT_CRIT_THR 0.175 | ||
param set BAT_EMERGEN_THR 0.10 | ||
param set BAT_LOW_THR 0.25 | ||
|
||
param set BAT_N_CELLS 3 | ||
param set BAT_CAPACITY 6000 | ||
#param set BAT_R_INTERNAL 0.06 | ||
param set BAT_V_CHARGED 4.00 | ||
param set BAT_V_EMPTY 3.65 | ||
|
||
# Airspeed | ||
param set FW_AIRSPD_MIN 10 | ||
param set FW_AIRSPD_TRIM 15 | ||
param set FW_AIRSPD_MAX 20 | ||
|
||
param set FW_T_CLMB_MAX 3.5 | ||
param set FW_THR_IDLE 0 | ||
param set FW_THR_CRUISE 60 | ||
param set FW_MAN_P_MAX 55 | ||
param set FW_MAN_R_MAX 55 | ||
param set FW_R_LIM 55 | ||
|
||
param set FW_WR_FF 0.2 | ||
param set FW_WR_I 0.2 | ||
param set FW_WR_IMAX 0.8 | ||
param set FW_WR_P 1 | ||
param set FW_W_RMAX 0 | ||
|
||
#Radio | ||
param set RC_MAP_PITCH 1 | ||
param set RC_MAP_ROLL 3 | ||
param set RC_MAP_THROTTLE 8 | ||
param set RC_MAP_YAW 2 | ||
param set RC_MAP_FLAPS 5 | ||
param set RC_MAP_ARM_SW 14 | ||
param set RC_MAP_FLTMODE 13 | ||
param set COM_ARM_SWISBTN 1 | ||
param set RC_MAP_AUX1 7 | ||
param set RC5_MIN 1500 | ||
param set RC5_TRIM 1750 | ||
param set RC7_MIN 1500 | ||
param set RC7_TRIM 1750 | ||
|
||
# Commander | ||
param set COM_DISARM_LAND 0.0 | ||
param set COM_ARM_WO_GPS 0 | ||
param set COM_FLTMODE1 0 | ||
param set COM_FLTMODE2 8 | ||
param set COM_FLTMODE3 1 | ||
param set COM_FLTMODE4 3 | ||
param set COM_FLTMODE5 4 | ||
param set COM_FLTMODE6 5 | ||
#PWM | ||
# param set PWM_MAIN_MAX1 1584 | ||
# param set PWM_MAIN_MAX2 1846 | ||
# param set PWM_MAIN_MAX3 1643 | ||
# param set PWM_MAIN_MAX4 1894 | ||
# param set PWM_MAIN_MAX5 2000 | ||
# param set PWM_MAIN_MAX6 1500 | ||
# param set PWM_MAIN_MAX7 1858 | ||
|
||
|
||
# param set PWM_MAIN_MIN1 1181 | ||
# param set PWM_MAIN_MIN2 1121 | ||
# param set PWM_MAIN_MIN3 1057 | ||
# param set PWM_MAIN_MIN4 1288 | ||
# param set PWM_MAIN_MIN5 1000 | ||
# param set PWM_MAIN_MIN6 1434 | ||
# param set PWM_MAIN_MIN7 1039 | ||
|
||
|
||
# param set PWM_MAIN_DIS1 1500 | ||
# param set PWM_MAIN_DIS2 1530 | ||
# param set PWM_MAIN_DIS3 1416 | ||
# param set PWM_MAIN_DIS4 1561 | ||
# param set PWM_MAIN_DIS5 900 | ||
# param set PWM_MAIN_DIS6 1500 | ||
# param set PWM_MAIN_DIS7 1500 | ||
|
||
# param set PWM_MAIN_FAIL1 1500 | ||
# param set PWM_MAIN_FAIL2 1530 | ||
# param set PWM_MAIN_FAIL3 1416 | ||
# param set PWM_MAIN_FAIL4 1561 | ||
# param set PWM_MAIN_FAIL5 900 | ||
# param set PWM_MAIN_FAIL6 1500 | ||
# param set PWM_MAIN_FAIL7 1500 | ||
|
||
# param set PWM_MAIN_REV1 1 | ||
# param set PWM_MAIN_REV2 0 | ||
# param set PWM_MAIN_REV3 1 | ||
# param set PWM_MAIN_REV4 1 | ||
# param set PWM_MAIN_REV6 1 | ||
|
||
# set disarmed value for the ESC | ||
param set PWM_DISARMED 900 | ||
|
||
# Return Mode RC Loss | ||
param set NAV_RCL_ACT 2 | ||
# Disabled Datalink Loss | ||
param set NAV_DLL_ACT 0 | ||
|
||
|
||
# Set Logging | ||
param set SDLOG_PROFILE 91 | ||
|
||
# UAVCAN | ||
param set UAVCAN_ENABLE 2 | ||
|
||
param set FW_VARIO_POLAR_A -0.0127 | ||
param set FW_VARIO_POLAR_B 0.1105 | ||
param set FW_VARIO_POLAR_C -0.7274 | ||
|
||
fi | ||
|
||
|
||
set MIXER AAVVTFF_magellan | ||
|
||
# use PWM parameters for throttle channel | ||
set PWM_OUT 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
Aileron/v-tail/throttle/wheel/flaps mixer for PX4FMU | ||
======================================================= | ||
|
||
This file defines mixers suitable for controlling a fixed wing aircraft with | ||
aileron, v-tail (rudder, elevator), throttle, and flaps | ||
using PX4FMU. | ||
|
||
The configuration assumes the following | ||
Right Aileron- 0 | ||
Left Aileron- 1 | ||
Right tail- 2 | ||
Left tail- 3 | ||
throttle- 4 | ||
Right flaps- 5 | ||
Right flaps- 6 | ||
|
||
Control Group #0 (Flight Control) | ||
0- roll (-1..1) | ||
1- pitch (-1..1) | ||
2- yaw (-1..1) | ||
3- throttle (0..1) | ||
4- flaps (-1..1) | ||
5- spoilers (-1..1) | ||
6- airbrakes (-1..1) | ||
7- landing gear (-1..1) | ||
|
||
Aileron mixer (roll + Airbrakes) | ||
--------------------------------- | ||
|
||
This mixer assumes that the aileron servos are set up mechanically reversed. | ||
|
||
M: 1 | ||
S: 0 0 10000 10000 -5200 -10000 10000 | ||
|
||
M: 1 | ||
S: 0 0 -7000 -3000 600 -10000 10000 | ||
|
||
V-tail mixers | ||
------------- | ||
Three scalers total (output, roll, pitch). | ||
|
||
M: 2 | ||
S: 0 2 -7000 -7000 0 -10000 10000 | ||
S: 0 1 8000 8000 0 -10000 10000 | ||
|
||
M: 2 | ||
S: 0 2 -7000 -7000 0 -10000 10000 | ||
S: 0 1 -8000 -8000 0 -10000 10000 | ||
|
||
Motor speed mixer | ||
----------------- | ||
Two scalers total (output, thrust). | ||
|
||
This mixer generates a full-range output (-1 to 1) from an input in the (0 - 1) | ||
range. Inputs below zero are treated as zero. | ||
|
||
M: 1 | ||
S: 0 3 0 20000 -10000 -10000 10000 | ||
|
||
Flaps mixer | ||
------------ | ||
Flap servos are physically reversed. | ||
|
||
M: 1 | ||
S: 0 4 10000 6000 0 -10000 10000 | ||
|
||
M: 1 | ||
S: 0 4 10000 6000 0 -10000 10000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
Mixer for SITL plane | ||
========================================================= | ||
|
||
Z: | ||
|
||
Z: | ||
|
||
# mixer for the rudder | ||
M: 1 | ||
O: 10000 10000 0 -10000 10000 | ||
S: 0 2 10000 10000 0 -10000 10000 | ||
|
||
# mixer for the pusher/puller throttle | ||
# NOTE: for HITL the throttle needs to be on the 3rd position see: | ||
# src/modules/mavlink/streams/HIL_ACTUATOR_CONTROLS.hpp::send() line 151 | ||
M: 1 | ||
O: 10000 10000 0 -10000 10000 | ||
S: 0 3 0 20000 -10000 -10000 10000 | ||
|
||
# mixer for the flaps | ||
M: 1 | ||
O: 10000 10000 0 -10000 10000 | ||
S: 0 4 10000 10000 0 -10000 10000 | ||
|
||
# mixer for the left aileron | ||
M: 1 | ||
O: 10000 10000 0 -10000 10000 | ||
S: 0 0 -10000 -10000 0 -10000 10000 | ||
|
||
# mixer for the right aileron | ||
M: 1 | ||
O: 10000 10000 0 -10000 10000 | ||
S: 0 0 10000 10000 0 -10000 10000 | ||
|
||
# mixer for the elevator | ||
M: 1 | ||
O: 10000 10000 0 -10000 10000 | ||
S: 0 1 10000 10000 0 -10000 10000 | ||
|
||
# mixer for the flaps | ||
M: 1 | ||
O: 10000 10000 0 -10000 10000 | ||
S: 0 4 10000 10000 0 -10000 10000 |
Oops, something went wrong.