Merge branch 'beta'

This commit is contained in:
Lorenz Meier
2015-07-12 15:52:02 +02:00
6 changed files with 117 additions and 15 deletions
+6 -2
View File
@@ -913,10 +913,14 @@ MPU6000::gyro_self_test()
/*
* Maximum deviation of 20 degrees, according to
* http://www.invensense.com/mems/gyro/documents/PS-MPU-6000A-00v3.4.pdf
* http://www.farnell.com/datasheets/1788002.pdf
* Section 6.1, initial ZRO tolerance
*
* 20 dps (0.34 rad/s) initial offset
* and 20 dps temperature drift, so 0.34 rad/s * 2
*/
const float max_offset = 0.34f;
const float max_offset = 2.0f * 0.34f;
/* 30% scale error is chosen to catch completely faulty units but
* to let some slight scale error pass. Requires a rate table or correlation
* with mag rotations + data fit to
+6
View File
@@ -878,6 +878,8 @@ int commander_thread_main(int argc, char *argv[])
param_t _param_autostart_id = param_find("SYS_AUTOSTART");
param_t _param_autosave_params = param_find("COM_AUTOS_PAR");
param_t _param_rc_in_off = param_find("COM_RC_IN_MODE");
param_t _param_eph = param_find("COM_HOME_H_T");
param_t _param_epv = param_find("COM_HOME_V_T");
const char *main_states_str[vehicle_status_s::MAIN_STATE_MAX];
main_states_str[vehicle_status_s::MAIN_STATE_MANUAL] = "MANUAL";
@@ -1300,6 +1302,10 @@ int commander_thread_main(int argc, char *argv[])
/* Parameter autosave setting */
param_get(_param_autosave_params, &autosave_params);
/* EPH / EPV */
param_get(_param_eph, &eph_threshold);
param_get(_param_epv, &epv_threshold);
}
/* Set flag to autosave parameters if necessary */
+70 -6
View File
@@ -1,7 +1,6 @@
/****************************************************************************
*
* Copyright (c) 2013 PX4 Development Team. All rights reserved.
* Author: Lorenz Meier <lm@inf.ethz.ch>
* Copyright (c) 2013-2015 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -37,16 +36,54 @@
*
* Parameters defined by the sensors task.
*
* @author Lorenz Meier <lm@inf.ethz.ch>
* @author Thomas Gubler <thomasgubler@student.ethz.ch>
* @author Julian Oes <julian@oes.ch>
* @author Lorenz Meier <lorenz@px4.io>
* @author Thomas Gubler <thomas@px4.io>
* @author Julian Oes <julian@px4.io>
*/
#include <px4_config.h>
#include <systemlib/param/param.h>
/**
* Roll trim
*
* The trim value is the actuator control value the system needs
* for straight and level flight. It can be calibrated by
* flying manually straight and level using the RC trims and
* copying them using the GCS.
*
* @group Radio Calibration
* @min -0.25
* @max 0.25
*/
PARAM_DEFINE_FLOAT(TRIM_ROLL, 0.0f);
/**
* Pitch trim
*
* The trim value is the actuator control value the system needs
* for straight and level flight. It can be calibrated by
* flying manually straight and level using the RC trims and
* copying them using the GCS.
*
* @group Radio Calibration
* @min -0.25
* @max 0.25
*/
PARAM_DEFINE_FLOAT(TRIM_PITCH, 0.0f);
/**
* Yaw trim
*
* The trim value is the actuator control value the system needs
* for straight and level flight. It can be calibrated by
* flying manually straight and level using the RC trims and
* copying them using the GCS.
*
* @group Radio Calibration
* @min -0.25
* @max 0.25
*/
PARAM_DEFINE_FLOAT(TRIM_YAW, 0.0f);
/**
@@ -77,6 +114,7 @@ PARAM_DEFINE_FLOAT(BAT_V_CHARGED, 4.2f);
*
* @group Battery Calibration
* @unit V
* @min 0.0f
*/
PARAM_DEFINE_FLOAT(BAT_V_LOAD_DROP, 0.07f);
@@ -87,6 +125,8 @@ PARAM_DEFINE_FLOAT(BAT_V_LOAD_DROP, 0.07f);
*
* @group Battery Calibration
* @unit S
* @min 1
* @max 10
*/
PARAM_DEFINE_INT32(BAT_N_CELLS, 3);
@@ -182,7 +222,31 @@ PARAM_DEFINE_FLOAT(COM_EF_TIME, 10.0f);
* @min 0
* @max 35
*/
PARAM_DEFINE_FLOAT(COM_RC_LOSS_T, 0.5);
PARAM_DEFINE_FLOAT(COM_RC_LOSS_T, 0.5f);
/**
* Home set horizontal threshold
*
* The home position will be set if the estimated positioning accuracy is below the threshold.
*
* @group Commander
* @unit meter
* @min 2
* @max 15
*/
PARAM_DEFINE_FLOAT(COM_HOME_H_T, 5.0f);
/**
* Home set vertical threshold
*
* The home position will be set if the estimated positioning accuracy is below the threshold.
*
* @group Commander
* @unit meter
* @min 5
* @max 25
*/
PARAM_DEFINE_FLOAT(COM_HOME_V_T, 10.0f);
/**
* Autosaving of params