<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.paparazziuav.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tim</id>
	<title>PaparazziUAV - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.paparazziuav.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tim"/>
	<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/wiki/Special:Contributions/Tim"/>
	<updated>2026-05-05T18:29:48Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Gyroscopes/ADXRS613&amp;diff=6348</id>
		<title>Gyroscopes/ADXRS613</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Gyroscopes/ADXRS613&amp;diff=6348"/>
		<updated>2010-03-28T00:13:57Z</updated>

		<summary type="html">&lt;p&gt;Tim: Configuration tested in air&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the setup of the ADXRS613 150 deg/sec gyro (breakout board from [http://www.sparkfun.com/ SparkFun]) to measure roll rates with [[Twog v1]].&lt;br /&gt;
&lt;br /&gt;
''Note 1'': Some steps may have been inadvertently left out below&amp;lt;br/&amp;gt;&lt;br /&gt;
''Note 2'': The ADXRS613 is a 5V sensor while the PPZ MCU runs on 3.3V&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Physical Setup ===&lt;br /&gt;
Solder wires onto the 5V, GND, RATE, and TEMP holes. Put the other ends of the wires into the connector housing. (The connector will be connected to port ADC2 on the PPZ board.)&lt;br /&gt;
&lt;br /&gt;
Using port ADC2 and GND as pin 1:&amp;lt;br/&amp;gt;&lt;br /&gt;
*PPZ pin 1 (GND)  -&amp;gt; gyro's GND&amp;lt;br/&amp;gt;&lt;br /&gt;
*PPZ pin 2 (+5V)  -&amp;gt; gyro's 5V&amp;lt;br/&amp;gt;&lt;br /&gt;
*PPZ pin 4 (ADC6) -&amp;gt; gyro's TEMP&amp;lt;br/&amp;gt;&lt;br /&gt;
*PPZ pin 5 (ADC5) -&amp;gt; gyro's RATE&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*PPZ pin 3 (+3.3V) is left unconnected&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ADC5 is used for the gyro's RATE as the voltage divider on the Twog divides a +5V signal down to a +3.3V signal.&lt;br /&gt;
&lt;br /&gt;
The voltage divider connected to ADC6 on our board divides a +18V signal down to +3.3V so, at this time, we are not using the TEMP compensation. You may be able to use this ADC as-is with the TEMP signal but we have not yet tried. We plan on replacing this voltage divider with a +5V to +3.3V divider, as is found on ADC5.&lt;br /&gt;
&lt;br /&gt;
=== Software Setup ===&lt;br /&gt;
Now that the gyro board can be physically interfaced with the PPZ, the airframe file must be updated.&lt;br /&gt;
&lt;br /&gt;
==== Enable Gyro Code and ADCs ====&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Makefile portion of the airframe file to include the gyro code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ap.CFLAGS += -DGYRO -DADXRS150&lt;br /&gt;
ap.srcs   += gyro.c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enable ADC5 and ADC6 by placing the following on the proper line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-DUSE_ADC_5 -DUSE_ADC_6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our ADC section (with the &amp;quot;proper&amp;quot; line) looks like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ap.CFLAGS += -DADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2 -DUSE_ADC_5 -DUSE_ADC_6&lt;br /&gt;
ap.srcs   += $(SRC_ARCH)/adc_hw.c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Map ADCs to Gyro ====&lt;br /&gt;
&lt;br /&gt;
Add the following to the &amp;quot;adc&amp;quot; section in the airframe to map the ADCs and set the gyro sample buffer size:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;GYRO_ROLL&amp;quot;       value=&amp;quot;ADC_5&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;GYRO_NB_SAMPLES&amp;quot; value=&amp;quot;16&amp;quot;/&amp;gt; &lt;br /&gt;
&amp;lt;define name=&amp;quot;GYRO_TEMP&amp;quot;       value=&amp;quot;ADC_6&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Gyro ====&lt;br /&gt;
&lt;br /&gt;
Add the following new section to the airframe:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;GYRO&amp;quot; prefix=&amp;quot;GYRO_&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ADC_ROLL_NEUTRAL&amp;quot; value=&amp;quot;500&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ROLL_DIRECTION&amp;quot;   value=&amp;quot;1&amp;quot;/&amp;gt;   &amp;lt;!-- Set to -1 to reverse --&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ROLL_SCALE&amp;quot;       value=&amp;quot;0.3&amp;quot;/&amp;gt; &amp;lt;!-- +/- 150 degrees / (1023-NEUTRAL) or +/- 150 degrees / (NEUTRAL) if NEUTRAL &amp;lt; 512 --&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ADC_TEMP_NEUTRAL&amp;quot; value=&amp;quot;385&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ADC_TEMP_SLOPE&amp;quot;   value=&amp;quot;0&amp;quot;/&amp;gt;   &amp;lt;!-- Temp compensation not used --&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*'''ADC_ROLL_NEUTRAL''' - The ADC value of the RATE reading when the gyro is held still (read from the Messages window)&amp;lt;br/&amp;gt;&lt;br /&gt;
*'''ROLL_DIRECTION'''   - Reverses the direction of a positive roll (right wing dipping should be positive). Should be either &amp;quot;1&amp;quot; or &amp;quot;-1&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
*'''ROLL_SCALE'''       - Degrees/second per ADC count from neutral&amp;lt;br/&amp;gt;&lt;br /&gt;
*'''ADC_TEMP_NEUTRAL''' - ADC value of TEMP at temperature the ADC_ROLL_NEUTRAL was determined&amp;lt;br/&amp;gt;&lt;br /&gt;
*'''ADC_TEMP_SLOPE'''   - Volts of increased SCALE output voltage per TEMP ADC count from neutral (should be negative to offset positive temperature coefficient of output)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(The last two descriptions have not been tested and may not be completely correct.)&lt;br /&gt;
&lt;br /&gt;
===== ROLL_SCALE Calibration =====&lt;br /&gt;
[[Image:ADXRS613GyroConfigMessages.png|thumb|200px|Messages window with gyro telemetry]]&lt;br /&gt;
The GYRO_RATES tab in the Messages window provides access to telemetry from the gyro sensor.&amp;lt;br/&amp;gt;&lt;br /&gt;
*'''roll_adc''' - the current value of the RATE ADC minus the current ''RATE neutral'' value (RATE - neutral)&amp;lt;br/&amp;gt;&lt;br /&gt;
*'''roll'''     - the estimated roll rate of the gyro with the current calibration&amp;lt;br/&amp;gt;&lt;br /&gt;
*'''pitch'''    - the current value of the TEMP ADC minus the current ''TEMP neutral'' value (TEMP - neutral). Note: this will actually be the pitch reading if the gyro is 2-axis and ''IDG300'' is defined in the airframe file (see gyro.c and ap_downlink.h for more information)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our calibration was fairly rough but the following is how we did it. The roll neutral value was measured at 500 (average roll_adc + current neutral when the gyro is still). Since the gyro is specified to be able to measure at least +/-150 deg/sec, we assumed 0 ADC count to be 150 deg/sec (and 1023 counts would be greater than 150 deg/sec as more ADC counts are on that side of neutral).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(150 deg/sec) / (500 counts) = 0.3 (deg/sec)/count&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The major assumptions with this calibration technique are:&lt;br /&gt;
# Either 0 or 1023 represents exactly 150 deg/sec, ignoring the sign of the rotational rate&lt;br /&gt;
# The +5V to +3.3V voltage divider is 100% accurate (i.e. a +5V signal fed into the divider will produce a +3.3V output, exactly)&lt;br /&gt;
This second assumption is easier to address (e.g. you can physically measure the voltage divider ratio and correct the ROLL_SCALE accordingly).&lt;br /&gt;
&lt;br /&gt;
For confirmation, the gyro was set to measure the yaw access angular rates (the plane was easier to spin in this configuration), the fuselage was placed in a chair, and the chair was spun at roughly 90 deg/sec. The output of the gyro was read from the Messages window and was confirmed to be close to 90 deg/sec. After this testing, the gyro was mounted in its final roll-axis position.&lt;br /&gt;
&lt;br /&gt;
==== Configure PPZ to Use Gyro ====&lt;br /&gt;
&lt;br /&gt;
To have the PPZ use the gyro data when computing the roll attitude estimator, the &amp;quot;HORIZONTAL CONTROL&amp;quot; section of the airframe must also be edited. Our inner roll parameters look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;!-- Inner roll loop parameters --&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;ROLL_ATTITUDE_GAIN&amp;quot; value=&amp;quot;-7500.&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;ROLL_RATE_GAIN&amp;quot;     value=&amp;quot;-900.&amp;quot;/&amp;gt;    &amp;lt;!-- Gyro --&amp;gt;&lt;br /&gt;
&amp;lt;!--&amp;lt;define name=&amp;quot;ROLL_PGAIN&amp;quot;     value=&amp;quot;8000.&amp;quot;/&amp;gt;--&amp;gt; &amp;lt;!-- Ignored when H_CTL_ROLL_ATTITUDE_GAIN is defined --&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As is mentioned in the last (commented) line, ROLL_PGAIN is ignored when using ROLL_ATTITUDE_GAIN. ROLL_RATE_GAIN is used only when ROLL_ATTITUDE_GAIN is defined. ROLL_ATTITUDE_GAIN is the proportional coefficient of the roll attitude loop; ROLL_RATE_GAIN is the derivative coefficient of the loop.&lt;/div&gt;</summary>
		<author><name>Tim</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Gyroscopes/ADXRS613&amp;diff=6324</id>
		<title>Gyroscopes/ADXRS613</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Gyroscopes/ADXRS613&amp;diff=6324"/>
		<updated>2010-03-16T06:27:59Z</updated>

		<summary type="html">&lt;p&gt;Tim: Added info on reading from Messages window. Also, formatting.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the setup of the ADXRS613 150 deg/sec gyro (breakout board from [http://www.sparkfun.com/ SparkFun]) to measure roll rates with [[Twog v1]].&lt;br /&gt;
&lt;br /&gt;
''Note 1'': This configuration has not yet been tested in the air&amp;lt;br/&amp;gt;&lt;br /&gt;
''Note 2'': Some steps may have been inadvertently left out below&amp;lt;br/&amp;gt;&lt;br /&gt;
''Note 3'': The ADXRS613 is a 5V sensor while the PPZ MCU runs on 3.3V&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Physical Setup ===&lt;br /&gt;
Solder wires onto the 5V, GND, RATE, and TEMP holes. Put the other ends of the wires into the connector housing. (The connector will be connected to port ADC2 on the PPZ board.)&lt;br /&gt;
&lt;br /&gt;
Using port ADC2 and GND as pin 1:&amp;lt;br/&amp;gt;&lt;br /&gt;
*PPZ pin 1 (GND)  -&amp;gt; gyro's GND&amp;lt;br/&amp;gt;&lt;br /&gt;
*PPZ pin 2 (+5V)  -&amp;gt; gyro's 5V&amp;lt;br/&amp;gt;&lt;br /&gt;
*PPZ pin 4 (ADC6) -&amp;gt; gyro's TEMP&amp;lt;br/&amp;gt;&lt;br /&gt;
*PPZ pin 5 (ADC5) -&amp;gt; gyro's RATE&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*PPZ pin 3 (+3.3V) is left unconnected&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ADC5 is used for the gyro's RATE as the voltage divider on the Twog divides a +5V signal down to a +3.3V signal.&lt;br /&gt;
&lt;br /&gt;
The voltage divider connected to ADC6 on our board divides a +18V signal down to +3.3V so, at this time, we are not using the TEMP compensation. You may be able to use this ADC as-is with the TEMP signal but we have not yet tried. We plan on replacing this voltage divider with a +5V to +3.3V divider, as is found on ADC5.&lt;br /&gt;
&lt;br /&gt;
=== Software Setup ===&lt;br /&gt;
Now that the gyro board can be physically interfaced with the PPZ, the airframe file must be updated.&lt;br /&gt;
&lt;br /&gt;
==== Enable Gyro Code and ADCs ====&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Makefile portion of the airframe file to include the gyro code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ap.CFLAGS += -DGYRO -DADXRS150&lt;br /&gt;
ap.srcs   += gyro.c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enable ADC5 and ADC6 by placing the following on the proper line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-DUSE_ADC_5 -DUSE_ADC_6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our ADC section (with the &amp;quot;proper&amp;quot; line) looks like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ap.CFLAGS += -DADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2 -DUSE_ADC_5 -DUSE_ADC_6&lt;br /&gt;
ap.srcs   += $(SRC_ARCH)/adc_hw.c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Map ADCs to Gyro ====&lt;br /&gt;
&lt;br /&gt;
Add the following to the &amp;quot;adc&amp;quot; section in the airframe to map the ADCs and set the gyro sample buffer size:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;GYRO_ROLL&amp;quot;       value=&amp;quot;ADC_5&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;GYRO_NB_SAMPLES&amp;quot; value=&amp;quot;16&amp;quot;/&amp;gt; &lt;br /&gt;
&amp;lt;define name=&amp;quot;GYRO_TEMP&amp;quot;       value=&amp;quot;ADC_6&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Gyro ====&lt;br /&gt;
&lt;br /&gt;
Add the following new section to the airframe:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;GYRO&amp;quot; prefix=&amp;quot;GYRO_&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ADC_ROLL_NEUTRAL&amp;quot; value=&amp;quot;500&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ROLL_DIRECTION&amp;quot;   value=&amp;quot;1&amp;quot;/&amp;gt;   &amp;lt;!-- Set to -1 to reverse --&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ROLL_SCALE&amp;quot;       value=&amp;quot;0.3&amp;quot;/&amp;gt; &amp;lt;!-- +/- 150 degrees / (1023-NEUTRAL) or +/- 150 degrees / (NEUTRAL) if NEUTRAL &amp;lt; 512 --&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ADC_TEMP_NEUTRAL&amp;quot; value=&amp;quot;385&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ADC_TEMP_SLOPE&amp;quot;   value=&amp;quot;0&amp;quot;/&amp;gt;   &amp;lt;!-- Temp compensation not used --&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*'''ADC_ROLL_NEUTRAL''' - The ADC value of the RATE reading when the gyro is held still (read from the Messages window)&amp;lt;br/&amp;gt;&lt;br /&gt;
*'''ROLL_DIRECTION'''   - Reverses the direction of a positive roll (right wing dipping should be positive). Should be either &amp;quot;1&amp;quot; or &amp;quot;-1&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
*'''ROLL_SCALE'''       - Degrees/second per ADC count from neutral&amp;lt;br/&amp;gt;&lt;br /&gt;
*'''ADC_TEMP_NEUTRAL''' - ADC value of TEMP at temperature the ADC_ROLL_NEUTRAL was determined&amp;lt;br/&amp;gt;&lt;br /&gt;
*'''ADC_TEMP_SLOPE'''   - Volts of increased SCALE output voltage per TEMP ADC count from neutral (should be negative to offset positive temperature coefficient of output)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(The last two descriptions have not been tested and may not be completely correct.)&lt;br /&gt;
&lt;br /&gt;
===== ROLL_SCALE Calibration =====&lt;br /&gt;
[[Image:ADXRS613GyroConfigMessages.png|thumb|200px|Messages window with gyro telemetry]]&lt;br /&gt;
The GYRO_RATES tab in the Messages window provides access to telemetry from the gyro sensor.&amp;lt;br/&amp;gt;&lt;br /&gt;
*'''roll_adc''' - the current value of the RATE ADC minus the current ''RATE neutral'' value (RATE - neutral)&amp;lt;br/&amp;gt;&lt;br /&gt;
*'''roll'''     - the estimated roll rate of the gyro with the current calibration&amp;lt;br/&amp;gt;&lt;br /&gt;
*'''pitch'''    - the current value of the TEMP ADC minus the current ''TEMP neutral'' value (TEMP - neutral). Note: this will actually be the pitch reading if the gyro is 2-axis and ''IDG300'' is defined in the airframe file (see gyro.c and ap_downlink.h for more information)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our calibration was fairly rough but the following is how we did it. The roll neutral value was measured at 500 (average roll_adc + current neutral when the gyro is still). Since the gyro is specified to be able to measure at least +/-150 deg/sec, we assumed 0 ADC count to be 150 deg/sec (and 1023 counts would be greater than 150 deg/sec as more ADC counts are on that side of neutral).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(150 deg/sec) / (500 counts) = 0.3 (deg/sec)/count&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The major assumptions with this calibration technique are:&lt;br /&gt;
# Either 0 or 1023 represents exactly 150 deg/sec, ignoring the sign of the rotational rate&lt;br /&gt;
# The +5V to +3.3V voltage divider is 100% accurate (i.e. a +5V signal fed into the divider will produce a +3.3V output, exactly)&lt;br /&gt;
This second assumption is easier to address (e.g. you can physically measure the voltage divider ratio and correct the ROLL_SCALE accordingly).&lt;br /&gt;
&lt;br /&gt;
For confirmation, the gyro was set to measure the yaw access angular rates (the plane was easier to spin in this configuration), the fuselage was placed in a chair, and the chair was spun at roughly 90 deg/sec. The output of the gyro was read from the Messages window and was confirmed to be close to 90 deg/sec. After this testing, the gyro was mounted in its final roll-axis position.&lt;br /&gt;
&lt;br /&gt;
==== Configure PPZ to Use Gyro ====&lt;br /&gt;
&lt;br /&gt;
To have the PPZ use the gyro data when computing the roll attitude estimator, the &amp;quot;HORIZONTAL CONTROL&amp;quot; section of the airframe must also be edited. Our inner roll parameters look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;!-- Inner roll loop parameters --&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;ROLL_ATTITUDE_GAIN&amp;quot; value=&amp;quot;-7500.&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;ROLL_RATE_GAIN&amp;quot;     value=&amp;quot;-1500&amp;quot;/&amp;gt;    &amp;lt;!-- Gyro --&amp;gt;&lt;br /&gt;
&amp;lt;!--&amp;lt;define name=&amp;quot;ROLL_PGAIN&amp;quot;     value=&amp;quot;8000.&amp;quot;/&amp;gt;--&amp;gt; &amp;lt;!-- Ignored when H_CTL_ROLL_ATTITUDE_GAIN is defined --&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As is mentioned in the last (commented) line, ROLL_PGAIN is ignored when using ROLL_ATTITUDE_GAIN. ROLL_RATE_GAIN is used only when ROLL_ATTITUDE_GAIN is defined. ROLL_ATTITUDE_GAIN is the proportional coefficient of the roll attitude loop; ROLL_RATE_GAIN is the derivative coefficient of the loop.&lt;/div&gt;</summary>
		<author><name>Tim</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=File:ADXRS613GyroConfigMessages.png&amp;diff=6323</id>
		<title>File:ADXRS613GyroConfigMessages.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=File:ADXRS613GyroConfigMessages.png&amp;diff=6323"/>
		<updated>2010-03-16T05:21:26Z</updated>

		<summary type="html">&lt;p&gt;Tim: Ground station Messages window with ADXRS613 output&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ground station Messages window with ADXRS613 output&lt;/div&gt;</summary>
		<author><name>Tim</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Gyroscopes&amp;diff=6315</id>
		<title>Gyroscopes</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Gyroscopes&amp;diff=6315"/>
		<updated>2010-03-13T08:55:41Z</updated>

		<summary type="html">&lt;p&gt;Tim: Linked to ADXRS613 page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Paparazzi ADXR Gyro board ==&lt;br /&gt;
&lt;br /&gt;
[http://cvs.savannah.gnu.org/viewvc/paparazzi/paparazzi3/hw/sensors/ CVS]&lt;br /&gt;
&lt;br /&gt;
== 3 gram AHRS ==&lt;br /&gt;
&lt;br /&gt;
[http://www.vectornav.com/ VectorNav AHRS]&lt;br /&gt;
&lt;br /&gt;
== Sparkfun Breakout Board ==&lt;br /&gt;
&lt;br /&gt;
Example Gyroscope for MicroJet: this is the 150 degrees per second sensor from [http://www.sparkfun.com sparkfun]. The sensor is a 5 volt sensor and will work without modification if you have a Tiny2.11 and in assembly used a 1.8k resistor on R12 and/or R13 (see [http://paparazzi.enac.fr/wiki/index.php/Tiny_v2 Tiny2.11] page).&lt;br /&gt;
&lt;br /&gt;
For [http://paparazzi.enac.fr/wiki/index.php/Tiny Tiny1.3] or [http://paparazzi.enac.fr/wiki/index.php/Classix Classix] Autopilots you will need to create a resistor bridge as their ADC is 3.3 volts. Using a resistor bridge of say 220k on 330k gives a nice 5 -&amp;gt; 3 volt conversion of the output. Ideally the gyro should be fed with very smooth stable 5V but as it will not be integrated but just used to help the slow thermopiles, the 5 Volts from the servos-receiver also work.&lt;br /&gt;
&lt;br /&gt;
Note the cut tracks - the 2.5v and ST2 pins are re-purposed as the midpoint in the resistor bridges as they are not needed for tiny.  These become our connections for Rate and Temp to the tiny.&lt;br /&gt;
&lt;br /&gt;
[[Image:ModifiedSparkfunCdw.jpg|thumb|Modified ADXR Sparkfun breakout board]] &lt;br /&gt;
&lt;br /&gt;
[[User:Cdewagter|cdewagter]] 12:59, 25 January 2008 (CET)&lt;br /&gt;
&lt;br /&gt;
=== ADXRS613 with Twog v1 ===&lt;br /&gt;
An overview of how to use an ADXRS613 gyro for roll rates with a Twog v1 can be found at [[Gyroscopes/ADXRS613]].&lt;/div&gt;</summary>
		<author><name>Tim</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Gyroscopes/ADXRS613&amp;diff=6314</id>
		<title>Gyroscopes/ADXRS613</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Gyroscopes/ADXRS613&amp;diff=6314"/>
		<updated>2010-03-13T08:45:19Z</updated>

		<summary type="html">&lt;p&gt;Tim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the setup of the ADXRS613 150 deg/sec gyro (breakout board from [http://www.sparkfun.com/ SparkFun]) to measure roll rates with [[Twog v1]].&lt;br /&gt;
&lt;br /&gt;
''Note 1'': This configuration has not yet been tested in the air&amp;lt;br/&amp;gt;&lt;br /&gt;
''Note 2'': Some steps may have been inadvertently left out below&amp;lt;br/&amp;gt;&lt;br /&gt;
''Note 3'': The ADXRS613 is a 5V sensor while the PPZ MCU runs on 3.3V&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Physical Setup ===&lt;br /&gt;
Solder wires onto the 5V, GND, RATE, and TEMP holes. Put the other ends of the wires into the connector housing. (The connector will be connected to port ADC2 on the PPZ board.)&lt;br /&gt;
&lt;br /&gt;
Using port ADC2 and GND as pin 1:&amp;lt;br/&amp;gt;&lt;br /&gt;
PPZ pin 1 (GND)  -&amp;gt; gyro's GND&amp;lt;br/&amp;gt;&lt;br /&gt;
PPZ pin 2 (+5V)  -&amp;gt; gyro's 5V&amp;lt;br/&amp;gt;&lt;br /&gt;
PPZ pin 4 (ADC6) -&amp;gt; gyro's TEMP&amp;lt;br/&amp;gt;&lt;br /&gt;
PPZ pin 5 (ADC5) -&amp;gt; gyro's RATE&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
PPZ pin 3 (+3.3V) is left unconnected&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ADC5 is used for the gyro's RATE as the voltage divider on the Twog divides a +5V signal down to a +3.3V signal.&lt;br /&gt;
&lt;br /&gt;
The voltage divider connected to ADC6 on our board divides a +18V signal down to +3.3V so, at this time, we are not using the TEMP compensation. You may be able to use this ADC as-is with the TEMP signal but we have not yet tried. We plan on replacing this voltage divider with a +5V to +3.3V divider, as is found on ADC5.&lt;br /&gt;
&lt;br /&gt;
=== Software Setup ===&lt;br /&gt;
Now that the gyro board can be physically interfaced with the PPZ, the airframe file must be updated.&lt;br /&gt;
&lt;br /&gt;
==== Enable Gyro Code and ADCs ====&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Makefile portion of the airframe file to include the gyro code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ap.CFLAGS += -DGYRO -DADXRS150&lt;br /&gt;
ap.srcs   += gyro.c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enable ADC5 and ADC6 by placing the following on the proper line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-DUSE_ADC_5 -DUSE_ADC_6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our ADC section (with the &amp;quot;proper&amp;quot; line) looks like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ap.CFLAGS += -DADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2 -DUSE_ADC_5 -DUSE_ADC_6&lt;br /&gt;
ap.srcs   += $(SRC_ARCH)/adc_hw.c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Map ADCs to Gyro ====&lt;br /&gt;
&lt;br /&gt;
Add the following to the &amp;quot;adc&amp;quot; section in the airframe to map the ADCs and set the gyro sample buffer size:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;GYRO_ROLL&amp;quot;       value=&amp;quot;ADC_5&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;GYRO_NB_SAMPLES&amp;quot; value=&amp;quot;16&amp;quot;/&amp;gt; &lt;br /&gt;
&amp;lt;define name=&amp;quot;GYRO_TEMP&amp;quot;       value=&amp;quot;ADC_6&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Gyro ====&lt;br /&gt;
&lt;br /&gt;
Add the following new section to the airframe:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;GYRO&amp;quot; prefix=&amp;quot;GYRO_&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ADC_ROLL_NEUTRAL&amp;quot; value=&amp;quot;500&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ROLL_DIRECTION&amp;quot;   value=&amp;quot;1&amp;quot;/&amp;gt;   &amp;lt;!-- Set to -1 to reverse --&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ROLL_SCALE&amp;quot;       value=&amp;quot;0.3&amp;quot;/&amp;gt; &amp;lt;!-- +/- 150 degrees / (1023-NEUTRAL) or +/- 150 degrees / (NEUTRAL) if NEUTRAL &amp;lt; 512 --&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ADC_TEMP_NEUTRAL&amp;quot; value=&amp;quot;385&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ADC_TEMP_SLOPE&amp;quot;   value=&amp;quot;0&amp;quot;/&amp;gt;   &amp;lt;!-- Temp compensation not used --&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
ADC_ROLL_NEUTRAL - The ADC value of the RATE reading when the gyro is held still (read from the Messages window)&amp;lt;br/&amp;gt;&lt;br /&gt;
ROLL_DIRECTION   - Reverses the direction of a positive roll (right wing dipping should be positive). Should be either &amp;quot;1&amp;quot; or &amp;quot;-1&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
ROLL_SCALE       - Degrees/second per ADC count from neutral&amp;lt;br/&amp;gt;&lt;br /&gt;
ADC_TEMP_NEUTRAL - ADC value of TEMP at temperature the ADC_ROLL_NEUTRAL was determined&amp;lt;br/&amp;gt;&lt;br /&gt;
ADC_TEMP_SLOPE   - Volts of increased SCALE output voltage per TEMP ADC count from neutral (should be negative to offset positive temperature coefficient of output)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(The last two descriptions have not been tested and may not be completely correct.)&lt;br /&gt;
&lt;br /&gt;
===== ROLL_SCALE Calibration =====&lt;br /&gt;
Our calibration was fairly rough but the following is how we did it. The roll neutral value was measured at 500. Since the gyro is specified to be able to measure at least +/-150 deg/sec, we assumed 0 ADC count to be 150 deg/sec (and 1023 counts would be greater than 150 deg/sec as more ADC counts are on that side of neutral).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(150 deg/sec) / (500 counts) = 0.3 (deg/sec)/count&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The major assumptions with this calibration technique are:&lt;br /&gt;
# Either 0 or 1023 represents exactly 150 deg/sec, ignoring the sign of the rotational rate&lt;br /&gt;
# The +5V to +3.3V voltage divider is 100% accurate (i.e. a +5V signal fed into the divider will produce a +3.3V output, exactly)&lt;br /&gt;
This second assumption is easier to address (e.g. you can physically measure the voltage divider ratio and correct the ROLL_SCALE accordingly).&lt;br /&gt;
&lt;br /&gt;
For confirmation, the gyro was set to measure the yaw access angular rates (the plane was easier to spin in this configuration), the fuselage was placed in a chair, and the chair was spun at roughly 90 deg/sec. The output of the gyro was read from the Messages window and was confirmed to be close to 90 deg/sec. After this testing, the gyro was mounted in its final roll-axis position.&lt;br /&gt;
&lt;br /&gt;
==== Configure PPZ to Use Gyro ====&lt;br /&gt;
&lt;br /&gt;
To have the PPZ use the gyro data when computing the roll attitude estimator, the &amp;quot;HORIZONTAL CONTROL&amp;quot; section of the airframe must also be edited. Our inner roll parameters look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;!-- Inner roll loop parameters --&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;ROLL_ATTITUDE_GAIN&amp;quot; value=&amp;quot;-7500.&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;ROLL_RATE_GAIN&amp;quot;     value=&amp;quot;-1500&amp;quot;/&amp;gt;    &amp;lt;!-- Gyro --&amp;gt;&lt;br /&gt;
&amp;lt;!--&amp;lt;define name=&amp;quot;ROLL_PGAIN&amp;quot;     value=&amp;quot;8000.&amp;quot;/&amp;gt;--&amp;gt; &amp;lt;!-- Ignored when H_CTL_ROLL_ATTITUDE_GAIN is defined --&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As is mentioned in the last (commented) line, ROLL_PGAIN is ignored when using ROLL_ATTITUDE_GAIN. ROLL_RATE_GAIN is used only when ROLL_ATTITUDE_GAIN is defined. ROLL_ATTITUDE_GAIN is the proportional coefficient of the roll attitude loop; ROLL_RATE_GAIN is the derivative coefficient of the loop.&lt;/div&gt;</summary>
		<author><name>Tim</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Gyroscopes/ADXRS613&amp;diff=6313</id>
		<title>Gyroscopes/ADXRS613</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Gyroscopes/ADXRS613&amp;diff=6313"/>
		<updated>2010-03-13T08:41:41Z</updated>

		<summary type="html">&lt;p&gt;Tim: Clarified which gyro board is in use&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the setup of the ADXRS613 150 deg/sec gyro (breakout board from [http://www.sparkfun.com/ SparkFun]) to measure roll rates with Twog v1.&lt;br /&gt;
&lt;br /&gt;
''Note 1'': This configuration has not yet been tested in the air&amp;lt;br/&amp;gt;&lt;br /&gt;
''Note 2'': Some steps may have been inadvertently left out below&amp;lt;br/&amp;gt;&lt;br /&gt;
''Note 3'': The ADXRS613 is a 5V sensor while the PPZ MCU runs on 3.3V&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Physical Setup ===&lt;br /&gt;
Solder wires onto the 5V, GND, RATE, and TEMP holes. Put the other ends of the wires into the connector housing. (The connector will be connected to port ADC2 on the PPZ board.)&lt;br /&gt;
&lt;br /&gt;
Using port ADC2 and GND as pin 1:&amp;lt;br/&amp;gt;&lt;br /&gt;
PPZ pin 1 (GND)  -&amp;gt; gyro's GND&amp;lt;br/&amp;gt;&lt;br /&gt;
PPZ pin 2 (+5V)  -&amp;gt; gyro's 5V&amp;lt;br/&amp;gt;&lt;br /&gt;
PPZ pin 4 (ADC6) -&amp;gt; gyro's TEMP&amp;lt;br/&amp;gt;&lt;br /&gt;
PPZ pin 5 (ADC5) -&amp;gt; gyro's RATE&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
PPZ pin 3 (+3.3V) is left unconnected&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ADC5 is used for the gyro's RATE as the voltage divider on the Twog divides a +5V signal down to a +3.3V signal.&lt;br /&gt;
&lt;br /&gt;
The voltage divider connected to ADC6 on our board divides a +18V signal down to +3.3V so, at this time, we are not using the TEMP compensation. You may be able to use this ADC as-is with the TEMP signal but we have not yet tried. We plan on replacing this voltage divider with a +5V to +3.3V divider, as is found on ADC5.&lt;br /&gt;
&lt;br /&gt;
=== Software Setup ===&lt;br /&gt;
Now that the gyro board can be physically interfaced with the PPZ, the airframe file must be updated.&lt;br /&gt;
&lt;br /&gt;
==== Enable Gyro Code and ADCs ====&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Makefile portion of the airframe file to include the gyro code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ap.CFLAGS += -DGYRO -DADXRS150&lt;br /&gt;
ap.srcs   += gyro.c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enable ADC5 and ADC6 by placing the following on the proper line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-DUSE_ADC_5 -DUSE_ADC_6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our ADC section (with the &amp;quot;proper&amp;quot; line) looks like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ap.CFLAGS += -DADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2 -DUSE_ADC_5 -DUSE_ADC_6&lt;br /&gt;
ap.srcs   += $(SRC_ARCH)/adc_hw.c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Map ADCs to Gyro ====&lt;br /&gt;
&lt;br /&gt;
Add the following to the &amp;quot;adc&amp;quot; section in the airframe to map the ADCs and set the gyro sample buffer size:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;GYRO_ROLL&amp;quot;       value=&amp;quot;ADC_5&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;GYRO_NB_SAMPLES&amp;quot; value=&amp;quot;16&amp;quot;/&amp;gt; &lt;br /&gt;
&amp;lt;define name=&amp;quot;GYRO_TEMP&amp;quot;       value=&amp;quot;ADC_6&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Gyro ====&lt;br /&gt;
&lt;br /&gt;
Add the following new section to the airframe:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;GYRO&amp;quot; prefix=&amp;quot;GYRO_&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ADC_ROLL_NEUTRAL&amp;quot; value=&amp;quot;500&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ROLL_DIRECTION&amp;quot;   value=&amp;quot;1&amp;quot;/&amp;gt;   &amp;lt;!-- Set to -1 to reverse --&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ROLL_SCALE&amp;quot;       value=&amp;quot;0.3&amp;quot;/&amp;gt; &amp;lt;!-- +/- 150 degrees / (1023-NEUTRAL) or +/- 150 degrees / (NEUTRAL) if NEUTRAL &amp;lt; 512 --&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ADC_TEMP_NEUTRAL&amp;quot; value=&amp;quot;385&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ADC_TEMP_SLOPE&amp;quot;   value=&amp;quot;0&amp;quot;/&amp;gt;   &amp;lt;!-- Temp compensation not used --&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
ADC_ROLL_NEUTRAL - The ADC value of the RATE reading when the gyro is held still (read from the Messages window)&amp;lt;br/&amp;gt;&lt;br /&gt;
ROLL_DIRECTION   - Reverses the direction of a positive roll (right wing dipping should be positive). Should be either &amp;quot;1&amp;quot; or &amp;quot;-1&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
ROLL_SCALE       - Degrees/second per ADC count from neutral&amp;lt;br/&amp;gt;&lt;br /&gt;
ADC_TEMP_NEUTRAL - ADC value of TEMP at temperature the ADC_ROLL_NEUTRAL was determined&amp;lt;br/&amp;gt;&lt;br /&gt;
ADC_TEMP_SLOPE   - Volts of increased SCALE output voltage per TEMP ADC count from neutral (should be negative to offset positive temperature coefficient of output)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(The last two descriptions have not been tested and may not be completely correct.)&lt;br /&gt;
&lt;br /&gt;
===== ROLL_SCALE Calibration =====&lt;br /&gt;
Our calibration was fairly rough but the following is how we did it. The roll neutral value was measured at 500. Since the gyro is specified to be able to measure at least +/-150 deg/sec, we assumed 0 ADC count to be 150 deg/sec (and 1023 counts would be greater than 150 deg/sec as more ADC counts are on that side of neutral).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(150 deg/sec) / (500 counts) = 0.3 (deg/sec)/count&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The major assumptions with this calibration technique are:&lt;br /&gt;
# Either 0 or 1023 represents exactly 150 deg/sec, ignoring the sign of the rotational rate&lt;br /&gt;
# The +5V to +3.3V voltage divider is 100% accurate (i.e. a +5V signal fed into the divider will produce a +3.3V output, exactly)&lt;br /&gt;
This second assumption is easier to address (e.g. you can physically measure the voltage divider ratio and correct the ROLL_SCALE accordingly).&lt;br /&gt;
&lt;br /&gt;
For confirmation, the gyro was set to measure the yaw access angular rates (the plane was easier to spin in this configuration), the fuselage was placed in a chair, and the chair was spun at roughly 90 deg/sec. The output of the gyro was read from the Messages window and was confirmed to be close to 90 deg/sec. After this testing, the gyro was mounted in its final roll-axis position.&lt;br /&gt;
&lt;br /&gt;
==== Configure PPZ to Use Gyro ====&lt;br /&gt;
&lt;br /&gt;
To have the PPZ use the gyro data when computing the roll attitude estimator, the &amp;quot;HORIZONTAL CONTROL&amp;quot; section of the airframe must also be edited. Our inner roll parameters look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;!-- Inner roll loop parameters --&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;ROLL_ATTITUDE_GAIN&amp;quot; value=&amp;quot;-7500.&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;ROLL_RATE_GAIN&amp;quot;     value=&amp;quot;-1500&amp;quot;/&amp;gt;    &amp;lt;!-- Gyro --&amp;gt;&lt;br /&gt;
&amp;lt;!--&amp;lt;define name=&amp;quot;ROLL_PGAIN&amp;quot;     value=&amp;quot;8000.&amp;quot;/&amp;gt;--&amp;gt; &amp;lt;!-- Ignored when H_CTL_ROLL_ATTITUDE_GAIN is defined --&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As is mentioned in the last (commented) line, ROLL_PGAIN is ignored when using ROLL_ATTITUDE_GAIN. ROLL_RATE_GAIN is used only when ROLL_ATTITUDE_GAIN is defined. ROLL_ATTITUDE_GAIN is the proportional coefficient of the roll attitude loop; ROLL_RATE_GAIN is the derivative coefficient of the loop.&lt;/div&gt;</summary>
		<author><name>Tim</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Gyroscopes/ADXRS613&amp;diff=6312</id>
		<title>Gyroscopes/ADXRS613</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Gyroscopes/ADXRS613&amp;diff=6312"/>
		<updated>2010-03-13T08:27:47Z</updated>

		<summary type="html">&lt;p&gt;Tim: Formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the setup of the ADXRS613 150 deg/sec gyro to measure roll rates with Twog v1.&lt;br /&gt;
&lt;br /&gt;
''Note 1'': This configuration has not yet been tested in the air&amp;lt;br/&amp;gt;&lt;br /&gt;
''Note 2'': Some steps may have been inadvertently left out below&amp;lt;br/&amp;gt;&lt;br /&gt;
''Note 3'': The ADXRS613 is a 5V sensor while the PPZ MCU runs on 3.3V&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Physical Setup ===&lt;br /&gt;
Solder wires onto the 5V, GND, RATE, and TEMP holes. Put the other ends of the wires into the connector housing. (The connector will be connected to port ADC2 on the PPZ board.)&lt;br /&gt;
&lt;br /&gt;
Using port ADC2 and GND as pin 1:&amp;lt;br/&amp;gt;&lt;br /&gt;
PPZ pin 1 (GND)  -&amp;gt; gyro's GND&amp;lt;br/&amp;gt;&lt;br /&gt;
PPZ pin 2 (+5V)  -&amp;gt; gyro's 5V&amp;lt;br/&amp;gt;&lt;br /&gt;
PPZ pin 4 (ADC6) -&amp;gt; gyro's TEMP&amp;lt;br/&amp;gt;&lt;br /&gt;
PPZ pin 5 (ADC5) -&amp;gt; gyro's RATE&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
PPZ pin 3 (+3.3V) is left unconnected&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ADC5 is used for the gyro's RATE as the voltage divider on the Twog divides a +5V signal down to a +3.3V signal.&lt;br /&gt;
&lt;br /&gt;
The voltage divider connected to ADC6 on our board divides a +18V signal down to +3.3V so, at this time, we are not using the TEMP compensation. You may be able to use this ADC as-is with the TEMP signal but we have not yet tried. We plan on replacing this voltage divider with a +5V to +3.3V divider, as is found on ADC5.&lt;br /&gt;
&lt;br /&gt;
=== Software Setup ===&lt;br /&gt;
Now that the gyro board can be physically interfaced with the PPZ, the airframe file must be updated.&lt;br /&gt;
&lt;br /&gt;
==== Enable Gyro Code and ADCs ====&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Makefile portion of the airframe file to include the gyro code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ap.CFLAGS += -DGYRO -DADXRS150&lt;br /&gt;
ap.srcs   += gyro.c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enable ADC5 and ADC6 by placing the following on the proper line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-DUSE_ADC_5 -DUSE_ADC_6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our ADC section (with the &amp;quot;proper&amp;quot; line) looks like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ap.CFLAGS += -DADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2 -DUSE_ADC_5 -DUSE_ADC_6&lt;br /&gt;
ap.srcs   += $(SRC_ARCH)/adc_hw.c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Map ADCs to Gyro ====&lt;br /&gt;
&lt;br /&gt;
Add the following to the &amp;quot;adc&amp;quot; section in the airframe to map the ADCs and set the gyro sample buffer size:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;GYRO_ROLL&amp;quot;       value=&amp;quot;ADC_5&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;GYRO_NB_SAMPLES&amp;quot; value=&amp;quot;16&amp;quot;/&amp;gt; &lt;br /&gt;
&amp;lt;define name=&amp;quot;GYRO_TEMP&amp;quot;       value=&amp;quot;ADC_6&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Gyro ====&lt;br /&gt;
&lt;br /&gt;
Add the following new section to the airframe:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;GYRO&amp;quot; prefix=&amp;quot;GYRO_&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ADC_ROLL_NEUTRAL&amp;quot; value=&amp;quot;500&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ROLL_DIRECTION&amp;quot;   value=&amp;quot;1&amp;quot;/&amp;gt;   &amp;lt;!-- Set to -1 to reverse --&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ROLL_SCALE&amp;quot;       value=&amp;quot;0.3&amp;quot;/&amp;gt; &amp;lt;!-- +/- 150 degrees / (1023-NEUTRAL) or +/- 150 degrees / (NEUTRAL) if NEUTRAL &amp;lt; 512 --&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ADC_TEMP_NEUTRAL&amp;quot; value=&amp;quot;385&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ADC_TEMP_SLOPE&amp;quot;   value=&amp;quot;0&amp;quot;/&amp;gt;   &amp;lt;!-- Temp compensation not used --&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
ADC_ROLL_NEUTRAL - The ADC value of the RATE reading when the gyro is held still (read from the Messages window)&amp;lt;br/&amp;gt;&lt;br /&gt;
ROLL_DIRECTION   - Reverses the direction of a positive roll (right wing dipping should be positive). Should be either &amp;quot;1&amp;quot; or &amp;quot;-1&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
ROLL_SCALE       - Degrees/second per ADC count from neutral&amp;lt;br/&amp;gt;&lt;br /&gt;
ADC_TEMP_NEUTRAL - ADC value of TEMP at temperature the ADC_ROLL_NEUTRAL was determined&amp;lt;br/&amp;gt;&lt;br /&gt;
ADC_TEMP_SLOPE   - Volts of increased SCALE output voltage per TEMP ADC count from neutral (should be negative to offset positive temperature coefficient of output)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(The last two descriptions have not been tested and may not be completely correct.)&lt;br /&gt;
&lt;br /&gt;
===== ROLL_SCALE Calibration =====&lt;br /&gt;
Our calibration was fairly rough but the following is how we did it. The roll neutral value was measured at 500. Since the gyro is specified to be able to measure at least +/-150 deg/sec, we assumed 0 ADC count to be 150 deg/sec (and 1023 counts would be greater than 150 deg/sec as more ADC counts are on that side of neutral).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(150 deg/sec) / (500 counts) = 0.3 (deg/sec)/count&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The major assumptions with this calibration technique are:&lt;br /&gt;
# Either 0 or 1023 represents exactly 150 deg/sec, ignoring the sign of the rotational rate&lt;br /&gt;
# The +5V to +3.3V voltage divider is 100% accurate (i.e. a +5V signal fed into the divider will produce a +3.3V output, exactly)&lt;br /&gt;
This second assumption is easier to address (e.g. you can physically measure the voltage divider ratio and correct the ROLL_SCALE accordingly).&lt;br /&gt;
&lt;br /&gt;
For confirmation, the gyro was set to measure the yaw access angular rates (the plane was easier to spin in this configuration), the fuselage was placed in a chair, and the chair was spun at roughly 90 deg/sec. The output of the gyro was read from the Messages window and was confirmed to be close to 90 deg/sec. After this testing, the gyro was mounted in its final roll-axis position.&lt;br /&gt;
&lt;br /&gt;
==== Configure PPZ to Use Gyro ====&lt;br /&gt;
&lt;br /&gt;
To have the PPZ use the gyro data when computing the roll attitude estimator, the &amp;quot;HORIZONTAL CONTROL&amp;quot; section of the airframe must also be edited. Our inner roll parameters look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;!-- Inner roll loop parameters --&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;ROLL_ATTITUDE_GAIN&amp;quot; value=&amp;quot;-7500.&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;ROLL_RATE_GAIN&amp;quot;     value=&amp;quot;-1500&amp;quot;/&amp;gt;    &amp;lt;!-- Gyro --&amp;gt;&lt;br /&gt;
&amp;lt;!--&amp;lt;define name=&amp;quot;ROLL_PGAIN&amp;quot;     value=&amp;quot;8000.&amp;quot;/&amp;gt;--&amp;gt; &amp;lt;!-- Ignored when H_CTL_ROLL_ATTITUDE_GAIN is defined --&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As is mentioned in the last (commented) line, ROLL_PGAIN is ignored when using ROLL_ATTITUDE_GAIN. ROLL_RATE_GAIN is used only when ROLL_ATTITUDE_GAIN is defined. ROLL_ATTITUDE_GAIN is the proportional coefficient of the roll attitude loop; ROLL_RATE_GAIN is the derivative coefficient of the loop.&lt;/div&gt;</summary>
		<author><name>Tim</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Gyroscopes/ADXRS613&amp;diff=6311</id>
		<title>Gyroscopes/ADXRS613</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Gyroscopes/ADXRS613&amp;diff=6311"/>
		<updated>2010-03-13T08:23:08Z</updated>

		<summary type="html">&lt;p&gt;Tim: Created page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Setup of ADXRS613 150 deg/sec gyro to measure roll rates with Twog v1 =&lt;br /&gt;
&lt;br /&gt;
''Note 1'': This configuration has not yet been tested in the air&amp;lt;br/&amp;gt;&lt;br /&gt;
''Note 2'': Some steps may have been inadvertently left out below&amp;lt;br/&amp;gt;&lt;br /&gt;
''Note 3'': The ADXRS613 is a 5V sensor while the PPZ MCU runs on 3.3V&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Physical Setup ==&lt;br /&gt;
Solder wires onto the 5V, GND, RATE, and TEMP holes. Put the other ends of the wires into the connector housing. (The connector will be connected to port ADC2 on the PPZ board.)&lt;br /&gt;
&lt;br /&gt;
Using port ADC2 and GND as pin 1:&amp;lt;br/&amp;gt;&lt;br /&gt;
PPZ pin 1 (GND)  -&amp;gt; gyro's GND&amp;lt;br/&amp;gt;&lt;br /&gt;
PPZ pin 2 (+5V)  -&amp;gt; gyro's 5V&amp;lt;br/&amp;gt;&lt;br /&gt;
PPZ pin 4 (ADC6) -&amp;gt; gyro's TEMP&amp;lt;br/&amp;gt;&lt;br /&gt;
PPZ pin 5 (ADC5) -&amp;gt; gyro's RATE&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
PPZ pin 3 (+3.3V) is left unconnected&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ADC5 is used for the gyro's RATE as the voltage divider on the Twog divides a +5V signal down to a +3.3V signal.&lt;br /&gt;
&lt;br /&gt;
The voltage divider connected to ADC6 on our board divides a +18V signal down to +3.3V so, at this time, we are not using the TEMP compensation. You may be able to use this ADC as-is with the TEMP signal but we have not yet tried. We plan on replacing this voltage divider with a +5V to +3.3V divider, as is found on ADC5.&lt;br /&gt;
&lt;br /&gt;
== Software Setup ==&lt;br /&gt;
Now that the gyro board can be physically interfaced with the PPZ, the airframe file must be updated.&lt;br /&gt;
&lt;br /&gt;
=== Enable Gyro Code and ADCs ===&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Makefile portion of the airframe file to include the gyro code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ap.CFLAGS += -DGYRO -DADXRS150&lt;br /&gt;
ap.srcs   += gyro.c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enable ADC5 and ADC6 by placing the following on the proper line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-DUSE_ADC_5 -DUSE_ADC_6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our ADC section (with the &amp;quot;proper&amp;quot; line) looks like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ap.CFLAGS += -DADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2 -DUSE_ADC_5 -DUSE_ADC_6&lt;br /&gt;
ap.srcs   += $(SRC_ARCH)/adc_hw.c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Map ADCs to Gyro ===&lt;br /&gt;
&lt;br /&gt;
Add the following to the &amp;quot;adc&amp;quot; section in the airframe to map the ADCs and set the gyro sample buffer size:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;GYRO_ROLL&amp;quot;       value=&amp;quot;ADC_5&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;GYRO_NB_SAMPLES&amp;quot; value=&amp;quot;16&amp;quot;/&amp;gt; &lt;br /&gt;
&amp;lt;define name=&amp;quot;GYRO_TEMP&amp;quot;       value=&amp;quot;ADC_6&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure Gyro ===&lt;br /&gt;
&lt;br /&gt;
Add the following new section to the airframe:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;GYRO&amp;quot; prefix=&amp;quot;GYRO_&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ADC_ROLL_NEUTRAL&amp;quot; value=&amp;quot;500&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ROLL_DIRECTION&amp;quot;   value=&amp;quot;1&amp;quot;/&amp;gt;   &amp;lt;!-- Set to -1 to reverse --&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ROLL_SCALE&amp;quot;       value=&amp;quot;0.3&amp;quot;/&amp;gt; &amp;lt;!-- +/- 150 degrees / (1023-NEUTRAL) or +/- 150 degrees / (NEUTRAL) if NEUTRAL &amp;lt; 512 --&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ADC_TEMP_NEUTRAL&amp;quot; value=&amp;quot;385&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ADC_TEMP_SLOPE&amp;quot;   value=&amp;quot;0&amp;quot;/&amp;gt;   &amp;lt;!-- Temp compensation not used --&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
ADC_ROLL_NEUTRAL - The ADC value of the RATE reading when the gyro is held still (read from the Messages window)&amp;lt;br/&amp;gt;&lt;br /&gt;
ROLL_DIRECTION   - Reverses the direction of a positive roll (right wing dipping should be positive). Should be either &amp;quot;1&amp;quot; or &amp;quot;-1&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
ROLL_SCALE       - Degrees/second per ADC count from neutral&amp;lt;br/&amp;gt;&lt;br /&gt;
ADC_TEMP_NEUTRAL - ADC value of TEMP at temperature the ADC_ROLL_NEUTRAL was determined&amp;lt;br/&amp;gt;&lt;br /&gt;
ADC_TEMP_SLOPE   - Volts of increased SCALE output voltage per TEMP ADC count from neutral (should be negative to offset positive temperature coefficient of output)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(The last two descriptions have not been tested and may not be completely correct.)&lt;br /&gt;
&lt;br /&gt;
==== ROLL_SCALE Calibration ====&lt;br /&gt;
Our calibration was fairly rough but the following is how we did it. The roll neutral value was measured at 500. Since the gyro is specified to be able to measure at least +/-150 deg/sec, we assumed 0 ADC count to be 150 deg/sec (and 1023 counts would be greater than 150 deg/sec as more ADC counts are on that side of neutral).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(150 deg/sec) / (500 counts) = 0.3 (deg/sec)/count&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The major assumptions with this calibration technique are:&lt;br /&gt;
# Either 0 or 1023 represents exactly 150 deg/sec, ignoring the sign of the rotational rate&lt;br /&gt;
# The +5V to +3.3V voltage divider is 100% accurate (i.e. a +5V signal fed into the divider will produce a +3.3V output, exactly)&lt;br /&gt;
This second assumption is easier to address (e.g. you can physically measure the voltage divider ratio and correct the ROLL_SCALE accordingly).&lt;br /&gt;
&lt;br /&gt;
For confirmation, the gyro was set to measure the yaw access angular rates (the plane was easier to spin in this configuration), the fuselage was placed in a chair, and the chair was spun at roughly 90 deg/sec. The output of the gyro was read from the Messages window and was confirmed to be close to 90 deg/sec. After this testing, the gyro was mounted in its final roll-axis position.&lt;br /&gt;
&lt;br /&gt;
=== Configure PPZ to Use Gyro ===&lt;br /&gt;
&lt;br /&gt;
To have the PPZ use the gyro data when computing the roll attitude estimator, the &amp;quot;HORIZONTAL CONTROL&amp;quot; section of the airframe must also be edited. Our inner roll parameters look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;!-- Inner roll loop parameters --&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;ROLL_ATTITUDE_GAIN&amp;quot; value=&amp;quot;-7500.&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;ROLL_RATE_GAIN&amp;quot;     value=&amp;quot;-1500&amp;quot;/&amp;gt;    &amp;lt;!-- Gyro --&amp;gt;&lt;br /&gt;
&amp;lt;!--&amp;lt;define name=&amp;quot;ROLL_PGAIN&amp;quot;     value=&amp;quot;8000.&amp;quot;/&amp;gt;--&amp;gt; &amp;lt;!-- Ignored when H_CTL_ROLL_ATTITUDE_GAIN is defined --&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As is mentioned in the last (commented) line, ROLL_PGAIN is ignored when using ROLL_ATTITUDE_GAIN. ROLL_RATE_GAIN is used only when ROLL_ATTITUDE_GAIN is defined. ROLL_ATTITUDE_GAIN is the proportional coefficient of the roll attitude loop; ROLL_RATE_GAIN is the derivative coefficient of the loop.&lt;/div&gt;</summary>
		<author><name>Tim</name></author>
	</entry>
</feed>