Skip to content

Commit

Permalink
lmc fw with skywalker airframe
Browse files Browse the repository at this point in the history
  • Loading branch information
JorgelHenri committed Feb 7, 2024
1 parent c01029b commit 9801d6c
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 0 deletions.
117 changes: 117 additions & 0 deletions ROMFS/px4fmu_common/init.d/airframes/4421_ssrc_skywalker
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
#!/bin/sh
#
# @name Skywalker X8
#
# @type Flying Wing
# @class Plane
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#

. /etc/init.d/rc.fw_defaults

# Control allocator parameters
param set-default CA_AIRFRAME 1
param set-default CA_ROTOR_COUNT 1
param set-default CA_SV_CS_COUNT 2
param set-default CA_SV_CS0_TYPE 5
param set-default CA_SV_CS0_TRQ_P 0.5
param set-default CA_SV_CS0_TRQ_R -0.5
param set-default CA_SV_CS1_TYPE 6
param set-default CA_SV_CS1_TRQ_P 0.5
param set-default CA_SV_CS1_TRQ_R 0.5

# PWM
param set-default PWM_MAIN_FUNC1 201
param set-default PWM_MAIN_MAX1 2000
param set-default PWM_MAIN_MIN1 1000
param set-default PWM_MAIN_DIS1 1500

param set-default PWM_MAIN_FUNC2 202
param set-default PWM_MAIN_MAX2 2000
param set-default PWM_MAIN_MIN2 1000
param set-default PWM_MAIN_DIS2 1500

param set-default PWM_MAIN_FUNC3 101
param set-default PWM_MAIN_MAX3 2000
param set-default PWM_MAIN_MIN3 1000
param set-default PWM_MAIN_DIS3 1000

param set-default PWM_MAIN_REV 2

# I2C probe
param set-default SENS_EXT_I2C_PRB 1

# Airspeed parameters
ms4525do start -X -f 500
param set-default SENS_EN_MS4525DO 1
param set-default ASPD_DO_CHECKS 15
param set-default FW_AIRSPD_MAX 25.0
param set-default FW_AIRSPD_MIN 13.0
param set-default FW_AIRSPD_STALL 10.0
param set-default FW_AIRSPD_TRIM 18.0

# Range-finder
param set-default SENS_EN_LL40LS 2

# Mission parameters
param set-default MIS_TAKEOFF_ALT 25.0
param set-default MIS_TKO_LAND_REQ 4
param set-default NAV_LOITER_RAD 40.0

# Battery parameters
param set-default BAT1_N_CELLS 4
param set-default BAT1_R_INTERNAL 0.0050
param set-default BAT1_V_EMPTY 3.6000
param set-default BAT1_V_LOAD_DROP 0.1000

param set-default BAT2_R_INTERNAL 0.0050
param set-default BAT2_V_EMPTY 3.6000
param set-default BAT2_V_LOAD_DROP 0.1000

# Disable internal magnetometer
param set-default CAL_MAG0_PRIO 1
param set-default CAL_MAG0_ROT 0
param set-default CAL_MAG1_PRIO 100
param set-default CAL_MAG1_ROT 0

param set-default SENS_MAG_MODE 0

# Launch detection
param set-default FW_LAUN_AC_T 0.0
param set-default FW_LAUN_AC_THLD 0.0
param set-default FW_LAUN_DETCN_ON 1

# Launch detection
param set-default FW_LND_ANG 15.0
param set-default FW_LND_ABORT 0

# Maximum manual roll angle
param set-default FW_MAN_R_MAX 60.0

# Rate control
param set-default FW_RR_IMAX 0.4000
param set-default FW_YR_IMAX 0.4000

# Misc
param set-default RTL_RETURN_ALT 100.0

# Failsafe
param set-default NAV_RCL_ACT 1
param set-default NAV_DLL_ACT 0
param set-default RC_MAP_KILL_SW 5

# Flight mode
param set-default RC_MAP_FLTMODE 6
param set-default COM_FLTMODE1 0
param set-default COM_FLTMODE4 1
param set-default COM_FLTMODE6 2

# Geometry
param set-default FW_WING_HEIGHT 0.2
param set-default FW_WING_SPAN 2.1

param set-default SYS_AUTOCONFIG 1

set MIXER fw_generic_wing
1 change: 1 addition & 0 deletions ROMFS/px4fmu_common/init.d/airframes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ px4_add_romfs_files(
4400_ssrc_fog_x
4401_ssrc_fog_x_tmotor
4420_ssrc_arwing
4421_ssrc_skywalker
4430_ssrc_strivermini
4500_clover4
4900_crazyflie
Expand Down

0 comments on commit 9801d6c

Please sign in to comment.