[[searchwing-firmware]]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
searchwing-firmware [2019/02/10 14:15]
beckmanf created
searchwing-firmware [2019/05/05 11:57] (current)
j0ge4622 Update the failsafe params.
Line 1: Line 1:
-===== PX4 Firmware =====+====== PX4 Firmware ​======
  
 Today (10.2.2019) the firmware for the PX4 is a custom build based on the 1.8.2 release. The firmware is maintained in the github repository: Today (10.2.2019) the firmware for the PX4 is a custom build based on the 1.8.2 release. The firmware is maintained in the github repository:
Line 10: Line 10:
   * [[https://​github.com/​PX4/​Firmware/​pull/​10699|A fix for the airframe]]   * [[https://​github.com/​PX4/​Firmware/​pull/​10699|A fix for the airframe]]
  
-The changes to the upstream firmware are based on the stable branch which is today the 1.8.2 release. The changes are maintained ​in the "searchwing18" ​branch+The above changes to the upstream firmware are after the 1.8.2 release. I cherry-picked the above changes and applied them to the stable ​(1.8.2) ​branch. All changes for searchwing are maintained in theÌý
 +Ìý
 +  * [[https://​github.com/​fredowski/​Firmware/​tree/​searchwing18|searchwing18 branch]]Ìý
 +Ìý
 +which branched off the stable branch from upstream. The changes for the reduced Telemetry2 activity are missing.Ìý
 +Ìý
 +===== Build =====Ìý
 +Ìý
 +The build command for the 1.8.2 based firmeware ​isÌý
 +Ìý
 +<​code>​Ìý
 +make px4fmu-v4_defaultÌý
 +</​code>​Ìý
 +Ìý
 +Note the missing "​_"​ compared to the [[https://​dev.px4.io/​en/​setup/​building_px4.html|official build description]]. You can find out the possible build targets viaÌý
 +Ìý
 +<​code>​Ìý
 +make helpÌý
 +make list_config_targetsÌý
 +</​code>​Ìý
 +Ìý
 +===== Firmware installation =====Ìý
 +Ìý
 +The firmware is [[https://​docs.px4.io/​en/​config/​firmware.html|installed]] on the PixRacer via the QGroundControl Software. You have to select the "​Custom Firmware File" that you find in the folder "​Firmware/​build"​. The name of the firmware file is "​px4fmu-v4_default.px4"​.Ìý
 +Ìý
 +=== Find out Firmware version ===Ìý
 +Ìý
 +The SearchWing Firmware version is displayed in QGC as 1.8.2dev, i.e. the internal ​1.8.2-1 or 1.8.2-2 is not shown directly. This can be done via the [[https://​docs.qgroundcontrol.com/​en/​analyze_view/​mavlink_console.html|Mavlink Console]]. You can figure out the firmware version viaÌý
 +Ìý
 +<​code>​Ìý
 +ver allÌý
 +</​code>​Ìý
 +Ìý
 +You can then compare the git hash.Ìý
 +Ìý
 +=== Mag Sensor Setup ===Ìý
 +Ìý
 +Make sure that only the mag sensor in the GPS Module is enabled. The two mag sensors ​in the pixracer should be disabled, because there is too much disturbance from the power cable below the autopilot. When the [[https://​store.mrobotics.io/​mRo-GPS-u-Blox-Neo-M8N-HMC5983-Compass-p/​mro-gps003-mr.htm|mRobotics GPS Module]] is installed with the arrow showing forward, then the mag sensor has a rotation of 90 Degrees Yaw (yes, this is strange). The parameters have to be setup like thisÌý
 +Ìý
 +  * CAL_MAG0_EN=1 (Enabled)Ìý
 +  * CAL_MAG0_ROT=2 (Yaw 90 Degrees)Ìý
 +  * CAL_MAG1_EN=CAL_MAG2_EN=0 (Disabled)Ìý
 +Ìý
 +After the mag setup is changed, the mag sensors have to be calibrated. If you see a "Mag Inconsistent Error" ​in QGC, then this setup is wrong.Ìý
 +Ìý
 +===== Parameter =====Ìý
 +Ìý
 +==== Procedure ====Ìý
 +Ìý
 +  - Export parameter from QGC (.params file)Ìý
 +  - Compare with the concurrent or for a new plane with an already existing file in [[https://​gitlab.com/​searchwing/​operational/​searchwing-config/​tree/​master/​PX4|searchwing-config]],​ e.g. with git diffÌý
 +  - Optional: Delete the not needed parameter and push the new file.Ìý
 +Ìý
 +==== Failsafes ====Ìý
 +Ìý
 +  - Low Battery Failsafe:Ìý
 +      - BAT_CRIT_THR = 0.1 (capacity [%])Ìý
 +      - BAT_EMERGEN_THR = 0.05 (capacity [%])Ìý
 +      - BAT_LOW_THR = 0.2 (capacity [%])Ìý
 +      - COM_LOW_BAT_ACT = 1 (return mode)Ìý
 +  - RC Loss Failsafe:Ìý
 +      - COM_RC_LOSS_T = 5 (time to detect RC-loss [s])Ìý
 +      - NAV_RCL_ACT = 0 (no action)Ìý
 +  - Data Link Loss Failsafe:Ìý
 +      - COM_DL_LOSS_T = 10 (time to detect datalink-loss [s])Ìý
 +      - NAV_DLL_ACT = 2 (return mode)Ìý
 +  - Geofence Failsafe:Ìý
 +      - GF_ACTION = 3 (return mode)Ìý
 +      - GF_COUNT = -1 (counter limit to detect geofence breach)Ìý
 +      - GF_MAX_HOR_DIST = 3000 (max horizontal distance home-plane [m])Ìý
 +      - GF_MAX_VER_DIST = 250 (max vertical distance home-plane [m])Ìý
 +  - Return Home Settings:Ìý
 +      - RTL_DESCEND_ALT = 100 (altitude to loiter above home [m])Ìý
 +      - RTL_LAND_DELAY = -1 (no land, just loiter [s])Ìý
 +      - RTL_RETURN_ALT = 100 (altitude to flight to home [m])Ìý
 +      - RTL_TYPE = 0 (direkt path to home)Ìý
 +  - Land Mode Settings:Ìý
 +      - COM_DISARM_LAND = 1 (disarm after delay [s])Ìý
 +  - Position (GPS) Loss Failsafe:Ìý
 +      - COM_POSCTL_NAVL = 1 (assume no RC → Land Mode with heigt, Termination without)Ìý
 +      - COM_POS_FS_DELAY = 5 (time to detect GPS-loss [s])Ìý
 +      - NAV_GPSF_LT = 10 (loiter time to recover GPS [s])Ìý
 +      - NAV_GPSF_P = 0 (loiter pitch [deg])Ìý
 +      - NAV_GPSF_R = 15 (loiter roll [deg])Ìý
 +      - NAV_GPSF_TR = 0 (loiter thrust [%])Ìý
 +  - Mission FailsafeÌý
 +      - MIS_DIST_1WP = 1500 (max distance home-wp1 [m])Ìý
 +      - MIS_DIST_WPS = 2000 (max distance wp-wp [m])Ìý
 +      - Set both values to -1, if more than 10km are needed.Ìý
 +  - Traffic Avoidance FailsafeÌý
 +      - NAV_TRAFF_AVOID = 2 (Return Mode)Ìý
 +Ìý
 +===== Releases =====Ìý
 +Ìý
 +=== searchwing-1.8.2-1 ===Ìý
 +Ìý
 +  * Based on upstream 1.8.2Ìý
 +  * Added X-UAV Mini Talon AirframeÌý
 +  * {{:​searchwing-1.8.2-1.px4.zip|searchwing-1.8.2-1.px4.zip}}Ìý
 +   * Git Hash: 1172edd2a093e614b9ca77bee753c19262295be3Ìý
 +Ìý
 +=== searchwing-1.8.2-2 (27.2.2019) ===Ìý
 +Ìý
 +  * Added Björns minimal telemetry patch for the Raspberry Pi Camera Trigger from the autopilotÌý
 +  * {{:​searchwing-1.8.2-2.px4.zip|searchwing-1.8.2-2.px4.zip}}Ìý
 +   * Git Hash: 2786d39b71068917de6fab381e802f1205988af1Ìý
 +  * [[https://​github.com/​fredowski/​Firmware/​commits/​searchwing-1.8.2-2|View it on github]]Ìý
 +Ìý
  • searchwing-firmware.1549804542.txt.gz
  • Last modified: 2019/02/10 14:15
  • by beckmanf