diff --git a/conf/airframes/OPENUAS/openuas_wltech_xk_a160.xml b/conf/airframes/OPENUAS/openuas_wltech_xk_a160.xml
new file mode 100644
index 0000000000..971129f472
--- /dev/null
+++ b/conf/airframes/OPENUAS/openuas_wltech_xk_a160.xml
@@ -0,0 +1,642 @@
+
+
+
+ Airframe with Lisa MXS flightcontroller hardware
+ + Model: WLTech XK A160 J3 Skylark Tiny Fixedwing
+ + Autopilot: Lisa MXS v1.0 with only a MPU6000, not a MPU9250
+ + Actuators: Default servos but Rudder and Elevator replaced by Dymond D47
+ + GNSS Ublox M8N GNSS set to 19Hz output rate with 3 GNSS constellations
+ + MAG External QMC Magnetometer on GNSS device
+ + ESC: FTV LittleBee 20A Opto Pro with custom firmware
+ + BEC: 2.5A small BEC
+ + RCRX: OpenRXSR Receiver
+ + AIRSPEED: No airspeed (Yet)
+ + TELEMETRY: Si10xx Chip based with firmware enabeling PPRZ RSSI message
+ + RANGER: None ATM
+ + MOTOR: Default
+ + PROP: Default
+
+NOTES:
+ + Default CoG is wrong and WAY off, tail heavy, we've modified AC body so that the battery can fit fully in front
+ + AP is rotated on Z 45 degrees counterclockwise and flipped 180 degrees
+ + Telemetry powered via BEC on flightcontrollen (100mAh max + MCU 60mAh is less than 250mAh, the max the DC converter can handle )
+ + Flashing the firmware done with Black Magic Probe (BMP) adapter
+ + A GNSS device with magneto on it is used
+ + Uses PAPARAZZI "standard" radio channel settings
+ + A 650mAh battery, expect flighttimes of ~15 minutes at 10m/s
+
+ WIP:
+ + The driver for the Magnetometer is not working well and thus code is not in this branch
+
+ Launching
+ + 1) Set TX to AUTO2, or if no TX it is AUTO2
+ 2) Move nose to ground
+ 3) wait until prop spins after a second or so,
+ 4) Position aircraft horizontally with slight pitch up
+ 5) Throw...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/conf/modules/imu_mpu6000.xml b/conf/modules/imu_mpu6000.xml
index bc4f4a800f..3c32afec9e 100644
--- a/conf/modules/imu_mpu6000.xml
+++ b/conf/modules/imu_mpu6000.xml
@@ -3,7 +3,7 @@
- IMU with MPU6000 via SPI.
+ IMU with an Invensense MPU6000 connected via the SPI bus to flightcontroller.
@@ -11,6 +11,7 @@
+
spi_master
diff --git a/conf/radios/OPENUAS/openuas_rxsr_cppm_8ch.xml b/conf/radios/OPENUAS/openuas_rxsr_cppm_8ch.xml
new file mode 100644
index 0000000000..5bf17a1c8d
--- /dev/null
+++ b/conf/radios/OPENUAS/openuas_rxsr_cppm_8ch.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/conf/userconf/OPENUAS/openuas_all_ac.xml b/conf/userconf/OPENUAS/openuas_all_ac.xml
index 1bd85fb771..ed4318e505 100644
--- a/conf/userconf/OPENUAS/openuas_all_ac.xml
+++ b/conf/userconf/OPENUAS/openuas_all_ac.xml
@@ -1,4 +1,16 @@
+
= 60) && (PERIODIC_FREQUENCY <= 120)
@@ -102,11 +104,21 @@ PRINT_CONFIG_VAR(IMU_MPU_Y_SIGN)
#endif
PRINT_CONFIG_VAR(IMU_MPU_Z_SIGN)
-
struct ImuMpu6000 imu_mpu_spi;
+#if IMU_MPU_USE_MEDIAN_FILTER
+static struct MedianFilter3Int medianfilter_accel;
+static struct MedianFilter3Int medianfilter_rates;
+#endif
+
void imu_mpu_spi_init(void)
{
+
+#if IMU_MPU_USE_MEDIAN_FILTER
+ InitMedianFilterVect3Int(medianfilter_accel, 3);
+ InitMedianFilterRatesInt(medianfilter_rates, 3);
+#endif
+
mpu60x0_spi_init(&imu_mpu_spi.mpu, &IMU_MPU_SPI_DEV, IMU_MPU_SPI_SLAVE_IDX);
// change the default configuration
imu_mpu_spi.mpu.config.smplrt_div = IMU_MPU_SMPLRT_DIV;
@@ -116,7 +128,6 @@ void imu_mpu_spi_init(void)
imu_mpu_spi.mpu.config.accel_range = IMU_MPU_ACCEL_RANGE;
}
-
void imu_mpu_spi_periodic(void)
{
mpu60x0_spi_periodic(&imu_mpu_spi.mpu);
@@ -139,6 +150,12 @@ void imu_mpu_spi_event(void)
IMU_MPU_Y_SIGN * (int32_t)(imu_mpu_spi.mpu.data_rates.value[IMU_MPU_CHAN_Y]),
IMU_MPU_Z_SIGN * (int32_t)(imu_mpu_spi.mpu.data_rates.value[IMU_MPU_CHAN_Z])
};
+
+ // In case sensor exhibits faulty large spike values in raw output remove them
+#if IMU_MPU_USE_MEDIAN_FILTER
+ UpdateMedianFilterVect3Int(medianfilter_accel, accel);
+ UpdateMedianFilterRatesInt(medianfilter_rates, rates);
+#endif
// unscaled vector
VECT3_COPY(imu.accel_unscaled, accel);
RATES_COPY(imu.gyro_unscaled, rates);