Skip to content

Commit

Permalink
Merge pull request #240 from rosflight/doc_v1.0
Browse files Browse the repository at this point in the history
Documentation for v1.0
  • Loading branch information
superjax authored Aug 11, 2017
2 parents bc7c258 + 1bd3125 commit e4c1880
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 37 deletions.
2 changes: 1 addition & 1 deletion boards/naze/lib/breezystm32
Submodule breezystm32 updated 4 files
+3 −4 drv_mb1242.c
+37 −11 drv_ms4525.c
+2 −0 drv_ms4525.h
+24 −26 drv_ms5611.c
38 changes: 21 additions & 17 deletions docs/user-guide/hardware-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@ ROSflight is best supported on the flip32+ from [readytoflyquads.com](http://www

Additional Sensors you may want for your ROSflight setup include:

* Sonar – MB1242 – [$40 on MaxBotix](http://www.maxbotix.com/Ultrasonic_Sensors/MB1242.htm)
* GPS – Venus GPS – [$50 on Sparkfun](https://www.sparkfun.com/products/11058)
- Requires FTDI USB-UART Converter – [$6 on Amazon](https://www.amazon.com/Blue3D-Ft232rl-Serial-Adapter-Arduino/dp/B012YUANZK/ref=sr_1_9?ie=UTF8&qid=1490068223&sr=8-9&keywords=FTDI+USB+converter)
- and Ceramic Antenna [$12 on Sparkfun](https://www.sparkfun.com/products/177)
* Sonar – MB1030 – [$25 on MaxBotix](https://www.maxbotix.com/Ultrasonic_Sensors/MB1030.htm)
* GPS – u-blox NEO-M8N – [$35 from Drotek](https://drotek.com/shop/en/511-ublox-neo-m8-gps-module.html)
* Digital Airspeed Sensor – [$65 on JDrones](http://store.jdrones.com/digital_airspeed_sensor_p/senair02kit.html)

The I2C sonar (MB124X) is also supported, but PWM sonars are preferred.

## Vibration Isolation

Expand Down Expand Up @@ -93,20 +92,25 @@ Your needs will likely be slightly different than what is shown. This is meant

# Motor layouts

We currently support 5 mixer types. The desired mixer can be chosen by setting the the "MIXER" parameter to the following values:
The desired mixer can be chosen by setting the the "MIXER" parameter to the following values:

| mixer | value |
|-----------------|-------|
| Quadctoper-Plus | 0 |
| Quadcopter-X | 1 |
| Y6 | 2 |
| X8 | 3 |
| Fixed Wing | 4 |
| # | Mixer |
|---|---------|
| 0 | ESC calibration |
| 1 | Quad + |
| 2 | Quad X |
| 3 | Hex + |
| 4 | Hex X |
| 5 | Octo + |
| 6 | Octo X |
| 7 | Y6 |
| 8 | X8 |
| 9 | Tricopter |
| 10 | Fixed wing (traditional AETR) |

The associated motor layouts are shown below for each mixer
The associated motor layouts are shown below for each mixer.
The _ESC calibration_ mixer outputs the throttle command equally to each motor, and can be used for calibrating the ESCs.

![Mixer_1](images/mixer_1.png)
![Mixer_1](images/mixers_1.png)

![Mixer_2](images/mixer_2.png)

![Mixer_3](images/mixer_3.png)
![Mixer_2](images/mixers_2.png)
Binary file modified docs/user-guide/images/Wiring_Diagram.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/user-guide/images/mixer_1.png
Binary file not shown.
Binary file removed docs/user-guide/images/mixer_2.png
Binary file not shown.
Binary file removed docs/user-guide/images/mixer_3.png
Binary file not shown.
Binary file added docs/user-guide/images/mixers_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/user-guide/images/mixers_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 6 additions & 9 deletions docs/user-guide/parameter-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,7 @@ Because ROSflight ships with default parameters for multirotors, you will probab

# Description of all Parameters

This is a list of all parameters on ROSflight, their types, default values, and minimum and maximum recommended setting.


# Parameter descriptions
This is a list of all parameters on ROSflight, their types, default values, and minimum and maximum recommended setting:

| Parameter | Description | Type | Default Value | Min | Max |
|-----------|-------------|------|---------------|-----|-----|
Expand Down Expand Up @@ -128,10 +125,10 @@ This is a list of all parameters on ROSflight, their types, default values, and
| PID_YAW_RATE_D | Yaw Rate Derivative Gain | float | 0.0f | 0.0 | 1000.0 |
| PID_ROLL_ANG_P | Roll Angle Proporitional Gain | float | 0.15f | 0.0 | 1000.0 |
| PID_ROLL_ANG_I | Roll Angle Integral Gain | float | 0.0f | 0.0 | 1000.0 |
| PID_ROLL_ANG_D | Roll Angle Derivative Gain | float | 0.07f | 0.0 | 1000.0 |
| PID_ROLL_ANG_D | Roll Angle Derivative Gain | float | 0.05f | 0.0 | 1000.0 |
| PID_PITCH_ANG_P | Pitch Angle Proporitional Gain | float | 0.15f | 0.0 | 1000.0 |
| PID_PITCH_ANG_I | Pitch Angle Integral Gain | float | 0.0f | 0.0 | 1000.0 |
| PID_PITCH_ANG_D | Pitch Angle Derivative Gain | float | 0.07f | 0.0 | 1000.0 |
| PID_PITCH_ANG_D | Pitch Angle Derivative Gain | float | 0.05f | 0.0 | 1000.0 |
| X_EQ_TORQUE | Equilibrium torque added to output of controller on x axis | float | 0.0f | -1.0 | 1.0 |
| Y_EQ_TORQUE | Equilibrium torque added to output of controller on y axis | float | 0.0f | -1.0 | 1.0 |
| Z_EQ_TORQUE | Equilibrium torque added to output of controller on z axis | float | 0.0f | -1.0 | 1.0 |
Expand All @@ -143,8 +140,8 @@ This is a list of all parameters on ROSflight, their types, default values, and
| MOTOR_MAX_PWM | PWM value sent to motor ESCs at full throttle | int | 2000 | 1000 | 2000 |
| ARM_SPIN_MOTORS | Enforce MOTOR_IDLE_THR | int | true | 0 | 1 |
| FILTER_INIT_T | Time in ms to initialize estimator | int | 3000 | 0 | 100000 |
| FILTER_KP | estimator proportional gain - See estimator documentation | float | 2.0f | 0 | 10.0 |
| FILTER_KI | estimator integral gain - See estimator documentation | float | 0.2f | 0 | 1.0 |
| FILTER_KP | estimator proportional gain - See estimator documentation | float | 0.5f | 0 | 10.0 |
| FILTER_KI | estimator integral gain - See estimator documentation | float | 0.05f | 0 | 1.0 |
| FILTER_QUAD_INT | Perform a quadratic averaging of LPF gyro data prior to integration (adds ~20 us to estimation loop on F1 processors) | int | 1 | 0 | 1 |
| FILTER_MAT_EXP | 1 - Use matrix exponential to improve gyro integration (adds ~90 us to estimation loop in F1 processors) 0 - use euler integration | int | 1 | 0 | 1 |
| FILTER_USE_ACC | Use accelerometer to correct gyro integration drift (adds ~70 us to estimation loop) | int | 1 | 0 | 1 |
Expand Down Expand Up @@ -198,7 +195,7 @@ This is a list of all parameters on ROSflight, their types, default values, and
| RC_MAX_ROLLRATE | Maximum roll rate command sent by full stick deflection of RC sticks | float | 3.14159f | 0.0 | 9.42477796077 |
| RC_MAX_PITCHRATE | Maximum pitch command sent by full stick deflection of RC sticks | float | 3.14159f | 0.0 | 3.14159 |
| RC_MAX_YAWRATE | Maximum pitch command sent by full stick deflection of RC sticks | float | 1.507f | 0.0 | 3.14159 |
| MIXER | Which mixer to choose - See Mixer documentation | int | Mixer::INVALID_MIXER | 0 | 5 |
| MIXER | Which mixer to choose - See Mixer documentation | int | 255 | 0 | 10 |
| FIXED_WING | switches on passthrough commands for fixedwing operation | int | false | 0 | 1 |
| ELEVATOR_REV | reverses elevator servo output | int | 0 | 0 | 1 |
| AIL_REV | reverses aileron servo output | int | 0 | 0 | 1 |
Expand Down
10 changes: 5 additions & 5 deletions include/mixer.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,15 @@ class Mixer
{ 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -1.0f, 1.0f, 1.0f}, // Y Mix
{ 1.0f, -1.0f, 1.0f, -1.0f, 1.0f, -1.0f, 1.0f, -1.0f} // Z Mix
};

const mixer_t tricopter_mixing =
{
{M, M, M, S, NONE, NONE, NONE, NONE}, // output_type

{ 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, // F Mix
{-1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, // X Mix
{ 0.667f, 0.667f, -1.333f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, // Y Mix
{ 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f} // Z Mix
{ 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f}, // F Mix
{-1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f}, // X Mix
{ 0.667f, 0.0f, 0.667f, -1.333f, 0.0f, 0.0f, 0.0f, 0.0f}, // Y Mix
{ 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f} // Z Mix
};

const mixer_t fixedwing_mixing =
Expand Down
10 changes: 5 additions & 5 deletions src/param.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ void Params::set_defaults(void)

init_param_float(PARAM_PID_ROLL_ANGLE_P, "PID_ROLL_ANG_P", 0.15f); // Roll Angle Proporitional Gain | 0.0 | 1000.0
init_param_float(PARAM_PID_ROLL_ANGLE_I, "PID_ROLL_ANG_I", 0.0f); // Roll Angle Integral Gain | 0.0 | 1000.0
init_param_float(PARAM_PID_ROLL_ANGLE_D, "PID_ROLL_ANG_D", 0.07f); // Roll Angle Derivative Gain | 0.0 | 1000.0
init_param_float(PARAM_PID_ROLL_ANGLE_D, "PID_ROLL_ANG_D", 0.05f); // Roll Angle Derivative Gain | 0.0 | 1000.0

init_param_float(PARAM_PID_PITCH_ANGLE_P, "PID_PITCH_ANG_P", 0.15f); // Pitch Angle Proporitional Gain | 0.0 | 1000.0
init_param_float(PARAM_PID_PITCH_ANGLE_I, "PID_PITCH_ANG_I", 0.0f); // Pitch Angle Integral Gain | 0.0 | 1000.0
init_param_float(PARAM_PID_PITCH_ANGLE_D, "PID_PITCH_ANG_D", 0.07f); // Pitch Angle Derivative Gain | 0.0 | 1000.0
init_param_float(PARAM_PID_PITCH_ANGLE_D, "PID_PITCH_ANG_D", 0.05f); // Pitch Angle Derivative Gain | 0.0 | 1000.0

init_param_float(PARAM_X_EQ_TORQUE, "X_EQ_TORQUE", 0.0f); // Equilibrium torque added to output of controller on x axis | -1.0 | 1.0
init_param_float(PARAM_Y_EQ_TORQUE, "Y_EQ_TORQUE", 0.0f); // Equilibrium torque added to output of controller on y axis | -1.0 | 1.0
Expand All @@ -164,8 +164,8 @@ void Params::set_defaults(void)
/*** ESTIMATOR CONFIGURATION ***/
/*******************************/
init_param_int(PARAM_INIT_TIME, "FILTER_INIT_T", 3000); // Time in ms to initialize estimator | 0 | 100000
init_param_float(PARAM_FILTER_KP, "FILTER_KP", 2.0f); // estimator proportional gain - See estimator documentation | 0 | 10.0
init_param_float(PARAM_FILTER_KI, "FILTER_KI", 0.2f); // estimator integral gain - See estimator documentation | 0 | 1.0
init_param_float(PARAM_FILTER_KP, "FILTER_KP", 0.5f); // estimator proportional gain - See estimator documentation | 0 | 10.0
init_param_float(PARAM_FILTER_KI, "FILTER_KI", 0.05f); // estimator integral gain - See estimator documentation | 0 | 1.0

init_param_int(PARAM_FILTER_USE_QUAD_INT, "FILTER_QUAD_INT", 1); // Perform a quadratic averaging of LPF gyro data prior to integration (adds ~20 us to estimation loop on F1 processors) | 0 | 1
init_param_int(PARAM_FILTER_USE_MAT_EXP, "FILTER_MAT_EXP", 1); // 1 - Use matrix exponential to improve gyro integration (adds ~90 us to estimation loop in F1 processors) 0 - use euler integration | 0 | 1
Expand Down Expand Up @@ -237,7 +237,7 @@ void Params::set_defaults(void)
/***************************/
/*** FRAME CONFIGURATION ***/
/***************************/
init_param_int(PARAM_MIXER, "MIXER", Mixer::INVALID_MIXER); // Which mixer to choose - See Mixer documentation | 0 | 5
init_param_int(PARAM_MIXER, "MIXER", Mixer::INVALID_MIXER); // Which mixer to choose - See Mixer documentation | 0 | 10

init_param_int(PARAM_FIXED_WING, "FIXED_WING", false); // switches on passthrough commands for fixedwing operation | 0 | 1
init_param_int(PARAM_ELEVATOR_REVERSE, "ELEVATOR_REV", 0); // reverses elevator servo output | 0 | 1
Expand Down

0 comments on commit e4c1880

Please sign in to comment.