http://wiki.paparazziuav.org/w/api.php?action=feedcontributions&user=Markgriffin&feedformat=atomPaparazziUAV - User contributions [en]2024-03-29T04:41:58ZUser contributionsMediaWiki 1.37.1http://wiki.paparazziuav.org/w/index.php?title=ArduIMU&diff=9039ArduIMU2011-03-10T13:19:35Z<p>Markgriffin: /* Airframe Adjustments */</p>
<hr />
<div>[[Image:Tiny13wIMU_001.jpg|thumb|right|Tiny13 w/IMU]]<br />
[[Image:Ppzfunjetaimu01.jpg|thumb|right|TWOG w/IMU]]<br />
This page describes how to integrate an [http://code.google.com/p/ardu-imu/wiki/HomePage?tm=6 ArduIMU+ V2 (flat)] into an existing Airframe/Paparazzi-Code.<br />
#The ArduIMU communicates over i2c with the Paparazzi-AP. The wiring is pretty easy to do. Connect SDA, SCL, ground and supply the IMU with 5V. Do not connect 3.3V from the Paparazzi-AP to the ArduIMU as it internally generates it's own stable 3.3v supply.<br />
#Integration into the Paparazzi software is realized as a module. This is an easy way to connect and test the software. <br />
#This description shows how to use the ArduIMU without a separate GPS-Receiver and without a Compass/Magnetometer. The GPS-Data is sent by the Paparazzi-AP over i2c to the ArduIMU.<br />
#There is an other airframe/main-AP we wrote which uses a magnetometer for yaw-drift compensation. We haven't written an installation guide for this configuration yet. But we will try to do this as soon as possible. <br />
<br />
The Code has been integrated into the Paparazzi build system. <br />
<br />
<br />
== Airframe Adjustments ==<br />
<br />
First, remove the infrared configuration and substitute the IMU configuration (which uses I2C) as follows :<br />
<br />
In your airframe file (found usually in conf/airframes with a name like "MyAirframe.xml")<br />
<br />
* (1) '''Insert''' the software module :<br />
<modules><br />
<load name="ins_arduimu.xml"/><br />
</modules><br />
<br />
* (2) Activate the "i2c" subsystem / peripheral, increase i2c queue length to 16, and reduce i2c clock speed:<br />
<target name="ap" board="..."><br />
...<br />
<define name="USE_I2C0"/><br />
</target><br />
<subsystem name="i2c"><br />
<define name="I2C_TRANSACTION_QUEUE_LEN" value="16"/> <!-- default is 8 --><br />
<define name="I2C0_SCLL" value="400"/> <!-- default clock speed 37.5KHz with our 15MHz PCLK I2C0_CLOCK=PCLK/(I2C0_SCLL+I2C0_SCLH) --><br />
<define name="I2C0_SCLH" value="400"/> <!-- Default values are 200 and must be the same for both SCLL and SCLH --><br />
</subsystem><br />
<br />
* (3) '''Insert''' INS neutrals:<br />
<br />
<section name="INS" prefix="INS_"><br />
<define name="ROLL_NEUTRAL_DEFAULT" value="0" unit="deg"/><br />
<define name="PITCH_NEUTRAL_DEFAULT" value="0" unit="deg"/><br />
</section><br />
<br />
* (4) '''Remove''' the infrared estimation :<br />
<br />
remove the line that looks like the following:<br />
<subsystem name="attitude" type="infrared"/><br />
<br />
TODO: link to sample working airframe in git<br />
<br />
'''NOTE:''' Martin Mueller has committed some ArduIMU changes to<br />
https://github.com/martinmm/paparazzi for review.<br />
<br />
It is based on ArduIMU v1.7 and fixes the main issue which was printing serial data while in I2C interrupt, also includes Steve Joyce's fixes. <br />
<br />
Additional features are running at 60Hz, having the possibility to use the Paparazzi ROLL_RATE loop and transferring the gps data as it is received rather than at a constant, non synchronized rate. The v1.7 uses gps 3D speed for centrifugal correction whereas the v1.8.2 uses 2D speed. <br />
<br />
Bill Premerlani's paper is a little vague on that but it is thought that 3D should be more precise when climbing/descending. Maybe 2D is used as simple gps receivers don't have 3D speed?<br />
<br />
An example airframe file is at /conf/airframes/mm/fixed-wing/fw_ins_arduimu.xml It controlled a Funjet in 55m circles climbing 6m/s nicely.<br />
<br />
== Aircraft Settings ==<br />
<br />
* (5) Use this '''Settings''' file: settings/tuning_basic_ins.xml<br />
<br />
== Magnetometer (Ignore for now) ==<br />
TODO: post Magnetometer integration guide<br />
<br />
== Flash the ArduIMU ==<br />
<br />
(6) Programming the ArduIMU for use with the Tiny includes using : <br />
# Adapted software in '''sw/airborne/firmwares/non_ap/arduimu_Firmware_WithGps'''. <br />
# Standard USB FTDI cable plugged into the header that comes with the arduimu (Match the wire colors with those written on the arduimu silkscreen GRN=Green BLK=Black)<br />
<br />
Steps:<br />
<br />
*Plug in USB FTDI Cable to PC and ArduIMU (this also provides power)<br />
<br />
*On ubuntu 10.10 installation of the arduino software is as simple as :<br />
$ sudo apt-get install arduino<br />
<br />
*Now launch the arduino IDE :<br />
$ arduino<br />
[[Image:arduino_open_sketch.png|thumb]]<br />
(TODO: Using the graphical interface is probably not necessary as the flashing seems to use avrdude command line utility)<br />
<br />
* open project/sketch (File->open , point to paparazzi/sw/airborne/firmwares/non_ap/arduimu_Firmware_WithGps/arduimu/arduime.pde)<br />
<br />
* clicking "verify" button compiles<br />
<br />
* clicking "upload" button flashes (may need to select your com port in menu Tools->Serial Port)<br />
<br />
For more information concerning flashing of the ArduIMU, read: http://code.google.com/p/ardu-imu/wiki/Code<br />
<br />
Do we still need this or is everything in git now?<br />
You can find the original ZHAW code [https://home.zhaw.ch/~schmiemi/Arduimu4Paprazzi.rar here].<br />
<br />
== Install and test the ArduIMU ==<br />
<br />
* The current firmware does not implement a full rotation matrix calculation and instead assumes that the arduimu's "x" axis is aligned with the fuselage. When installing the device in your aircraft be sure to respect this constraint.<br />
<br />
* Clean and build your aircraft target in paparazzi center and flash your Tiny as usual<br />
<br />
* With your GCS session running, you should see attitudes messages including the new messages "xxx" and " xxx" <br />
[[Image:arduimu_gcs_messages.png|thumb]]<br />
<br />
== Hardware Considerations ==<br />
<br />
So far, this setup has been successfully flown in the Maja and EasyStar aircraft. For faster more agile aircraft such as the Merlin or Funjet, the polling rate needs to be changed from 15 Hz to 50 Hz in the '''/conf/modules/ins_arduimu.xml''' file.<br />
<br />
<periodic fun="ArduIMU_periodic()" freq="50" autorun="TRUE"/> <br />
<periodic fun="ArduIMU_periodicGPS()" freq="4" autorun="TRUE"/> <br />
<br />
The ArduIMU is sensitive to vibrations. Mount it on a thick piece of foam to dampen the vibrations.<br />
<br />
<br />
Have Fun !<br />
<br />
== Analysis and Results ==<br />
<br />
TODO: Compare IR and arduimu estimations for various flight conditions<br />
TODO: Fuse the two estimates together for robustness?<br />
<br />
Please Post Results Here... Issues?<br />
<br />
[[Category:Hardware]] [[Category:Software]] [[Category:User_Documentation]]</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=ArduIMU&diff=9015ArduIMU2011-03-10T10:01:20Z<p>Markgriffin: /* Airframe Adjustments */</p>
<hr />
<div>[[Image:Tiny13wIMU_001.jpg|thumb|right|Tiny13 w/IMU]]<br />
[[Image:Ppzfunjetaimu01.jpg|thumb|right|TWOG w/IMU]]<br />
This page describes how to integrate an [http://code.google.com/p/ardu-imu/wiki/HomePage?tm=6 ArduIMU+ V2 (flat)] into an existing Airframe/Paparazzi-Code.<br />
#The ArduIMU communicates over i2c with the Paparazzi-AP. The wiring is pretty easy to do. Connect SDA, SCL, ground and supply the IMU with 5V. Do not connect 3.3V from the Paparazzi-AP to the ArduIMU as it internally generates it's own stable 3.3v supply.<br />
#Integration into the Paparazzi software is realized as a module. This is an easy way to connect and test the software. <br />
#This description shows how to use the ArduIMU without a separate GPS-Receiver and without a Compass/Magnetometer. The GPS-Data is sent by the Paparazzi-AP over i2c to the ArduIMU.<br />
#There is an other airframe/main-AP we wrote which uses a magnetometer for yaw-drift compensation. We haven't written an installation guide for this configuration yet. But we will try to do this as soon as possible. <br />
<br />
The Code has been integrated into the Paparazzi build system. <br />
<br />
<br />
== Airframe Adjustments ==<br />
<br />
First, remove the infrared configuration and substitute the IMU configuration (which uses I2C) as follows :<br />
<br />
In your airframe file (found usually in conf/airframes with a name like "MyAirframe.xml")<br />
<br />
* (1) '''Insert''' the software module :<br />
<modules><br />
<load name="ins_arduimu.xml"/><br />
</modules><br />
<br />
* (2) Activate the "i2c" subsystem / peripheral, increase i2c queue length to 16, and reduce i2c clock speed:<br />
<target name="ap" board="..."><br />
...<br />
<define name="USE_I2C0"/><br />
</target><br />
<subsystem name="i2c"><br />
<define name="I2C_TRANSACTION_QUEUE_LEN" value="16"/> <!-- default is 8 --><br />
<define name="I2C0_SCLL" value="400"/> <!-- default clock speed 37.5KHz with our 15MHz PCLK I2C0_CLOCK=PCLK/(I2C0_SCLL+I2C0_SCLH) --><br />
<define name="I2C0_SCLH" value="400"/> <!-- Default values are 200 and must be the same for both SCLL and SCLH --><br />
</subsystem><br />
<br />
* (3) '''Insert''' INS neutrals:<br />
<br />
<section name="INS" prefix="INS_"><br />
<define name="ROLL_NEUTRAL_DEFAULT" value="0" unit="deg"/><br />
<define name="PITCH_NEUTRAL_DEFAULT" value="0" unit="deg"/><br />
</section><br />
<br />
* (4) '''Remove''' the infrared estimation :<br />
<br />
remove the line that looks like the following:<br />
<subsystem name="attitude" type="infrared"/><br />
<br />
TODO: link to sample working airframe in git<br />
<br />
NOTE: Martin Mueller has committed some ArduIMU changes to<br />
https://github.com/martinmm/paparazzi for review.<br />
<br />
It is based on ArduIMU v1.7 and fixes the main issue which was printing serial data while in I2C interrupt, also includes Steve Joyce's fixes. <br />
Additional features are running at 60Hz, having the possibility to use the Paparazzi ROLL_RATE loop and transferring the gps data as it is received rather than at a constant, non synchronized rate. The v1.7 uses gps 3D speed for centrifugal correction whereas the v1.8.2 uses 2D speed. Premerlanis paper is a little vague on that but I would think that 3D should be more precise when climbing/descending. Maybe 2D is used as simple gps receivers don't have 3D speed?<br />
<br />
An example airframe file is at mm/fixed-wing/fw_ins_arduimu.xml It controlled a Funjet in 55m circles climbing 6m/s nicely.<br />
<br />
== Aircraft Settings ==<br />
<br />
* (5) Use this '''Settings''' file: settings/tuning_basic_ins.xml<br />
<br />
== Magnetometer (Ignore for now) ==<br />
TODO: post Magnetometer integration guide<br />
<br />
== Flash the ArduIMU ==<br />
<br />
(6) Programming the ArduIMU for use with the Tiny includes using : <br />
# Adapted software in '''sw/airborne/firmwares/non_ap/arduimu_Firmware_WithGps'''. <br />
# Standard USB FTDI cable plugged into the header that comes with the arduimu (Match the wire colors with those written on the arduimu silkscreen GRN=Green BLK=Black)<br />
<br />
Steps:<br />
<br />
*Plug in USB FTDI Cable to PC and ArduIMU (this also provides power)<br />
<br />
*On ubuntu 10.10 installation of the arduino software is as simple as :<br />
$ sudo apt-get install arduino<br />
<br />
*Now launch the arduino IDE :<br />
$ arduino<br />
[[Image:arduino_open_sketch.png|thumb]]<br />
(TODO: Using the graphical interface is probably not necessary as the flashing seems to use avrdude command line utility)<br />
<br />
* open project/sketch (File->open , point to paparazzi/sw/airborne/firmwares/non_ap/arduimu_Firmware_WithGps/arduimu/arduime.pde)<br />
<br />
* clicking "verify" button compiles<br />
<br />
* clicking "upload" button flashes (may need to select your com port in menu Tools->Serial Port)<br />
<br />
For more information concerning flashing of the ArduIMU, read: http://code.google.com/p/ardu-imu/wiki/Code<br />
<br />
Do we still need this or is everything in git now?<br />
You can find the original ZHAW code [https://home.zhaw.ch/~schmiemi/Arduimu4Paprazzi.rar here].<br />
<br />
== Install and test the ArduIMU ==<br />
<br />
* The current firmware does not implement a full rotation matrix calculation and instead assumes that the arduimu's "x" axis is aligned with the fuselage. When installing the device in your aircraft be sure to respect this constraint.<br />
<br />
* Clean and build your aircraft target in paparazzi center and flash your Tiny as usual<br />
<br />
* With your GCS session running, you should see attitudes messages including the new messages "xxx" and " xxx" <br />
[[Image:arduimu_gcs_messages.png|thumb]]<br />
<br />
== Hardware Considerations ==<br />
<br />
So far, this setup has been successfully flown in the Maja and EasyStar aircraft. For faster more agile aircraft such as the Merlin or Funjet, the polling rate needs to be changed from 15 Hz to 50 Hz in the '''/conf/modules/ins_arduimu.xml''' file.<br />
<br />
<periodic fun="ArduIMU_periodic()" freq="50" autorun="TRUE"/> <br />
<periodic fun="ArduIMU_periodicGPS()" freq="4" autorun="TRUE"/> <br />
<br />
The ArduIMU is sensitive to vibrations. Mount it on a thick piece of foam to dampen the vibrations.<br />
<br />
<br />
Have Fun !<br />
<br />
== Analysis and Results ==<br />
<br />
TODO: Compare IR and arduimu estimations for various flight conditions<br />
TODO: Fuse the two estimates together for robustness?<br />
<br />
Please Post Results Here... Issues?<br />
<br />
[[Category:Hardware]] [[Category:Software]] [[Category:User_Documentation]]</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=ArduIMU&diff=8735ArduIMU2011-02-18T12:09:14Z<p>Markgriffin: /* Hardware Considerations */</p>
<hr />
<div>[[Image:Tiny13wIMU_001.jpg|thumb|right|Tiny13 w/IMU]]<br />
[[Image:Ppzfunjetaimu01.jpg|thumb|right|TWOG w/IMU]]<br />
This page describes how to integrate an [http://code.google.com/p/ardu-imu/wiki/HomePage?tm=6 ArduIMU+ V2 (flat)] into an existing Airframe/Paparazzi-Code.<br />
#The ArduIMU communicates over i2c with the Paparazzi-AP. The wiring is pretty easy to do. Connect SDA, SCL, ground and supply the IMU with 5V. Do not connect 3.3V from the Paparazzi-AP to the ArduIMU as it internally generates it's own stable 3.3v supply.<br />
#Integration into the Paparazzi software is realized as a module. This is an easy way to connect and test the software. <br />
#This description shows how to use the ArduIMU without a separate GPS-Receiver and without a Compass/Magnetometer. The GPS-Data is sent by the Paparazzi-AP over i2c to the ArduIMU.<br />
#There is an other airframe/main-AP we wrote which uses a magnetometer for yaw-drift compensation. We haven't written an installation guide for this configuration yet. But we will try to do this as soon as possible. <br />
<br />
The Code has been integrated into the Paparazzi build system. <br />
<br />
<br />
== Airframe Adjustments ==<br />
<br />
First, remove the infrared configuration and substitute the IMU configuration (which uses I2C) as follows :<br />
<br />
In your airframe file (found usually in conf/airframes with a name like "MyAirframe.xml")<br />
<br />
* (1) '''Insert''' the software module :<br />
<modules><br />
<load name="ins_arduimu.xml"/><br />
</modules><br />
<br />
* (2) Activate the "i2c" subsystem / peripheral :<br />
<target name="ap" board="..."><br />
...<br />
<define name="USE_I2C0"/><br />
</target><br />
<subsystem name="i2c"/> <br />
<br />
* (3) '''Insert''' INS neutrals, increase i2c queue length to 16, and reduce i2c clock speed:<br />
<br />
<section name="INS" prefix="INS_"><br />
<define name="ROLL_NEUTRAL_DEFAULT" value="0" unit="deg"/><br />
<define name="PITCH_NEUTRAL_DEFAULT" value="0" unit="deg"/><br />
<define name="I2C_TRANSACTION_QUEUE_LEN" value="16"/> <!-- default is 8 --><br />
<define name="I2C0_SCLL" value="400"/> <!-- default clock speed 37.5KHz with our 15MHz PCLK I2C0_CLOCK=PCLK/(I2C0_SCLL+I2C0_SCLH) --><br />
<define name="I2C0_SCLH" value="400"/> <!-- Default values are 200 and must be the same for both SCLL and SCLH --><br />
</section><br />
<br />
* (4) '''Remove''' the infrared estimation :<br />
<br />
remove the line that looks like the following:<br />
<subsystem name="attitude" type="infrared"/><br />
<br />
TODO: link to sample working airframe in git<br />
<br />
== Aircraft Settings ==<br />
<br />
* (5) Use this '''Settings''' file: settings/tuning_basic_ins.xml<br />
<br />
== Magnetometer (Ignore for now) ==<br />
TODO: post Magnetometer integration guide<br />
<br />
== Flash the ArduIMU ==<br />
<br />
(6) Programming the ArduIMU for use with the Tiny includes using : <br />
# Adapted software in '''sw/airborne/firmwares/non_ap/arduimu_Firmware_WithGps'''. <br />
# Standard USB FTDI cable plugged into the header that comes with the arduimu (Match the wire colors with those written on the arduimu silkscreen GRN=Green BLK=Black)<br />
<br />
Steps:<br />
<br />
*Plug in USB FTDI Cable to PC and ArduIMU (this also provides power)<br />
<br />
*On ubuntu 10.04 installation of the arduino software is as simple as :<br />
$ sudo apt-get install arduino<br />
<br />
*Now launch the arduino IDE :<br />
$ arduino<br />
[[Image:arduino_open_sketch.png|thumb]]<br />
(TODO: Using the graphical interface is probably not necessary as the flashing seems to use avrdude command line utility)<br />
<br />
* open project/sketch (File->open , point to paparazzi/sw/airborne/firmwares/non_ap/arduimu_Firmware_WithGps/arduimu/arduime.pde)<br />
<br />
* clicking "verify" button compiles<br />
<br />
* clicking "upload" button flashes (may need to select your com port in menu Tools->Serial Port)<br />
<br />
For more information concerning flashing of the ArduIMU, read: http://code.google.com/p/ardu-imu/wiki/Code<br />
<br />
Do we still need this or is everything in git now?<br />
You can find the original ZHAW code [https://home.zhaw.ch/~schmiemi/Arduimu4Paprazzi.rar here].<br />
<br />
== Install and test the ArduIMU ==<br />
<br />
* The current firmware does not implement a full rotation matrix calculation and instead assumes that the arduimu's "x" axis is aligned with the fuselage. When installing the device in your aircraft be sure to respect this constraint.<br />
<br />
* Clean and build your aircraft target in paparazzi center and flash your Tiny as usual<br />
<br />
* With your GCS session running, you should see attitudes messages including the new messages "xxx" and " xxx" <br />
[[Image:arduimu_gcs_messages.png|thumb]]<br />
<br />
== Hardware Considerations ==<br />
<br />
So far, this setup has been successfully flown in the Maja and EasyStar aircraft. For faster more agile aircraft such as the Merlin or Funjet, the polling rate needs to be changed from 15 Hz to 50 Hz in the '''/conf/modules/ins_arduimu.xml''' file.<br />
<br />
<periodic fun="ArduIMU_periodic()" freq="50" autorun="TRUE"/> <br />
<periodic fun="ArduIMU_periodicGPS()" freq="4" autorun="TRUE"/> <br />
<br />
The ArduIMU is sensitive to vibrations. Mount it on a thick piece of foam to dampen the vibrations.<br />
<br />
<br />
Have Fun !<br />
<br />
== Analysis and Results ==<br />
<br />
TODO: Compare IR and arduimu estimations for various flight conditions<br />
TODO: Fuse the two estimates together for robustness?<br />
<br />
Please Post Results Here... Issues?</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=ArduIMU&diff=8734ArduIMU2011-02-18T12:07:03Z<p>Markgriffin: /* Airframe Adjustments */</p>
<hr />
<div>[[Image:Tiny13wIMU_001.jpg|thumb|right|Tiny13 w/IMU]]<br />
[[Image:Ppzfunjetaimu01.jpg|thumb|right|TWOG w/IMU]]<br />
This page describes how to integrate an [http://code.google.com/p/ardu-imu/wiki/HomePage?tm=6 ArduIMU+ V2 (flat)] into an existing Airframe/Paparazzi-Code.<br />
#The ArduIMU communicates over i2c with the Paparazzi-AP. The wiring is pretty easy to do. Connect SDA, SCL, ground and supply the IMU with 5V. Do not connect 3.3V from the Paparazzi-AP to the ArduIMU as it internally generates it's own stable 3.3v supply.<br />
#Integration into the Paparazzi software is realized as a module. This is an easy way to connect and test the software. <br />
#This description shows how to use the ArduIMU without a separate GPS-Receiver and without a Compass/Magnetometer. The GPS-Data is sent by the Paparazzi-AP over i2c to the ArduIMU.<br />
#There is an other airframe/main-AP we wrote which uses a magnetometer for yaw-drift compensation. We haven't written an installation guide for this configuration yet. But we will try to do this as soon as possible. <br />
<br />
The Code has been integrated into the Paparazzi build system. <br />
<br />
<br />
== Airframe Adjustments ==<br />
<br />
First, remove the infrared configuration and substitute the IMU configuration (which uses I2C) as follows :<br />
<br />
In your airframe file (found usually in conf/airframes with a name like "MyAirframe.xml")<br />
<br />
* (1) '''Insert''' the software module :<br />
<modules><br />
<load name="ins_arduimu.xml"/><br />
</modules><br />
<br />
* (2) Activate the "i2c" subsystem / peripheral :<br />
<target name="ap" board="..."><br />
...<br />
<define name="USE_I2C0"/><br />
</target><br />
<subsystem name="i2c"/> <br />
<br />
* (3) '''Insert''' INS neutrals, increase i2c queue length to 16, and reduce i2c clock speed:<br />
<br />
<section name="INS" prefix="INS_"><br />
<define name="ROLL_NEUTRAL_DEFAULT" value="0" unit="deg"/><br />
<define name="PITCH_NEUTRAL_DEFAULT" value="0" unit="deg"/><br />
<define name="I2C_TRANSACTION_QUEUE_LEN" value="16"/> <!-- default is 8 --><br />
<define name="I2C0_SCLL" value="400"/> <!-- default clock speed 37.5KHz with our 15MHz PCLK I2C0_CLOCK=PCLK/(I2C0_SCLL+I2C0_SCLH) --><br />
<define name="I2C0_SCLH" value="400"/> <!-- Default values are 200 and must be the same for both SCLL and SCLH --><br />
</section><br />
<br />
* (4) '''Remove''' the infrared estimation :<br />
<br />
remove the line that looks like the following:<br />
<subsystem name="attitude" type="infrared"/><br />
<br />
TODO: link to sample working airframe in git<br />
<br />
== Aircraft Settings ==<br />
<br />
* (5) Use this '''Settings''' file: settings/tuning_basic_ins.xml<br />
<br />
== Magnetometer (Ignore for now) ==<br />
TODO: post Magnetometer integration guide<br />
<br />
== Flash the ArduIMU ==<br />
<br />
(6) Programming the ArduIMU for use with the Tiny includes using : <br />
# Adapted software in '''sw/airborne/firmwares/non_ap/arduimu_Firmware_WithGps'''. <br />
# Standard USB FTDI cable plugged into the header that comes with the arduimu (Match the wire colors with those written on the arduimu silkscreen GRN=Green BLK=Black)<br />
<br />
Steps:<br />
<br />
*Plug in USB FTDI Cable to PC and ArduIMU (this also provides power)<br />
<br />
*On ubuntu 10.04 installation of the arduino software is as simple as :<br />
$ sudo apt-get install arduino<br />
<br />
*Now launch the arduino IDE :<br />
$ arduino<br />
[[Image:arduino_open_sketch.png|thumb]]<br />
(TODO: Using the graphical interface is probably not necessary as the flashing seems to use avrdude command line utility)<br />
<br />
* open project/sketch (File->open , point to paparazzi/sw/airborne/firmwares/non_ap/arduimu_Firmware_WithGps/arduimu/arduime.pde)<br />
<br />
* clicking "verify" button compiles<br />
<br />
* clicking "upload" button flashes (may need to select your com port in menu Tools->Serial Port)<br />
<br />
For more information concerning flashing of the ArduIMU, read: http://code.google.com/p/ardu-imu/wiki/Code<br />
<br />
Do we still need this or is everything in git now?<br />
You can find the original ZHAW code [https://home.zhaw.ch/~schmiemi/Arduimu4Paprazzi.rar here].<br />
<br />
== Install and test the ArduIMU ==<br />
<br />
* The current firmware does not implement a full rotation matrix calculation and instead assumes that the arduimu's "x" axis is aligned with the fuselage. When installing the device in your aircraft be sure to respect this constraint.<br />
<br />
* Clean and build your aircraft target in paparazzi center and flash your Tiny as usual<br />
<br />
* With your GCS session running, you should see attitudes messages including the new messages "xxx" and " xxx" <br />
[[Image:arduimu_gcs_messages.png|thumb]]<br />
<br />
== Hardware Considerations ==<br />
<br />
So far, this setup has been successfully flown in the Maja and EasyStar aircraft. For faster more agile aircraft such as the Merlin or Funjet, the polling rate needs to be changed from 15 Hz to 50 Hz in the '''/conf/modules/ins_arduimu.xml''' file.<br />
<br />
Here's the diff showing where to change the rate value :<br />
<pre><br />
--- a/conf/modules/ins_arduimu.xml<br />
+++ b/conf/modules/ins_arduimu.xml<br />
@@ -5,7 +5,7 @@<br />
<file name="ins_arduimu.h"/><br />
</header><br />
<init fun="ArduIMU_init()"/><br />
- <periodic fun="ArduIMU_periodic()" freq="15" autorun="TRUE"/> <!-- 15 ist soll --><br />
+ <periodic fun="ArduIMU_periodic()" freq="50" autorun="TRUE"/> <!-- 15 ist soll --><br />
<periodic fun="ArduIMU_periodicGPS()" freq="4" autorun="TRUE"/> <!-- 8 ist soll --><br />
<makefile target="ap"><br />
<file name="ins_arduimu.c"/><br />
</pre><br />
<br />
The ArduIMU is sensitive to vibrations. Mount it on a thick piece of foam to dampen the vibrations.<br />
<br />
<br />
Have Fun !<br />
<br />
== Analysis and Results ==<br />
<br />
TODO: Compare IR and arduimu estimations for various flight conditions<br />
TODO: Fuse the two estimates together for robustness?<br />
<br />
Please Post Results Here... Issues?</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=ArduIMU&diff=8733ArduIMU2011-02-18T12:04:25Z<p>Markgriffin: /* Airframe Adjustments */</p>
<hr />
<div>[[Image:Tiny13wIMU_001.jpg|thumb|right|Tiny13 w/IMU]]<br />
[[Image:Ppzfunjetaimu01.jpg|thumb|right|TWOG w/IMU]]<br />
This page describes how to integrate an [http://code.google.com/p/ardu-imu/wiki/HomePage?tm=6 ArduIMU+ V2 (flat)] into an existing Airframe/Paparazzi-Code.<br />
#The ArduIMU communicates over i2c with the Paparazzi-AP. The wiring is pretty easy to do. Connect SDA, SCL, ground and supply the IMU with 5V. Do not connect 3.3V from the Paparazzi-AP to the ArduIMU as it internally generates it's own stable 3.3v supply.<br />
#Integration into the Paparazzi software is realized as a module. This is an easy way to connect and test the software. <br />
#This description shows how to use the ArduIMU without a separate GPS-Receiver and without a Compass/Magnetometer. The GPS-Data is sent by the Paparazzi-AP over i2c to the ArduIMU.<br />
#There is an other airframe/main-AP we wrote which uses a magnetometer for yaw-drift compensation. We haven't written an installation guide for this configuration yet. But we will try to do this as soon as possible. <br />
<br />
The Code has been integrated into the Paparazzi build system. <br />
<br />
<br />
== Airframe Adjustments ==<br />
<br />
First, remove the infrared configuration and substitute the IMU configuration (which uses I2C) as follows :<br />
<br />
In your airframe file (found usually in conf/airframes with a name like "MyAirframe.xml")<br />
<br />
* (1) '''Insert''' the software module :<br />
<modules><br />
<load name="ins_arduimu.xml"/><br />
</modules><br />
<br />
* (2) Activate the "i2c" subsystem / peripheral :<br />
<target name="ap" board="..."><br />
...<br />
<define name="USE_I2C0"/><br />
</target><br />
<subsystem name="i2c"/> <br />
<br />
* (3) '''Insert''' INS neutrals, increase I2C queue length, and reduce I2C clock speed:<br />
<br />
<section name="INS" prefix="INS_"><br />
<define name="ROLL_NEUTRAL_DEFAULT" value="0" unit="deg"/><br />
<define name="PITCH_NEUTRAL_DEFAULT" value="0" unit="deg"/><br />
<define name="I2C_TRANSACTION_QUEUE_LEN" value="16"/> <!-- default is 8 --><br />
<define name="I2C0_SCLL" value="400"/> <!-- default clock speed 37.5KHz with our 15MHz PCLK I2C0_CLOCK=PCLK/(I2C0_SCLL+I2C0_SCLH) --><br />
<define name="I2C0_SCLH" value="400"/> <!-- Default values are 200 and must be the same for both SCLL and SCLH --><br />
</section><br />
<br />
* (4) '''Remove''' the infrared estimation :<br />
<br />
remove the line that looks like the following:<br />
<subsystem name="attitude" type="infrared"/><br />
<br />
TODO: link to sample working airframe in git<br />
<br />
== Aircraft Settings ==<br />
<br />
* (5) Use this '''Settings''' file: settings/tuning_basic_ins.xml<br />
<br />
== Magnetometer (Ignore for now) ==<br />
TODO: post Magnetometer integration guide<br />
<br />
== Flash the ArduIMU ==<br />
<br />
(6) Programming the ArduIMU for use with the Tiny includes using : <br />
# Adapted software in '''sw/airborne/firmwares/non_ap/arduimu_Firmware_WithGps'''. <br />
# Standard USB FTDI cable plugged into the header that comes with the arduimu (Match the wire colors with those written on the arduimu silkscreen GRN=Green BLK=Black)<br />
<br />
Steps:<br />
<br />
*Plug in USB FTDI Cable to PC and ArduIMU (this also provides power)<br />
<br />
*On ubuntu 10.04 installation of the arduino software is as simple as :<br />
$ sudo apt-get install arduino<br />
<br />
*Now launch the arduino IDE :<br />
$ arduino<br />
[[Image:arduino_open_sketch.png|thumb]]<br />
(TODO: Using the graphical interface is probably not necessary as the flashing seems to use avrdude command line utility)<br />
<br />
* open project/sketch (File->open , point to paparazzi/sw/airborne/firmwares/non_ap/arduimu_Firmware_WithGps/arduimu/arduime.pde)<br />
<br />
* clicking "verify" button compiles<br />
<br />
* clicking "upload" button flashes (may need to select your com port in menu Tools->Serial Port)<br />
<br />
For more information concerning flashing of the ArduIMU, read: http://code.google.com/p/ardu-imu/wiki/Code<br />
<br />
Do we still need this or is everything in git now?<br />
You can find the original ZHAW code [https://home.zhaw.ch/~schmiemi/Arduimu4Paprazzi.rar here].<br />
<br />
== Install and test the ArduIMU ==<br />
<br />
* The current firmware does not implement a full rotation matrix calculation and instead assumes that the arduimu's "x" axis is aligned with the fuselage. When installing the device in your aircraft be sure to respect this constraint.<br />
<br />
* Clean and build your aircraft target in paparazzi center and flash your Tiny as usual<br />
<br />
* With your GCS session running, you should see attitudes messages including the new messages "xxx" and " xxx" <br />
[[Image:arduimu_gcs_messages.png|thumb]]<br />
<br />
== Hardware Considerations ==<br />
<br />
So far, this setup has been successfully flown in the Maja and EasyStar aircraft. For faster more agile aircraft such as the Merlin or Funjet, the polling rate needs to be changed from 15 Hz to 50 Hz in the '''/conf/modules/ins_arduimu.xml''' file.<br />
<br />
Here's the diff showing where to change the rate value :<br />
<pre><br />
--- a/conf/modules/ins_arduimu.xml<br />
+++ b/conf/modules/ins_arduimu.xml<br />
@@ -5,7 +5,7 @@<br />
<file name="ins_arduimu.h"/><br />
</header><br />
<init fun="ArduIMU_init()"/><br />
- <periodic fun="ArduIMU_periodic()" freq="15" autorun="TRUE"/> <!-- 15 ist soll --><br />
+ <periodic fun="ArduIMU_periodic()" freq="50" autorun="TRUE"/> <!-- 15 ist soll --><br />
<periodic fun="ArduIMU_periodicGPS()" freq="4" autorun="TRUE"/> <!-- 8 ist soll --><br />
<makefile target="ap"><br />
<file name="ins_arduimu.c"/><br />
</pre><br />
<br />
The ArduIMU is sensitive to vibrations. Mount it on a thick piece of foam to dampen the vibrations.<br />
<br />
<br />
Have Fun !<br />
<br />
== Analysis and Results ==<br />
<br />
TODO: Compare IR and arduimu estimations for various flight conditions<br />
TODO: Fuse the two estimates together for robustness?<br />
<br />
Please Post Results Here... Issues?</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=ArduIMU&diff=8732ArduIMU2011-02-18T12:02:49Z<p>Markgriffin: /* Airframe Adjustments */</p>
<hr />
<div>[[Image:Tiny13wIMU_001.jpg|thumb|right|Tiny13 w/IMU]]<br />
[[Image:Ppzfunjetaimu01.jpg|thumb|right|TWOG w/IMU]]<br />
This page describes how to integrate an [http://code.google.com/p/ardu-imu/wiki/HomePage?tm=6 ArduIMU+ V2 (flat)] into an existing Airframe/Paparazzi-Code.<br />
#The ArduIMU communicates over i2c with the Paparazzi-AP. The wiring is pretty easy to do. Connect SDA, SCL, ground and supply the IMU with 5V. Do not connect 3.3V from the Paparazzi-AP to the ArduIMU as it internally generates it's own stable 3.3v supply.<br />
#Integration into the Paparazzi software is realized as a module. This is an easy way to connect and test the software. <br />
#This description shows how to use the ArduIMU without a separate GPS-Receiver and without a Compass/Magnetometer. The GPS-Data is sent by the Paparazzi-AP over i2c to the ArduIMU.<br />
#There is an other airframe/main-AP we wrote which uses a magnetometer for yaw-drift compensation. We haven't written an installation guide for this configuration yet. But we will try to do this as soon as possible. <br />
<br />
The Code has been integrated into the Paparazzi build system. <br />
<br />
<br />
== Airframe Adjustments ==<br />
<br />
First, remove the infrared configuration and substitute the IMU configuration (which uses I2C) as follows :<br />
<br />
In your airframe file (found usually in conf/airframes with a name like "MyAirframe.xml")<br />
<br />
* (1) '''Insert''' the software module :<br />
<modules><br />
<load name="ins_arduimu.xml"/><br />
</modules><br />
<br />
* (2) Activate the "i2c" subsystem / peripheral :<br />
<target name="ap" board="..."><br />
...<br />
<define name="USE_I2C0"/><br />
</target><br />
<subsystem name="i2c"/> <br />
<br />
* (3) '''Insert''' INS neutrals and change I2C queue length and clock speed:<br />
<br />
<section name="INS" prefix="INS_"><br />
<define name="ROLL_NEUTRAL_DEFAULT" value="0" unit="deg"/><br />
<define name="PITCH_NEUTRAL_DEFAULT" value="0" unit="deg"/><br />
<define name="I2C_TRANSACTION_QUEUE_LEN" value="16"/> <!-- default is 8 --><br />
<define name="I2C0_SCLL" value="400"/> <!-- default clock speed 37.5KHz with our 15MHz PCLK I2C0_CLOCK=PCLK/(I2C0_SCLL+I2C0_SCLH) --><br />
<define name="I2C0_SCLH" value="400"/> <!-- Default values are 200 and must be the same for both SCLL and SCLH --><br />
</section><br />
<br />
* (4) '''Remove''' the infrared estimation :<br />
<br />
remove the line that looks like the following:<br />
<subsystem name="attitude" type="infrared"/><br />
<br />
TODO: link to sample working airframe in git<br />
<br />
== Aircraft Settings ==<br />
<br />
* (5) Use this '''Settings''' file: settings/tuning_basic_ins.xml<br />
<br />
== Magnetometer (Ignore for now) ==<br />
TODO: post Magnetometer integration guide<br />
<br />
== Flash the ArduIMU ==<br />
<br />
(6) Programming the ArduIMU for use with the Tiny includes using : <br />
# Adapted software in '''sw/airborne/firmwares/non_ap/arduimu_Firmware_WithGps'''. <br />
# Standard USB FTDI cable plugged into the header that comes with the arduimu (Match the wire colors with those written on the arduimu silkscreen GRN=Green BLK=Black)<br />
<br />
Steps:<br />
<br />
*Plug in USB FTDI Cable to PC and ArduIMU (this also provides power)<br />
<br />
*On ubuntu 10.04 installation of the arduino software is as simple as :<br />
$ sudo apt-get install arduino<br />
<br />
*Now launch the arduino IDE :<br />
$ arduino<br />
[[Image:arduino_open_sketch.png|thumb]]<br />
(TODO: Using the graphical interface is probably not necessary as the flashing seems to use avrdude command line utility)<br />
<br />
* open project/sketch (File->open , point to paparazzi/sw/airborne/firmwares/non_ap/arduimu_Firmware_WithGps/arduimu/arduime.pde)<br />
<br />
* clicking "verify" button compiles<br />
<br />
* clicking "upload" button flashes (may need to select your com port in menu Tools->Serial Port)<br />
<br />
For more information concerning flashing of the ArduIMU, read: http://code.google.com/p/ardu-imu/wiki/Code<br />
<br />
Do we still need this or is everything in git now?<br />
You can find the original ZHAW code [https://home.zhaw.ch/~schmiemi/Arduimu4Paprazzi.rar here].<br />
<br />
== Install and test the ArduIMU ==<br />
<br />
* The current firmware does not implement a full rotation matrix calculation and instead assumes that the arduimu's "x" axis is aligned with the fuselage. When installing the device in your aircraft be sure to respect this constraint.<br />
<br />
* Clean and build your aircraft target in paparazzi center and flash your Tiny as usual<br />
<br />
* With your GCS session running, you should see attitudes messages including the new messages "xxx" and " xxx" <br />
[[Image:arduimu_gcs_messages.png|thumb]]<br />
<br />
== Hardware Considerations ==<br />
<br />
So far, this setup has been successfully flown in the Maja and EasyStar aircraft. For faster more agile aircraft such as the Merlin or Funjet, the polling rate needs to be changed from 15 Hz to 50 Hz in the '''/conf/modules/ins_arduimu.xml''' file.<br />
<br />
Here's the diff showing where to change the rate value :<br />
<pre><br />
--- a/conf/modules/ins_arduimu.xml<br />
+++ b/conf/modules/ins_arduimu.xml<br />
@@ -5,7 +5,7 @@<br />
<file name="ins_arduimu.h"/><br />
</header><br />
<init fun="ArduIMU_init()"/><br />
- <periodic fun="ArduIMU_periodic()" freq="15" autorun="TRUE"/> <!-- 15 ist soll --><br />
+ <periodic fun="ArduIMU_periodic()" freq="50" autorun="TRUE"/> <!-- 15 ist soll --><br />
<periodic fun="ArduIMU_periodicGPS()" freq="4" autorun="TRUE"/> <!-- 8 ist soll --><br />
<makefile target="ap"><br />
<file name="ins_arduimu.c"/><br />
</pre><br />
<br />
The ArduIMU is sensitive to vibrations. Mount it on a thick piece of foam to dampen the vibrations.<br />
<br />
<br />
Have Fun !<br />
<br />
== Analysis and Results ==<br />
<br />
TODO: Compare IR and arduimu estimations for various flight conditions<br />
TODO: Fuse the two estimates together for robustness?<br />
<br />
Please Post Results Here... Issues?</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=ArduIMU&diff=8731ArduIMU2011-02-18T11:56:05Z<p>Markgriffin: /* Hardware Considerations */</p>
<hr />
<div>[[Image:Tiny13wIMU_001.jpg|thumb|right|Tiny13 w/IMU]]<br />
[[Image:Ppzfunjetaimu01.jpg|thumb|right|TWOG w/IMU]]<br />
This page describes how to integrate an [http://code.google.com/p/ardu-imu/wiki/HomePage?tm=6 ArduIMU+ V2 (flat)] into an existing Airframe/Paparazzi-Code.<br />
#The ArduIMU communicates over i2c with the Paparazzi-AP. The wiring is pretty easy to do. Connect SDA, SCL, ground and supply the IMU with 5V. Do not connect 3.3V from the Paparazzi-AP to the ArduIMU as it internally generates it's own stable 3.3v supply.<br />
#Integration into the Paparazzi software is realized as a module. This is an easy way to connect and test the software. <br />
#This description shows how to use the ArduIMU without a separate GPS-Receiver and without a Compass/Magnetometer. The GPS-Data is sent by the Paparazzi-AP over i2c to the ArduIMU.<br />
#There is an other airframe/main-AP we wrote which uses a magnetometer for yaw-drift compensation. We haven't written an installation guide for this configuration yet. But we will try to do this as soon as possible. <br />
<br />
The Code has been integrated into the Paparazzi build system. <br />
<br />
<br />
== Airframe Adjustments ==<br />
<br />
First, remove the infrared configuration and substitute the IMU configuration (which uses I2C) as follows :<br />
<br />
In your airframe file (found usually in conf/airframes with a name like "MyAirframe.xml")<br />
<br />
* (1) '''Insert''' the software module :<br />
<modules><br />
<load name="ins_arduimu.xml"/><br />
</modules><br />
<br />
* (2) Activate the "i2c" subsystem / peripheral :<br />
<target name="ap" board="..."><br />
...<br />
<define name="USE_I2C0"/><br />
</target><br />
<subsystem name="i2c"/> <br />
<br />
* (3) '''Insert''' INS neutrals :<br />
<br />
<section name="INS" prefix="INS_"><br />
<define name="ROLL_NEUTRAL_DEFAULT" value="0" unit="deg"/><br />
<define name="PITCH_NEUTRAL_DEFAULT" value="0" unit="deg"/><br />
</section><br />
<br />
* (4) '''Remove''' the infrared estimation :<br />
<br />
remove the line that looks like the following:<br />
<subsystem name="attitude" type="infrared"/><br />
<br />
TODO: link to sample working airframe in git<br />
<br />
== Aircraft Settings ==<br />
<br />
* (5) Use this '''Settings''' file: settings/tuning_basic_ins.xml<br />
<br />
== Magnetometer (Ignore for now) ==<br />
TODO: post Magnetometer integration guide<br />
<br />
== Flash the ArduIMU ==<br />
<br />
(6) Programming the ArduIMU for use with the Tiny includes using : <br />
# Adapted software in '''sw/airborne/firmwares/non_ap/arduimu_Firmware_WithGps'''. <br />
# Standard USB FTDI cable plugged into the header that comes with the arduimu (Match the wire colors with those written on the arduimu silkscreen GRN=Green BLK=Black)<br />
<br />
Steps:<br />
<br />
*Plug in USB FTDI Cable to PC and ArduIMU (this also provides power)<br />
<br />
*On ubuntu 10.04 installation of the arduino software is as simple as :<br />
$ sudo apt-get install arduino<br />
<br />
*Now launch the arduino IDE :<br />
$ arduino<br />
[[Image:arduino_open_sketch.png|thumb]]<br />
(TODO: Using the graphical interface is probably not necessary as the flashing seems to use avrdude command line utility)<br />
<br />
* open project/sketch (File->open , point to paparazzi/sw/airborne/firmwares/non_ap/arduimu_Firmware_WithGps/arduimu/arduime.pde)<br />
<br />
* clicking "verify" button compiles<br />
<br />
* clicking "upload" button flashes (may need to select your com port in menu Tools->Serial Port)<br />
<br />
For more information concerning flashing of the ArduIMU, read: http://code.google.com/p/ardu-imu/wiki/Code<br />
<br />
Do we still need this or is everything in git now?<br />
You can find the original ZHAW code [https://home.zhaw.ch/~schmiemi/Arduimu4Paprazzi.rar here].<br />
<br />
== Install and test the ArduIMU ==<br />
<br />
* The current firmware does not implement a full rotation matrix calculation and instead assumes that the arduimu's "x" axis is aligned with the fuselage. When installing the device in your aircraft be sure to respect this constraint.<br />
<br />
* Clean and build your aircraft target in paparazzi center and flash your Tiny as usual<br />
<br />
* With your GCS session running, you should see attitudes messages including the new messages "xxx" and " xxx" <br />
[[Image:arduimu_gcs_messages.png|thumb]]<br />
<br />
== Hardware Considerations ==<br />
<br />
So far, this setup has been successfully flown in the Maja and EasyStar aircraft. For faster more agile aircraft such as the Merlin or Funjet, the polling rate needs to be changed from 15 Hz to 50 Hz in the '''/conf/modules/ins_arduimu.xml''' file.<br />
<br />
Here's the diff showing where to change the rate value :<br />
<pre><br />
--- a/conf/modules/ins_arduimu.xml<br />
+++ b/conf/modules/ins_arduimu.xml<br />
@@ -5,7 +5,7 @@<br />
<file name="ins_arduimu.h"/><br />
</header><br />
<init fun="ArduIMU_init()"/><br />
- <periodic fun="ArduIMU_periodic()" freq="15" autorun="TRUE"/> <!-- 15 ist soll --><br />
+ <periodic fun="ArduIMU_periodic()" freq="50" autorun="TRUE"/> <!-- 15 ist soll --><br />
<periodic fun="ArduIMU_periodicGPS()" freq="4" autorun="TRUE"/> <!-- 8 ist soll --><br />
<makefile target="ap"><br />
<file name="ins_arduimu.c"/><br />
</pre><br />
<br />
The ArduIMU is sensitive to vibrations. Mount it on a thick piece of foam to dampen the vibrations.<br />
<br />
<br />
Have Fun !<br />
<br />
== Analysis and Results ==<br />
<br />
TODO: Compare IR and arduimu estimations for various flight conditions<br />
TODO: Fuse the two estimates together for robustness?<br />
<br />
Please Post Results Here... Issues?</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=ArduIMU&diff=8730ArduIMU2011-02-18T11:54:05Z<p>Markgriffin: /* Aircraft Settings */</p>
<hr />
<div>[[Image:Tiny13wIMU_001.jpg|thumb|right|Tiny13 w/IMU]]<br />
[[Image:Ppzfunjetaimu01.jpg|thumb|right|TWOG w/IMU]]<br />
This page describes how to integrate an [http://code.google.com/p/ardu-imu/wiki/HomePage?tm=6 ArduIMU+ V2 (flat)] into an existing Airframe/Paparazzi-Code.<br />
#The ArduIMU communicates over i2c with the Paparazzi-AP. The wiring is pretty easy to do. Connect SDA, SCL, ground and supply the IMU with 5V. Do not connect 3.3V from the Paparazzi-AP to the ArduIMU as it internally generates it's own stable 3.3v supply.<br />
#Integration into the Paparazzi software is realized as a module. This is an easy way to connect and test the software. <br />
#This description shows how to use the ArduIMU without a separate GPS-Receiver and without a Compass/Magnetometer. The GPS-Data is sent by the Paparazzi-AP over i2c to the ArduIMU.<br />
#There is an other airframe/main-AP we wrote which uses a magnetometer for yaw-drift compensation. We haven't written an installation guide for this configuration yet. But we will try to do this as soon as possible. <br />
<br />
The Code has been integrated into the Paparazzi build system. <br />
<br />
<br />
== Airframe Adjustments ==<br />
<br />
First, remove the infrared configuration and substitute the IMU configuration (which uses I2C) as follows :<br />
<br />
In your airframe file (found usually in conf/airframes with a name like "MyAirframe.xml")<br />
<br />
* (1) '''Insert''' the software module :<br />
<modules><br />
<load name="ins_arduimu.xml"/><br />
</modules><br />
<br />
* (2) Activate the "i2c" subsystem / peripheral :<br />
<target name="ap" board="..."><br />
...<br />
<define name="USE_I2C0"/><br />
</target><br />
<subsystem name="i2c"/> <br />
<br />
* (3) '''Insert''' INS neutrals :<br />
<br />
<section name="INS" prefix="INS_"><br />
<define name="ROLL_NEUTRAL_DEFAULT" value="0" unit="deg"/><br />
<define name="PITCH_NEUTRAL_DEFAULT" value="0" unit="deg"/><br />
</section><br />
<br />
* (4) '''Remove''' the infrared estimation :<br />
<br />
remove the line that looks like the following:<br />
<subsystem name="attitude" type="infrared"/><br />
<br />
TODO: link to sample working airframe in git<br />
<br />
== Aircraft Settings ==<br />
<br />
* (5) Use this '''Settings''' file: settings/tuning_basic_ins.xml<br />
<br />
== Magnetometer (Ignore for now) ==<br />
TODO: post Magnetometer integration guide<br />
<br />
== Flash the ArduIMU ==<br />
<br />
(6) Programming the ArduIMU for use with the Tiny includes using : <br />
# Adapted software in '''sw/airborne/firmwares/non_ap/arduimu_Firmware_WithGps'''. <br />
# Standard USB FTDI cable plugged into the header that comes with the arduimu (Match the wire colors with those written on the arduimu silkscreen GRN=Green BLK=Black)<br />
<br />
Steps:<br />
<br />
*Plug in USB FTDI Cable to PC and ArduIMU (this also provides power)<br />
<br />
*On ubuntu 10.04 installation of the arduino software is as simple as :<br />
$ sudo apt-get install arduino<br />
<br />
*Now launch the arduino IDE :<br />
$ arduino<br />
[[Image:arduino_open_sketch.png|thumb]]<br />
(TODO: Using the graphical interface is probably not necessary as the flashing seems to use avrdude command line utility)<br />
<br />
* open project/sketch (File->open , point to paparazzi/sw/airborne/firmwares/non_ap/arduimu_Firmware_WithGps/arduimu/arduime.pde)<br />
<br />
* clicking "verify" button compiles<br />
<br />
* clicking "upload" button flashes (may need to select your com port in menu Tools->Serial Port)<br />
<br />
For more information concerning flashing of the ArduIMU, read: http://code.google.com/p/ardu-imu/wiki/Code<br />
<br />
Do we still need this or is everything in git now?<br />
You can find the original ZHAW code [https://home.zhaw.ch/~schmiemi/Arduimu4Paprazzi.rar here].<br />
<br />
== Install and test the ArduIMU ==<br />
<br />
* The current firmware does not implement a full rotation matrix calculation and instead assumes that the arduimu's "x" axis is aligned with the fuselage. When installing the device in your aircraft be sure to respect this constraint.<br />
<br />
* Clean and build your aircraft target in paparazzi center and flash your Tiny as usual<br />
<br />
* With your GCS session running, you should see attitudes messages including the new messages "xxx" and " xxx" <br />
[[Image:arduimu_gcs_messages.png|thumb]]<br />
<br />
== Hardware Considerations ==<br />
<br />
So far, this setup has been successfully flown in the Maja and EasyStar aircraft. For faster more agile aircraft such as the Merlin or Funjet, the polling rate needs to be changed from 15 Hz to 40 Hz in the '''/conf/modules/ins_arduimu.xml''' file.<br />
<br />
Here's the diff showing where to change the rate value :<br />
<pre><br />
--- a/conf/modules/ins_arduimu.xml<br />
+++ b/conf/modules/ins_arduimu.xml<br />
@@ -5,7 +5,7 @@<br />
<file name="ins_arduimu.h"/><br />
</header><br />
<init fun="ArduIMU_init()"/><br />
- <periodic fun="ArduIMU_periodic()" freq="15" autorun="TRUE"/> <!-- 15 ist soll --><br />
+ <periodic fun="ArduIMU_periodic()" freq="60" autorun="TRUE"/> <!-- 15 ist soll --><br />
<periodic fun="ArduIMU_periodicGPS()" freq="8" autorun="TRUE"/> <!-- 8 ist soll --><br />
<makefile target="ap"><br />
<file name="ins_arduimu.c"/><br />
</pre><br />
<br />
The ArduIMU is sensitive to vibrations. Mount it on a thick piece of foam to dampen the vibrations.<br />
<br />
<br />
Have Fun !<br />
<br />
== Analysis and Results ==<br />
<br />
TODO: Compare IR and arduimu estimations for various flight conditions<br />
TODO: Fuse the two estimates together for robustness?<br />
<br />
Please Post Results Here... Issues?</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Video&diff=8617Video2011-02-08T08:21:13Z<p>Markgriffin: /* Using separate Frame Grabber and Video Receiver */</p>
<hr />
<div>The main application for small UAVs is video. There are various means to take pictures from the aircraft and transfer them to the ground.<br />
<br />
=Analog Video=<br />
<br />
The easiest and most practical way is to transfer video in an analog way either as NTSC or PAL signal. The picture is taken by a camera, put to an analog signal and sent through an FM modulated transmitter.<br />
<br />
==Cameras==<br />
Affordable CCD cameras tend to be better in dynamic range and noise than same price CMOS cameras. On the other side CMOS ones do need less energy and they are more likely to run with 5V.<br />
<br />
Small digital handheld cameras do have a much better optical system and sensor than stand alone cameras. There are ongoing efforts to reduce size and weight to be able to implement them.<br />
<br />
=== Recommended cameras ===<br />
A good selection of miniature cameras can be found at [http://www.microcameras.com/micro_cameras.htm Microcameras.com]. If you´re looking for Panasonic KX-xxx cameras find them here: [http://rangevideo.com/index.php?main_page=index&cPath=6 RangeVideo].<br />
<br />
[[Image:micro_clr_cmos_02.jpg|thumb|left|Mini Color CMOS Camera with Pinhole Lens<br>TV Lines: 380<br>Lux: 1.5 at F1.2<br>Shutter: 1/50-1/63000<br>Power: 7-12V DC, 25mA (bypass regulator for 5V use)<br>Dim: 12mm x 12mm x 14mm<br>Weight: 3.3g (w/o cable)]]<br />
[[Image:Cam_up.jpg|thumb|left|Camera position for upright pictures (crystal up). The blank copper is ground, blue is signal and red is 7V supply.]]<br />
[[Image:Cam_up_5v.jpg|thumb|left|Solder the red cable to the other side of the capacitor connected to ground for 5V supply.]]<br />
* Simple, lightweight camera with good performance<br />
<br style="clear:both"><br />
<br />
====Panasonic KX-141 (a.k.a. Pacific Corp. PC-2005) CCD====<br />
[[Image:PC-2005_COLOR_CAMERA.JPG|thumb|left|Pacific Corp. PC-2005 CCD<br>5V supply, signal is yellow<br>12g]]<br />
* Available at [http://www.blackwidowav.com/productcameras.html Black Widow AV]<br />
* Available here too [http://rangevideo.com/index.php?main_page=index&cPath=6 RangeVideo]<br />
<br style="clear:both"><br />
<br />
=== Pan/tilt mechanism ===<br />
For help in building a pan/tilt camera mechanism see our [[Pan_Tilt_Camera|pan/tilt camera]] page.<br />
Code for driving such as system is in <tt>/sw/airborne/cam.c</tt><br />
<br />
== Transmitter ==<br />
There are various FM transmitters available at 10mW, 50mW, 200mW or even more. Keep them as far away from the GPS receiver/antenna as possible as they might cause severe interference. For the competitions mostly 50mW or 200mW transmitters have been used.<br />
<br />
Standard 2.4GHz Wi-Fi antennas can be used as lightweight dipole antennas by breaking the plastic case and removing everything except the coaxial cable and the counter balance soldered to the shield.<br />
<br />
== Receiver ==<br />
The most important thing about the receiver is a good antenna (we used a 2.4GHz Yagi (532-4474 from RS components) at some competitions, also some patch antennas). The analog receiver modules itself do not seem to differ very much.<br />
<br />
== Display ==<br />
Tube television sets seem to have the best picture. As it blurs out the pixels the human eye can very good adapt to it. We used them whenever transport was not an issue. If not possible small TFT video screens intended for car entertainment were used.<br />
<br />
== Digital Display ==<br />
[[Image:Pollin_usb_r1.jpg|thumb|left|Pollin USB R1 video receiver/digitizer]]<br />
There is a TFT screen in the ground station, so why not use it? For that the picture does need to be digitized and feed into the laptop. In the early days we used a [http://www.plextor.com/english/products/M402U.htm Plextor M402U] to digitize and MPEG4 compress the analog video. It was then recorded or decompressed and displayed on screen. The drawback on this nice box is the delay you get through compressing/decompressing plus the size and the need for an external video receiver and power supply. A lot easier to use is the [http://www.pollin.de/shop/shop.php?cf=detail.php&pg=NQ==&a=NzM4OTE0OTk= Pollin USB-R1] which includes an analog video receiver and an USB (High Speed) digitizer. It does not need any external component or power supply.<br />
<br style="clear:both"><br />
<br />
===Plextor M402U===<br />
This box not really recommended any more. With a recent kernel and driver patches from the Paparazzi cvs it should be possible to get it to run.<br />
<br />
===Pollin USB R1===<br />
<br />
The [http://www.pollin.de/shop/dt/NzM4OTE0OTk-/Haustechnik/Sicherheitstechnik/Kameras/USB_Funkkamera_2_4_GHz.html Pollin USB-R1] requires no additional software drivers since the release of Ubuntu 10.04 (Lucid Lynx). It now works out of the box. <br />
<br />
====Watching Video====<br />
<br />
Watch video with (maybe adjust the NORM to PAL or whatever your cameras standard is):<br />
<br />
mplayer tv:// -tv driver=v4l2:width=320:height=240:norm=NTSC:input=0:device=/dev/video0:noaudio<br />
<br />
====LinuxTv (old driver)====<br />
<br />
http://www.linuxtv.org/wiki/index.php/Em28xx_devices<br />
<br />
shell> hg clone http://linuxtv.org/hg/v4l-dvb<br />
<br />
shell> cd v4l-dvb<br />
shell> make<br />
shell> sudo make install<br />
<br />
shell> mplayer tv:// -tv driver=v4l2:width=320:height=240:norm=PAL:input=1:device=/dev/video0:noaudio -vo x11<br />
<br />
====Linux Kernel 2.18 (old driver)====<br />
Some work is needed to get it to run with Linux as it needs a recent and patched version of the em28xx driver (this will get easier as the patches are integrated to v4l). You need some version control system as well as the kernel headers and video encoders, do as root:<br />
<br />
aptitude install mercurial linux-headers-$(uname -r) libxvidcore4 libxvidcore-dev mplayer<br />
<br />
Get the video4linux drivers using the (v4l) special version control system, as user:<br />
<br />
hg clone http://mcentral.de/hg/~mrec/v4l-dvb-kernel<br />
<br />
Copy over the two changed files "em28xx-cards.c" and "em28xx.h" from sw/in_progress/videolizer/v4l-dvb-experimental/ to the v4l-dvb-kernel/linux/drivers/media/video/em28xx/ folder. Then build v4l-dvb as user:<br />
<br />
cd v4l-dvb-kernel<br />
make<br />
<br />
And install as root (you have to do this each time you update the kernel):<br />
<br />
make install<br />
<br />
Add the follwing to /etc/modprobe.d/emb28xx (as the Pollin USB-R1 does not have an EEPROM for auto detect.) <br />
<br />
options em28xx card=62<br />
<br />
====Linux Kernel 2.26 (old driver)====<br />
The changes to the emb28xx driver have now been [http://mcentral.de/hg/~mrec/em28xx-new/rev/94d8ffd2d696 integrated upstream]. To build the driver, follow the [http://mcentral.de/wiki/index.php5/Installation_Guide instructions on the emb28xx driver website.]<br />
<br />
Add the follwing to /etc/modprobe.d/emb28xx (as the Pollin USB-R1 does not have an EEPROM for auto detect.) <br />
<br />
options em28xx card=76<br />
<br />
===Using separate Frame Grabber and Video Receiver===<br />
<br />
This solution provides maximum possible range, video quality and flexiblity due to modularity. Though it requires more hardware than the integrated [[Video#Pollin_USB_R1|Pollin USB R1]] solution.<br />
<br />
====Frame Grabber====<br />
A frame grabber takes the output of any video receiver and streams it into Linux. <br />
[[Image:AVerMedia_EZMaker.jpg|thumb|left|AVerMedia DVD EZMaker USB 2.0 Gold]]<br />
The AVerMedia DVD EZMaker USB 2.0 Gold works well and comes with a Linux driver. <br />
<br />
<br />
The Easycap DC60+ (with Empia chip) works well and is less expensive but not as compact as the Pollin unit.<br />
<br />
<br />
<br />
The video stream can be directly integrated into the GCS as described in [[GCS#Video_Plugin|Video Plugin]].<br />
<br style="clear:both"><br />
<br />
====Video Receiver====<br />
<br />
[[Image:YellowJacket_Pro.jpg|thumb|left|Yellowjacket Pro Video Receiver 2.4GHz]]<br />
<br />
This diversity receiver provides high range and video quality. Especially when connected to high gain patch antennas.<br />
<br style="clear:both"><br />
<br />
== Streaming ==<br />
<br />
The USB video converters can be used to do live streams over the internet as seen at 24C3. We use [http://www.litech.org/spook/ spook] to receive the video data from the USB converter, compress it with MPEG4 and send it using the rtsp protocol. Spook needs some patches to work with the Pollin converter. Build it from Paparazzi cvs:<br />
<br />
cd sw/in_progress/videolizer/spook<br />
./configure<br />
<br />
All encoders should be enabled. Then build it:<br />
<br />
make<br />
<br />
and start it<br />
<br />
./spook -c spook.conf.usbraw<br />
<br />
Watch video through vlc from it<br />
<br />
vlc rtsp://localhost:7070/webcam<br />
<br />
Note: a first time spook user must chose the correct video camera output format i.e. NTSC or PAL, for instance. Navigate to ~paparazzi3/sw/in_progress/videolizer/spook/spook.conf.usbraw/input VL42/InputType PAL; The CVS default is set as PAL. <br />
<br />
Somehow the standard Debian 4.0 (etch) mplayer does not support rtsp:// video. The debian-multimedia.org mplayer seems to work. It can be installed adding to /etc/apt/sources.list:<br />
<br />
deb http://www.debian-multimedia.org etch main<br />
<br />
and install with<br />
<br />
aptitude install -t stable mplayer<br />
<br />
== Forward USB Streaming Video over a Mobile TCP/IP Link to a Remote Windows Viewer ==<br />
<br />
If one has installed a fully functional USB video streaming payload, as outlined above, and wishes to share the output with associates beyond the perimeter of the local gcs TFT, implement the following. <br />
<br />
===Modem Hardware===<br />
[[Image:Vodafone_Huawei_E800_HSDPA_3G_Mobile_Data_Card.jpg|thumb|left|Vodafone mobile data card]] <br />
Mobile modem choice is up to the user and ability to configure the interface to an ISP. The model described here and utilised for now is a Vodafone/Huawei E800 HSDPA 3G mobile data card. Compatible with Express Card laptops.<br />
<br style="clear:both"><br />
<br />
===Modem Linux Drivers===<br />
[[Image:Vodafone_MC_startup_splash.jpg|thumb|left|Startup splash]]<br />
Download the appropriate vodafone-mobile-connect-card-driver-for-linux for your Linux OS release at <br />
[https://forge.vodafonebetavine.net/frs/?group_id=12 Forge Vodafone Betavine]. The Unbuntu Gutsy Gibbon & Hardy Heron version used by me can be loaded here: [https://forge.vodafonebetavine.net/frs/download.php/167/vodafone-mobile-connect-card-driver-for-linux-2.0.beta2-ubuntu-installer.run vodafone-mobile-connect-card-driver-for-linux-2.0.beta2-ubuntu-installer.run]. Right click link, choose 'save link as' to your home folder. Check the permissions tab to allow the downloaded file to run as an executable. Run file. Follow the instructions in the [https://forge.vodafonebetavine.net/frs/download.php/179/README_2.0.beta2.txt README]. <br />
<br style="clear:both"><br />
<br />
Warning - the user is advised to install the data card in the express card slot prior to booting and turn off the wifi radio before intialising the software found in the /Applications/Internet drop down menus. Furthermore, the later procedure should be instituted before starting spook.<br />
<br />
The local gcs server should be ready now to transmit video as well as other data once a connection to the ISP is established. Confirm this by getting the IP address, as user:<br />
<br />
ifconfig <br />
<br />
===Remote Client Connection Configuration===<br />
[[Image:VLC_front_page.jpg|thumb|left|VLC Media Player]]<br />
Windows client users will have to download VLC Media Player here: [http://www.videolan.org/ Version 0.8.6f] to view JPEG/HTTP video as defined in ~paparazzi3/sw/in_progress/videolizer/spook/spook.conf.dist<br />
<br style="clear:both"> <br />
<br />
[[Image:PuTTY_SSH_front_page.jpg|thumb|left|PuTTY basic SSH configuration]]<br />
To faciltate a secure SSH TCP forward port connection from the host to the Windows client install PuTTY here: <br />
[http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTY Download page]. Insert the gcs host Mobile IP address obtained from the remote operator via a preferred form of communication .ie. chat, email etc.in the box labelled 'Host Name (or IP address)'. Confirm Port 22 is chosen and the connection type is SSH. Expand SSH category in left panel and click 'tunnels'. See next box.<br />
<br style="clear:both"><br />
<br />
[[Image:PuTTY_SSH_port_forwarding.jpg|thumb|left|PuTTY SSH port forwarding]]<br />
Tick both port forwarding options. Set Source port to '80' and destination to 'localhost:7070/webcam'. Click 'Add' and then 'Open'. See next box. <br />
<br style="clear:both"><br />
<br />
[[Image:PuTTY_Terminal.jpg|thumb|left|PuTTY terminal logged in]]<br />
The information contained within this terminal is self explanatory after a successful login. <br />
<br style="clear:both"><br />
<br />
[[Image:VLC_open_network_stream_page.jpg|thumb|left|VLC http network stream configuration]]<br />
Open VLC, click 'file', select 'open network stream' and then 'HTTP/HTTPS/FTP/MMS'. Enter 'localhost:80/webcam' in the URL box and select 'Open'. See next box.<br />
<br style="clear:both"><br />
<br />
[[Image:Streaming_JPEG_HTTP_window.jpg|thumb|left|VLC Streaming jpeg/http window]]<br />
Hopefully, whatever the on board camera is viewing is faithfully reproduced in the window. Unfortunately, the 'Print Screen' function fails to capture the live video output. <br />
<br style="clear:both"><br />
<br />
= Digital Video =<br />
<br />
This remains difficult as we are lacking a fast digital telemetry link. There are [http://www.comedia.com.cn/sm/C328.pdf serial bus cameras] that might be hooked up to the autopilot and JPEG encoded pictures be sent through telemetry.<br />
<br />
= On-Screen Display (OSD) =<br />
<br />
There are some situations where on-board data needs to be overlayed on the video stream. Examples include:<br />
* Alternative display of on-board data without a telemetry link and GCS;<br />
* In Australia, 2.4GHz analogue video links with OSD are considered as "telemetry transmitters" allowing 1000mW EIRP emission without a licence; or<br />
* Sending a callsign when operating under an amateur licence.<br />
<br />
A number of OSD devices exist.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Video&diff=8616Video2011-02-08T08:10:32Z<p>Markgriffin: /* Pollin USB R1 */</p>
<hr />
<div>The main application for small UAVs is video. There are various means to take pictures from the aircraft and transfer them to the ground.<br />
<br />
=Analog Video=<br />
<br />
The easiest and most practical way is to transfer video in an analog way either as NTSC or PAL signal. The picture is taken by a camera, put to an analog signal and sent through an FM modulated transmitter.<br />
<br />
==Cameras==<br />
Affordable CCD cameras tend to be better in dynamic range and noise than same price CMOS cameras. On the other side CMOS ones do need less energy and they are more likely to run with 5V.<br />
<br />
Small digital handheld cameras do have a much better optical system and sensor than stand alone cameras. There are ongoing efforts to reduce size and weight to be able to implement them.<br />
<br />
=== Recommended cameras ===<br />
A good selection of miniature cameras can be found at [http://www.microcameras.com/micro_cameras.htm Microcameras.com]. If you´re looking for Panasonic KX-xxx cameras find them here: [http://rangevideo.com/index.php?main_page=index&cPath=6 RangeVideo].<br />
<br />
[[Image:micro_clr_cmos_02.jpg|thumb|left|Mini Color CMOS Camera with Pinhole Lens<br>TV Lines: 380<br>Lux: 1.5 at F1.2<br>Shutter: 1/50-1/63000<br>Power: 7-12V DC, 25mA (bypass regulator for 5V use)<br>Dim: 12mm x 12mm x 14mm<br>Weight: 3.3g (w/o cable)]]<br />
[[Image:Cam_up.jpg|thumb|left|Camera position for upright pictures (crystal up). The blank copper is ground, blue is signal and red is 7V supply.]]<br />
[[Image:Cam_up_5v.jpg|thumb|left|Solder the red cable to the other side of the capacitor connected to ground for 5V supply.]]<br />
* Simple, lightweight camera with good performance<br />
<br style="clear:both"><br />
<br />
====Panasonic KX-141 (a.k.a. Pacific Corp. PC-2005) CCD====<br />
[[Image:PC-2005_COLOR_CAMERA.JPG|thumb|left|Pacific Corp. PC-2005 CCD<br>5V supply, signal is yellow<br>12g]]<br />
* Available at [http://www.blackwidowav.com/productcameras.html Black Widow AV]<br />
* Available here too [http://rangevideo.com/index.php?main_page=index&cPath=6 RangeVideo]<br />
<br style="clear:both"><br />
<br />
=== Pan/tilt mechanism ===<br />
For help in building a pan/tilt camera mechanism see our [[Pan_Tilt_Camera|pan/tilt camera]] page.<br />
Code for driving such as system is in <tt>/sw/airborne/cam.c</tt><br />
<br />
== Transmitter ==<br />
There are various FM transmitters available at 10mW, 50mW, 200mW or even more. Keep them as far away from the GPS receiver/antenna as possible as they might cause severe interference. For the competitions mostly 50mW or 200mW transmitters have been used.<br />
<br />
Standard 2.4GHz Wi-Fi antennas can be used as lightweight dipole antennas by breaking the plastic case and removing everything except the coaxial cable and the counter balance soldered to the shield.<br />
<br />
== Receiver ==<br />
The most important thing about the receiver is a good antenna (we used a 2.4GHz Yagi (532-4474 from RS components) at some competitions, also some patch antennas). The analog receiver modules itself do not seem to differ very much.<br />
<br />
== Display ==<br />
Tube television sets seem to have the best picture. As it blurs out the pixels the human eye can very good adapt to it. We used them whenever transport was not an issue. If not possible small TFT video screens intended for car entertainment were used.<br />
<br />
== Digital Display ==<br />
[[Image:Pollin_usb_r1.jpg|thumb|left|Pollin USB R1 video receiver/digitizer]]<br />
There is a TFT screen in the ground station, so why not use it? For that the picture does need to be digitized and feed into the laptop. In the early days we used a [http://www.plextor.com/english/products/M402U.htm Plextor M402U] to digitize and MPEG4 compress the analog video. It was then recorded or decompressed and displayed on screen. The drawback on this nice box is the delay you get through compressing/decompressing plus the size and the need for an external video receiver and power supply. A lot easier to use is the [http://www.pollin.de/shop/shop.php?cf=detail.php&pg=NQ==&a=NzM4OTE0OTk= Pollin USB-R1] which includes an analog video receiver and an USB (High Speed) digitizer. It does not need any external component or power supply.<br />
<br style="clear:both"><br />
<br />
===Plextor M402U===<br />
This box not really recommended any more. With a recent kernel and driver patches from the Paparazzi cvs it should be possible to get it to run.<br />
<br />
===Pollin USB R1===<br />
<br />
The [http://www.pollin.de/shop/dt/NzM4OTE0OTk-/Haustechnik/Sicherheitstechnik/Kameras/USB_Funkkamera_2_4_GHz.html Pollin USB-R1] requires no additional software drivers since the release of Ubuntu 10.04 (Lucid Lynx). It now works out of the box. <br />
<br />
====Watching Video====<br />
<br />
Watch video with (maybe adjust the NORM to PAL or whatever your cameras standard is):<br />
<br />
mplayer tv:// -tv driver=v4l2:width=320:height=240:norm=NTSC:input=0:device=/dev/video0:noaudio<br />
<br />
====LinuxTv (old driver)====<br />
<br />
http://www.linuxtv.org/wiki/index.php/Em28xx_devices<br />
<br />
shell> hg clone http://linuxtv.org/hg/v4l-dvb<br />
<br />
shell> cd v4l-dvb<br />
shell> make<br />
shell> sudo make install<br />
<br />
shell> mplayer tv:// -tv driver=v4l2:width=320:height=240:norm=PAL:input=1:device=/dev/video0:noaudio -vo x11<br />
<br />
====Linux Kernel 2.18 (old driver)====<br />
Some work is needed to get it to run with Linux as it needs a recent and patched version of the em28xx driver (this will get easier as the patches are integrated to v4l). You need some version control system as well as the kernel headers and video encoders, do as root:<br />
<br />
aptitude install mercurial linux-headers-$(uname -r) libxvidcore4 libxvidcore-dev mplayer<br />
<br />
Get the video4linux drivers using the (v4l) special version control system, as user:<br />
<br />
hg clone http://mcentral.de/hg/~mrec/v4l-dvb-kernel<br />
<br />
Copy over the two changed files "em28xx-cards.c" and "em28xx.h" from sw/in_progress/videolizer/v4l-dvb-experimental/ to the v4l-dvb-kernel/linux/drivers/media/video/em28xx/ folder. Then build v4l-dvb as user:<br />
<br />
cd v4l-dvb-kernel<br />
make<br />
<br />
And install as root (you have to do this each time you update the kernel):<br />
<br />
make install<br />
<br />
Add the follwing to /etc/modprobe.d/emb28xx (as the Pollin USB-R1 does not have an EEPROM for auto detect.) <br />
<br />
options em28xx card=62<br />
<br />
====Linux Kernel 2.26 (old driver)====<br />
The changes to the emb28xx driver have now been [http://mcentral.de/hg/~mrec/em28xx-new/rev/94d8ffd2d696 integrated upstream]. To build the driver, follow the [http://mcentral.de/wiki/index.php5/Installation_Guide instructions on the emb28xx driver website.]<br />
<br />
Add the follwing to /etc/modprobe.d/emb28xx (as the Pollin USB-R1 does not have an EEPROM for auto detect.) <br />
<br />
options em28xx card=76<br />
<br />
===Using separate Frame Grabber and Video Receiver===<br />
<br />
This solution provides maximum possible range, video quality and flexiblity due to modularity. Though it is more expensive and requires more hardware than the integrated [[Video#Pollin_USB_R1|Pollin USB R1]] solution.<br />
<br />
====Frame Grabber====<br />
<br />
[[Image:AVerMedia_EZMaker.jpg|thumb|left|AVerMedia DVD EZMaker USB 2.0 Gold]]<br />
<br />
This frame grabber takes the output of any video receiver and streams it into Linux. The Linux driver is provided by AVerMedia. In advantage to the [[Video#Pollin_USB_R1|Pollin USB R1]] solution, no emb28xx driver installation, v4l adaption or other special steps are required. The video stream can be directely integrated into the GCS as described in [[GCS#Video_Plugin|Video Plugin]].<br />
<br style="clear:both"><br />
<br />
====Video Receiver====<br />
<br />
[[Image:YellowJacket_Pro.jpg|thumb|left|Yellowjacket Pro Video Receiver 2.4GHz]]<br />
<br />
This diversity receiver provides high range and video quality. Especially when connected to high gain patch antennas.<br />
<br style="clear:both"><br />
<br />
== Streaming ==<br />
<br />
The USB video converters can be used to do live streams over the internet as seen at 24C3. We use [http://www.litech.org/spook/ spook] to receive the video data from the USB converter, compress it with MPEG4 and send it using the rtsp protocol. Spook needs some patches to work with the Pollin converter. Build it from Paparazzi cvs:<br />
<br />
cd sw/in_progress/videolizer/spook<br />
./configure<br />
<br />
All encoders should be enabled. Then build it:<br />
<br />
make<br />
<br />
and start it<br />
<br />
./spook -c spook.conf.usbraw<br />
<br />
Watch video through vlc from it<br />
<br />
vlc rtsp://localhost:7070/webcam<br />
<br />
Note: a first time spook user must chose the correct video camera output format i.e. NTSC or PAL, for instance. Navigate to ~paparazzi3/sw/in_progress/videolizer/spook/spook.conf.usbraw/input VL42/InputType PAL; The CVS default is set as PAL. <br />
<br />
Somehow the standard Debian 4.0 (etch) mplayer does not support rtsp:// video. The debian-multimedia.org mplayer seems to work. It can be installed adding to /etc/apt/sources.list:<br />
<br />
deb http://www.debian-multimedia.org etch main<br />
<br />
and install with<br />
<br />
aptitude install -t stable mplayer<br />
<br />
== Forward USB Streaming Video over a Mobile TCP/IP Link to a Remote Windows Viewer ==<br />
<br />
If one has installed a fully functional USB video streaming payload, as outlined above, and wishes to share the output with associates beyond the perimeter of the local gcs TFT, implement the following. <br />
<br />
===Modem Hardware===<br />
[[Image:Vodafone_Huawei_E800_HSDPA_3G_Mobile_Data_Card.jpg|thumb|left|Vodafone mobile data card]] <br />
Mobile modem choice is up to the user and ability to configure the interface to an ISP. The model described here and utilised for now is a Vodafone/Huawei E800 HSDPA 3G mobile data card. Compatible with Express Card laptops.<br />
<br style="clear:both"><br />
<br />
===Modem Linux Drivers===<br />
[[Image:Vodafone_MC_startup_splash.jpg|thumb|left|Startup splash]]<br />
Download the appropriate vodafone-mobile-connect-card-driver-for-linux for your Linux OS release at <br />
[https://forge.vodafonebetavine.net/frs/?group_id=12 Forge Vodafone Betavine]. The Unbuntu Gutsy Gibbon & Hardy Heron version used by me can be loaded here: [https://forge.vodafonebetavine.net/frs/download.php/167/vodafone-mobile-connect-card-driver-for-linux-2.0.beta2-ubuntu-installer.run vodafone-mobile-connect-card-driver-for-linux-2.0.beta2-ubuntu-installer.run]. Right click link, choose 'save link as' to your home folder. Check the permissions tab to allow the downloaded file to run as an executable. Run file. Follow the instructions in the [https://forge.vodafonebetavine.net/frs/download.php/179/README_2.0.beta2.txt README]. <br />
<br style="clear:both"><br />
<br />
Warning - the user is advised to install the data card in the express card slot prior to booting and turn off the wifi radio before intialising the software found in the /Applications/Internet drop down menus. Furthermore, the later procedure should be instituted before starting spook.<br />
<br />
The local gcs server should be ready now to transmit video as well as other data once a connection to the ISP is established. Confirm this by getting the IP address, as user:<br />
<br />
ifconfig <br />
<br />
===Remote Client Connection Configuration===<br />
[[Image:VLC_front_page.jpg|thumb|left|VLC Media Player]]<br />
Windows client users will have to download VLC Media Player here: [http://www.videolan.org/ Version 0.8.6f] to view JPEG/HTTP video as defined in ~paparazzi3/sw/in_progress/videolizer/spook/spook.conf.dist<br />
<br style="clear:both"> <br />
<br />
[[Image:PuTTY_SSH_front_page.jpg|thumb|left|PuTTY basic SSH configuration]]<br />
To faciltate a secure SSH TCP forward port connection from the host to the Windows client install PuTTY here: <br />
[http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTY Download page]. Insert the gcs host Mobile IP address obtained from the remote operator via a preferred form of communication .ie. chat, email etc.in the box labelled 'Host Name (or IP address)'. Confirm Port 22 is chosen and the connection type is SSH. Expand SSH category in left panel and click 'tunnels'. See next box.<br />
<br style="clear:both"><br />
<br />
[[Image:PuTTY_SSH_port_forwarding.jpg|thumb|left|PuTTY SSH port forwarding]]<br />
Tick both port forwarding options. Set Source port to '80' and destination to 'localhost:7070/webcam'. Click 'Add' and then 'Open'. See next box. <br />
<br style="clear:both"><br />
<br />
[[Image:PuTTY_Terminal.jpg|thumb|left|PuTTY terminal logged in]]<br />
The information contained within this terminal is self explanatory after a successful login. <br />
<br style="clear:both"><br />
<br />
[[Image:VLC_open_network_stream_page.jpg|thumb|left|VLC http network stream configuration]]<br />
Open VLC, click 'file', select 'open network stream' and then 'HTTP/HTTPS/FTP/MMS'. Enter 'localhost:80/webcam' in the URL box and select 'Open'. See next box.<br />
<br style="clear:both"><br />
<br />
[[Image:Streaming_JPEG_HTTP_window.jpg|thumb|left|VLC Streaming jpeg/http window]]<br />
Hopefully, whatever the on board camera is viewing is faithfully reproduced in the window. Unfortunately, the 'Print Screen' function fails to capture the live video output. <br />
<br style="clear:both"><br />
<br />
= Digital Video =<br />
<br />
This remains difficult as we are lacking a fast digital telemetry link. There are [http://www.comedia.com.cn/sm/C328.pdf serial bus cameras] that might be hooked up to the autopilot and JPEG encoded pictures be sent through telemetry.<br />
<br />
= On-Screen Display (OSD) =<br />
<br />
There are some situations where on-board data needs to be overlayed on the video stream. Examples include:<br />
* Alternative display of on-board data without a telemetry link and GCS;<br />
* In Australia, 2.4GHz analogue video links with OSD are considered as "telemetry transmitters" allowing 1000mW EIRP emission without a licence; or<br />
* Sending a callsign when operating under an amateur licence.<br />
<br />
A number of OSD devices exist.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Video&diff=8615Video2011-02-08T08:09:11Z<p>Markgriffin: /* Pollin USB R1 */</p>
<hr />
<div>The main application for small UAVs is video. There are various means to take pictures from the aircraft and transfer them to the ground.<br />
<br />
=Analog Video=<br />
<br />
The easiest and most practical way is to transfer video in an analog way either as NTSC or PAL signal. The picture is taken by a camera, put to an analog signal and sent through an FM modulated transmitter.<br />
<br />
==Cameras==<br />
Affordable CCD cameras tend to be better in dynamic range and noise than same price CMOS cameras. On the other side CMOS ones do need less energy and they are more likely to run with 5V.<br />
<br />
Small digital handheld cameras do have a much better optical system and sensor than stand alone cameras. There are ongoing efforts to reduce size and weight to be able to implement them.<br />
<br />
=== Recommended cameras ===<br />
A good selection of miniature cameras can be found at [http://www.microcameras.com/micro_cameras.htm Microcameras.com]. If you´re looking for Panasonic KX-xxx cameras find them here: [http://rangevideo.com/index.php?main_page=index&cPath=6 RangeVideo].<br />
<br />
[[Image:micro_clr_cmos_02.jpg|thumb|left|Mini Color CMOS Camera with Pinhole Lens<br>TV Lines: 380<br>Lux: 1.5 at F1.2<br>Shutter: 1/50-1/63000<br>Power: 7-12V DC, 25mA (bypass regulator for 5V use)<br>Dim: 12mm x 12mm x 14mm<br>Weight: 3.3g (w/o cable)]]<br />
[[Image:Cam_up.jpg|thumb|left|Camera position for upright pictures (crystal up). The blank copper is ground, blue is signal and red is 7V supply.]]<br />
[[Image:Cam_up_5v.jpg|thumb|left|Solder the red cable to the other side of the capacitor connected to ground for 5V supply.]]<br />
* Simple, lightweight camera with good performance<br />
<br style="clear:both"><br />
<br />
====Panasonic KX-141 (a.k.a. Pacific Corp. PC-2005) CCD====<br />
[[Image:PC-2005_COLOR_CAMERA.JPG|thumb|left|Pacific Corp. PC-2005 CCD<br>5V supply, signal is yellow<br>12g]]<br />
* Available at [http://www.blackwidowav.com/productcameras.html Black Widow AV]<br />
* Available here too [http://rangevideo.com/index.php?main_page=index&cPath=6 RangeVideo]<br />
<br style="clear:both"><br />
<br />
=== Pan/tilt mechanism ===<br />
For help in building a pan/tilt camera mechanism see our [[Pan_Tilt_Camera|pan/tilt camera]] page.<br />
Code for driving such as system is in <tt>/sw/airborne/cam.c</tt><br />
<br />
== Transmitter ==<br />
There are various FM transmitters available at 10mW, 50mW, 200mW or even more. Keep them as far away from the GPS receiver/antenna as possible as they might cause severe interference. For the competitions mostly 50mW or 200mW transmitters have been used.<br />
<br />
Standard 2.4GHz Wi-Fi antennas can be used as lightweight dipole antennas by breaking the plastic case and removing everything except the coaxial cable and the counter balance soldered to the shield.<br />
<br />
== Receiver ==<br />
The most important thing about the receiver is a good antenna (we used a 2.4GHz Yagi (532-4474 from RS components) at some competitions, also some patch antennas). The analog receiver modules itself do not seem to differ very much.<br />
<br />
== Display ==<br />
Tube television sets seem to have the best picture. As it blurs out the pixels the human eye can very good adapt to it. We used them whenever transport was not an issue. If not possible small TFT video screens intended for car entertainment were used.<br />
<br />
== Digital Display ==<br />
[[Image:Pollin_usb_r1.jpg|thumb|left|Pollin USB R1 video receiver/digitizer]]<br />
There is a TFT screen in the ground station, so why not use it? For that the picture does need to be digitized and feed into the laptop. In the early days we used a [http://www.plextor.com/english/products/M402U.htm Plextor M402U] to digitize and MPEG4 compress the analog video. It was then recorded or decompressed and displayed on screen. The drawback on this nice box is the delay you get through compressing/decompressing plus the size and the need for an external video receiver and power supply. A lot easier to use is the [http://www.pollin.de/shop/shop.php?cf=detail.php&pg=NQ==&a=NzM4OTE0OTk= Pollin USB-R1] which includes an analog video receiver and an USB (High Speed) digitizer. It does not need any external component or power supply.<br />
<br style="clear:both"><br />
<br />
===Plextor M402U===<br />
This box not really recommended any more. With a recent kernel and driver patches from the Paparazzi cvs it should be possible to get it to run.<br />
<br />
===Pollin USB R1===<br />
<br />
The [http://www.pollin.de/shop/dt/NzM4OTE0OTk-/Haustechnik/Sicherheitstechnik/Kameras/USB_Funkkamera_2_4_GHz.html Pollin USB-R1] requires no additional software drivers since the release of Ubuntu 10.04 (Lucid Lynx). It works out of the box. <br />
<br />
====Watching Video====<br />
<br />
Watch video with (maybe adjust the NORM to PAL or whatever your cameras standard is):<br />
<br />
mplayer tv:// -tv driver=v4l2:width=320:height=240:norm=NTSC:input=0:device=/dev/video0:noaudio<br />
<br />
<br />
====LinuxTv (old driver)====<br />
<br />
http://www.linuxtv.org/wiki/index.php/Em28xx_devices<br />
<br />
shell> hg clone http://linuxtv.org/hg/v4l-dvb<br />
<br />
shell> cd v4l-dvb<br />
shell> make<br />
shell> sudo make install<br />
<br />
shell> mplayer tv:// -tv driver=v4l2:width=320:height=240:norm=PAL:input=1:device=/dev/video0:noaudio -vo x11<br />
<br />
====Linux Kernel 2.18 (old driver)====<br />
Some work is needed to get it to run with Linux as it needs a recent and patched version of the em28xx driver (this will get easier as the patches are integrated to v4l). You need some version control system as well as the kernel headers and video encoders, do as root:<br />
<br />
aptitude install mercurial linux-headers-$(uname -r) libxvidcore4 libxvidcore-dev mplayer<br />
<br />
Get the video4linux drivers using the (v4l) special version control system, as user:<br />
<br />
hg clone http://mcentral.de/hg/~mrec/v4l-dvb-kernel<br />
<br />
Copy over the two changed files "em28xx-cards.c" and "em28xx.h" from sw/in_progress/videolizer/v4l-dvb-experimental/ to the v4l-dvb-kernel/linux/drivers/media/video/em28xx/ folder. Then build v4l-dvb as user:<br />
<br />
cd v4l-dvb-kernel<br />
make<br />
<br />
And install as root (you have to do this each time you update the kernel):<br />
<br />
make install<br />
<br />
Add the follwing to /etc/modprobe.d/emb28xx (as the Pollin USB-R1 does not have an EEPROM for auto detect.) <br />
<br />
options em28xx card=62<br />
<br />
====Linux Kernel 2.26 (old driver)====<br />
The changes to the emb28xx driver have now been [http://mcentral.de/hg/~mrec/em28xx-new/rev/94d8ffd2d696 integrated upstream]. To build the driver, follow the [http://mcentral.de/wiki/index.php5/Installation_Guide instructions on the emb28xx driver website.]<br />
<br />
Add the follwing to /etc/modprobe.d/emb28xx (as the Pollin USB-R1 does not have an EEPROM for auto detect.) <br />
<br />
options em28xx card=76<br />
<br />
===Using separate Frame Grabber and Video Receiver===<br />
<br />
This solution provides maximum possible range, video quality and flexiblity due to modularity. Though it is more expensive and requires more hardware than the integrated [[Video#Pollin_USB_R1|Pollin USB R1]] solution.<br />
<br />
====Frame Grabber====<br />
<br />
[[Image:AVerMedia_EZMaker.jpg|thumb|left|AVerMedia DVD EZMaker USB 2.0 Gold]]<br />
<br />
This frame grabber takes the output of any video receiver and streams it into Linux. The Linux driver is provided by AVerMedia. In advantage to the [[Video#Pollin_USB_R1|Pollin USB R1]] solution, no emb28xx driver installation, v4l adaption or other special steps are required. The video stream can be directely integrated into the GCS as described in [[GCS#Video_Plugin|Video Plugin]].<br />
<br style="clear:both"><br />
<br />
====Video Receiver====<br />
<br />
[[Image:YellowJacket_Pro.jpg|thumb|left|Yellowjacket Pro Video Receiver 2.4GHz]]<br />
<br />
This diversity receiver provides high range and video quality. Especially when connected to high gain patch antennas.<br />
<br style="clear:both"><br />
<br />
== Streaming ==<br />
<br />
The USB video converters can be used to do live streams over the internet as seen at 24C3. We use [http://www.litech.org/spook/ spook] to receive the video data from the USB converter, compress it with MPEG4 and send it using the rtsp protocol. Spook needs some patches to work with the Pollin converter. Build it from Paparazzi cvs:<br />
<br />
cd sw/in_progress/videolizer/spook<br />
./configure<br />
<br />
All encoders should be enabled. Then build it:<br />
<br />
make<br />
<br />
and start it<br />
<br />
./spook -c spook.conf.usbraw<br />
<br />
Watch video through vlc from it<br />
<br />
vlc rtsp://localhost:7070/webcam<br />
<br />
Note: a first time spook user must chose the correct video camera output format i.e. NTSC or PAL, for instance. Navigate to ~paparazzi3/sw/in_progress/videolizer/spook/spook.conf.usbraw/input VL42/InputType PAL; The CVS default is set as PAL. <br />
<br />
Somehow the standard Debian 4.0 (etch) mplayer does not support rtsp:// video. The debian-multimedia.org mplayer seems to work. It can be installed adding to /etc/apt/sources.list:<br />
<br />
deb http://www.debian-multimedia.org etch main<br />
<br />
and install with<br />
<br />
aptitude install -t stable mplayer<br />
<br />
== Forward USB Streaming Video over a Mobile TCP/IP Link to a Remote Windows Viewer ==<br />
<br />
If one has installed a fully functional USB video streaming payload, as outlined above, and wishes to share the output with associates beyond the perimeter of the local gcs TFT, implement the following. <br />
<br />
===Modem Hardware===<br />
[[Image:Vodafone_Huawei_E800_HSDPA_3G_Mobile_Data_Card.jpg|thumb|left|Vodafone mobile data card]] <br />
Mobile modem choice is up to the user and ability to configure the interface to an ISP. The model described here and utilised for now is a Vodafone/Huawei E800 HSDPA 3G mobile data card. Compatible with Express Card laptops.<br />
<br style="clear:both"><br />
<br />
===Modem Linux Drivers===<br />
[[Image:Vodafone_MC_startup_splash.jpg|thumb|left|Startup splash]]<br />
Download the appropriate vodafone-mobile-connect-card-driver-for-linux for your Linux OS release at <br />
[https://forge.vodafonebetavine.net/frs/?group_id=12 Forge Vodafone Betavine]. The Unbuntu Gutsy Gibbon & Hardy Heron version used by me can be loaded here: [https://forge.vodafonebetavine.net/frs/download.php/167/vodafone-mobile-connect-card-driver-for-linux-2.0.beta2-ubuntu-installer.run vodafone-mobile-connect-card-driver-for-linux-2.0.beta2-ubuntu-installer.run]. Right click link, choose 'save link as' to your home folder. Check the permissions tab to allow the downloaded file to run as an executable. Run file. Follow the instructions in the [https://forge.vodafonebetavine.net/frs/download.php/179/README_2.0.beta2.txt README]. <br />
<br style="clear:both"><br />
<br />
Warning - the user is advised to install the data card in the express card slot prior to booting and turn off the wifi radio before intialising the software found in the /Applications/Internet drop down menus. Furthermore, the later procedure should be instituted before starting spook.<br />
<br />
The local gcs server should be ready now to transmit video as well as other data once a connection to the ISP is established. Confirm this by getting the IP address, as user:<br />
<br />
ifconfig <br />
<br />
===Remote Client Connection Configuration===<br />
[[Image:VLC_front_page.jpg|thumb|left|VLC Media Player]]<br />
Windows client users will have to download VLC Media Player here: [http://www.videolan.org/ Version 0.8.6f] to view JPEG/HTTP video as defined in ~paparazzi3/sw/in_progress/videolizer/spook/spook.conf.dist<br />
<br style="clear:both"> <br />
<br />
[[Image:PuTTY_SSH_front_page.jpg|thumb|left|PuTTY basic SSH configuration]]<br />
To faciltate a secure SSH TCP forward port connection from the host to the Windows client install PuTTY here: <br />
[http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTY Download page]. Insert the gcs host Mobile IP address obtained from the remote operator via a preferred form of communication .ie. chat, email etc.in the box labelled 'Host Name (or IP address)'. Confirm Port 22 is chosen and the connection type is SSH. Expand SSH category in left panel and click 'tunnels'. See next box.<br />
<br style="clear:both"><br />
<br />
[[Image:PuTTY_SSH_port_forwarding.jpg|thumb|left|PuTTY SSH port forwarding]]<br />
Tick both port forwarding options. Set Source port to '80' and destination to 'localhost:7070/webcam'. Click 'Add' and then 'Open'. See next box. <br />
<br style="clear:both"><br />
<br />
[[Image:PuTTY_Terminal.jpg|thumb|left|PuTTY terminal logged in]]<br />
The information contained within this terminal is self explanatory after a successful login. <br />
<br style="clear:both"><br />
<br />
[[Image:VLC_open_network_stream_page.jpg|thumb|left|VLC http network stream configuration]]<br />
Open VLC, click 'file', select 'open network stream' and then 'HTTP/HTTPS/FTP/MMS'. Enter 'localhost:80/webcam' in the URL box and select 'Open'. See next box.<br />
<br style="clear:both"><br />
<br />
[[Image:Streaming_JPEG_HTTP_window.jpg|thumb|left|VLC Streaming jpeg/http window]]<br />
Hopefully, whatever the on board camera is viewing is faithfully reproduced in the window. Unfortunately, the 'Print Screen' function fails to capture the live video output. <br />
<br style="clear:both"><br />
<br />
= Digital Video =<br />
<br />
This remains difficult as we are lacking a fast digital telemetry link. There are [http://www.comedia.com.cn/sm/C328.pdf serial bus cameras] that might be hooked up to the autopilot and JPEG encoded pictures be sent through telemetry.<br />
<br />
= On-Screen Display (OSD) =<br />
<br />
There are some situations where on-board data needs to be overlayed on the video stream. Examples include:<br />
* Alternative display of on-board data without a telemetry link and GCS;<br />
* In Australia, 2.4GHz analogue video links with OSD are considered as "telemetry transmitters" allowing 1000mW EIRP emission without a licence; or<br />
* Sending a callsign when operating under an amateur licence.<br />
<br />
A number of OSD devices exist.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=ArduIMU&diff=8147ArduIMU2010-12-03T13:24:32Z<p>Markgriffin: </p>
<hr />
<div>[[Image:Tiny13wIMU_001.jpg|thumb|right|Tiny13 w/IMU]]<br />
This page describes how to integrate an [http://code.google.com/p/ardu-imu/wiki/HomePage?tm=6 ArduIMU+ V2 (flat)] into an existing Airframe/Paparazzi-Code.<br />
#The ArduIMU communicates over i2c with the Paparazzi-AP. The wiring is pretty easy to do. Connect SDA, SCL, ground and supply the IMU with 5V. Do not connect 3.3V from the Paparazzi-AP to the ArduIMU as it internally generates it's own stable 3.3v supply.<br />
#Integration into the Paparazzi software is realized as a module. This is an easy way to connect and test the software. <br />
#This description shows how to use the ArduIMU without a separate GPS-Receiver and without a Compass/Magnetometer. The GPS-Data is sent by the Paparazzi-AP over i2c to the ArduIMU.<br />
#There is an other airframe/main-AP we wrote which uses a magnetometer for yaw-drift compensation. We haven't written an installation guide for this configuration yet. But we will try to do this as soon as possible. <br />
<br />
The Code has been integrated into the Paparazzi build system. <br />
<br />
<br />
== Airframe Adjustments ==<br />
<br />
conf/airframes: "MyAirframe.xml"<br />
* (1) '''Insert''' the module:<br />
<modules><br />
<load name="ins_arduimu.xml"/><br />
</modules><br />
<br />
* (2) Activate "i2c"<br />
<target name="ap" board="..."><br />
...<br />
<define name="USE_I2C0"/><br />
</target><br />
<subsystem name="i2c"/> <br />
<br />
* (3) '''Insert''' INS neutrals<br />
<br />
<section name="INS" prefix="INS_"><br />
<define name="ROLL_NEUTRAL_DEFAULT" value="0" unit="deg"/><br />
<define name="PITCH_NEUTRAL_DEFAULT" value="0" unit="deg"/><br />
</section><br />
<br />
* (4) Use this "Settings" file: settings/tuning_ins.xml<br />
<br />
* (5) '''Remove''' the infrared estimation<br />
<br />
remove this:<br />
<subsystem name="attitude" type="infrared"/><br />
<br />
== Flash the ArduIMU ==<br />
<br />
* (6) Flash the ArduIMU with the adapted software in '''sw/airborne/firmwares/non_ap/arduimu_Firmware_WithGps'''. For information concerning flashing of the ArduIMU, read: http://code.google.com/p/ardu-imu/wiki/Code<br />
<br />
<br />
You can find the original ZHAW code [https://home.zhaw.ch/~schmiemi/Arduimu4Paprazzi.rar here].<br />
<br />
== Hardware Considerations ==<br />
<br />
So far, this setup has been successfully flown in the Maja and EasyStar aircraft. For faster more agile aircraft such as the Merlin or Funjet, the polling rate needs to be changed from 15 Hz to 40 Hz in the '''/conf/modules/ins_arduimu.xml''' file.<br />
<br />
The ArduIMU is sensitive to vibrations. Mount it on a thick piece of foam to dampen the vibrations.<br />
<br />
<br />
Have Fun !</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=ArduIMU&diff=8146ArduIMU2010-12-03T13:17:52Z<p>Markgriffin: </p>
<hr />
<div>[[Image:Tiny13wIMU_001.jpg|thumb|right|Tiny13 w/IMU]]<br />
This page describes how to integrate an [http://code.google.com/p/ardu-imu/wiki/HomePage?tm=6 ArduIMU+ V2 (flat)] into an existing Airframe/Paparazzi-Code.<br />
#The ArduIMU communicates over i2c with the Paparazzi-AP. The wiring is pretty easy to do. Connect SDA, SCL, ground and supply the IMU with 5V. Do not connect 3.3V from the Paparazzi-AP to the ArduIMU as it internally generates it's own stable 3.3v supply.<br />
#Integration into the Paparazzi software is realized as a module. This is an easy way to connect and test the software. <br />
#This description shows how to use the ArduIMU without a separate GPS-Receiver and without a Compass/Magnetometer. The GPS-Data is sent by the Paparazzi-AP over i2c to the ArduIMU.<br />
#There is an other airframe/main-AP we wrote which uses a magnetometer for yaw-drift compensation. We haven't written an installation guide for this configuration yet. But we will try to do this as soon as possible. <br />
<br />
The Code has been integrated into the Paparazzi build system. <br />
<br />
<br />
== Airframe Adjustments ==<br />
<br />
conf/airframes: "MyAirframe.xml"<br />
* (1) '''Insert''' the module:<br />
<modules><br />
<load name="ins_arduimu.xml"/><br />
</modules><br />
<br />
* (2) Activate "i2c"<br />
<target name="ap" board="..."><br />
...<br />
<define name="USE_I2C0"/><br />
</target><br />
<subsystem name="i2c"/> <br />
<br />
* (3) '''Insert''' INS neutrals<br />
<br />
<section name="INS" prefix="INS_"><br />
<define name="ROLL_NEUTRAL_DEFAULT" value="0" unit="deg"/><br />
<define name="PITCH_NEUTRAL_DEFAULT" value="0" unit="deg"/><br />
</section><br />
<br />
* (4) Use this "Settings" file: settings/tuning_ins.xml<br />
<br />
* (5) '''Remove''' the infrared estimation<br />
<br />
remove this:<br />
<subsystem name="attitude" type="infrared"/><br />
<br />
== Flash the ArduIMU ==<br />
<br />
* (6) Flash the ArduIMU with the adapted software in '''sw/airborne/firmwares/non_ap/arduimu_Firmware_WithGps'''. For information concerning flashing of the ArduIMU, read: http://code.google.com/p/ardu-imu/wiki/Code<br />
<br />
<br />
You can find the original ZHAW code [https://home.zhaw.ch/~schmiemi/Arduimu4Paprazzi.rar here].<br />
<br />
<br />
So far, this setup has been successfully flown in the Maja and EasyStar aircraft. For faster more agile aircraft such as the Merlin or Funjet, the polling rate needs to be changed from 15 Hz to 40 Hz in the '''/conf/modules/ins_arduimu.xml''' file.<br />
<br />
<br />
Have Fun !</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=ArduIMU&diff=8145ArduIMU2010-12-03T13:16:39Z<p>Markgriffin: </p>
<hr />
<div>[[Image:Tiny13wIMU_001.jpg|thumb|right|Tiny13 w/IMU]]<br />
This page describes how to integrate an [http://code.google.com/p/ardu-imu/wiki/HomePage?tm=6 ArduIMU+ V2 (flat)] into an existing Airframe/Paparazzi-Code.<br />
#The ArduIMU communicates over i2c with the Paparazzi-AP. The wiring is pretty easy to do. Connect SDA, SCL, ground and supply the IMU with 5V. Do not connect 3.3V from the Paparazzi-AP to the ArduIMU as it internally generates it's own stable 3.3v supply.<br />
#Integration into the Paparazzi software is realized as a module. This is an easy way to connect and test the software. <br />
#This description shows how to use the ArduIMU without a separate GPS-Receiver and without a Compass/Magnetometer. The GPS-Data is sent by the Paparazzi-AP over i2c to the ArduIMU.<br />
#There is an other airframe/main-AP we wrote which uses a magnetometer for yaw-drift compensation. We haven't written an installation guide for this configuration yet. But we will try to do this as soon as possible. <br />
<br />
The Code has been integrated into the Paparazzi build system. <br />
<br />
<br />
== Airframe Adjustments ==<br />
<br />
conf/airframes: "MyAirframe.xml"<br />
* (1) '''Insert''' the module:<br />
<modules><br />
<load name="ins_arduimu.xml"/><br />
</modules><br />
<br />
* (2) Activate "i2c"<br />
<target name="ap" board="..."><br />
...<br />
<define name="USE_I2C0"/><br />
</target><br />
<subsystem name="i2c"/> <br />
<br />
* (3) '''Insert''' INS neutrals<br />
<br />
<section name="INS" prefix="INS_"><br />
<define name="ROLL_NEUTRAL_DEFAULT" value="0" unit="deg"/><br />
<define name="PITCH_NEUTRAL_DEFAULT" value="0" unit="deg"/><br />
</section><br />
<br />
* (4) Use this "Settings" file: settings/tuning_ins.xml<br />
<br />
* (5) '''Remove''' the infrared estimation<br />
<br />
remove this:<br />
<subsystem name="attitude" type="infrared"/><br />
<br />
== Flash the ArduIMU ==<br />
<br />
* (6) Flash the ArduIMU with the adapted software in '''sw/airborne/firmwares/non_ap/arduimu_Firmware_WithGps'''. For information concerning flashing of the ArduIMU, read: http://code.google.com/p/ardu-imu/wiki/Code<br />
<br />
<br />
You can find the original ZHAW code [https://home.zhaw.ch/~schmiemi/Arduimu4Paprazzi.rar here].<br />
<br />
<br />
So far, this setup has been successfully flown in the Maja and EasyStar aircraft. For faster more agile aircraft such as the Merlin or Funjet, the polling rate needs to be changed from 15 Hz to 40 Hz in the /conf/modules/ins_arduimu.xml file.<br />
<br />
<br />
Have Fun !</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Antenna_Tracker&diff=8131Antenna Tracker2010-11-29T13:44:43Z<p>Markgriffin: </p>
<hr />
<div>An antenna tracker is a hardware/software solution that follows an aircraft in flight to keep a high-gain directional antenna locked on to it. This is particularly useful for live video feeds. The software estimates the pan/azimuth/Theta and tilt/elevation/Psi angles based on information contained in the GPS and NAVIGATION telemetry messages, which are available through the IVY software bus.<br />
<br />
== '''Basic Example''' ==<br />
<br />
The basic ''ant_track.c'' code can be found in the paparazzi3/sw/ground_segment/cockpit folder. <br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track<br />
3. Run it with: <br />
./ant_track<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi (use the simulator), wait for GPS 3D lock to be obtained, then you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
== '''Sophisticated Pololu Based Tracker''' ==<br />
<br />
The basic code has been modified to send the azimuth/elevation values through USB to the [http://www.pololu.com/catalog/category/12 Pololu servo controller]. It drives two servos mounted on a pan/tilt mechanism.<br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track_pmm<br />
3. Run it with: <br />
./ant_track_pmm<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi (to test use the simulator), wait for GPS 3D lock to be obtained, then you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
The following command line inputs are possible:<br />
<br />
--port=xxx..x opens port xxx..x. Example --port=/dev/ttyACM0 (Default).<br />
--pan=xxx sets pan mode to 180 or 360 degrees. Example --pan=180 (Default).<br />
--zero_angle=xxx set the mechanical zero angle. Default is 0 (North).<br />
--id=xx sets the Pololu board id. Example --id=12 (Default).<br />
--servo_acc=xxx sets the servo acceleration. Example --servo_acc=3 (Default).<br />
--pan_servo=x sets the pan/azimuth/Theta servo number. Example --pan_servo=0 (Default).<br />
--tilt_servo=x sets the tilt/elevation/Psi servo number. Example --tilt_servo=1 (Default).<br />
--pan_epa=xx..x sets the pan/azimuth servo's max travel (Default is 1100us).<br />
--tilt_epa=xx..x sets the tilt/elevation servo's max travel (Default is 1100us). HINT: a negative EPA value reverses the servo direction.<br />
--pan_servo_center_pw=xx..x sets the pan/azimuth servo's center position (Default is 1500us).<br />
--tilt_servo_center_pw=xx..x sets the tilt/elevation servo's center position (Default is 1500us).<br />
<br />
'''Notes:'''<br />
<br />
The antenna tracker zero azimuth is to the NORTH (NORTH = 0, EAST = 90 WEST = -90, SOUTH = 180/0 degrees). The elevation zero is totally horizontal, 90 is up and 180 is to the back. The servo used must be able to do 180 degrees in order to get full 360 degree coverage from the tracker.<br />
<br />
<br />
WARNING: The Pololu board limits servo travel to 1000-2000 microseconds (default). Use the Pololu board setup program to change the above limits.<br />
<br />
Examples: <br />
./ant_track_pmm --tilt_epa=1100 <br />
sets the pulse width from 950us to 2050us (1500+(1100/2)=2050us to 1500-(1100/2)=950us).<br />
<br />
./ant_track_pmm --pan_epa=-1000<br />
sets the pulse width from 1000us to 2000 us and reverses the servo direction.<br />
<br />
<br />
Use programmable servos like the Hyperion Atlas. You can also use the proportional 360 degree GWS S125-1T as the Theta (Azimuth) servo or the mighty but expensive Futaba S5801.<br />
<br />
<br />
'''FOR THE 360 DEGREE PAN MODE:'''<br />
<br />
Mechanical zero (0 degrees or 1500us) is to the NORTH, 90 = EAST, +-180 = SOUTH and -90 = WEST.<br />
<br />
Elevation center is 45 degrees up (1500us), 0 degrees = horizontal, 90 degrees is vertical (up).<br />
<br />
Of course use this mode if your PAN servo can do a full 360 degrees rotation (GWS S125-1T for example).<br />
<br />
<br />
'''FOR THE 180 DEGREE PAN MODE:'''<br />
<br />
Mechanical zero (0 degrees or 1500us) is to the NORTH, 90 = EAST, -90 = WEST.<br />
<br />
Elevation center is 90 degrees up (1500us), 0 degrees = horizontal, 180 degrees is horizontal to the opposite side.<br />
<br />
When the azimuth is > 90 or < -90 the azimuth and elevation servos swap sides to obtain the full 360 degree coverage.<br />
<br />
Of course your PAN and TILT servos must be true 180 degrees servos like the Hyperion ATLAS servos for example.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Antenna_Tracker&diff=8130Antenna Tracker2010-11-29T13:36:23Z<p>Markgriffin: </p>
<hr />
<div>An antenna tracker is a hardware/software solution that follows an aircraft in flight to keep a high-gain directional antenna locked on to it. This is particularly useful for live video feeds. The software estimates the pan/azimuth/Theta and tilt/elevation/Psi angles based on information contained in the GPS and NAVIGATION telemetry messages, which are available through the IVY software bus.<br />
<br />
== '''Basic Example''' ==<br />
<br />
The basic ''ant_track.c'' code can be found in the paparazzi3/sw/ground_segment/cockpit folder. <br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track<br />
3. Run it with: <br />
./ant_track<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi (use the simulator), wait for GPS 3D lock to be obtained, then you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
== '''Sophisticated Pololu Based Tracker''' ==<br />
<br />
The basic code has been modified to send the azimuth/elevation values through USB to the [http://www.pololu.com/catalog/category/12 Pololu servo controller]. It drives two servos mounted on a pan/tilt mechanism.<br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track_pmm<br />
3. Run it with: <br />
./ant_track_pmm<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi (to test use the simulator), wait for GPS 3D lock to be obtained, then you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
The following command line inputs are possible:<br />
<br />
--port=xxx..x opens port xxx..x. Example --port=/dev/ttyACM0 (Default).<br />
--pan=xxx sets pan mode to 180 or 360 degrees. Example --pan=180 (Default).<br />
--zero_angle=xxx set the mechanical zero angle. Default is 0 (North).<br />
--id=xx sets the Pololu board id. Example --id=12 (Default).<br />
--servo_acc=xxx sets the servo acceleration. Example --servo_acc=3 (Default).<br />
--pan_servo=x sets the pan/azimuth/Theta servo number. Example --pan_servo=0 (Default).<br />
--tilt_servo=x sets the tilt/elevation/Psi servo number. Example --tilt_servo=1 (Default).<br />
--pan_epa=xx..x sets the pan/azimuth servo's max travel (Default is 1100us).<br />
--tilt_epa=xx..x sets the tilt/elevation servo's max travel (Default is 1100us). HINT: a negative EPA value reverses the servo direction.<br />
--pan_servo_center_pw=xx..x sets the pan/azimuth servo's center position (Default is 1500us).<br />
--tilt_servo_center_pw=xx..x sets the tilt/elevation servo's center position (Default is 1500us).<br />
<br />
'''Notes:'''<br />
<br />
The antenna tracker zero azimuth is to the NORTH (NORTH = 0, EAST = 90 WEST = -90, SOUTH = 180/0 degrees). The elevation zero is totally horizontal, 90 is up and 180 is to the back. The servo used must be able to do 180 degrees in order to get full 360 degree coverage from the tracker.<br />
<br />
<br />
WARNING: The Pololu board limits servo travel to 1000-2000 microseconds (default). Use the Pololu board setup program to change the above limits.<br />
<br />
<br />
Examples: --tilt_epa=1100 sets the PW from 950 to 2050 microseconds.<br />
<br />
--pan_epa=-1000 sets the PW from 1000 to 2000 microseconds and reverses the servo direction.<br />
<br />
<br />
An EPA of 1100 sets the servo travel from 1500+(1100/2)=2050us to 1500-(1100/2)=950us.<br />
<br />
Use programmable servos like the Hyperion Atlas. You can also use the proportional 360 degree GWS S125-1T as the Theta (Azimuth) servo or the mighty but expensive Futaba S5801.<br />
<br />
<br />
'''FOR THE 360 DEGREE PAN MODE:'''<br />
<br />
Mechanical zero (0 degrees or 1500 ms) is to the NORTH, 90 = EAST, +-180 = SOUTH and -90 = WEST.<br />
<br />
Elevation center is 45 degrees up (1500ms), 0 degrees = horizontal, 90 degrees is vertical (up).<br />
<br />
Of course use this mode if your PAN servo can do a full 360 degrees rotation (GWS S125-1T for example).<br />
<br />
<br />
'''FOR THE 180 DEGREE PAN MODE:'''<br />
<br />
Mechanical zero (0 degrees or 1500 ms) is to the NORTH, 90 = EAST, -90 = WEST.<br />
<br />
Elevation center is 90 degrees up (1500ms), 0 degrees = horizontal, 180 degrees is horizontal to the opposite side.<br />
<br />
When the azimuth is > 90 or < -90 the azimuth and elevation servos swap sides to obtain the full 360 degree coverage.<br />
<br />
Of course your PAN and TILT servos must be true 180 degrees servos like the Hyperion ATLAS servos for example.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Antenna_Tracker&diff=8129Antenna Tracker2010-11-29T08:45:37Z<p>Markgriffin: </p>
<hr />
<div>An antenna tracker follows an aircraft in flight to keep a high-gain directional antenna locked on to it. This is particularly useful for live video feeds. The code below estimates the azimuth and elevation angles based on the information contained in the GPS and NAVIGATION telemetry messages, which are available through the IVY bus.<br />
<br />
== '''Basic Example''' ==<br />
<br />
The basic ''ant_track.c'' code can be found in the paparazzi3/sw/ground_segment/cockpit folder. <br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track<br />
3. Run it with: <br />
./ant_track<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi (use the simulator), wait for GPS 3D lock to be obtained, then you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
== '''Sophisticated Pololu Based Tracker''' ==<br />
<br />
The basic code has been modified to send the azimuth/elevation values through USB to the [http://www.pololu.com/catalog/category/12 Pololu servo controller]. It drives two servos mounted to an appropriate pan/tilt mechanism.<br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track_pmm<br />
3. Run it with: <br />
./ant_track_pmm<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi (to test use the simulator), wait for GPS 3D lock to be obtained, then you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
The following command line inputs are possible:<br />
<br />
--port=xxx..x opens port xxx..x. Example --port=/dev/ttyACM0 (Default).<br />
--pan=xxx sets pan mode to 180 or 360 degrees. Example --pan=180 (Default).<br />
--zero_angle=xxx set the mechanical zero angle. Default is 0 (North).<br />
--id=xx sets the Pololu board id. Example --id=12 (Default).<br />
--servo_acc=xxx sets the servo acceleration. Example --servo_acc=3 (Default).<br />
--pan_servo=x sets the pan/azimuth/Theta servo number. Example --pan_servo=0 (Default).<br />
--tilt_servo=x sets the tilt/elevation/Psi servo number. Example --tilt_servo=1 (Default).<br />
--pan_epa=xx..x sets the pan/azimuth servo's max travel (Default is 1100us).<br />
--tilt_epa=xx..x sets the tilt/elevation servo's max travel (Default is 1100us). HINT: a negative EPA value reverses the servo direction.<br />
--pan_servo_center_pw=xx..x sets the pan/azimuth servo's center position (Default is 1500us).<br />
--tilt_servo_center_pw=xx..x sets the tilt/elevation servo's center position (Default is 1500us).<br />
<br />
'''Notes:'''<br />
<br />
The antenna tracker zero azimuth is to the NORTH (NORTH = 0, EAST = 90 WEST = -90, SOUTH = 180/0 degrees).<br />
<br />
The elevation zero is totally horizontal, 90 is up and 180 is to the back.<br />
<br />
The servo used must be able to do 180 degrees in order to get full 360 degree coverage from the tracker.<br />
<br />
<br />
WARNING: The Pololu board limits servo travel to 1000-2000 microseconds.<br />
<br />
WARNING: Use the Pololu board setup program to change the above limits.<br />
<br />
<br />
Example: --tilt_epa=1100 sets the PW from 950 to 2050 microseconds.<br />
<br />
Example: --pan_epa=-1000 sets the PW from 1000 to 2000 microseconds and reverses the servo direction.<br />
<br />
<br />
An EPA of 1100 sets the servo travel from 1500+(1100/2)=2050us to 1500-(1100/2)=950us.<br />
<br />
Use programmable servos like the Hyperion Atlas. You can also use the proportional 360 degree GWS S125-1T as the Theta (Azimuth) servo or the mighty but expensive Futaba S5801.<br />
<br />
<br />
'''FOR THE 360 DEGREE PAN MODE:'''<br />
<br />
Mechanical zero (0 degrees or 1500 ms) is to the NORTH, 90 = EAST, +-180 = SOUTH and -90 = WEST.<br />
<br />
Elevation center is 45 degrees up (1500ms), 0 degrees = horizontal, 90 degrees is vertical (up).<br />
<br />
Of course use this mode if your PAN servo can do a full 360 degrees rotation (GWS S125-1T for example).<br />
<br />
<br />
'''FOR THE 180 DEGREE PAN MODE:'''<br />
<br />
Mechanical zero (0 degrees or 1500 ms) is to the NORTH, 90 = EAST, -90 = WEST.<br />
<br />
Elevation center is 90 degrees up (1500ms), 0 degrees = horizontal, 180 degrees is horizontal to the opposite side.<br />
<br />
When the azimuth is > 90 or < -90 the azimuth and elevation servos swap sides to obtain the full 360 degree coverage.<br />
<br />
Of course your PAN and TILT servos must be true 180 degrees servos like the Hyperion ATLAS servos for example.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Antenna_Tracker&diff=8128Antenna Tracker2010-11-29T08:40:36Z<p>Markgriffin: </p>
<hr />
<div>An antenna tracker follows an aircraft in flight to keep a high-gain directional antenna locked on to it. This is particularly useful for live video feeds. The code below estimates the azimuth and elevation angles based on the information contained in the GPS and NAVIGATION telemetry messages, which are available through the IVY bus.<br />
<br />
== '''Basic Example''' ==<br />
<br />
The basic ''ant_track.c'' code can be found in the paparazzi3/sw/ground_segment/cockpit folder. <br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track<br />
3. Run it with: <br />
./ant_track<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi (use the simulator), wait for GPS 3D lock to be obtained, then you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
== '''Sophisticated Pololu Based Tracker''' ==<br />
<br />
The basic code has been modified to send the azimuth/elevation values through USB to the [http://www.pololu.com/catalog/category/12 Pololu servo controller]. It drives two servos mounted to an appropriate pan/tilt mechanism.<br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track_pmm<br />
3. Run it with: <br />
./ant_track_pmm<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi (to test use the simulator), wait for GPS 3D lock to be obtained, then you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
The following command line inputs are possible:<br />
<br />
--port=xxx..x opens port xxx..x, example --port=/dev/ttyACM0 (Default).<br />
--pan=xxx sets pan mode to 180 or 360 degrees. Example --pan=180 (Default).<br />
--zero_angle=xxx set the mechanical zero angle. Default is 0 (North).<br />
--id=xx sets the Pololu board id. Example --id=12 (Default).<br />
--servo_acc=xxx sets the servo acceleration. Example --servo_acc=3 (Default).<br />
--pan_servo=x sets the pan (Theta) servo number. Example --pan_servo=0 (Default).<br />
--tilt_servo=x sets the tilt (Psi) servo number.Example --tilt_servo=1 (Default).<br />
--pan_epa=xx..x sets the Azimuth servo's max travel (Default is 1100us).<br />
--tilt_epa=xx..x sets the elevation servo's max travel (Default is 1100us). HINT: a negative value EPA value reverses the servo direction.<br />
--pan_servo_center_pw=xx..x sets the Azimuth servo's center position (Default is 1500us).<br />
--tilt_servo_center_pw=xx..x sets the elevation servo's center position (Default is 1500us).<br />
<br />
'''Notes:'''<br />
<br />
The antenna tracker zero azimuth is to the NORTH (NORTH = 0, EAST = 90 WEST = -90, SOUTH = 180/0 degrees).<br />
<br />
The elevation zero is totally horizontal, 90 is up and 180 is to the back.<br />
<br />
The servo used must be able to do 180 degrees in order to get full 360 degree coverage from the tracker.<br />
<br />
<br />
WARNING: The Pololu board limits servo travel to 1000-2000 microseconds.<br />
<br />
WARNING: Use the Pololu board setup program to change the above limits.<br />
<br />
<br />
Example: --tilt_epa=1100 sets the PW from 950 to 2050 microseconds.<br />
<br />
Example: --pan_epa=-1000 sets the PW from 1000 to 2000 microseconds and reverses the servo direction.<br />
<br />
<br />
An EPA of 1100 sets the servo travel from 1500+(1100/2)=2050us to 1500-(1100/2)=950us.<br />
<br />
Use programmable servos like the Hyperion Atlas. You can also use the proportional 360 degree GWS S125-1T as the Theta (Azimuth) servo or the mighty but expensive Futaba S5801.<br />
<br />
<br />
'''FOR THE 360 DEGREE PAN MODE:'''<br />
<br />
Mechanical zero (0 degrees or 1500 ms) is to the NORTH, 90 = EAST, +-180 = SOUTH and -90 = WEST.<br />
<br />
Elevation center is 45 degrees up (1500ms), 0 degrees = horizontal, 90 degrees is vertical (up).<br />
<br />
Of course use this mode if your PAN servo can do a full 360 degrees rotation (GWS S125-1T for example).<br />
<br />
<br />
'''FOR THE 180 DEGREE PAN MODE:'''<br />
<br />
Mechanical zero (0 degrees or 1500 ms) is to the NORTH, 90 = EAST, -90 = WEST.<br />
<br />
Elevation center is 90 degrees up (1500ms), 0 degrees = horizontal, 180 degrees is horizontal to the opposite side.<br />
<br />
When the azimuth is > 90 or < -90 the azimuth and elevation servos swap sides to obtain the full 360 degree coverage.<br />
<br />
Of course your PAN and TILT servos must be true 180 degrees servos like the Hyperion ATLAS servos for example.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Antenna_Tracker&diff=8127Antenna Tracker2010-11-29T08:30:56Z<p>Markgriffin: </p>
<hr />
<div>An antenna tracker follows an aircraft in flight to keep a high-gain directional antenna locked on to it. This is particularly useful for live video feeds. The code below estimates the azimuth and elevation angles based on the information contained in the GPS and NAVIGATION telemetry messages, which are available through the IVY bus.<br />
<br />
== '''Basic Example''' ==<br />
<br />
The basic ''ant_track.c'' code can be found in the paparazzi3/sw/ground_segment/cockpit folder. <br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track<br />
3. Run it with: <br />
./ant_track<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi (use the simulator), wait for GPS 3D lock to be obtained, then you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
== '''Sophisticated Pololu Based Tracker''' ==<br />
<br />
The basic code has been modified to send the azimuth/elevation values through USB to the [http://www.pololu.com/catalog/category/12 Pololu servo controller]. It drives two servos mounted to an appropriate pan/tilt mechanism.<br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track_pmm<br />
3. Run it with: <br />
./ant_track_pmm<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi (to test use the simulator), wait for GPS 3D lock to be obtained, then you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
The following command line inputs are possible:<br />
<br />
--port=xxx..x' opens port xxx..x, example --port=/dev/ttyACM0 (Default).<br />
--pan=xxx' sets pan mode to 180 or 360 degrees. Example --pan=180 (Default).<br />
--zero_angle=xxx' set the mechanical zero angle. Default is 0 (North).<br />
--id=xx' sets the Pololu board id. Example --id=12 (Default).<br />
--servo_acc=xxx' sets the servo acceleration. Example --servo_acc=3 (Default).<br />
--pan_servo=x' sets the pan (Theta) servo number. Example --pan_servo=0 (Default).<br />
--tilt_servo=x' sets the tilt (Psi) servo number.Example --tilt_servo=1 (Default).<br />
--pan_epa=xx..x' sets the Azimuth servo's max travel (Default is 1100us).<br />
--tilt_epa=xx..x' sets the elevation servo's max travel (Default is 1100us). HINT: a negative value EPA value reverses the servo direction.<br />
--pan_servo_center_pw=xx..x' sets the Azimuth servo's center position (Default is 1500us).<br />
--tilt_servo_center_pw=xx..x' sets the elevation servo's center position (Default is 1500us).<br />
<br />
'''Notes:'''<br />
<br />
The antenna tracker zero azimuth is to the NORTH (NORTH = 0, EAST = 90 WEST = -90, SOUTH = 180/0 degrees).<br />
<br />
The elevation zero is totally horizontal, 90 is up and 180 is to the back.<br />
<br />
The servo used must be able to do 180 degrees in order to get full 360 degree coverage from the tracker.<br />
<br />
<br />
WARNING: The Pololu board limits servo travel to 1000-2000 microseconds.<br />
<br />
WARNING: Use the Pololu board setup program to change the above limits.<br />
<br />
<br />
Example: --tilt_epa=1100 sets the PW from 950 to 2050 microseconds.<br />
<br />
Example: --pan_epa=-1000 sets the PW from 1000 to 2000 microseconds and reverses the servo direction.<br />
<br />
<br />
An EPA of 1100 sets the servo travel from 1500+(1100/2)=2050us to 1500-(1100/2)=950us.<br />
<br />
Use programmable servos like the Hyperion Atlas. You can also use the proportional 360 degree GWS S125-1T as the Theta (Azimuth) servo or the mighty but expensive Futaba S5801.<br />
<br />
<br />
'''FOR THE 360 DEGREE PAN MODE:'''<br />
<br />
Mechanical zero (0 degrees or 1500 ms) is to the NORTH, 90 = EAST, +-180 = SOUTH and -90 = WEST.<br />
<br />
Elevation center is 45 degrees up (1500ms), 0 degrees = horizontal, 90 degrees is vertical (up).<br />
<br />
Of course use this mode if your PAN servo can do a full 360 degrees rotation (GWS S125-1T for example).<br />
<br />
<br />
'''FOR THE 180 DEGREE PAN MODE:'''<br />
<br />
Mechanical zero (0 degrees or 1500 ms) is to the NORTH, 90 = EAST, -90 = WEST.<br />
<br />
Elevation center is 90 degrees up (1500ms), 0 degrees = horizontal, 180 degrees is horizontal to the opposite side.<br />
<br />
When the azimuth is > 90 or < -90 the azimuth and elevation servos swap sides to obtain the full 360 degree coverage.<br />
<br />
Of course your PAN and TILT servos must be true 180 degrees servos like the Hyperion ATLAS servos for example.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Antenna_Tracker&diff=8126Antenna Tracker2010-11-29T08:24:08Z<p>Markgriffin: </p>
<hr />
<div>An antenna tracker follows an aircraft in flight to keep a high-gain directional antenna locked on to it. This is particularly useful for live video feeds. The code below estimates the azimuth and elevation angles based on the information contained in the GPS and NAVIGATION telemetry messages, which are available through the IVY bus.<br />
<br />
== '''Basic Example''' ==<br />
<br />
The basic ''ant_track.c'' code can be found in the paparazzi3/sw/ground_segment/cockpit folder. <br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track<br />
3. Run it with: <br />
./ant_track<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi (use the simulator) and you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
== '''Sophisticated Pololu Based Tracker''' ==<br />
<br />
The basic code has been modified to send the azimuth/elevation values through USB to the [http://www.pololu.com/catalog/category/12 Pololu servo controller]. It drives two servos mounted to an appropriate pan/tilt mechanism.<br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track_pmm<br />
3. Run it with: <br />
./ant_track_pmm<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi and you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
The following command line inputs are possible:<br />
<br />
--port=xxx..x' opens port xxx..x, example --port=/dev/ttyACM0 (Default).<br />
--pan=xxx' sets pan mode to 180 or 360 degrees. Example --pan=180 (Default).<br />
--zero_angle=xxx' set the mechanical zero angle. Default is 0 (North).<br />
--id=xx' sets the Pololu board id. Example --id=12 (Default).<br />
--servo_acc=xxx' sets the servo acceleration. Example --servo_acc=3 (Default).<br />
--pan_servo=x' sets the pan (Theta) servo number. Example --pan_servo=0 (Default).<br />
--tilt_servo=x' sets the tilt (Psi) servo number.Example --tilt_servo=1 (Default).<br />
--pan_epa=xx..x' sets the Azimuth servo's max travel (Default is 1100us).<br />
--tilt_epa=xx..x' sets the elevation servo's max travel (Default is 1100us). HINT: a negative value EPA value reverses the servo direction.<br />
--pan_servo_center_pw=xx..x' sets the Azimuth servo's center position (Default is 1500us).<br />
--tilt_servo_center_pw=xx..x' sets the elevation servo's center position (Default is 1500us).<br />
<br />
'''Notes:'''<br />
<br />
The antenna tracker zero azimuth is to the NORTH (NORTH = 0, EAST = 90 WEST = -90, SOUTH = 180/0 degrees).<br />
<br />
The elevation zero is totally horizontal, 90 is up and 180 is to the back.<br />
<br />
The servo used must be able to do 180 degrees in order to get full 360 degree coverage from the tracker.<br />
<br />
<br />
WARNING: The Pololu board limits servo travel to 1000-2000 microseconds.<br />
<br />
WARNING: Use the Pololu board setup program to change the above limits.<br />
<br />
<br />
Example: --tilt_epa=1100 sets the PW from 950 to 2050 microseconds.<br />
<br />
Example: --pan_epa=-1000 sets the PW from 1000 to 2000 microseconds and reverses the servo direction.<br />
<br />
<br />
An EPA of 1100 sets the servo travel from 1500+(1100/2)=2050us to 1500-(1100/2)=950us.<br />
<br />
Use programmable servos like the Hyperion Atlas. You can also use the proportional 360 degree GWS S125-1T as the Theta (Azimuth) servo or the mighty but expensive Futaba S5801.<br />
<br />
<br />
'''FOR THE 360 DEGREE PAN MODE:'''<br />
<br />
Mechanical zero (0 degrees or 1500 ms) is to the NORTH, 90 = EAST, +-180 = SOUTH and -90 = WEST.<br />
<br />
Elevation center is 45 degrees up (1500ms), 0 degrees = horizontal, 90 degrees is vertical (up).<br />
<br />
Of course use this mode if your PAN servo can do a full 360 degrees rotation (GWS S125-1T for example).<br />
<br />
<br />
'''FOR THE 180 DEGREE PAN MODE:'''<br />
<br />
Mechanical zero (0 degrees or 1500 ms) is to the NORTH, 90 = EAST, -90 = WEST.<br />
<br />
Elevation center is 90 degrees up (1500ms), 0 degrees = horizontal, 180 degrees is horizontal to the opposite side.<br />
<br />
When the azimuth is > 90 or < -90 the azimuth and elevation servos swap sides to obtain the full 360 degree coverage.<br />
<br />
Of course your PAN and TILT servos must be true 180 degrees servos like the Hyperion ATLAS servos for example.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Antenna_Tracker&diff=8125Antenna Tracker2010-11-29T08:22:49Z<p>Markgriffin: </p>
<hr />
<div>An antenna tracker follows an aircraft in flight to keep a high-gain directional antenna locked on to it. This is particularly useful for live video feeds. The code below estimates the azimuth and elevation angles based on the information contained in the GPS and NAVIGATION telemetry messages, which are available through the IVY bus.<br />
<br />
== '''Basic Example''' ==<br />
<br />
The ''ant_track.c'' code in the paparazzi3/sw/ground_segment/cockpit folder <br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track<br />
3. Run it with: <br />
./ant_track<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi (use the simulator) and you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
== '''Sophisticated Pololu Based Tracker''' ==<br />
<br />
The basic code has been modified to send the azimuth/elevation values through USB to the [http://www.pololu.com/catalog/category/12 Pololu servo controller]. It drives two servos mounted to an appropriate pan/tilt mechanism.<br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track_pmm<br />
3. Run it with: <br />
./ant_track_pmm<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi and you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
The following command line inputs are possible:<br />
<br />
--port=xxx..x' opens port xxx..x, example --port=/dev/ttyACM0 (Default).<br />
--pan=xxx' sets pan mode to 180 or 360 degrees. Example --pan=180 (Default).<br />
--zero_angle=xxx' set the mechanical zero angle. Default is 0 (North).<br />
--id=xx' sets the Pololu board id. Example --id=12 (Default).<br />
--servo_acc=xxx' sets the servo acceleration. Example --servo_acc=3 (Default).<br />
--pan_servo=x' sets the pan (Theta) servo number. Example --pan_servo=0 (Default).<br />
--tilt_servo=x' sets the tilt (Psi) servo number.Example --tilt_servo=1 (Default).<br />
--pan_epa=xx..x' sets the Azimuth servo's max travel (Default is 1100us).<br />
--tilt_epa=xx..x' sets the elevation servo's max travel (Default is 1100us). HINT: a negative value EPA value reverses the servo direction.<br />
--pan_servo_center_pw=xx..x' sets the Azimuth servo's center position (Default is 1500us).<br />
--tilt_servo_center_pw=xx..x' sets the elevation servo's center position (Default is 1500us).<br />
<br />
'''Notes:'''<br />
<br />
The antenna tracker zero azimuth is to the NORTH (NORTH = 0, EAST = 90 WEST = -90, SOUTH = 180/0 degrees).<br />
<br />
The elevation zero is totally horizontal, 90 is up and 180 is to the back.<br />
<br />
The servo used must be able to do 180 degrees in order to get full 360 degree coverage from the tracker.<br />
<br />
<br />
WARNING: The Pololu board limits servo travel to 1000-2000 microseconds.<br />
<br />
WARNING: Use the Pololu board setup program to change the above limits.<br />
<br />
<br />
Example: --tilt_epa=1100 sets the PW from 950 to 2050 microseconds.<br />
<br />
Example: --pan_epa=-1000 sets the PW from 1000 to 2000 microseconds and reverses the servo direction.<br />
<br />
<br />
An EPA of 1100 sets the servo travel from 1500+(1100/2)=2050us to 1500-(1100/2)=950us.<br />
<br />
Use programmable servos like the Hyperion Atlas. You can also use the proportional 360 degree GWS S125-1T as the Theta (Azimuth) servo or the mighty but expensive Futaba S5801.<br />
<br />
<br />
'''FOR THE 360 DEGREE PAN MODE:'''<br />
<br />
Mechanical zero (0 degrees or 1500 ms) is to the NORTH, 90 = EAST, +-180 = SOUTH and -90 = WEST.<br />
<br />
Elevation center is 45 degrees up (1500ms), 0 degrees = horizontal, 90 degrees is vertical (up).<br />
<br />
Of course use this mode if your PAN servo can do a full 360 degrees rotation (GWS S125-1T for example).<br />
<br />
<br />
'''FOR THE 180 DEGREE PAN MODE:'''<br />
<br />
Mechanical zero (0 degrees or 1500 ms) is to the NORTH, 90 = EAST, -90 = WEST.<br />
<br />
Elevation center is 90 degrees up (1500ms), 0 degrees = horizontal, 180 degrees is horizontal to the opposite side.<br />
<br />
When the azimuth is > 90 or < -90 the azimuth and elevation servos swap sides to obtain the full 360 degree coverage.<br />
<br />
Of course your PAN and TILT servos must be true 180 degrees servos like the Hyperion ATLAS servos for example.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Antenna_Tracker&diff=8124Antenna Tracker2010-11-29T08:05:12Z<p>Markgriffin: </p>
<hr />
<div>== '''Basic Example''' ==<br />
<br />
The ''ant_track.c'' code in the paparazzi3/sw/ground_segment/cockpit folder estimates the azimuth and elevation angles based on the information contained in the GPS and NAVIGATION telemetry messages through the IVY bus.<br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track<br />
3. Run it with: <br />
./ant_track<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi (use the simulator) and you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
== '''Sophisticated Pololu Based Tracker''' ==<br />
<br />
The basic code has been modified to send the azimuth/elevation values through USB to the [http://www.pololu.com/catalog/category/12 Pololu servo controller].<br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track_pmm<br />
3. Run it with: <br />
./ant_track_pmm<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi and you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
The following command line inputs are possible:<br />
<br />
--port=xxx..x' opens port xxx..x, example --port=/dev/ttyACM0 (Default).<br />
--pan=xxx' sets pan mode to 180 or 360 degrees. Example --pan=180 (Default).<br />
--zero_angle=xxx' set the mechanical zero angle. Default is 0 (North).<br />
--id=xx' sets the Pololu board id. Example --id=12 (Default).<br />
--servo_acc=xxx' sets the servo acceleration. Example --servo_acc=3 (Default).<br />
--pan_servo=x' sets the pan (Theta) servo number. Example --pan_servo=0 (Default).<br />
--tilt_servo=x' sets the tilt (Psi) servo number.Example --tilt_servo=1 (Default).<br />
--pan_epa=xx..x' sets the Azimuth servo's max travel (Default is 1100us).<br />
--tilt_epa=xx..x' sets the elevation servo's max travel (Default is 1100us). HINT: a negative value EPA value reverses the servo direction.<br />
--pan_servo_center_pw=xx..x' sets the Azimuth servo's center position (Default is 1500us).<br />
--tilt_servo_center_pw=xx..x' sets the elevation servo's center position (Default is 1500us).<br />
<br />
'''Notes:'''<br />
<br />
The antenna tracker zero azimuth is to the NORTH (NORTH = 0, EAST = 90 WEST = -90, SOUTH = 180/0 degrees).<br />
<br />
The elevation zero is totally horizontal, 90 is up and 180 is to the back.<br />
<br />
The servo used must be able to do 180 degrees in order to get full 360 degree coverage from the tracker.<br />
<br />
<br />
WARNING: The Pololu board limits servo travel to 1000-2000 microseconds.<br />
<br />
WARNING: Use the Pololu board setup program to change the above limits.<br />
<br />
<br />
Example: --tilt_epa=1100 sets the PW from 950 to 2050 microseconds.<br />
<br />
Example: --pan_epa=-1000 sets the PW from 1000 to 2000 microseconds and reverses the servo direction.<br />
<br />
<br />
An EPA of 1100 sets the servo travel from 1500+(1100/2)=2050us to 1500-(1100/2)=950us.<br />
<br />
Use programmable servos like the Hyperion Atlas. You can also use the proportional 360 degree GWS S125-1T as the Theta (Azimuth) servo or the mighty but expensive Futaba S5801.<br />
<br />
<br />
'''FOR THE 360 DEGREE PAN MODE:'''<br />
<br />
Mechanical zero (0 degrees or 1500 ms) is to the NORTH, 90 = EAST, +-180 = SOUTH and -90 = WEST.<br />
<br />
Elevation center is 45 degrees up (1500ms), 0 degrees = horizontal, 90 degrees is vertical (up).<br />
<br />
Of course use this mode if your PAN servo can do a full 360 degrees rotation (GWS S125-1T for example).<br />
<br />
<br />
'''FOR THE 180 DEGREE PAN MODE:'''<br />
<br />
Mechanical zero (0 degrees or 1500 ms) is to the NORTH, 90 = EAST, -90 = WEST.<br />
<br />
Elevation center is 90 degrees up (1500ms), 0 degrees = horizontal, 180 degrees is horizontal to the opposite side.<br />
<br />
When the azimuth is > 90 or < -90 the azimuth and elevation servos swap sides to obtain the full 360 degree coverage.<br />
<br />
Of course your PAN and TILT servos must be true 180 degrees servos like the Hyperion ATLAS servos for example.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Antenna_Tracker&diff=8123Antenna Tracker2010-11-29T08:04:10Z<p>Markgriffin: </p>
<hr />
<div>== '''Basic Example''' ==<br />
<br />
The ''ant_track.c'' code in the paparazzi3/sw/ground_segment/cockpit folder estimates the azimuth and elevation angles based on the information contained in the GPS and NAVIGATION telemetry messages through the IVY bus.<br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track<br />
3. Run it with: <br />
./ant_track<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi (use the simulator) and you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
== '''Sophisticated Pololu Based Tracker''' ==<br />
<br />
The basic code has been modified to send the azimuth/elevation values through USB to the [http://www.pololu.com/catalog/category/12 Pololu servo controller].<br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track_pmm<br />
3. Run it with: <br />
./ant_track_pmm<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi and you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
The following input arguments are possible:<br />
<br />
--port=xxx..x' opens port xxx..x, example --port=/dev/ttyACM0 (Default).<br />
--pan=xxx' sets pan mode to 180 or 360 degrees. Example --pan=180 (Default).<br />
--zero_angle=xxx' set the mechanical zero angle. Default is 0 (North).<br />
--id=xx' sets the Pololu board id. Example --id=12 (Default).<br />
--servo_acc=xxx' sets the servo acceleration. Example --servo_acc=3 (Default).<br />
--pan_servo=x' sets the pan (Theta) servo number. Example --pan_servo=0 (Default).<br />
--tilt_servo=x' sets the tilt (Psi) servo number.Example --tilt_servo=1 (Default).<br />
--pan_epa=xx..x' sets the Azimuth servo's max travel (Default is 1100us).<br />
--tilt_epa=xx..x' sets the elevation servo's max travel (Default is 1100us). HINT: a negative value EPA value reverses the servo direction.<br />
--pan_servo_center_pw=xx..x' sets the Azimuth servo's center position (Default is 1500us).<br />
--tilt_servo_center_pw=xx..x' sets the elevation servo's center position (Default is 1500us).<br />
<br />
'''Notes:'''<br />
<br />
The antenna tracker zero azimuth is to the NORTH (NORTH = 0, EAST = 90 WEST = -90, SOUTH = 180/0 degrees).<br />
<br />
The elevation zero is totally horizontal, 90 is up and 180 is to the back.<br />
<br />
The servo used must be able to do 180 degrees in order to get full 360 degree coverage from the tracker.<br />
<br />
<br />
WARNING: The Pololu board limits servo travel to 1000-2000 microseconds.<br />
<br />
WARNING: Use the Pololu board setup program to change the above limits.<br />
<br />
<br />
Example: --tilt_epa=1100 sets the PW from 950 to 2050 microseconds.<br />
<br />
Example: --pan_epa=-1000 sets the PW from 1000 to 2000 microseconds and reverses the servo direction.<br />
<br />
<br />
An EPA of 1100 sets the servo travel from 1500+(1100/2)=2050us to 1500-(1100/2)=950us.<br />
<br />
Use programmable servos like the Hyperion Atlas. You can also use the proportional 360 degree GWS S125-1T as the Theta (Azimuth) servo or the mighty but expensive Futaba S5801.<br />
<br />
<br />
'''FOR THE 360 DEGREE PAN MODE:'''<br />
<br />
Mechanical zero (0 degrees or 1500 ms) is to the NORTH, 90 = EAST, +-180 = SOUTH and -90 = WEST.<br />
<br />
Elevation center is 45 degrees up (1500ms), 0 degrees = horizontal, 90 degrees is vertical (up).<br />
<br />
Of course use this mode if your PAN servo can do a full 360 degrees rotation (GWS S125-1T for example).<br />
<br />
<br />
'''FOR THE 180 DEGREE PAN MODE:'''<br />
<br />
Mechanical zero (0 degrees or 1500 ms) is to the NORTH, 90 = EAST, -90 = WEST.<br />
<br />
Elevation center is 90 degrees up (1500ms), 0 degrees = horizontal, 180 degrees is horizontal to the opposite side.<br />
<br />
When the azimuth is > 90 or < -90 the azimuth and elevation servos swap sides to obtain the full 360 degree coverage.<br />
<br />
Of course your PAN and TILT servos must be true 180 degrees servos like the Hyperion ATLAS servos for example.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Antenna_Tracker&diff=8122Antenna Tracker2010-11-28T17:42:01Z<p>Markgriffin: </p>
<hr />
<div>== '''Basic Example''' ==<br />
<br />
The ''ant_track.c'' code in the paparazzi3/sw/ground_segment/cockpit folder estimates the azimuth and elevation angles based on the information contained in the GPS and NAVIGATION telemetry messages through the IVY bus.<br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track<br />
3. Run it with: <br />
./ant_track<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi (use the simulator) and you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
== '''Sophisticated Pololu Based Tracker''' ==<br />
<br />
The basic code has been modified to send the azimuth/elevation values through USB to the Pololu servo controller.<br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track_pmm<br />
3. Run it with: <br />
./ant_track_pmm<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi and you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
The following input arguments are possible:<br />
<br />
--port=xxx..x' opens port xxx..x, example --port=/dev/ttyACM0 (Default).<br />
--pan=xxx' sets pan mode to 180 or 360 degrees. Example --pan=180 (Default).<br />
--zero_angle=xxx' set the mechanical zero angle. Default is 0 (North).<br />
--id=xx' sets the Pololu board id. Example --id=12 (Default).<br />
--servo_acc=xxx' sets the servo acceleration. Example --servo_acc=3 (Default).<br />
--pan_servo=x' sets the pan (Theta) servo number. Example --pan_servo=0 (Default).<br />
--tilt_servo=x' sets the tilt (Psi) servo number.Example --tilt_servo=1 (Default).<br />
--pan_epa=xx..x' sets the Azimuth servo's max travel (Default is 1100us).<br />
--tilt_epa=xx..x' sets the elevation servo's max travel (Default is 1100us). HINT: a negative value EPA value reverses the servo direction.<br />
--pan_servo_center_pw=xx..x' sets the Azimuth servo's center position (Default is 1500us).<br />
--tilt_servo_center_pw=xx..x' sets the elevation servo's center position (Default is 1500us).<br />
<br />
'''Notes:'''<br />
<br />
The antenna tracker zero azimuth is to the NORTH (NORTH = 0, EAST = 90 WEST = -90, SOUTH = 180/0 degrees).<br />
<br />
The elevation zero is totally horizontal, 90 is up and 180 is to the back.<br />
<br />
The servo used must be able to do 180 degrees in order to get full 360 degree coverage from the tracker.<br />
<br />
<br />
WARNING: The Pololu board limits servo travel to 1000-2000 microseconds.<br />
<br />
WARNING: Use the Pololu board setup program to change the above limits.<br />
<br />
<br />
Example: --tilt_epa=1100 sets the PW from 950 to 2050 microseconds.<br />
<br />
Example: --pan_epa=-1000 sets the PW from 1000 to 2000 microseconds and reverses the servo direction.<br />
<br />
<br />
An EPA of 1100 sets the servo travel from 1500+(1100/2)=2050us to 1500-(1100/2)=950us.<br />
<br />
Use programmable servos like the Hyperion Atlas. You can also use the proportional 360 degree GWS S125-1T as the Theta (Azimuth) servo or the mighty but expensive Futaba S5801.<br />
<br />
<br />
FOR THE 360 DEGREE PAN MODE:<br />
<br />
Mechanical zero (0 degrees or 1500 ms) is to the NORTH, 90 = EAST, +-180 = SOUTH and -90 = WEST.<br />
<br />
Elevation center is 45 degrees up (1500ms), 0 degrees = horizontal, 90 degrees is vertical (up).<br />
<br />
Of course use this mode if your PAN servo can do a full 360 degrees rotation (GWS S125-1T for example).<br />
<br />
<br />
FOR THE 180 DEGREE PAN MODE:<br />
<br />
Mechanical zero (0 degrees or 1500 ms) is to the NORTH, 90 = EAST, -90 = WEST.<br />
<br />
Elevation center is 90 degrees up (1500ms), 0 degrees = horizontal, 180 degrees is horizontal to the opposite side.<br />
<br />
When the azimuth is > 90 or < -90 the azimuth and elevation servos swap sides to obtain the full 360 degree coverage.<br />
<br />
Of course your PAN and TILT servos must be true 180 degrees servos like the Hyperion ATLAS servos for example.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Antenna_Tracker&diff=8121Antenna Tracker2010-11-28T17:34:02Z<p>Markgriffin: </p>
<hr />
<div>== '''Basic Example''' ==<br />
<br />
The ''ant_track.c'' code in the paparazzi3/sw/ground_segment/cockpit folder estimates the azimuth and elevation angles based on the information contained in the GPS and NAVIGATION telemetry messages through the IVY bus.<br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track<br />
3. Run it with: <br />
./ant_track<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi (use the simulator) and you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
== '''Sophisticated Pololu Based Tracker''' ==<br />
<br />
The basic code has been modified to send the azimuth/elevation values through USB to the Pololu servo controller.<br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track_pmm<br />
3. Run it with: <br />
./ant_track_pmm<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi and you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
The following input arguments are possible:<br />
<br />
--port=xxx..x' opens port xxx..x, example --port=/dev/ttyACM0 (Default).<br />
--pan=xxx' sets pan mode to 180 or 360 degrees. Example --pan=180 (Default).<br />
--zero_angle=xxx' set the mechanical zero angle. Default is 0 (North).<br />
--id=xx' sets the Pololu board id. Example --id=12 (Default).<br />
--servo_acc=xxx' sets the servo acceleration. Example --servo_acc=3 (Default).<br />
--pan_servo=x' sets the pan (Theta) servo number. Example --pan_servo=0 (Default).<br />
--tilt_servo=x' sets the tilt (Psi) servo number.Example --tilt_servo=1 (Default).<br />
--pan_epa=xx..x' sets the Azimuth servo's max travel (Default is 1100us).<br />
--tilt_epa=xx..x' sets the elevation servo's max travel (Default is 1100us). HINT: a negative value EPA value reverses the servo direction.<br />
--pan_servo_center_pw=xx..x' sets the Azimuth servo's center position (Default is 1500us).<br />
--tilt_servo_center_pw=xx..x' sets the elevation servo's center position (Default is 1500us).<br />
<br />
'''Notes:'''<br />
<br />
<li>The antenna tracker zero azimuth is to the NORTH (NORTH = 0, EAST = 90 WEST = -90, SOUTH = 180/0 degrees).<br />
<li>The elevation zero is totally horizontal, 90 is up and 180 is to the back.<br />
<li>The servo used must be able to do 180 degrees in order to get full 360 degree coverage from the tracker.<br />
<br />
<li>WARNING: The Pololu board limits servo travel to 1000-2000 microseconds.<br />
<li>WARNING: Use the Pololu board setup program to change the above limits.<br />
<br />
<li>Example: --tilt_epa=1100 sets the PW from 950 to 2050 microseconds.<br />
<li>Example: --pan_epa=-1000 sets the PW from 1000 to 2000 microseconds and reverses the servo direction.<br />
<br />
<li>An EPA of 1100 sets the servo travel from 1500+(1100/2)=2050us to 1500-(1100/2)=950us.<br />
<li>Use programmable servos like the Hyperion Atlas. You can also use the proportional 360 degree GWS S125-1T as the Theta (Azimuth) servo or the mighty but expensive Futaba S5801.<br />
<br />
FOR THE 360 DEGREE PAN MODE:<br />
<li>Mechanical zero (0 degrees or 1500 ms) is to the NORTH, 90 = EAST, +-180 = SOUTH and -90 = WEST.<br />
<li>Elevation center is 45 degrees up (1500ms), 0 degrees = horizontal, 90 degrees is vertical (up).<br />
<li>Of course use this mode if your PAN servo can do a full 360 degrees rotation (GWS S125-1T for example).<br />
<br />
FOR THE 180 DEGREE PAN MODE:<br />
<li>Mechanical zero (0 degrees or 1500 ms) is to the NORTH, 90 = EAST, -90 = WEST.<br />
<li>Elevation center is 90 degrees up (1500ms), 0 degrees = horizontal, 180 degrees is horizontal to the opposite side.<br />
<li>When the azimuth is > 90 or < -90 the azimuth and elevation servos swap sides to obtain the full 360 degree coverage.<br />
<li>Of course your PAN and TILT servos must be true 180 degrees servos like the Hyperion ATLAS servos for example.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Antenna_Tracker&diff=8120Antenna Tracker2010-11-28T17:31:59Z<p>Markgriffin: </p>
<hr />
<div>== '''Basic Example''' ==<br />
<br />
The ''ant_track.c'' code in the paparazzi3/sw/ground_segment/cockpit folder estimates the azimuth and elevation angles based on the information contained in the GPS and NAVIGATION telemetry messages through the IVY bus.<br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track<br />
3. Run it with: <br />
./ant_track<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi (use the simulator) and you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
== '''Sophisticated Pololu Based Tracker''' ==<br />
<br />
The basic code has been modified to send the azimuth/elevation values through USB to the Pololu servo controller.<br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track_pmm<br />
3. Run it with: <br />
./ant_track_pmm<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi and you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
The following input arguments are possible:<br />
<br />
--port=xxx..x' opens port xxx..x, example --port=/dev/ttyACM0 (Default).<br />
--pan=xxx' sets pan mode to 180 or 360 degrees. Example --pan=180 (Default).<br />
--zero_angle=xxx' set the mechanical zero angle. Default is 0 (North).<br />
--id=xx' sets the Pololu board id. Example --id=12 (Default).<br />
--servo_acc=xxx' sets the servo acceleration. Example --servo_acc=3 (Default).<br />
--pan_servo=x' sets the pan (Theta) servo number. Example --pan_servo=0 (Default).<br />
--tilt_servo=x' sets the tilt (Psi) servo number.Example --tilt_servo=1 (Default).<br />
--pan_epa=xx..x' sets the Azimuth servo's max travel (Default is 1100us).<br />
--tilt_epa=xx..x' sets the elevation servo's max travel (Default is 1100us). HINT: a negative value EPA value reverses the servo direction.<br />
--pan_servo_center_pw=xx..x' sets the Azimuth servo's center position (Default is 1500us).<br />
--tilt_servo_center_pw=xx..x' sets the elevation servo's center position (Default is 1500us).<br />
<br />
'''Notes:'''<br />
<br />
The antenna tracker zero azimuth is to the NORTH (NORTH = 0, EAST = 90 WEST = -90, SOUTH = 180/0 degrees).<br />
<br />
The elevation zero is totally horizontal, 90 is up and 180 is to the back.<br />
<br />
The servo used must be able to do 180 degrees in order to get full 360 degree coverage from the tracker.<br />
<br />
WARNING: The Pololu board limits servo travel to 1000-2000 microseconds.<br />
<br />
WARNING: Use the Pololu board setup program to change the above limits.<br />
<br />
<br />
Example: --tilt_epa=1100 sets the PW from 950 to 2050 microseconds.<br />
<br />
Example: --pan_epa=-1000 sets the PW from 1000 to 2000 microseconds and reverses the servo direction.<br />
<br />
<br />
An EPA of 1100 sets the servo travel from 1500+(1100/2)=2050us to 1500-(1100/2)=950us.<br />
<br />
Use programmable servos like the Hyperion Atlas. You can also use the proportional 360 degree GWS S125-1T as the Theta (Azimuth) servo or the mighty but expensive Futaba S5801.<br />
<br />
<br />
FOR THE 360 DEGREE PAN MODE:<br />
<br />
Mechanical zero (0 degrees or 1500 ms) is to the NORTH, 90 = EAST, +-180 = SOUTH and -90 = WEST.<br />
<br />
Elevation center is 45 degrees up (1500ms), 0 degrees = horizontal, 90 degrees is vertical (up).<br />
<br />
Of course use this mode if your PAN servo can do a full 360 degrees rotation (GWS S125-1T for example).<br />
<br />
<br />
FOR THE 180 DEGREE PAN MODE:<br />
<br />
Mechanical zero (0 degrees or 1500 ms) is to the NORTH, 90 = EAST, -90 = WEST.<br />
<br />
Elevation center is 90 degrees up (1500ms), 0 degrees = horizontal, 180 degrees is horizontal to the opposite side.<br />
<br />
When the azimuth is > 90 or < -90 the azimuth and elevation servos swap sides to obtain the full 360 degree coverage.<br />
<br />
Of course your PAN and TILT servos must be true 180 degrees servos like the Hyperion ATLAS servos for example.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Antenna_Tracker&diff=8119Antenna Tracker2010-11-28T17:29:42Z<p>Markgriffin: </p>
<hr />
<div>'''Basic Example'''<br />
<br />
The ''ant_track.c'' code in the paparazzi3/sw/ground_segment/cockpit folder estimates the azimuth and elevation angles based on the information contained in the GPS and NAVIGATION telemetry messages through the IVY bus.<br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track<br />
3. Run it with: <br />
./ant_track<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi (use the simulator) and you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
'''Sophisticated Pololu Based Tracker'''<br />
<br />
The basic code has been modified to send the azimuth/elevation values through USB to the Pololu servo controller.<br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track_pmm<br />
3. Run it with: <br />
./ant_track_pmm<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi and you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
The following input arguments are possible:<br />
<br />
--port=xxx..x' opens port xxx..x, example --port=/dev/ttyACM0 (Default).<br />
--pan=xxx' sets pan mode to 180 or 360 degrees. Example --pan=180 (Default).<br />
--zero_angle=xxx' set the mechanical zero angle. Default is 0 (North).<br />
--id=xx' sets the Pololu board id. Example --id=12 (Default).<br />
--servo_acc=xxx' sets the servo acceleration. Example --servo_acc=3 (Default).<br />
--pan_servo=x' sets the pan (Theta) servo number. Example --pan_servo=0 (Default).<br />
--tilt_servo=x' sets the tilt (Psi) servo number.Example --tilt_servo=1 (Default).<br />
--pan_epa=xx..x' sets the Azimuth servo's max travel (Default is 1100us).<br />
--tilt_epa=xx..x' sets the elevation servo's max travel (Default is 1100us). HINT: a negative value EPA value reverses the servo direction.<br />
--pan_servo_center_pw=xx..x' sets the Azimuth servo's center position (Default is 1500us).<br />
--tilt_servo_center_pw=xx..x' sets the elevation servo's center position (Default is 1500us).<br />
<br />
'''Notes:'''<br />
<br />
The antenna tracker zero azimuth is to the NORTH (NORTH = 0, EAST = 90 WEST = -90, SOUTH = 180/0 degrees).<br />
<br />
The elevation zero is totally horizontal, 90 is up and 180 is to the back.<br />
<br />
The servo used must be able to do 180 degrees in order to get full 360 degree coverage from the tracker.<br />
<br />
WARNING: The Pololu board limits servo travel to 1000-2000 microseconds.<br />
<br />
WARNING: Use the Pololu board setup program to change the above limits.<br />
<br />
<br />
Example: --tilt_epa=1100 sets the PW from 950 to 2050 microseconds.<br />
<br />
Example: --pan_epa=-1000 sets the PW from 1000 to 2000 microseconds and reverses the servo direction.<br />
<br />
<br />
An EPA of 1100 sets the servo travel from 1500+(1100/2)=2050us to 1500-(1100/2)=950us.<br />
<br />
Use programmable servos like the Hyperion Atlas. You can also use the proportional 360 degree GWS S125-1T as the Theta (Azimuth) servo or the mighty but expensive Futaba S5801.<br />
<br />
<br />
FOR THE 360 DEGREE PAN MODE:<br />
<br />
Mechanical zero (0 degrees or 1500 ms) is to the NORTH, 90 = EAST, +-180 = SOUTH and -90 = WEST.<br />
<br />
Elevation center is 45 degrees up (1500ms), 0 degrees = horizontal, 90 degrees is vertical (up).<br />
<br />
Of course use this mode if your PAN servo can do a full 360 degrees rotation (GWS S125-1T for example).<br />
<br />
<br />
FOR THE 180 DEGREE PAN MODE:<br />
<br />
Mechanical zero (0 degrees or 1500 ms) is to the NORTH, 90 = EAST, -90 = WEST.<br />
<br />
Elevation center is 90 degrees up (1500ms), 0 degrees = horizontal, 180 degrees is horizontal to the opposite side.<br />
<br />
When the azimuth is > 90 or < -90 the azimuth and elevation servos swap sides to obtain the full 360 degree coverage.<br />
<br />
Of course your PAN and TILT servos must be true 180 degrees servos like the Hyperion ATLAS servos for example.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Antenna_Tracker&diff=8118Antenna Tracker2010-11-28T16:51:31Z<p>Markgriffin: Antenna Tracker</p>
<hr />
<div>'''Basic Example'''<br />
<br />
The ''ant_track.c'' code in the paparazzi3/sw/ground_segment/cockpit folder estimates the azimuth and elevation angles based on the information contained in the GPS and NAVIGATION telemetry messages through the IVY bus.<br />
<br />
To use it, <br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
<br />
2. Compile it with: <br />
make ant_track<br />
3. Run it with: <br />
./ant_track<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi (use the simulator) and you will see the azimuth/elevation updated on the GUI.<br />
<br />
<br />
'''Sophisticated Pololu Based Tracker'''<br />
<br />
The code has been modified to send the azimuth/elevation values through USB to the Pololu servo controller.<br />
<br />
To use it, <br />
<br />
1. Open a terminal window and go to the "/sw/ground_segment/cockpit/" folder.<br />
2. Compile it with: <br />
make ant_track_pmm<br />
3. Run it with: <br />
./ant_track_pmm<br />
4. A GUI should appear. Click on AUTO.<br />
<br />
5. Launch an aircraft in paparazzi and you will see the azimuth/elevation updated on the GUI.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=ArduIMU&diff=8056ArduIMU2010-11-10T22:19:25Z<p>Markgriffin: </p>
<hr />
<div> [[Image:Tiny13wIMU_001.jpg|thumb|left|Tiny13 w/IMU]]<br />
This page describes how to integrate an [http://code.google.com/p/ardu-imu/wiki/HomePage?tm=6 ArduIMU+ V2 (flat)] into an existing Airframe/Paparazzi-Code.<br />
#The ArduIMU communicates over i2c with the Paparazzi-AP. The wiring is pretty easy to do. Connect SDA, SCL, ground and supply the IMU with 5V. Do not connect 3.3V from the Paparazzi-AP to the ArduIMU as it internally generates it's own stable 3.3v supply.<br />
#Integration into the Paparazzi software is realized as a module. This is an easy way to connect and test the software. <br />
#This description shows how to use the ArduIMU without a separate GPS-Receiver and without a Compass/Magnetometer. The GPS-Data is sent by the Paparazzi-AP over i2c to the ArduIMU.<br />
#There is an other airframe/main-AP we wrote which uses a magnetometer for yaw-drift compensation. We haven't written an installation guide for this configuration yet. But we will try to do this as soon as possible. <br />
<br />
The Code has been integrated into the Paparazzi build system. <br />
<br />
<br />
== Airframe Adjustments ==<br />
<br />
conf/airframes: "MyAirframe.xml"<br />
* (1) '''Insert''' the module:<br />
<modules><br />
<load name="ins_arduimu.xml"/><br />
</modules><br />
<br />
* (2) Activate "i2c"<br />
<target name="ap" board="..."><br />
...<br />
<define name="USE_I2C0"/><br />
</target><br />
<subsystem name="i2c"/> <br />
<br />
* (3) '''Insert''' INS neutrals<br />
<br />
<section name="INS" prefix="INS_"><br />
<define name="ROLL_NEUTRAL_DEFAULT" value="0" unit="deg"/><br />
<define name="PITCH_NEUTRAL_DEFAULT" value="0" unit="deg"/><br />
</section><br />
<br />
* (4) Use this "Settings" file: settings/tuning_ins.xml<br />
<br />
* (5) '''Remove''' the infrared estimation<br />
<br />
remove this:<br />
<subsystem name="attitude" type="infrared"/><br />
<br />
== Flash the ArduIMU ==<br />
<br />
* (6) Flash the ArduIMU with the adapted software in '''sw/airborne/firmwares/helper/arduimu_Firmware_WithGps'''. For information concerning flashing of the ArduIMU, read: http://code.google.com/p/ardu-imu/wiki/Code<br />
<br />
<br />
You can find the original ZHAW code [https://home.zhaw.ch/~schmiemi/Arduimu4Paprazzi.rar here].<br />
<br />
<br />
So far, this setup has been successfully flown in the EasyStar, Merlin & Funjet aircrafts.<br />
<br />
<br />
Have Fun !</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=ArduIMU&diff=8055ArduIMU2010-11-10T22:11:14Z<p>Markgriffin: </p>
<hr />
<div> [[Image:Tiny13wIMU_001.jpg|thumb|left|Tiny13 w/IMU]]<br />
This page describes how to integrate an [http://code.google.com/p/ardu-imu/wiki/HomePage?tm=6 ArduIMU+ V2 (flat)] into an existing Airframe/Paparazzi-Code.<br />
#The ArduIMU communicates over I2C with the Paparazzi-AP. The wiring is pretty easy to do. Connect SDA, SCL, ground and supply the IMU with 5V. Do not connect 3.3V from the Paparazzi-AP to the ArduIMU.<br />
#Integration into the Paparazzi software is realized as a module. This is an easy way to connect and test new software. <br />
#This description shows how to use the ArduIMU without a separate GPS-Receiver and without a Compass/Magnetometer. The GPS-Data is sent by the Paparazzi-AP over I2C to the ArduIMU.<br />
#There is an other airframe/main-AP we wrote which uses a magnetometer for yaw-drift compensation. We haven't written an installation guide for this configuration yet. But we will try to do this as soon as possible. <br />
<br />
The Code has been integrated into the Paparazzi build system. Find the original ZHAW code [https://home.zhaw.ch/~schmiemi/Arduimu4Paprazzi.rar here].<br />
<br />
== Airframe Adjustments ==<br />
<br />
conf/airframes: "MyAirframe.xml"<br />
* (1) Insert the module:<br />
<modules><br />
<load name="ins_arduimu.xml"/><br />
</modules><br />
<br />
* (2) Activate "i2c"<br />
<target name="ap" board="..."><br />
...<br />
<define name="USE_I2C0"/><br />
</target><br />
<subsystem name="i2c"/> <br />
<br />
* (3) Have INS neutrals<br />
<br />
<section name="INS" prefix="INS_"><br />
<define name="ROLL_NEUTRAL_DEFAULT" value="0" unit="deg"/><br />
<define name="PITCH_NEUTRAL_DEFAULT" value="0" unit="deg"/><br />
</section><br />
<br />
* (4) Use "Settings" file: settings/tuning_ins.xml<br />
<br />
* (5) '''Remove''' the infrared estimation<br />
<br />
remove this:<br />
<subsystem name="attitude" type="infrared"/><br />
<br />
== Flash the ArduIMU ==<br />
<br />
* (6) Flash the ArduIMU with the adapted software in '''sw/airborne/firmwares/helper/arduimu_Firmware_WithGps'''. For information concerning flashing of the ArduIMU, read:<br />
<br />
http://code.google.com/p/ardu-imu/wiki/Code<br />
<br />
So far, this setup has been successfully flown in the EasyStar, Merlin & Funjet aircrafts.<br />
<br />
Have Fun !</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Installation/Linux&diff=8043Installation/Linux2010-11-09T13:30:29Z<p>Markgriffin: Changed paparazzi3 to paparazzi-software</p>
<hr />
<div>== Introduction ==<br />
<br />
Paparazzi is very easily installed on any laptop or workstation running the [http://www.ubuntu.com/ Ubuntu Linux OS] or virtually any [http://www.debian.org/ Debian] based [http://en.wikipedia.org/wiki/Linux Linux].<br />
<br />
At a high-level here are the steps required to install Paparazzi:<br />
<ul><br />
<li>Install a current Linux distribution (Ubuntu Lucid is recommended at the moment).<br />
<li>The Linux package sources file is updated to add the Paparazzi packages (/etc/apt/sources.list)<br />
<li>The Linux packages are updated from the network with the "update" command<br />
<li>The Paparazzi packages are installed (sudo apt-get install paparazzi-dev paparazzi-arm7)<br />
<li>Install subversion to get SVN (sudo apt-get install subversion). Don't worry if it's already installed. <br />
<li>Bring down the sources from the SVN repository: (svn co svn://svn.savannah.nongnu.org/paparazzi/paparazzi-software/trunk paparazzi-software).<br />
<li>Allow access to the ports by copying the [http://www.openuas.org/pub/writing_udev_rules.html rules file]: (export PAPARAZZI_HOME=~/paparazzi-software; sudo cp $PAPARAZZI_HOME/conf/system/udev/rules/10-paparazzi.rules /etc/udev/rules.d/)<br />
<li>Compile the binaries from the sources (cd paparazzi-software && make)<br />
</ul><br />
<br />
That's all.<br />
<br />
=== Operating System ===<br />
<br />
Paparazzi is very easily installed on any laptop or workstation running the [http://www.ubuntu.com/ Ubuntu Linux OS] or virtually any [http://www.debian.org/ Debian] based [http://en.wikipedia.org/wiki/Linux Linux]. Paparazzi is packaged for Debian as well as all of its dependencies. The [http://paparazzi.enac.fr/debian repository] hosted at ENAC holds their latest version.<br />
<br />
It is also possible to have your Debian/Ubuntu running in a virtual machine, for instance with [http://www.virtualbox.org/ VirtualBox]. This requires minimal changes to your computer setup, as you can run the VM from all common platforms (Windows, Mac OS X, Linux). The virtual machine image can easily be transferred between different laptops, giving greater flexibility. Unfortunately, the Open-Source Edition of VirtualBox doesn't include the necessary USB support, so you'll need to get the regular version from the website.<br />
<br />
If you are new and this is your first time installing it is suggested you keep it simple. Select a system you can dedicate to the Linux installation. No VMs or dual boot configurations. The idea is do a very simple generic installation that is certain to have no issues. This reassures you that the installation process works and you can see and use a working Paparazzi install for some time before you try a more complicated install. The install is well documented below and certain to succeed if followed exactly. Most issues arise when someone unfamiliar with Linux tries a non-standard install that requires special steps not documented here.<br />
<br />
=== Compilers and Handlers ===<br />
<br />
The typical installation contains all of the necessary C and OCaml compilers as well as some XML and [http://www.tls.cena.fr/products/ivy/ Ivy] handlers. These tools are provided by the ''paparazzi-dev'' package. Have no fear, this is all taken care of for you so all you must do is type a few simple commands. Below are those commands and helpful information. Commands can be copied and pasted from these pages to make it as easy as possible. <br />
<br />
=== Source Code ===<br />
<br />
The Paparazzi source code is hosted by [https://savannah.nongnu.org/svn/?group=paparazzi Savannah]. It is downloaded using [http://subversion.apache.org/ Subversion] or [[git]].<br />
<br />
== Installation of Compilers and Handlers ==<br />
<br />
=== From the Command Line ===<br />
<br />
For the sources file (sources.list) you only add the line required for your version. Linux names their versions. <br />
<br />
Just add the following lines to your repository list (<b>/etc/apt/sources.list</b>) and then<br />
uncomment the line relevant to your operating system (e.g. one of etch, gutsy or hardy):<br />
<br />
Note: Because of the sources.list file permissions maybe you will need to edit it with root access. In Terminal write this:<br />
<br />
gksudo gedit /etc/apt/sources.list<br />
<br />
{{Box Code|/etc/apt/sources.list|<br />
# Uncomment just _one_ of the following lines - depending on your OS version<br />
# deb <nowiki>http://paparazzi.enac.fr/debian</nowiki> etch main<br />
# deb <nowiki>http://paparazzi.enac.fr/debian</nowiki> lenny main<br />
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> gutsy main<br />
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> hardy main<br />
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> intrepid main<br />
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> jaunty main<br />
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> karmic main<br />
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> lucid main<br />
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> maverick main<br />
}}<br />
<br />
Then, update your sources and install the dependencies needed for recompiling from the source (<b>dev</b>), and the cross-compilers (<b>arm7</b> or <b>stm32</b>) :<br />
<br />
For ARM7 (i.e. Tiny or TWOG boards) :<br />
sudo apt-get update<br />
sudo apt-get install paparazzi-dev paparazzi-arm7<br />
<br />
For STM32 (i.e. Lisa boards) :<br />
sudo apt-get update<br />
sudo apt-get install paparazzi-dev paparazzi-stm32<br />
<br />
Note: The ivy-python package now among the dependencies of paparazzi-dev is also available in the normal paparazzi repository. [https://launchpad.net/~uce-launchpad/+archive/ppa Allen Ibara] might have some newer versions in his PPA but you should not need them.<br />
<br />
==== Optional/Obsolete Packages ====<br />
Users of the newer Lisa/L or Lisa/S boards will need the <b>paparazzi-stm32</b> package.<br />
<br />
Users of older AVR based boards will also need the <b>paparazzi-avr</b> package.<br />
<br />
==== Older Ubuntu Versions ====<br />
<br />
On older Linux distributions (not needed for lucid and later), the Braille TTY driver interferes with FTDI USB Serial adapters. If somehow your FTDI serial adapter does not work, remove the package via:<br />
<br />
sudo apt-get remove brltty<br />
<br />
=== Using Synaptic Package Manager ===<br />
* Launch ''Synaptic Package Manager'' (''Applications/System'' Tools Menu)<br />
* In '''Settings/Repositories''', add a new repository picking the right deb line from above, e.g. <tt>deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> maverick main</tt> if you use Ubuntu Maverik/10.10.<br />
* Search for <tt>paparazzi-dev</tt>, and <tt>paparazzi-arm7</tt> packages (use the ''Search'' button)<br />
* Mark them for installation (right-click on package names)<br />
* Left-click on ''Apply''<br />
<br />
=== Manual Installation of Individual Packages ===<br />
Users of other Linux flavors than a recent Ubuntu or anyone needing manual control of each individual package can [[Manual_Installation|install them independently]].<br />
<br />
== Downloading the Source Code ==<br />
After the <tt>paparazzi-dev</tt> package is installed the complete source code should be downloaded from one of the software repositories.<br />
=== Subversion ===<br />
See the [http://savannah.nongnu.org/svn/?group=paparazzi project page] at Savannah for more details. From the directory of your choice type:<br />
svn co svn://svn.savannah.nongnu.org/paparazzi/paparazzi-software/trunk paparazzi-software<br />
or if you are behind a firewall with an http proxy available:<br />
svn co http://svn.savannah.gnu.org/svn/paparazzi/paparazzi-software/trunk paparazzi-software<br />
after configuration of your proxy in the <tt>~/.subversion/servers</tt> file<br />
<br />
This will download all of the code and install it into <tt>paparazzi-software/</tt><br />
<br />
If you cannot use the Subversion install, daily updated tarballs can also be fetched from the [[Downloads|Downloads]] page.<br />
<br />
=== Git ===<br />
You can also get the source code via a [[git]] mirror.<br />
<br />
== Launching the Software ==<br />
<br />
The first step is to compile. From the <tt>paparazzi-software</tt> directory (<tt>cd paparazzi-software</tt>), run<br />
<br />
make<br />
<br />
You will have to run this command after each update of the source (<tt>svn update</tt> command).<br />
Launch the software from the <tt>paparazzi-software</tt> directory with<br />
<br />
./paparazzi<br />
<br />
From the [[Paparazzi_Center|Paparazzi Center]] interface, select the ''MJ5'' aircraft, select the ''sim'' target and ''Build'' it. Then ''Execute'' the ''Simulation'' session. The prcedure is detailed in the [[Simulation]] page.<br />
<br />
=== Quick Launch Icon ===<br />
<br />
To create an icon on the desktop so you don’t have to manually type codes into the Terminal each time you want to start the GCS follow these steps:<br />
<br />
#Save [[Media:Paparazzi_logo.png|this image file]] to your /paparazzi-software folder<br />
#Right click anywhere on the Ubuntu desktop and click Create Launcher.<br />
#Enter the following in the fields provided:<br />
#*Name: Paparazzi GCS<br />
#*Command: /home/YOUR_USER_NAME/paparazzi-software/paparazzi<br />
#*Comment: Runs the Paparazzi GCS<br />
#*Then click the icon image in the top left on the dialog box and select the Paparazzi logo you just downloaded.<br />
#Click the OK button and that’s it! Your icon should appear on the desktop and you are ready to go.<br />
<br />
=== Agents ===<br />
<br />
If ('''and only if''') you want to directly launch some Paparazzi agents (the ''Tools'' of the [[Paparazzi_Center|Paparazzi Center]]), without using the Paparazzi Center, you must have the Paparazzi source and home environment variables set correctly in your shell. These variables can be automatically set in your shell by adding the following lines to your .bashrc file:<br />
{{Box Code|~/.bashrc|<br />
export PAPARAZZI_HOME<nowiki>=</nowiki>''your paparazzi-software directory''<br />
export PAPARAZZI_SRC<nowiki>=</nowiki>''your paparazzi-software directory''<br />
}}<br />
<br />
=== env Variables ===<br />
<br />
If you wish to manually set the env variables (i.e. when compiling a backup copy of your code in a different folder) execute the following command from the folder you wish to set as your active paparazzi folder:<br />
export PAPARAZZI_HOME=`pwd`;export PAPARAZZI_SRC=`pwd`<br />
Verify that your variables are set correctly with the following command:<br />
env | grep PAPARAZZI<br />
which should return the following:<br />
PAPARAZZI_HOME<nowiki>=</nowiki>''your paparazzi-software directory''<br />
PAPARAZZI_SRC<nowiki>=</nowiki>''your paparazzi-software directory''<br />
<br />
== Setting access rights for USB download ==<br />
<br />
This may be required to flash the Paparazzi-boards directly thru USB. For flashing details, see [[Compiling]].<br />
<br />
Default linux rights may not allow standard (non root) users to directly access the USB bus. You will need to make yourself a member of the plugdev "group" and then create a "rule", associated with that "group". <br><br />
Make yourself a member of the ''plugdev'' group:<br />
<br />
sudo adduser <your login> plugdev<br />
<br />
Logout and login again. Then add the appropriate rule (available ine fhe file ''10-paparazzi.rules'') to the USB handler. Simply copy as root <tt>$PAPARAZZI_HOME/conf/system/udev/rules/10-paparazzi.rules</tt> to <tt>/etc/udev/rules.d/</tt><br />
<br />
sudo cp $PAPARAZZI_HOME/conf/system/udev/rules/10-paparazzi.rules /etc/udev/rules.d/<br />
<br />
== Software Updates ==<br />
Paparazzi is a very rapidly evolving project and as such, you will find that variables and functions are frequently added, changed, or removed. Update your software with care and caution, and always test the functionality on the ground and in the air as some updates will affect tuning parameters. Your airframe file will not be updated by the Subversion (SVN) system and therefore any new or modified variable names will need to be added manually. The compiler will usually identify the problem variables at which point you can look at some of the most recent airframe files on SVN to find the proper syntax. See the [[Compiling]] page for more help if needed.<br />
<br><br />
That said, keeping your software up to date is easy with the Subversion system. The system will compare all source code files with the server and update any that are needed, automatically merging any minor changes that you have incorporated along the way.<br />
<br />
To download and automatically merge any updated source files, run the following command from your Paparazzi directory<br />
svn update<br />
<br />
After any SVN update or source code modification the code can be recompiled from ''your paparazzi-software directory'' with the following command:<br />
<br />
make<br />
<br />
The ''make'' command will only recompile portions of the software where changed have been detected. If it does not behave as expected you can deleted all compiled files and recompile from scratch with the following commands:<br />
<br />
make clean<br />
make<br />
<br />
See the [[Compiling]] page for more info.<br />
<br />
Users making changes to their code structure may prefer to have more control over the updating and merging process and may wish to install and use '''tkdiff''' instead which provides highlighted comparisons of any files that differ between your code and the SVN server and allows for a file by file update.<br />
<br />
To update your Linux distribution as well as any dependencies of Paparazzi (seldom necessary), run the following:<br />
<br />
sudo apt-get update<br />
sudo apt-get upgrade<br />
<br />
== Using the Live CD ==<br />
<br />
There is a [[LiveCD]] available, but it dates back to 2008. It is still an easy way to get a first glimpse on Paparazzi.<br />
<br />
== From Scratch==<br />
<br />
In very rare occasions one needs to install the tools used, third-party libraries used by Paparazzi all from scratch. There are are the moment no 64Bit Linux repositories, that is a very good reason to install from scratch. Sometime one just wants to be able to use all the latest and greatest compilers, or source code of everything to improve something. Then there is no other way than to install from scratch. To help you out getting it all smoothly working [[install_paparazzi_and_everything_from_scratch | a special page is created just click here]]. If you do not understand what that all means, do not panic, then the information on that page is not important to you. Just pretend you never read this part of the Wiki. You are advised just to follow the regular step as described on the install page.<br />
<br />
== 64 Bit ==<br />
<br />
If you don't know what 64 bit (x86_64) means, then don't worry about this!<br />
As previously discussed, there are currently no 64 bit paparazzi versions available.<br />
The easy solution is to use an i386 installation instead. In rare circumstances however, this may be problematic (certain engineering software for example requires 64 bit kernels).<br />
In these cases, a chroot is a good compromise, while avoiding the overhead of a virtual machine (and USB device problems which may occur).<br />
Initial instructions are here for now: https://help.ubuntu.com/community/DebootstrapChroot<br />
The command you use for the bootstrap needs to reflect your architecture - I used<br />
<br />
sudo debootstrap --variant=buildd --arch i386 lucid /var/chroot/lucid http://gb.archive.ubuntu.com/ubuntu/<br />
<br />
The format for schroot config files has changed as of lucid however - here is mine:<br />
<br />
$ cat /etc/schroot/chroot.d/lucid-i386 <br />
[lucid]<br />
description=Ubuntu 10.04 Lucid for i386<br />
directory=/var/chroot/lucid<br />
personality=linux32<br />
root-users=my_user<br />
type=directory<br />
users=my_user<br />
<br />
Once you've installed the ubuntu minimal package, make sure you also enable the uni- and multiverse repos (the easiest way for me is to simply copy my host's /etc/apt/sources.lst to /var/chroot/lucid/etc/apt/sources.lst).<br />
Then follow the standard instructions above. You may need to manually set the PAPARAZZI_HOME and PAPARAZZI_SRC environment variables. You will also have to set the DISPLAY environment variable to :0.0 like so:<br />
<br />
export DISPLAY=:0.0<br />
<br />
Please note, this is more advanced than the standard paparazzi installation and therefore you may encounter strange problems.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=ArduIMU&diff=7951ArduIMU2010-10-15T07:58:14Z<p>Markgriffin: </p>
<hr />
<div>This page describes how to integrate an ArduIMU into an existing Airframe/Paparazzi-Code.<br />
#The ArduIMU communicates over I2C with the Paparazzi-AP. The wiring is pretty easy to do. Connect SDA, SCL, ground and supply the IMU with 5V.<br />
#The integration into the software is realized as a module. That is an easy way to connect and test new software. <br />
#This Guide/Software is made to use the ArduIMU without separate GPS-Receiver and without Compass/Magnetometer. The GPS-Data is sent by the Tiny 2.11 over I2C to the IMU.<br />
#There is an other airframe/main-AP we wrote wich uses a magnetometer for yaw-drift compensation. We didn't write an installation guide like this yet. But we try to do this as soon as possible. <br />
<br />
You can download the code [https://home.zhaw.ch/~schmiemi/Arduimu4Paprazzi.rar here].<br />
<br />
== Airframe Adjustments ==<br />
<br />
conf/airframes: "MyAirframe.xml"<br />
* (1) Insert the module:<br />
<modules><br />
<load name="ArduIMU.xml"/><br />
</modules><br />
<br />
* (2) Activate "i2c" and "modules"<br />
ap.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c<br />
ap.CFLAGS += -DUSE_I2C0 -DI2C0_SCLL=150 -DI2C0_SCLH=150<br />
ap.CFLAGS += -DUSE_MODULES<br />
<br />
== Copy the Modules and other Data ==<br />
<br />
conf/modules: "ArduIMU.xml"<br />
<br />
* (3) Copy "ArduIMU.xml" into the directory "conf/modules/"<br />
<br />
sw/airborne/modules/: "ArduIMU"<br />
<br />
* (4) Copy the directory "ArduIMU" into the directory "sw/airborne/modules/"<br />
<br />
== Flash the ArduIMU ==<br />
<br />
* (5) Flash the ArduIMU with the adapted software. For information concerning flashing of the IMU, read:<br />
<br />
http://code.google.com/p/ardu-imu/wiki/HomePage?tm=6<br />
<br />
Have Fun !<br />
<br />
Please note that there was a major revision to the paparazzi i2c drivers in early September 2010. As the ArduIMU code is written for the former drivers, it will not work on a paparazzi installation updated after 1 September 2010 (it will work on a paparazzi installation updated before then). To work with the new transaction-based i2c drivers, the ArduIMU code will need to be revised.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Installation/Linux&diff=7858Installation/Linux2010-09-24T10:25:42Z<p>Markgriffin: /* From the Command Line */</p>
<hr />
<div>== Introduction ==<br />
<br />
Paparazzi is very easily installed on any laptop or workstation running the [http://www.ubuntu.com/ Ubuntu Linux OS] or virtually any [http://www.debian.org/ Debian] based [http://en.wikipedia.org/wiki/Linux Linux].<br />
<br />
At a high-level here are the steps required to install Paparazzi:<br />
<ul><br />
<li>Dedicate a Laptop or PC for Paparazzi. Dedicate means during install you select to use the entire disk for the installation and erase any previous Linux or Windows OS installed.<br />
<li>Installation takes place with a recent build of Linux using the default options. <br />
<li>The Linux package sources file is updated to add the Paparazzi packages (/etc/apt/sources.list)<br />
<li>The Linux packages are updated from the network with the "update" command<br />
<li>The Paparazzi packages are installed (sudo apt-get install paparazzi-dev paparazzi-arm7)<br />
<li>The brltty package is removed to avoid issues (sudo apt-get remove brltty)<br />
<li>Install subversion to get SVN (sudo apt-get install subversion). Don't worry if it's already installed. <br />
<li>Bring down the sources from the SVN repository: (svn co svn://svn.savannah.nongnu.org/paparazzi/paparazzi3/trunk paparazzi3). Just change the paparazzi3s to paparazzi4s for Booz files.<br />
<li>Allow access to the ports by copying the [http://www.openuas.org/pub/writing_udev_rules.html rules file]: (export PAPARAZZI_HOME=~/paparazzi3; sudo cp $PAPARAZZI_HOME/conf/system/udev/rules/10-paparazzi.rules /etc/udev/rules.d/)<br />
<li>Compile the binaries from the sources (cd paparazzi3 && make)<br />
</ul><br />
<br />
That's all.<br />
<br />
=== Operating System ===<br />
<br />
Paparazzi is very easily installed on any laptop or workstation running the [http://www.ubuntu.com/ Ubuntu Linux OS] or virtually any [http://www.debian.org/ Debian] based [http://en.wikipedia.org/wiki/Linux Linux]. Paparazzi is packaged for Debian as well as all of its dependencies. The [http://paparazzi.enac.fr/debian repository] hosted at ENAC holds their latest version.<br />
<br />
It is also possible to have your Debian/Ubuntu running in a virtual machine, for instance with [http://www.virtualbox.org/ VirtualBox]. This requires minimal changes to your computer setup, as you can run the VM from all common platforms (Windows, Mac OS X, Linux). The virtual machine image can easily be transferred between different laptops, giving greater flexibility. Unfortunately, the Open-Source Edition of VirtualBox doesn't include the necessary USB support, so you'll need to get the regular version from the website.<br />
<br />
If you are new and this is your first time installing it is suggested you keep it simple. Select a system you can dedicate to the Linux installation. No VMs or dual boot configurations. The idea is do a very simple generic installation that is certain to have no issues. This reassures you that the installation process works and you can see and use a working Paparazzi install for some time before you try a more complicated install. The install is well documented below and certain to succeed if followed exactly. Most issues arise when someone unfamiliar with Linux tries a non-standard install that requires special steps not documented here.<br />
<br />
=== Precompiled Binaries ===<br />
<br />
Precompiled binaries can be downloaded and executed with the ''paparazzi-bin'' package. To enjoy the power and flexibility of open-source code, you will soon want to configure the airborne autopilot and ground station according to your needs and recompile it. Therefore you need to install the compilers and download the source code.<br />
<br />
The Paparazzi packages for a Debian based Linux are hosted at the [http://www.recherche.enac.fr/paparazzi/debian ENAC repository].<br />
<br />
=== Compilers and Handlers ===<br />
<br />
The typical installation contains all of the necessary C and OCaml compilers as well as some XML and [http://www.tls.cena.fr/products/ivy/ Ivy] handlers. These tools are provided by the ''paparazzi-dev'' package. Have no fear, this is all taken care of for you so all you must do is type a few simple commands. Below are those commands and helpful information. Commands can be copied and pasted from these pages to make it as easy as possible. <br />
<br />
=== Source Code ===<br />
<br />
The Paparazzi source code is hosted by [https://savannah.nongnu.org/svn/?group=paparazzi Savannah]. It is downloaded using [http://subversion.apache.org/ Subversion] or [[git]].<br />
<br />
== Installation of Compilers and Handlers ==<br />
<br />
=== From the Command Line ===<br />
<br />
For the sources file (sources.list) you only add the line required for your version. Linux names their versions. <br />
<br />
Just add the following lines to your repository list (<b>/etc/apt/sources.list</b>) and then<br />
uncomment the line relevant to your operating system (e.g. one of etch, gutsy or hardy):<br />
<br />
Note: Because of the sources.list file permissions maybe you will need to edit it with root access. In Terminal write this:<br />
<br />
gksudo gedit /etc/apt/sources.list<br />
<br />
{{Box Code|/etc/apt/sources.list|<br />
# Uncomment just _one_ of the following lines - depending on your OS version<br />
# deb <nowiki>http://paparazzi.enac.fr/debian</nowiki> etch main<br />
# deb <nowiki>http://paparazzi.enac.fr/debian</nowiki> lenny main<br />
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> gutsy main<br />
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> hardy main<br />
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> intrepid main<br />
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> jaunty main<br />
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> karmic main<br />
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> lucid main<br />
}}<br />
<br />
Then, update your sources and '''either''' install the precompiled <b>bin</b>aries<br />
sudo apt-get update<br />
sudo apt-get install paparazzi-bin<br />
<b>or</b> the dependencies needed for recompiling from the source (<b>dev</b>), and the cross-compilers (<b>arm7</b> or <b>stm32</b>) :<br />
<br />
For ARM7 (i.e. Tiny or TWOG boards) :<br />
sudo apt-get update<br />
sudo apt-get install paparazzi-dev paparazzi-arm7<br />
<br />
For STM32 (i.e. Lisa boards) :<br />
sudo apt-get update<br />
sudo apt-get install paparazzi-dev paparazzi-stm32<br />
<br />
It is not recommended to install both <tt>paparazzi-bin</tt> <b>and</b> <tt>paparazzi-dev</tt>. While the <b>bin</b> package is self-contained and should be sufficient for users who do not want to patch the code, the <b>dev</b> meta-package provides only the tools to compile the source code which must be separately downloaded, from an archive or the SVN repository.<br />
<br />
Note: The ivy-python package now among the dependencies of paparazzi-dev is also available in the normal paparazzi repository. [https://launchpad.net/~uce-launchpad/+archive/ppa Allen Ibara] might have some newer versions in his PPA but you should not need them.<br />
<br />
==== Optional/Obsolete Packages ====<br />
Users of the newer Lisa/L or Lisa/S boards will need the <b>paparazzi-stm32</b> package.<br />
<br />
Users of older AVR based boards will also need the <b>paparazzi-avr</b> package.<br />
<br />
==== Extra for Ubuntu ====<br />
<br />
On older Linux distributions, the Braille TTY driver interferes with FTDI USB Serial adapters. If somehow your FTDI serial adapter does not work, remove the package via:<br />
<br />
sudo apt-get remove brltty<br />
<br />
=== Using Synaptic Package Manager ===<br />
* Launch ''Synaptic Package Manager'' (''Applications/System'' Tools Menu)<br />
* In '''Settings/Repositories''', add a new repository on URI = '''<nowiki>http://paparazzi.enac.fr/debian</nowiki>''', Distribution = '''etch''', Section = '''main''' . For Ubuntu, replace '''debian''' by '''ubuntu''' and '''etch''' by '''gutsy''', '''hardy''', '''karmic''' or '''lucid'''<br />
* Search for <tt>paparazzi-bin</tt>, <tt>paparazzi-dev</tt>, and <tt>paparazzi-arm7</tt> packages (use the ''Search'' button)<br />
* Mark them for installation (right-click on package names)<br />
* Left-click on ''Apply''<br />
<br />
=== Manual Installation of Individual Packages ===<br />
Users of other Linux flavors or anyone needing manual control of each individual package can install them independently. The list of dependencies of the Debian package is located in the [http://svn.savannah.gnu.org/viewvc/paparazzi3/trunk/debian/control.lenny?root=paparazzi&view=markup <tt> debian/control.lenny</tt>] file and may help users of other distributions.<br />
<br />
The binary packages and some corresponding source tarballs can be downloaded from<br />
<br />
http://paparazzi.enac.fr/debian/dists/etch/main/binary-i386/<br />
<br />
For distributions using RPM packaging, the [http://packages.debian.org/unstable/source/alien alien] tool can be used to translate a .deb package into a .rpm package.<br />
<br />
For Fedora (Core8) users, you can install the following packages from standard repository:<br />
* ocaml.i386<br />
* ocaml-camlimages-devel.i386<br />
* ocaml-lablgtk-devel.i386<br />
* ocaml-xml-light-devel.i386<br />
* boa.i386<br />
* libgnomecanvas-devel.i386<br />
* libusb-devel.i386<br />
* pcre-devel.i386<br />
* arm-gp2x-linux-gcc.i386<br />
* arm-gp2x-linux-binutils.i386<br />
* glade2.i386<br />
* and gcc, make, subversion, gnuplot, imagemagik...<br />
<br />
Then you need [http://packages.debian.org/unstable/source/alien alien] tool to convert packages from the paparazzi repository:<br />
* ivy-c<br />
* ivy-c-dev<br />
* ivy-ocaml (WARNING: debian and fedora have different path for ocaml (/usr/lib/ocaml/<version> vs. /usr/lib/ocaml), so you need to move by hand the files in /usr/lib/ocaml/<version> to /usr/lib/ocaml)<br />
* lpc21isp<br />
<br />
== Downloading the Source Code ==<br />
'''Important:''' If you use paparazzi-bin you need not to download the source code.<br />
<br />
After the <tt>paparazzi-dev</tt> package is installed the complete source code should be downloaded from one of the software repositories.<br />
=== Subversion ===<br />
See the [http://savannah.nongnu.org/svn/?group=paparazzi project page] at Savannah for more details. From the directory of your choice type:<br />
svn co svn://svn.savannah.nongnu.org/paparazzi/paparazzi3/trunk paparazzi3<br />
or if you are behind a firewall with an http proxy available:<br />
svn co http://svn.savannah.gnu.org/svn/paparazzi/paparazzi3/trunk paparazzi3<br />
after configuration of your proxy in the <tt>~/.subversion/servers</tt> file<br />
<br />
This will download all of the code and install it into <tt>paparazzi3/</tt><br />
<br />
If you cannot use the Subversion install, daily updated tarballs can also be fetched from the [[Downloads|Downloads]] page.<br />
<br />
=== Git ===<br />
You can also get the source code via [[git]].<br />
<br />
== Launching the Software ==<br />
<br />
=== Using paparazzi-bin ===<br />
<br />
If you are using the <tt>paparazzi-bin</tt> package or the Live-CD, just launch the <tt>paparazzi</tt> binary application and you will be guided through the installation of your personal configuration files.<br />
<br />
=== Using Source Code ===<br />
<br />
If you are using the source code, the first step is to compile it. From the <tt>paparazzi3</tt> directory (<tt>cd paparazzi3</tt>), run<br />
<br />
make<br />
<br />
You will have to run this command after each update of the source (<tt>svn update</tt> command).<br />
Launch the software from the <tt>paparazzi3</tt> directory with<br />
<br />
./paparazzi<br />
<br />
From the [[Paparazzi_Center|Paparazzi Center]] interface, select the ''MJ5'' aircraft, select the ''sim'' target and ''Build'' it. Then ''Execute'' the ''Simulation'' session. The prcedure is detailed in the [[Simulation]] page.<br />
<br />
=== Quick Launch Icon ===<br />
<br />
To create an icon on the desktop so you don’t have to manually type codes into the Terminal each time you want to start the GCS follow these steps:<br />
<br />
#Save [[Media:Paparazzi_logo.png|this image file]] to your /paparazzi3 folder<br />
#Right click anywhere on the Ubuntu desktop and click Create Launcher.<br />
#Enter the following in the fields provided:<br />
#*Name: Paparazzi GCS<br />
#*Command: /home/YOUR_USER_NAME/paparazzi3/paparazzi<br />
#*Comment: Runs the Paparazzi GCS<br />
#*Then click the icon image in the top left on the dialog box and select the Paparazzi logo you just downloaded.<br />
#Click the OK button and that’s it! Your icon should appear on the desktop and you are ready to go.<br />
<br />
=== Agents ===<br />
<br />
If ('''and only if''') you want to directly launch some Paparazzi agents (the ''Tools'' of the [[Paparazzi_Center|Paparazzi Center]]), without using the Paparazzi Center, you must have the Paparazzi source and home environment variables set correctly in your shell. These variables can be automatically set in your shell by adding the following lines to your .bashrc file:<br />
{{Box Code|~/.bashrc|<br />
export PAPARAZZI_HOME<nowiki>=</nowiki>''your paparazzi3 directory''<br />
export PAPARAZZI_SRC<nowiki>=</nowiki>''your paparazzi3 directory''<br />
}}<br />
<br />
=== env Variables ===<br />
<br />
If you wish to manually set the env variables (i.e. when compiling a backup copy of your code in a different folder) execute the following command from the folder you wish to set as your active paparazzi folder:<br />
export PAPARAZZI_HOME=`pwd`;export PAPARAZZI_SRC=`pwd`<br />
Verify that your variables are set correctly with the following command:<br />
env | grep PAPARAZZI<br />
which should return the following:<br />
PAPARAZZI_HOME<nowiki>=</nowiki>''your paparazzi3 directory''<br />
PAPARAZZI_SRC<nowiki>=</nowiki>''your paparazzi3 directory''<br />
<br />
== Setting access rights for USB download ==<br />
<br />
This may be required to flash the Paparazzi-boards directly thru USB. For flashing details, see [[Compiling]].<br />
<br />
Default linux rights may not allow standard (non root) users to directly access the USB bus. You will need to make yourself a member of the plugdev "group" and then create a "rule", associated with that "group". <br><br />
Make yourself a member of the ''plugdev'' group:<br />
<br />
sudo adduser <your login> plugdev<br />
<br />
Logout and login again. Then add the appropriate rule (available ine fhe file ''10-paparazzi.rules'') to the USB handler. Simply copy as root <tt>$PAPARAZZI_HOME/conf/system/udev/rules/10-paparazzi.rules</tt> to <tt>/etc/udev/rules.d/</tt><br />
<br />
sudo cp $PAPARAZZI_HOME/conf/system/udev/rules/10-paparazzi.rules /etc/udev/rules.d/<br />
<br />
== Software Updates ==<br />
Paparazzi is a very rapidly evolving project and as such, you will find that variables and functions are frequently added, changed, or removed. Update your software with care and caution, and always test the functionality on the ground and in the air as some updates will affect tuning parameters. Your airframe file will not be updated by the Subversion (SVN) system and therefore any new or modified variable names will need to be added manually. The compiler will usually identify the problem variables at which point you can look at some of the most recent airframe files on SVN to find the proper syntax. See the [[Compiling]] page for more help if needed.<br />
<br><br />
That said, keeping your software up to date is easy with the Subversion system. The system will compare all source code files with the server and update any that are needed, automatically merging any minor changes that you have incorporated along the way.<br />
<br />
To download and automatically merge any updated source files, run the following command from your Paparazzi directory<br />
svn update<br />
<br />
After any SVN update or source code modification the code can be recompiled from ''your paparazzi3 directory'' with the following command:<br />
<br />
make<br />
<br />
The ''make'' command will only recompile portions of the software where changed have been detected. If it does not behave as expected you can deleted all compiled files and recompile from scratch with the following commands:<br />
<br />
make clean<br />
make<br />
<br />
See the [[Compiling]] page for more info.<br />
<br />
Users making changes to their code structure may prefer to have more control over the updating and merging process and may wish to install and use '''tkdiff''' instead which provides highlighted comparisons of any files that differ between your code and the SVN server and allows for a file by file update.<br />
<br />
To update your Linux distribution as well as any dependencies of Paparazzi (seldom necessary), run the following:<br />
<br />
sudo apt-get update<br />
sudo apt-get upgrade<br />
<br />
== Using the Live CD==<br />
<br />
[[Image:Lightscribe_CD_Cover_1.JPG|thumb|320px|LightScribe CD Cover]] <br />
<br />
The LiveCD is an easy way to test Paparazzi: no installation is required and no changes are made to your computer. Simply burn the image as a boot CD and reboot! The LiveCD includes Linux and the complete paparazzi binary package (code source, tools and cross compilers). It is intended for demonstration only and not frequently updated but it contains the complete system and can store changed files on a pen drive or compressed file on your hard drive so that it can compile, flash, and operate any aircraft, albeit slowly. <br />
<br />
The CD image and a howto on [[Using the Boot CD]] is available from the [[Downloads|Downloads]] page.<br />
<br />
The Paparazzi demo is launchable on the Live CD from the Paparazzi icon.<br />
<br />
Knoppix allows for all the user data to be saved on a hard disk partition (most file systems are supported) or on a removable device (typically a USB pendrive). Note that this action is not destructive: the user data tree is compressed and stored on your file system as a single file (<tt>knoppix.img</tt>).<br />
* From the Knoppix menu (second from bottom left), choose '''Configure''', '''Create a persistent KNOPPIX disk image'''<br />
* Choose your media (be sure to connect your USB pendrive before booting!)<br />
* Choose if you want an encrypted filesystem (to protect your flight plan designed for the next MAV competition :-) )<br />
* Choose the size of your home directory (100Mb is recommended)<br />
On the next reboot, this saved state will be automatically located and loaded.<br />
<br />
Using this persistent feature, the Paparazzix Live CD can really be used to configure, simulate and fly an aircraft with the Paparazzi system.<br />
<br />
The Live CD can also be used to install a Debian system on the hard disk, using the <tt>knoppix-installer</tt> command. Be sure to backup the hard disk before trying ...<br />
<br />
<br />
A LiveCD needs some looks... In color or in LightScribe format, your CD will always look cool. <br />
* Get the PDF version for download here [http://paparazzi.enac.fr/wiki_images/Lightscribe_CD_Cover_1.pdf LightScribe CD Cover 1].<br />
<br />
* The LightScribe version is in Nero Cover Design format (.ncd) and it's here for download [http://paparazzi.enac.fr/wiki_images/Lightscribe_CD_Cover_1.zip LightScribe CD Cover 1]<br />
<br />
* Better is of course to use it on an OpenSource OS, some Linux software to be found here: [http://www.lightscribe.com/downloadSection/linux/index.aspx?id=814 Lightscribe for Linux]<br />
<br />
== From Scratch==<br />
<br />
In very rare occasions one needs to install the tools used, third-party libraries used by Paparazzi all from scratch. There are are the moment no 64Bit Linux repositories, that is a very good reason to install from scratch. Sometime one just wants to be able to use all the latest and greatest compilers, or source code of everything to improve something. Then there is no other way than to install from scratch. To help you out getting it all smoothly working [[install_paparazzi_and_everything_from_scratch | a special page is created just click here]]. If you do not understand what that all means, do not panic, then the information on that page is not important to you. Just pretend you never read this part of the Wiki. You are advised just to follow the regular step as described on the install page.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Installation/Linux&diff=7857Installation/Linux2010-09-24T10:10:19Z<p>Markgriffin: /* From the Command Line */</p>
<hr />
<div>== Introduction ==<br />
<br />
Paparazzi is very easily installed on any laptop or workstation running the [http://www.ubuntu.com/ Ubuntu Linux OS] or virtually any [http://www.debian.org/ Debian] based [http://en.wikipedia.org/wiki/Linux Linux].<br />
<br />
At a high-level here are the steps required to install Paparazzi:<br />
<ul><br />
<li>Dedicate a Laptop or PC for Paparazzi. Dedicate means during install you select to use the entire disk for the installation and erase any previous Linux or Windows OS installed.<br />
<li>Installation takes place with a recent build of Linux using the default options. <br />
<li>The Linux package sources file is updated to add the Paparazzi packages (/etc/apt/sources.list)<br />
<li>The Linux packages are updated from the network with the "update" command<br />
<li>The Paparazzi packages are installed (sudo apt-get install paparazzi-dev paparazzi-arm7)<br />
<li>The brltty package is removed to avoid issues (sudo apt-get remove brltty)<br />
<li>Install subversion to get SVN (sudo apt-get install subversion). Don't worry if it's already installed. <br />
<li>Bring down the sources from the SVN repository: (svn co svn://svn.savannah.nongnu.org/paparazzi/paparazzi3/trunk paparazzi3). Just change the paparazzi3s to paparazzi4s for Booz files.<br />
<li>Allow access to the ports by copying the [http://www.openuas.org/pub/writing_udev_rules.html rules file]: (export PAPARAZZI_HOME=~/paparazzi3; sudo cp $PAPARAZZI_HOME/conf/system/udev/rules/10-paparazzi.rules /etc/udev/rules.d/)<br />
<li>Compile the binaries from the sources (cd paparazzi3 && make)<br />
</ul><br />
<br />
That's all.<br />
<br />
=== Operating System ===<br />
<br />
Paparazzi is very easily installed on any laptop or workstation running the [http://www.ubuntu.com/ Ubuntu Linux OS] or virtually any [http://www.debian.org/ Debian] based [http://en.wikipedia.org/wiki/Linux Linux]. Paparazzi is packaged for Debian as well as all of its dependencies. The [http://paparazzi.enac.fr/debian repository] hosted at ENAC holds their latest version.<br />
<br />
It is also possible to have your Debian/Ubuntu running in a virtual machine, for instance with [http://www.virtualbox.org/ VirtualBox]. This requires minimal changes to your computer setup, as you can run the VM from all common platforms (Windows, Mac OS X, Linux). The virtual machine image can easily be transferred between different laptops, giving greater flexibility. Unfortunately, the Open-Source Edition of VirtualBox doesn't include the necessary USB support, so you'll need to get the regular version from the website.<br />
<br />
If you are new and this is your first time installing it is suggested you keep it simple. Select a system you can dedicate to the Linux installation. No VMs or dual boot configurations. The idea is do a very simple generic installation that is certain to have no issues. This reassures you that the installation process works and you can see and use a working Paparazzi install for some time before you try a more complicated install. The install is well documented below and certain to succeed if followed exactly. Most issues arise when someone unfamiliar with Linux tries a non-standard install that requires special steps not documented here.<br />
<br />
=== Precompiled Binaries ===<br />
<br />
Precompiled binaries can be downloaded and executed with the ''paparazzi-bin'' package. To enjoy the power and flexibility of open-source code, you will soon want to configure the airborne autopilot and ground station according to your needs and recompile it. Therefore you need to install the compilers and download the source code.<br />
<br />
The Paparazzi packages for a Debian based Linux are hosted at the [http://www.recherche.enac.fr/paparazzi/debian ENAC repository].<br />
<br />
=== Compilers and Handlers ===<br />
<br />
The typical installation contains all of the necessary C and OCaml compilers as well as some XML and [http://www.tls.cena.fr/products/ivy/ Ivy] handlers. These tools are provided by the ''paparazzi-dev'' package. Have no fear, this is all taken care of for you so all you must do is type a few simple commands. Below are those commands and helpful information. Commands can be copied and pasted from these pages to make it as easy as possible. <br />
<br />
=== Source Code ===<br />
<br />
The Paparazzi source code is hosted by [https://savannah.nongnu.org/svn/?group=paparazzi Savannah]. It is downloaded using [http://subversion.apache.org/ Subversion] or [[git]].<br />
<br />
== Installation of Compilers and Handlers ==<br />
<br />
=== From the Command Line ===<br />
<br />
For the sources file (sources.list) you only add the line required for your version. Linux names their versions. <br />
<br />
Just add the following lines to your repository list (<b>/etc/apt/sources.list</b>) and then<br />
uncomment the line relevant to your operating system (e.g. one of etch, gutsy or hardy):<br />
<br />
Note: Because of the sources.list file permissions maybe you will need to edit it with root access. In Terminal write this:<br />
<br />
gksudo gedit /etc/apt/sources.list<br />
<br />
{{Box Code|/etc/apt/sources.list|<br />
# Uncomment just _one_ of the following lines - depending on your OS version<br />
# deb <nowiki>http://paparazzi.enac.fr/debian</nowiki> etch main<br />
# deb <nowiki>http://paparazzi.enac.fr/debian</nowiki> lenny main<br />
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> gutsy main<br />
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> hardy main<br />
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> intrepid main<br />
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> jaunty main<br />
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> karmic main<br />
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> lucid main<br />
}}<br />
<br />
Then, update your sources and '''either''' install the precompiled <b>bin</b>aries<br />
sudo apt-get update<br />
sudo apt-get install paparazzi-bin<br />
<b>or</b> the dependencies needed for recompiling from the source (<b>dev</b>), and the cross-compilers (<b>arm7</b>) :<br />
sudo apt-get update<br />
sudo apt-get install paparazzi-dev paparazzi-arm7<br />
<br />
It is not recommended to install both <tt>paparazzi-bin</tt> <b>and</b> <tt>paparazzi-dev</tt>. While the <b>bin</b> package is self-contained and should be sufficient for users who do not want to patch the code, the <b>dev</b> meta-package provides only the tools to compile the source code which must be separately downloaded, from an archive or the SVN repository.<br />
<br />
Note: The ivy-python package now among the dependencies of paparazzi-dev is also available in the normal paparazzi repository. [https://launchpad.net/~uce-launchpad/+archive/ppa Allen Ibara] might have some newer versions in his PPA but you should not need them.<br />
<br />
==== Optional/Obsolete Packages ====<br />
Users of older AVR based boards will also need the <b>paparazzi-avr</b> package.<br />
<br />
Users of Lisa/L or Lisa/S will need the <b>paparazzi-stm32</b> package.<br />
<br />
==== Extra for Ubuntu ====<br />
<br />
On older Linux distributions, the Braille TTY driver interferes with FTDI USB Serial adapters. If somehow your FTDI serial adapter does not work, remove the package via:<br />
<br />
sudo apt-get remove brltty<br />
<br />
=== Using Synaptic Package Manager ===<br />
* Launch ''Synaptic Package Manager'' (''Applications/System'' Tools Menu)<br />
* In '''Settings/Repositories''', add a new repository on URI = '''<nowiki>http://paparazzi.enac.fr/debian</nowiki>''', Distribution = '''etch''', Section = '''main''' . For Ubuntu, replace '''debian''' by '''ubuntu''' and '''etch''' by '''gutsy''', '''hardy''', '''karmic''' or '''lucid'''<br />
* Search for <tt>paparazzi-bin</tt>, <tt>paparazzi-dev</tt>, and <tt>paparazzi-arm7</tt> packages (use the ''Search'' button)<br />
* Mark them for installation (right-click on package names)<br />
* Left-click on ''Apply''<br />
<br />
=== Manual Installation of Individual Packages ===<br />
Users of other Linux flavors or anyone needing manual control of each individual package can install them independently. The list of dependencies of the Debian package is located in the [http://svn.savannah.gnu.org/viewvc/paparazzi3/trunk/debian/control.lenny?root=paparazzi&view=markup <tt> debian/control.lenny</tt>] file and may help users of other distributions.<br />
<br />
The binary packages and some corresponding source tarballs can be downloaded from<br />
<br />
http://paparazzi.enac.fr/debian/dists/etch/main/binary-i386/<br />
<br />
For distributions using RPM packaging, the [http://packages.debian.org/unstable/source/alien alien] tool can be used to translate a .deb package into a .rpm package.<br />
<br />
For Fedora (Core8) users, you can install the following packages from standard repository:<br />
* ocaml.i386<br />
* ocaml-camlimages-devel.i386<br />
* ocaml-lablgtk-devel.i386<br />
* ocaml-xml-light-devel.i386<br />
* boa.i386<br />
* libgnomecanvas-devel.i386<br />
* libusb-devel.i386<br />
* pcre-devel.i386<br />
* arm-gp2x-linux-gcc.i386<br />
* arm-gp2x-linux-binutils.i386<br />
* glade2.i386<br />
* and gcc, make, subversion, gnuplot, imagemagik...<br />
<br />
Then you need [http://packages.debian.org/unstable/source/alien alien] tool to convert packages from the paparazzi repository:<br />
* ivy-c<br />
* ivy-c-dev<br />
* ivy-ocaml (WARNING: debian and fedora have different path for ocaml (/usr/lib/ocaml/<version> vs. /usr/lib/ocaml), so you need to move by hand the files in /usr/lib/ocaml/<version> to /usr/lib/ocaml)<br />
* lpc21isp<br />
<br />
== Downloading the Source Code ==<br />
'''Important:''' If you use paparazzi-bin you need not to download the source code.<br />
<br />
After the <tt>paparazzi-dev</tt> package is installed the complete source code should be downloaded from one of the software repositories.<br />
=== Subversion ===<br />
See the [http://savannah.nongnu.org/svn/?group=paparazzi project page] at Savannah for more details. From the directory of your choice type:<br />
svn co svn://svn.savannah.nongnu.org/paparazzi/paparazzi3/trunk paparazzi3<br />
or if you are behind a firewall with an http proxy available:<br />
svn co http://svn.savannah.gnu.org/svn/paparazzi/paparazzi3/trunk paparazzi3<br />
after configuration of your proxy in the <tt>~/.subversion/servers</tt> file<br />
<br />
This will download all of the code and install it into <tt>paparazzi3/</tt><br />
<br />
If you cannot use the Subversion install, daily updated tarballs can also be fetched from the [[Downloads|Downloads]] page.<br />
<br />
=== Git ===<br />
You can also get the source code via [[git]].<br />
<br />
== Launching the Software ==<br />
<br />
=== Using paparazzi-bin ===<br />
<br />
If you are using the <tt>paparazzi-bin</tt> package or the Live-CD, just launch the <tt>paparazzi</tt> binary application and you will be guided through the installation of your personal configuration files.<br />
<br />
=== Using Source Code ===<br />
<br />
If you are using the source code, the first step is to compile it. From the <tt>paparazzi3</tt> directory (<tt>cd paparazzi3</tt>), run<br />
<br />
make<br />
<br />
You will have to run this command after each update of the source (<tt>svn update</tt> command).<br />
Launch the software from the <tt>paparazzi3</tt> directory with<br />
<br />
./paparazzi<br />
<br />
From the [[Paparazzi_Center|Paparazzi Center]] interface, select the ''MJ5'' aircraft, select the ''sim'' target and ''Build'' it. Then ''Execute'' the ''Simulation'' session. The prcedure is detailed in the [[Simulation]] page.<br />
<br />
=== Quick Launch Icon ===<br />
<br />
To create an icon on the desktop so you don’t have to manually type codes into the Terminal each time you want to start the GCS follow these steps:<br />
<br />
#Save [[Media:Paparazzi_logo.png|this image file]] to your /paparazzi3 folder<br />
#Right click anywhere on the Ubuntu desktop and click Create Launcher.<br />
#Enter the following in the fields provided:<br />
#*Name: Paparazzi GCS<br />
#*Command: /home/YOUR_USER_NAME/paparazzi3/paparazzi<br />
#*Comment: Runs the Paparazzi GCS<br />
#*Then click the icon image in the top left on the dialog box and select the Paparazzi logo you just downloaded.<br />
#Click the OK button and that’s it! Your icon should appear on the desktop and you are ready to go.<br />
<br />
=== Agents ===<br />
<br />
If ('''and only if''') you want to directly launch some Paparazzi agents (the ''Tools'' of the [[Paparazzi_Center|Paparazzi Center]]), without using the Paparazzi Center, you must have the Paparazzi source and home environment variables set correctly in your shell. These variables can be automatically set in your shell by adding the following lines to your .bashrc file:<br />
{{Box Code|~/.bashrc|<br />
export PAPARAZZI_HOME<nowiki>=</nowiki>''your paparazzi3 directory''<br />
export PAPARAZZI_SRC<nowiki>=</nowiki>''your paparazzi3 directory''<br />
}}<br />
<br />
=== env Variables ===<br />
<br />
If you wish to manually set the env variables (i.e. when compiling a backup copy of your code in a different folder) execute the following command from the folder you wish to set as your active paparazzi folder:<br />
export PAPARAZZI_HOME=`pwd`;export PAPARAZZI_SRC=`pwd`<br />
Verify that your variables are set correctly with the following command:<br />
env | grep PAPARAZZI<br />
which should return the following:<br />
PAPARAZZI_HOME<nowiki>=</nowiki>''your paparazzi3 directory''<br />
PAPARAZZI_SRC<nowiki>=</nowiki>''your paparazzi3 directory''<br />
<br />
== Setting access rights for USB download ==<br />
<br />
This may be required to flash the Paparazzi-boards directly thru USB. For flashing details, see [[Compiling]].<br />
<br />
Default linux rights may not allow standard (non root) users to directly access the USB bus. You will need to make yourself a member of the plugdev "group" and then create a "rule", associated with that "group". <br><br />
Make yourself a member of the ''plugdev'' group:<br />
<br />
sudo adduser <your login> plugdev<br />
<br />
Logout and login again. Then add the appropriate rule (available ine fhe file ''10-paparazzi.rules'') to the USB handler. Simply copy as root <tt>$PAPARAZZI_HOME/conf/system/udev/rules/10-paparazzi.rules</tt> to <tt>/etc/udev/rules.d/</tt><br />
<br />
sudo cp $PAPARAZZI_HOME/conf/system/udev/rules/10-paparazzi.rules /etc/udev/rules.d/<br />
<br />
== Software Updates ==<br />
Paparazzi is a very rapidly evolving project and as such, you will find that variables and functions are frequently added, changed, or removed. Update your software with care and caution, and always test the functionality on the ground and in the air as some updates will affect tuning parameters. Your airframe file will not be updated by the Subversion (SVN) system and therefore any new or modified variable names will need to be added manually. The compiler will usually identify the problem variables at which point you can look at some of the most recent airframe files on SVN to find the proper syntax. See the [[Compiling]] page for more help if needed.<br />
<br><br />
That said, keeping your software up to date is easy with the Subversion system. The system will compare all source code files with the server and update any that are needed, automatically merging any minor changes that you have incorporated along the way.<br />
<br />
To download and automatically merge any updated source files, run the following command from your Paparazzi directory<br />
svn update<br />
<br />
After any SVN update or source code modification the code can be recompiled from ''your paparazzi3 directory'' with the following command:<br />
<br />
make<br />
<br />
The ''make'' command will only recompile portions of the software where changed have been detected. If it does not behave as expected you can deleted all compiled files and recompile from scratch with the following commands:<br />
<br />
make clean<br />
make<br />
<br />
See the [[Compiling]] page for more info.<br />
<br />
Users making changes to their code structure may prefer to have more control over the updating and merging process and may wish to install and use '''tkdiff''' instead which provides highlighted comparisons of any files that differ between your code and the SVN server and allows for a file by file update.<br />
<br />
To update your Linux distribution as well as any dependencies of Paparazzi (seldom necessary), run the following:<br />
<br />
sudo apt-get update<br />
sudo apt-get upgrade<br />
<br />
== Using the Live CD==<br />
<br />
[[Image:Lightscribe_CD_Cover_1.JPG|thumb|320px|LightScribe CD Cover]] <br />
<br />
The LiveCD is an easy way to test Paparazzi: no installation is required and no changes are made to your computer. Simply burn the image as a boot CD and reboot! The LiveCD includes Linux and the complete paparazzi binary package (code source, tools and cross compilers). It is intended for demonstration only and not frequently updated but it contains the complete system and can store changed files on a pen drive or compressed file on your hard drive so that it can compile, flash, and operate any aircraft, albeit slowly. <br />
<br />
The CD image and a howto on [[Using the Boot CD]] is available from the [[Downloads|Downloads]] page.<br />
<br />
The Paparazzi demo is launchable on the Live CD from the Paparazzi icon.<br />
<br />
Knoppix allows for all the user data to be saved on a hard disk partition (most file systems are supported) or on a removable device (typically a USB pendrive). Note that this action is not destructive: the user data tree is compressed and stored on your file system as a single file (<tt>knoppix.img</tt>).<br />
* From the Knoppix menu (second from bottom left), choose '''Configure''', '''Create a persistent KNOPPIX disk image'''<br />
* Choose your media (be sure to connect your USB pendrive before booting!)<br />
* Choose if you want an encrypted filesystem (to protect your flight plan designed for the next MAV competition :-) )<br />
* Choose the size of your home directory (100Mb is recommended)<br />
On the next reboot, this saved state will be automatically located and loaded.<br />
<br />
Using this persistent feature, the Paparazzix Live CD can really be used to configure, simulate and fly an aircraft with the Paparazzi system.<br />
<br />
The Live CD can also be used to install a Debian system on the hard disk, using the <tt>knoppix-installer</tt> command. Be sure to backup the hard disk before trying ...<br />
<br />
<br />
A LiveCD needs some looks... In color or in LightScribe format, your CD will always look cool. <br />
* Get the PDF version for download here [http://paparazzi.enac.fr/wiki_images/Lightscribe_CD_Cover_1.pdf LightScribe CD Cover 1].<br />
<br />
* The LightScribe version is in Nero Cover Design format (.ncd) and it's here for download [http://paparazzi.enac.fr/wiki_images/Lightscribe_CD_Cover_1.zip LightScribe CD Cover 1]<br />
<br />
* Better is of course to use it on an OpenSource OS, some Linux software to be found here: [http://www.lightscribe.com/downloadSection/linux/index.aspx?id=814 Lightscribe for Linux]<br />
<br />
== From Scratch==<br />
<br />
In very rare occasions one needs to install the tools used, third-party libraries used by Paparazzi all from scratch. There are are the moment no 64Bit Linux repositories, that is a very good reason to install from scratch. Sometime one just wants to be able to use all the latest and greatest compilers, or source code of everything to improve something. Then there is no other way than to install from scratch. To help you out getting it all smoothly working [[install_paparazzi_and_everything_from_scratch | a special page is created just click here]]. If you do not understand what that all means, do not panic, then the information on that page is not important to you. Just pretend you never read this part of the Wiki. You are advised just to follow the regular step as described on the install page.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Installation/Linux&diff=7856Installation/Linux2010-09-24T09:20:16Z<p>Markgriffin: /* From the Command Line */</p>
<hr />
<div>== Introduction ==<br />
<br />
Paparazzi is very easily installed on any laptop or workstation running the [http://www.ubuntu.com/ Ubuntu Linux OS] or virtually any [http://www.debian.org/ Debian] based [http://en.wikipedia.org/wiki/Linux Linux].<br />
<br />
At a high-level here are the steps required to install Paparazzi:<br />
<ul><br />
<li>Dedicate a Laptop or PC for Paparazzi. Dedicate means during install you select to use the entire disk for the installation and erase any previous Linux or Windows OS installed.<br />
<li>Installation takes place with a recent build of Linux using the default options. <br />
<li>The Linux package sources file is updated to add the Paparazzi packages (/etc/apt/sources.list)<br />
<li>The Linux packages are updated from the network with the "update" command<br />
<li>The Paparazzi packages are installed (sudo apt-get install paparazzi-dev paparazzi-arm7)<br />
<li>The brltty package is removed to avoid issues (sudo apt-get remove brltty)<br />
<li>Install subversion to get SVN (sudo apt-get install subversion). Don't worry if it's already installed. <br />
<li>Bring down the sources from the SVN repository: (svn co svn://svn.savannah.nongnu.org/paparazzi/paparazzi3/trunk paparazzi3). Just change the paparazzi3s to paparazzi4s for Booz files.<br />
<li>Allow access to the ports by copying the [http://www.openuas.org/pub/writing_udev_rules.html rules file]: (export PAPARAZZI_HOME=~/paparazzi3; sudo cp $PAPARAZZI_HOME/conf/system/udev/rules/10-paparazzi.rules /etc/udev/rules.d/)<br />
<li>Compile the binaries from the sources (cd paparazzi3 && make)<br />
</ul><br />
<br />
That's all.<br />
<br />
=== Operating System ===<br />
<br />
Paparazzi is very easily installed on any laptop or workstation running the [http://www.ubuntu.com/ Ubuntu Linux OS] or virtually any [http://www.debian.org/ Debian] based [http://en.wikipedia.org/wiki/Linux Linux]. Paparazzi is packaged for Debian as well as all of its dependencies. The [http://paparazzi.enac.fr/debian repository] hosted at ENAC holds their latest version.<br />
<br />
It is also possible to have your Debian/Ubuntu running in a virtual machine, for instance with [http://www.virtualbox.org/ VirtualBox]. This requires minimal changes to your computer setup, as you can run the VM from all common platforms (Windows, Mac OS X, Linux). The virtual machine image can easily be transferred between different laptops, giving greater flexibility. Unfortunately, the Open-Source Edition of VirtualBox doesn't include the necessary USB support, so you'll need to get the regular version from the website.<br />
<br />
If you are new and this is your first time installing it is suggested you keep it simple. Select a system you can dedicate to the Linux installation. No VMs or dual boot configurations. The idea is do a very simple generic installation that is certain to have no issues. This reassures you that the installation process works and you can see and use a working Paparazzi install for some time before you try a more complicated install. The install is well documented below and certain to succeed if followed exactly. Most issues arise when someone unfamiliar with Linux tries a non-standard install that requires special steps not documented here.<br />
<br />
=== Precompiled Binaries ===<br />
<br />
Precompiled binaries can be downloaded and executed with the ''paparazzi-bin'' package. To enjoy the power and flexibility of open-source code, you will soon want to configure the airborne autopilot and ground station according to your needs and recompile it. Therefore you need to install the compilers and download the source code.<br />
<br />
The Paparazzi packages for a Debian based Linux are hosted at the [http://www.recherche.enac.fr/paparazzi/debian ENAC repository].<br />
<br />
=== Compilers and Handlers ===<br />
<br />
The typical installation contains all of the necessary C and OCaml compilers as well as some XML and [http://www.tls.cena.fr/products/ivy/ Ivy] handlers. These tools are provided by the ''paparazzi-dev'' package. Have no fear, this is all taken care of for you so all you must do is type a few simple commands. Below are those commands and helpful information. Commands can be copied and pasted from these pages to make it as easy as possible. <br />
<br />
=== Source Code ===<br />
<br />
The Paparazzi source code is hosted by [https://savannah.nongnu.org/svn/?group=paparazzi Savannah]. It is downloaded using [http://subversion.apache.org/ Subversion] or [[git]].<br />
<br />
== Installation of Compilers and Handlers ==<br />
<br />
=== From the Command Line ===<br />
<br />
For the sources file (sources.list) you only add the line required for your version. Linux names their versions. <br />
<br />
Just add the following lines to your repository list (<b>/etc/apt/sources.list</b>) and then<br />
uncomment the line relevant to your operating system (e.g. one of etch, gutsy or hardy):<br />
<br />
Note: Because of the sources.list file permissions maybe you will need to edit it with root access. In Terminal write this:<br />
<br />
gksudo gedit /etc/apt/sources.list<br />
<br />
{{Box Code|/etc/apt/sources.list|<br />
# Uncomment just _one_ of the following lines - depending on your OS version<br />
# deb <nowiki>http://paparazzi.enac.fr/debian</nowiki> etch main<br />
# deb <nowiki>http://paparazzi.enac.fr/debian</nowiki> lenny main<br />
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> gutsy main<br />
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> hardy main<br />
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> intrepid main<br />
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> jaunty main<br />
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> karmic main<br />
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> lucid main<br />
}}<br />
<br />
Then, update your sources and '''either''' install the precompiled <b>bin</b>aries<br />
sudo apt-get update<br />
sudo apt-get install paparazzi-bin<br />
<b>or</b> the dependencies needed for recompiling from the source (<b>dev</b>), and the cross-compiler (<b>arm7</b>) :<br />
sudo apt-get update<br />
sudo apt-get install paparazzi-dev paparazzi-arm7 paparazzi-stm32<br />
<br />
It is not recommended to install both <tt>paparazzi-bin</tt> <b>and</b> <tt>paparazzi-dev</tt>. While the <b>bin</b> package is self-contained and should be sufficient for users who do not want to patch the code, the <b>dev</b> meta-package provides only the tools to compile the source code which must be separately downloaded, from an archive or the SVN repository.<br />
<br />
Note: The ivy-python package now among the dependencies of paparazzi-dev is also available in the normal paparazzi repository. [https://launchpad.net/~uce-launchpad/+archive/ppa Allen Ibara] might have some newer versions in his PPA but you should not need them.<br />
<br />
==== Optional/Obsolete Packages ====<br />
Users of older AVR based boards will also need the paparazzi-avr package.<br />
<br />
==== Extra for Ubuntu ====<br />
<br />
On older Linux distributions, the Braille TTY driver interferes with FTDI USB Serial adapters. If somehow your FTDI serial adapter does not work, remove the package via:<br />
<br />
sudo apt-get remove brltty<br />
<br />
=== Using Synaptic Package Manager ===<br />
* Launch ''Synaptic Package Manager'' (''Applications/System'' Tools Menu)<br />
* In '''Settings/Repositories''', add a new repository on URI = '''<nowiki>http://paparazzi.enac.fr/debian</nowiki>''', Distribution = '''etch''', Section = '''main''' . For Ubuntu, replace '''debian''' by '''ubuntu''' and '''etch''' by '''gutsy''', '''hardy''', '''karmic''' or '''lucid'''<br />
* Search for <tt>paparazzi-bin</tt>, <tt>paparazzi-dev</tt>, and <tt>paparazzi-arm7</tt> packages (use the ''Search'' button)<br />
* Mark them for installation (right-click on package names)<br />
* Left-click on ''Apply''<br />
<br />
=== Manual Installation of Individual Packages ===<br />
Users of other Linux flavors or anyone needing manual control of each individual package can install them independently. The list of dependencies of the Debian package is located in the [http://svn.savannah.gnu.org/viewvc/paparazzi3/trunk/debian/control.lenny?root=paparazzi&view=markup <tt> debian/control.lenny</tt>] file and may help users of other distributions.<br />
<br />
The binary packages and some corresponding source tarballs can be downloaded from<br />
<br />
http://paparazzi.enac.fr/debian/dists/etch/main/binary-i386/<br />
<br />
For distributions using RPM packaging, the [http://packages.debian.org/unstable/source/alien alien] tool can be used to translate a .deb package into a .rpm package.<br />
<br />
For Fedora (Core8) users, you can install the following packages from standard repository:<br />
* ocaml.i386<br />
* ocaml-camlimages-devel.i386<br />
* ocaml-lablgtk-devel.i386<br />
* ocaml-xml-light-devel.i386<br />
* boa.i386<br />
* libgnomecanvas-devel.i386<br />
* libusb-devel.i386<br />
* pcre-devel.i386<br />
* arm-gp2x-linux-gcc.i386<br />
* arm-gp2x-linux-binutils.i386<br />
* glade2.i386<br />
* and gcc, make, subversion, gnuplot, imagemagik...<br />
<br />
Then you need [http://packages.debian.org/unstable/source/alien alien] tool to convert packages from the paparazzi repository:<br />
* ivy-c<br />
* ivy-c-dev<br />
* ivy-ocaml (WARNING: debian and fedora have different path for ocaml (/usr/lib/ocaml/<version> vs. /usr/lib/ocaml), so you need to move by hand the files in /usr/lib/ocaml/<version> to /usr/lib/ocaml)<br />
* lpc21isp<br />
<br />
== Downloading the Source Code ==<br />
'''Important:''' If you use paparazzi-bin you need not to download the source code.<br />
<br />
After the <tt>paparazzi-dev</tt> package is installed the complete source code should be downloaded from one of the software repositories.<br />
=== Subversion ===<br />
See the [http://savannah.nongnu.org/svn/?group=paparazzi project page] at Savannah for more details. From the directory of your choice type:<br />
svn co svn://svn.savannah.nongnu.org/paparazzi/paparazzi3/trunk paparazzi3<br />
or if you are behind a firewall with an http proxy available:<br />
svn co http://svn.savannah.gnu.org/svn/paparazzi/paparazzi3/trunk paparazzi3<br />
after configuration of your proxy in the <tt>~/.subversion/servers</tt> file<br />
<br />
This will download all of the code and install it into <tt>paparazzi3/</tt><br />
<br />
If you cannot use the Subversion install, daily updated tarballs can also be fetched from the [[Downloads|Downloads]] page.<br />
<br />
=== Git ===<br />
You can also get the source code via [[git]].<br />
<br />
== Launching the Software ==<br />
<br />
=== Using paparazzi-bin ===<br />
<br />
If you are using the <tt>paparazzi-bin</tt> package or the Live-CD, just launch the <tt>paparazzi</tt> binary application and you will be guided through the installation of your personal configuration files.<br />
<br />
=== Using Source Code ===<br />
<br />
If you are using the source code, the first step is to compile it. From the <tt>paparazzi3</tt> directory (<tt>cd paparazzi3</tt>), run<br />
<br />
make<br />
<br />
You will have to run this command after each update of the source (<tt>svn update</tt> command).<br />
Launch the software from the <tt>paparazzi3</tt> directory with<br />
<br />
./paparazzi<br />
<br />
From the [[Paparazzi_Center|Paparazzi Center]] interface, select the ''MJ5'' aircraft, select the ''sim'' target and ''Build'' it. Then ''Execute'' the ''Simulation'' session. The prcedure is detailed in the [[Simulation]] page.<br />
<br />
=== Quick Launch Icon ===<br />
<br />
To create an icon on the desktop so you don’t have to manually type codes into the Terminal each time you want to start the GCS follow these steps:<br />
<br />
#Save [[Media:Paparazzi_logo.png|this image file]] to your /paparazzi3 folder<br />
#Right click anywhere on the Ubuntu desktop and click Create Launcher.<br />
#Enter the following in the fields provided:<br />
#*Name: Paparazzi GCS<br />
#*Command: /home/YOUR_USER_NAME/paparazzi3/paparazzi<br />
#*Comment: Runs the Paparazzi GCS<br />
#*Then click the icon image in the top left on the dialog box and select the Paparazzi logo you just downloaded.<br />
#Click the OK button and that’s it! Your icon should appear on the desktop and you are ready to go.<br />
<br />
=== Agents ===<br />
<br />
If ('''and only if''') you want to directly launch some Paparazzi agents (the ''Tools'' of the [[Paparazzi_Center|Paparazzi Center]]), without using the Paparazzi Center, you must have the Paparazzi source and home environment variables set correctly in your shell. These variables can be automatically set in your shell by adding the following lines to your .bashrc file:<br />
{{Box Code|~/.bashrc|<br />
export PAPARAZZI_HOME<nowiki>=</nowiki>''your paparazzi3 directory''<br />
export PAPARAZZI_SRC<nowiki>=</nowiki>''your paparazzi3 directory''<br />
}}<br />
<br />
=== env Variables ===<br />
<br />
If you wish to manually set the env variables (i.e. when compiling a backup copy of your code in a different folder) execute the following command from the folder you wish to set as your active paparazzi folder:<br />
export PAPARAZZI_HOME=`pwd`;export PAPARAZZI_SRC=`pwd`<br />
Verify that your variables are set correctly with the following command:<br />
env | grep PAPARAZZI<br />
which should return the following:<br />
PAPARAZZI_HOME<nowiki>=</nowiki>''your paparazzi3 directory''<br />
PAPARAZZI_SRC<nowiki>=</nowiki>''your paparazzi3 directory''<br />
<br />
== Setting access rights for USB download ==<br />
<br />
This may be required to flash the Paparazzi-boards directly thru USB. For flashing details, see [[Compiling]].<br />
<br />
Default linux rights may not allow standard (non root) users to directly access the USB bus. You will need to make yourself a member of the plugdev "group" and then create a "rule", associated with that "group". <br><br />
Make yourself a member of the ''plugdev'' group:<br />
<br />
sudo adduser <your login> plugdev<br />
<br />
Logout and login again. Then add the appropriate rule (available ine fhe file ''10-paparazzi.rules'') to the USB handler. Simply copy as root <tt>$PAPARAZZI_HOME/conf/system/udev/rules/10-paparazzi.rules</tt> to <tt>/etc/udev/rules.d/</tt><br />
<br />
sudo cp $PAPARAZZI_HOME/conf/system/udev/rules/10-paparazzi.rules /etc/udev/rules.d/<br />
<br />
== Software Updates ==<br />
Paparazzi is a very rapidly evolving project and as such, you will find that variables and functions are frequently added, changed, or removed. Update your software with care and caution, and always test the functionality on the ground and in the air as some updates will affect tuning parameters. Your airframe file will not be updated by the Subversion (SVN) system and therefore any new or modified variable names will need to be added manually. The compiler will usually identify the problem variables at which point you can look at some of the most recent airframe files on SVN to find the proper syntax. See the [[Compiling]] page for more help if needed.<br />
<br><br />
That said, keeping your software up to date is easy with the Subversion system. The system will compare all source code files with the server and update any that are needed, automatically merging any minor changes that you have incorporated along the way.<br />
<br />
To download and automatically merge any updated source files, run the following command from your Paparazzi directory<br />
svn update<br />
<br />
After any SVN update or source code modification the code can be recompiled from ''your paparazzi3 directory'' with the following command:<br />
<br />
make<br />
<br />
The ''make'' command will only recompile portions of the software where changed have been detected. If it does not behave as expected you can deleted all compiled files and recompile from scratch with the following commands:<br />
<br />
make clean<br />
make<br />
<br />
See the [[Compiling]] page for more info.<br />
<br />
Users making changes to their code structure may prefer to have more control over the updating and merging process and may wish to install and use '''tkdiff''' instead which provides highlighted comparisons of any files that differ between your code and the SVN server and allows for a file by file update.<br />
<br />
To update your Linux distribution as well as any dependencies of Paparazzi (seldom necessary), run the following:<br />
<br />
sudo apt-get update<br />
sudo apt-get upgrade<br />
<br />
== Using the Live CD==<br />
<br />
[[Image:Lightscribe_CD_Cover_1.JPG|thumb|320px|LightScribe CD Cover]] <br />
<br />
The LiveCD is an easy way to test Paparazzi: no installation is required and no changes are made to your computer. Simply burn the image as a boot CD and reboot! The LiveCD includes Linux and the complete paparazzi binary package (code source, tools and cross compilers). It is intended for demonstration only and not frequently updated but it contains the complete system and can store changed files on a pen drive or compressed file on your hard drive so that it can compile, flash, and operate any aircraft, albeit slowly. <br />
<br />
The CD image and a howto on [[Using the Boot CD]] is available from the [[Downloads|Downloads]] page.<br />
<br />
The Paparazzi demo is launchable on the Live CD from the Paparazzi icon.<br />
<br />
Knoppix allows for all the user data to be saved on a hard disk partition (most file systems are supported) or on a removable device (typically a USB pendrive). Note that this action is not destructive: the user data tree is compressed and stored on your file system as a single file (<tt>knoppix.img</tt>).<br />
* From the Knoppix menu (second from bottom left), choose '''Configure''', '''Create a persistent KNOPPIX disk image'''<br />
* Choose your media (be sure to connect your USB pendrive before booting!)<br />
* Choose if you want an encrypted filesystem (to protect your flight plan designed for the next MAV competition :-) )<br />
* Choose the size of your home directory (100Mb is recommended)<br />
On the next reboot, this saved state will be automatically located and loaded.<br />
<br />
Using this persistent feature, the Paparazzix Live CD can really be used to configure, simulate and fly an aircraft with the Paparazzi system.<br />
<br />
The Live CD can also be used to install a Debian system on the hard disk, using the <tt>knoppix-installer</tt> command. Be sure to backup the hard disk before trying ...<br />
<br />
<br />
A LiveCD needs some looks... In color or in LightScribe format, your CD will always look cool. <br />
* Get the PDF version for download here [http://paparazzi.enac.fr/wiki_images/Lightscribe_CD_Cover_1.pdf LightScribe CD Cover 1].<br />
<br />
* The LightScribe version is in Nero Cover Design format (.ncd) and it's here for download [http://paparazzi.enac.fr/wiki_images/Lightscribe_CD_Cover_1.zip LightScribe CD Cover 1]<br />
<br />
* Better is of course to use it on an OpenSource OS, some Linux software to be found here: [http://www.lightscribe.com/downloadSection/linux/index.aspx?id=814 Lightscribe for Linux]<br />
<br />
== From Scratch==<br />
<br />
In very rare occasions one needs to install the tools used, third-party libraries used by Paparazzi all from scratch. There are are the moment no 64Bit Linux repositories, that is a very good reason to install from scratch. Sometime one just wants to be able to use all the latest and greatest compilers, or source code of everything to improve something. Then there is no other way than to install from scratch. To help you out getting it all smoothly working [[install_paparazzi_and_everything_from_scratch | a special page is created just click here]]. If you do not understand what that all means, do not panic, then the information on that page is not important to you. Just pretend you never read this part of the Wiki. You are advised just to follow the regular step as described on the install page.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=User/AirborneCodeReorg&diff=7771User/AirborneCodeReorg2010-08-31T17:25:37Z<p>Markgriffin: </p>
<hr />
<div>This page summarizes the changes needed to switch from the "raw makefile in airframes" to a new "xml only aiframes" syntax. Just want to quickly convert your tiny/twog airframe then go [[User/AirborneCodeReorg#In_Brief|here (Brief)]]<br />
<br />
=== Why ===<br />
<br />
Because of its growth, paparazzi needs significant reorganization. To make this possible without breaking airframe files, the 'subsystem' idea introduced in booz is now generalized to all airframes.<br />
<br />
# A nicer looking XML structure.<br />
# users are not required to understand Makefile's anymore in order to choose what to compile.<br />
<br />
Replacing the makefile section of the airframe file with xml:<br />
<br />
# Provide a simpler to understand and consistent syntax for end users.<br />
# Enable Paparazzi centre to provide a list of all targets for an airframe.<br />
# Simplify the design of tools that automatically generate airframe files.<br />
# Simplify the process of documenting the airframe file and any future additions to it.<br />
<br />
The reorganization of directory structures is aimed at simplifying development and maintenance. The aim here is to provide :<br />
<br />
# A consistent structure for all targets, all architectures and all subsystems.<br />
# A structure that informs the naming of files.<br />
# A route to enable the merging of fixed wing and rotor craft code bases.<br />
<br />
<br />
=== Naming ===<br />
<br />
In your airframe you now put '''<firmware>''' which can be 'rotorcraft', 'fixedwing' or various 'setup and testing' groups of code. <br />
<br />
This code can be compiled for 1 or more '''<target>''' 's like 'ap' and 'sim'. For each target you need to define which '''board''' it runs on.<br />
<br />
Strictly separating '''<firmwares>''' and '''boards''' makes it possible to re-use code, remove double files, have clear naming (booz is now the name of the board but also the name of the code, which was OK as long as there was only 1 rotorcraft board) and start running the same code on more platforms (e.g. fixed wing on lisa, rotorcraft filters on gumstix, ... etc).<br />
<br />
Most users will want to run<br />
<br />
<firmware name="fixedwing"><br />
<target name="ap" board="tiny_2.11" /><br />
<br />
or <br />
<br />
<firmware name="fixedwing"><br />
<target name="ap" board="twog_1" /><br />
<br />
or <br />
<br />
<firmware name="rotorcraft"><br />
<target name="ap" board="booz_1.0" /><br />
<br />
== FixedWing ==<br />
<br />
===In Brief===<br />
The idea is to replace the '''<makefile>''' section with a '''<firmware>''' section. Just change your board type, in case of ublox 5h change 4p to 5h and remove gyro if not needed.<br />
<br />
Typicaly, replace:<br />
<makefile><br />
CONFIG=\"tiny_2_1_1.h\"<br />
include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile<br />
FLASH_MODE=IAP<br />
ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1<br />
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c<br />
ap.srcs += commands.c<br />
ap.CFLAGS += -DACTUATORS=\"servos_4017_hw.h\" -DSERVOS_4017<br />
ap.srcs += $(SRC_ARCH)/servos_4017_hw.c actuators.c<br />
ap.CFLAGS += -DRADIO_CONTROL<br />
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c <br />
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600<br />
ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c<br />
ap.CFLAGS += -DINTER_MCU<br />
ap.srcs += inter_mcu.c <br />
ap.CFLAGS += -DADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2 -DUSE_ADC_3<br />
ap.srcs += $(SRC_ARCH)/adc_hw.c<br />
ap.CFLAGS += -DGPS -DUBX -DUSE_UART1 -DGPS_LINK=Uart1 -DUART1_BAUD=B38400<br />
ap.CFLAGS += -DGPS_CONFIGURE -DGPS_BAUD=38400<br />
ap.srcs += gps_ubx.c gps.c latlong.c<br />
ap.CFLAGS += -DINFRARED<br />
ap.srcs += infrared.c estimator.c<br />
ap.CFLAGS += -DNAV -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN -DWIND_INFO<br />
ap.srcs += nav.c fw_h_ctl.c fw_v_ctl.c<br />
ap.srcs += nav_line.c nav_survey_rectangle.c<br />
</makefile><br />
<br />
with<br />
<pre><br />
<firmware name="fixedwing"><br />
<target name="sim" board="pc"/><br />
<target name="ap" board="tiny_2.11"><br />
<param name="FLASH_MODE" value="IAP" /><br />
<define name="AGR_CLIMB" /><br />
<define name="LOITER_TRIM" /><br />
<define name="ALT_KALMAN" /><br />
</target><br />
<subsystem name="radio_control" type="ppm"/><br />
<!-- Communication --><br />
<subsystem name="telemetry" type="transparent"><br />
<param name="MODEM_BAUD" value="B9600"/><br />
</subsystem><br />
<!-- Actuators are automatically chosen according to the board--><br />
<subsystem name="control"/><br />
<!-- Sensors --><br />
<subsystem name="gyro" type="roll"/><br />
<subsystem name="attitude" type="infrared"/><br />
<subsystem name="gps" type="ublox_lea4p"/><br />
<subsystem name="navigation" type="extra"/><!--this includes OSAMNav, nav, discsurvey and nav_cube as well--><br />
</firmware><br />
<!-- Carefull: add the location after!! --><br />
<makefile location="after"><br />
# specific stuff that only you are needing... be aware that files might move, so USE the firmware-source variable<br />
</makefile><br />
</pre><br />
<br />
But you can also add:<br />
<br />
<firmware name="setup"><br />
<target name="tunnel" board="tiny_2.11" /><br />
<target name="setup_actuators" board="tiny_2.11" /><br />
</firmware><br />
<br />
===In details===<br />
<br />
Let's look in more detail how this is done<br />
<br />
You can define several <firmware> branches that are linked with you airframe<br />
<br />
For a tiny2 this is typically the 'fixedwing' firmware. This chooses which main routine will run. In this case the fixedwing main.c<br />
<br />
<firmware name="fixedwing"><br />
<br />
The old first two lines of the makefile<br />
<br />
CONFIG=\"tiny_2_1_1.h\"<br />
include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile<br />
FLASH_MODE=IAP<br />
<br />
are now replaced by the <target> block. Notice that this name is automatically filled in paparazzi center.<br />
<br />
<pre><br />
<target name="ap" board="tiny_2.11"><br />
<param name="FLASH_MODE" value="IAP"/><!-- this is already the default if not set --><br />
</target><br />
</pre><br />
<br />
The only field you might want to adapt depending on your configuration is the ''board'' one. The list of supported boards is <br />
*"twog_1" <br />
*"tiny_2.11"<br />
*"tiny_2.1"<br />
*"tiny_1.1"<br />
*"tiny_0.99"<br />
*"booz_1.0"<br />
*"lisa_l_1.0"<br />
*"pc"<br />
<br />
Then you should define which subsystems to use for you board. For most fixedwing Tiny users this will be standard. But for booz there are already many more options, and wait until you see the power of Lisa!<br />
<br />
The following line defines what kind of radio control you'll be using. Fox now fixedwing doesn't have a choice and uses '''ppm'''<br />
<br />
<subsystem name="radio_control" type="ppm"/><br />
<br />
replaces<br />
<br />
ap.CFLAGS += -DRADIO_CONTROL<br />
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c<br />
<br />
== Available Subsystems ==<br />
<br />
{| class="wikitable" style="text-align:center" border="1"<br />
! Name !! type !! airframe(s) !! description<br />
|-<br />
| rowspan="2"| radio_control<br />
| ppm || FW || ppm R/C input<br />
|-<br />
| spektrum || FW || Spektrum serial R/C input<br />
|-<br />
| rowspan="2"| telemetry<br />
| transparent || FW, rotor || to be used with any serial link replacement<br />
|-<br />
| xbee_api || FW, rotor || for XBee modems in API mode<br />
|-<br />
| rowspan="3"|actuators <br />
| 4017 || FW || 4017 decade counter (used on tiny_2 and twog)<br />
|-<br />
| 4015 || FW || 4015 decade counter (used on tiny_1)<br />
|-<br />
| ppm || FW || outputs ppm to a R/C receiver<br />
|-<br />
| attitude || infrared || FW || <br />
|-<br />
| rowspan="2"|gyro <br />
| roll || FW || roll gyro sensor<br />
|-<br />
| pitch || FW || pitch gyro sensor<br />
|-<br />
| adc || generic || FW ||<br />
|-<br />
| rowspan="3"| gps<br />
| ublox_lea5h || FW || <br />
|-<br />
| ublox_lea4p || FW ||<br />
|-<br />
| skytraq || FW ||<br />
|-<br />
|airspeed|| ets || FW || Eagle Tree Systems airspeed sensor<br />
|-<br />
|baro || ets || FW || Eagle Tree Systems barometric altitude sensor<br />
|-<br />
| rowspan="3" |navigation <br />
| - || FW || standard navigation routines<br />
|-<br />
| extra || FW || plus extra navigation routines: OSAMNav, snav, discsurvey, nav_cube<br />
|-<br />
| bomb || FW || bomb drop routine<br />
|-<br />
| rowspan="3" |control <br />
| - || FW || standard control loops<br />
|-<br />
| adaptive || FW || adaptive horizontal control<br />
|-<br />
| new || FW || merged auto pitch and auto throttle, adaptive horizontal control<br />
|}<br />
<br />
Some of these (optional) subsystems will probably be moved to modules to limit the number of #ifdef in main_ap<br />
<br />
==Generated transition guide==<br />
*[[fixedwing_subsystems | fixedwing_subsystems]]<br />
*[[rotorcraft_subsystems | rotorcraft_subsystems]]<br />
<br />
==Description of available firmwares==<br />
<br />
*[[FirmwareRotorcraft | Rotorcraft]]<br />
*[[FirmwareFixedwing | Fixedwing]]<br />
*[[FirmwareLisa_l_test_progs | Lisa_l_test_progs]]<br />
*[[FirmwareBooz_test_progs | Booz_test_progs]]</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=User/AirborneCodeReorg&diff=7768User/AirborneCodeReorg2010-08-31T16:40:55Z<p>Markgriffin: /* Available Subsystems */</p>
<hr />
<div>This page summarizes the changes needed to switch from the "raw makefile in airframes" to a new "xml only aiframes" syntax. Just want to quickly convert your tiny/twog airframe then go [[User/AirborneCodeReorg#In_Brief|here (Brief)]]<br />
<br />
=== Why ===<br />
<br />
Because of its growth, paparazzi needs significant reorganization. To make this possible without breaking airframe files, the 'subsystem' idea introduced in booz is now generalized to all airframes.<br />
<br />
# A nicer looking XML structure.<br />
# users are not required to understand Makefile's anymore in order to choose what to compile.<br />
<br />
Replacing the makefile section of the airframe file with xml:<br />
<br />
# Provide a simpler to understand and consistent syntax for end users.<br />
# Enable Paparazzi centre to provide a list of all targets for an airframe.<br />
# Simplify the design of tools that automatically generate airframe files.<br />
# Simplify the process of documenting the airframe file and any future additions to it.<br />
<br />
The reorganization of directory structures is aimed at simplifying development and maintenance. The aim here is to provide :<br />
<br />
# A consistent structure for all targets, all architectures and all subsystems.<br />
# A structure that informs the naming of files.<br />
# A route to enable the merging of fixed wing and rotor craft code bases.<br />
<br />
<br />
=== Naming ===<br />
<br />
In your airframe you now put '''<firmware>''' which can be 'rotorcraft', 'fixedwing' or various 'setup and testing' groups of code. <br />
<br />
This code can be compiled for 1 or more '''<target>''' 's like 'ap' and 'sim'. For each target you need to define which '''board''' it runs on.<br />
<br />
Strictly separating '''<firmwares>''' and '''boards''' makes it possible to re-use code, remove double files, have clear naming (booz is now the name of the board but also the name of the code, which was OK as long as there was only 1 rotorcraft board) and start running the same code on more platforms (e.g. fixed wing on lisa, rotorcraft filters on gumstix, ... etc).<br />
<br />
Most users will want to run<br />
<br />
<firmware name="fixedwing"><br />
<target name="ap" board="tiny_2.11" /><br />
<br />
or <br />
<br />
<firmware name="fixedwing"><br />
<target name="ap" board="twog_1" /><br />
<br />
or <br />
<br />
<firmware name="rotorcraft"><br />
<target name="ap" board="booz_1.0" /><br />
<br />
== FixedWing ==<br />
<br />
===In Brief===<br />
The idea is to replace the '''<makefile>''' section with a '''<firmware>''' section. Just change your board type, in case of ublox 5h change 4p to 5h and remove gyro if not needed.<br />
<br />
Typicaly, replace:<br />
<makefile><br />
CONFIG=\"tiny_2_1_1.h\"<br />
include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile<br />
FLASH_MODE=IAP<br />
ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1<br />
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c<br />
ap.srcs += commands.c<br />
ap.CFLAGS += -DACTUATORS=\"servos_4017_hw.h\" -DSERVOS_4017<br />
ap.srcs += $(SRC_ARCH)/servos_4017_hw.c actuators.c<br />
ap.CFLAGS += -DRADIO_CONTROL<br />
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c <br />
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600<br />
ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c<br />
ap.CFLAGS += -DINTER_MCU<br />
ap.srcs += inter_mcu.c <br />
ap.CFLAGS += -DADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2 -DUSE_ADC_3<br />
ap.srcs += $(SRC_ARCH)/adc_hw.c<br />
ap.CFLAGS += -DGPS -DUBX -DUSE_UART1 -DGPS_LINK=Uart1 -DUART1_BAUD=B38400<br />
ap.CFLAGS += -DGPS_CONFIGURE -DGPS_BAUD=38400<br />
ap.srcs += gps_ubx.c gps.c latlong.c<br />
ap.CFLAGS += -DINFRARED<br />
ap.srcs += infrared.c estimator.c<br />
ap.CFLAGS += -DNAV -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN -DWIND_INFO<br />
ap.srcs += nav.c fw_h_ctl.c fw_v_ctl.c<br />
ap.srcs += nav_line.c nav_survey_rectangle.c<br />
</makefile><br />
<br />
with<br />
<pre><br />
<firmware name="fixedwing"><br />
<target name="sim" board="pc"/><br />
<target name="ap" board="tiny_2.11"><br />
<param name="FLASH_MODE" value="IAP" /><br />
<define name="AGR_CLIMB" /><br />
<define name="LOITER_TRIM" /><br />
<define name="ALT_KALMAN" /><br />
</target><br />
<subsystem name="radio_control" type="ppm"/><br />
<!-- Communication --><br />
<subsystem name="telemetry" type="transparent"><br />
<param name="MODEM_BAUD" value="B9600"/><br />
</subsystem><br />
<!-- Actuators are automatically chosen according to the board--><br />
<subsystem name="control"/><br />
<!-- Sensors --><br />
<subsystem name="gyro" type="roll"/><br />
<subsystem name="attitude" type="infrared"/><br />
<subsystem name="gps" type="ublox_lea4p"/><br />
<subsystem name="navigation" type="extra"/><!--this includes OSAMNav, nav, discsurvey and nav_cube as well--><br />
</firmware><br />
<!-- Carefull: add the location after!! --><br />
<makefile location="after"><br />
# specific stuff that only you are needing... be aware that files might move, so USE the firmware-source variable<br />
</makefile><br />
</pre><br />
<br />
But you can also add:<br />
<br />
<firmware name="setup"><br />
<target name="tunnel" board="tiny_2.11" /><br />
<target name="setup_actuators" board="tiny_2.11" /><br />
</firmware><br />
<br />
===In details===<br />
<br />
Let's look in more detail how this is done<br />
<br />
You can define several <firmware> branches that are linked with you airframe<br />
<br />
For a tiny2 this is typically the 'fixedwing' firmware. This chooses which main routine will run. In this case the fixedwing main.c<br />
<br />
<firmware name="fixedwing"><br />
<br />
The old first two lines of the makefile<br />
<br />
CONFIG=\"tiny_2_1_1.h\"<br />
include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile<br />
FLASH_MODE=IAP<br />
<br />
are now replaced by the <target> block. Notice that this name is automatically filled in paparazzi center.<br />
<br />
<pre><br />
<target name="ap" board="tiny_2.11"><br />
<param name="FLASH_MODE" value="IAP"/><!-- this is already the default if not set --><br />
</target><br />
</pre><br />
<br />
The only field you might want to adapt depending on your configuration is the ''board'' one. The list of supported boards is <br />
*"twog_1" <br />
*"tiny_2.11"<br />
*"tiny_2.1"<br />
*"tiny_1.1"<br />
*"tiny_0.99"<br />
*"booz_1.0"<br />
*"lisa_l_1.0"<br />
*"pc"<br />
<br />
Then you should define which subsystems to use for you board. For most fixedwing Tiny users this will be standard. But for booz there are already many more options, and wait until you see the power of Lisa!<br />
<br />
The following line defines what kind of radio control you'll be using. Fox now fixedwing doesn't have a choice and uses '''ppm'''<br />
<br />
<subsystem name="radio_control" type="ppm"/><br />
<br />
replaces<br />
<br />
ap.CFLAGS += -DRADIO_CONTROL<br />
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c<br />
<br />
== Available Subsystems ==<br />
<br />
{| class="wikitable" style="text-align:center" border="1"<br />
! Name !! type !! airframe(s) !! description<br />
|-<br />
| rowspan="2"| radio_control<br />
| ppm || FW || ppm based R/C input<br />
|-<br />
| spektrum || FW || spektrum based R/C input<br />
|-<br />
| rowspan="2"| telemetry<br />
| transparent || FW, rotor || to be used with any serial link replacement<br />
|-<br />
| xbee_api || FW, rotor || for XBee modems in API mode<br />
|-<br />
| rowspan="3"|actuators <br />
| 4017 || FW || 4017 decade counter (used on tiny_2 and twog)<br />
|-<br />
| 4015 || FW || 4015 decade counter (used on tiny_1)<br />
|-<br />
| ppm || FW || output ppm to a R/C receiver<br />
|-<br />
| attitude || infrared || FW || <br />
|-<br />
| rowspan="2"|gyro <br />
| roll || FW || roll gyro<br />
|-<br />
| pitch || FW || pitch<br />
|-<br />
| adc || generic || FW ||<br />
|-<br />
| rowspan="3"| gps<br />
| ublox_lea5h || FW || <br />
|-<br />
| ublox_lea4p || FW ||<br />
|-<br />
| skytraq || FW ||<br />
|-<br />
|airspeed|| ets || FW || Eagle Tree Systems airspeed sensor<br />
|-<br />
|baro || ets || FW || Eagle Tree Systems barometric altitude sensor<br />
|-<br />
| rowspan="2" |navigation <br />
| - || FW || standard navigation routines<br />
|-<br />
| extra || FW || plus extra navigation routines: OSAMNav, snav, discsurvey, nav_cube<br />
|-<br />
| rowspan="3" |control <br />
| - || FW || standard control loops<br />
|-<br />
| adaptive || FW || adaptive horizontal control<br />
|-<br />
| new || FW || merged auto pitch and auto throttle, adaptive horizontal control<br />
|}<br />
<br />
Some of these (optional) subsystems will probably be moved to modules to limit the number of #ifdef in main_ap<br />
<br />
==Generated transition guide==<br />
*[[fixedwing_subsystems | fixedwing_subsystems]]<br />
*[[rotorcraft_subsystems | rotorcraft_subsystems]]<br />
<br />
==Description of available firmwares==<br />
<br />
*[[FirmwareRotorcraft | Rotorcraft]]<br />
*[[FirmwareFixedwing | Fixedwing]]<br />
*[[FirmwareLisa_l_test_progs | Lisa_l_test_progs]]<br />
*[[FirmwareBooz_test_progs | Booz_test_progs]]</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Theory_of_Operation&diff=7752Theory of Operation2010-08-30T08:58:35Z<p>Markgriffin: /* Infrared Sensors */</p>
<hr />
<div>== Formal Methods ==<br />
The critical core of the Paparazzi code has been proven by [http://en.wikipedia.org/wiki/Formal_methods formal methods] to ensure absolute reliability of the servo, R/C, and manual control portions of the code using the same tools and methods used for full-scale autopilots, nuclear power plants, and other critical control systems. See our page on [[Lustre|formally proving critical Paparazzi code using Lustre]]. <br />
<br />
== PID ==<br />
Paparazzi uses common Proportional Integral Derivative (PID) control for stability and navigation. PID is probably the most commonly used feedback control design as it is simple to implement and intuitive to operate. PID controllers use three terms operating on the measured error to produce a control output. If ''u(t)'' is the control signal sent to the system, ''y(t)'' is the measured output and ''r(t)'' is the desired output, and tracking error <math>e(t)=r(t)- y(t)</math>, a PID controller has the general form<br />
<br />
:<math>u(t) = K_P e(t) + K_I \int e(t)dt + K_D \dot{e}(t)</math><br />
<br />
The desired closed loop dynamics are obtained by adjusting the three parameters <math> K_P</math>, <math> K_I</math> and <math> K_D</math>, often iteratively by "tuning" and without specific knowledge of a plant model. Stability can often be ensured using only the proportional term in well damped systems. The integral term compensates for steady long-term errors, and the derivative term is used to provide damping to reduce oscillation.<br />
<br />
See more on Wikipedia: [http://en.wikipedia.org/wiki/PID_controller PID Controller]<br />
<br />
Paparazzi uses PID controllers on all loops but many of the I and D terms are not fully implemented as they are often unnecessary or difficult to tune. Below are some examples of the PID implementations in Paparazzi. There is a [[Control Loops|graphical description of the control loops]] as well.<br />
<br />
=== Roll Rate ===<br />
{{Box Code|In <b>sw/airborne/fw_h_ctl.c</b> we define the roll rate loop:|<br />
float cmd <nowiki>=</nowiki> throttle_dep_pgain * ( err + h_ctl_roll_rate_igain * roll_rate_sum_err / H_CTL_ROLL_RATE_SUM_NB_SAMPLES + h_ctl_roll_rate_dgain * d_err);<br />
}}<br />
Note that the roll Pgain is variable with throttle and multiplies through the entire equation affecting the I and D terms as well for ease of tuning.<br />
<br />
=== Roll Attitude ===<br />
{{Box Code|In <b>sw/airborne/fw_h_ctl.c</b> we define the roll attitude gain loop:|<br />
float err <nowiki>=</nowiki> estimator_phi - h_ctl_roll_setpoint;<br />
float cmd <nowiki>=</nowiki> - h_ctl_roll_attitude_gain * err- h_ctl_roll_rate_gain * estimator_p+ v_ctl_throttle_setpoint * h_ctl_aileron_of_throttle;<br />
}}<br />
<br />
<br />
=== Pitch Angle ===<br />
{{Box Code|In <b>sw/airborne/fw_h_ctl.c</b> we define the pitch angle loop:|<br />
float err <nowiki>=</nowiki> estimator_theta - h_ctl_pitch_setpoint;<br />
float d_err <nowiki>=</nowiki> err - last_err;<br />
last_err <nowiki>=</nowiki> err;<br />
float cmd <nowiki>=</nowiki> h_ctl_pitch_pgain * (err + h_ctl_pitch_dgain * d_err) + h_ctl_elevator_of_roll * fabs(estimator_phi);<br />
}}<br />
<br />
Here we use only Proportional as the Derivative is always set to zero. An integral term could prove useful here. Aircraft pitch response is normally very well damped. Those with "plank" style aircraft or other pitch-sensitive designs may benefit from implementing a gyro-based D term.<br />
<br />
=== Navigation ===<br />
{{Box Code|In <b>sw/airborne/fw_h_ctl.c</b> we define the navigation loop:|<br />
float err <nowiki>=</nowiki> estimator_hspeed_dir - h_ctl_course_setpoint;<br />
NormRadAngle(err);<br />
float speed_depend_nav <nowiki>=</nowiki> estimator_hspeed_mod/NOMINAL_AIRSPEED; <br />
Bound(speed_depend_nav, 0.66, 1.5);<br />
float cmd <nowiki>=</nowiki> h_ctl_course_pgain * err * speed_depend_nav;<br />
}}<br />
Here we only use the Proportional term though a Derivative would be useful as navigation is not well damped. Note that an Integral term cannot be used for navigation without accurate and reliable wind information and the necessary implementation of wind data. Note however that we increase/reduce the commanded bank angle for navigation based on the ground speed. This reduces "hunting" on upwind legs, keeps the navigation tight on fast downwind legs and helps keep circles round in a crosswind.<br />
<br />
=== Climb Rate ===<br />
{{Box Code|In <b>sw/airborne/fw_v_ctl.c</b> we compute the desired climb rate:|<br />
v_ctl_altitude_error <nowiki>=</nowiki> estimator_z - v_ctl_altitude_setpoint;<br />
v_ctl_climb_setpoint <nowiki>=</nowiki> v_ctl_altitude_pgain * v_ctl_altitude_error + v_ctl_altitude_pre_climb;<br />
}}<br />
Here we only use the Proportional term though a Derivative would be useful as climb rate is not well damped. An integral term may prove useful if well-implemented. The last term <b><tt>v_ctl_altitude_pre_climb</tt></b> represents the desired constant climb rate needed to follow a 3-dimensional navigation path. This term is zero for level flight, altitude maintenance, and commanded altitude changes.<br />
{{Box Code|Then we compute the throttle response:|<br />
float err <nowiki>=</nowiki> estimator_z_dot - v_ctl_climb_setpoint;<br />
float controlled_throttle <nowiki>=</nowiki> v_ctl_auto_throttle_cruise_throttle + v_ctl_auto_throttle_climb_throttle_increment * v_ctl_climb_setpoint <br />
+ v_ctl_auto_throttle_pgain * (err + v_ctl_auto_throttle_igain * v_ctl_auto_throttle_sum_err);<br />
and pitch response<br />
float v_ctl_pitch_of_vz <nowiki>=</nowiki> v_ctl_climb_setpoint * v_ctl_auto_throttle_pitch_of_vz_pgain;<br />
}}<br />
<br />
== Infrared Sensors ==<br />
[[Image:Electromagnetic-Spectrum.png|thumb|Electromagnetic Spectrum]]<br />
The infrared spectrum spans the gap between red light and microwave radiation and consists of a very large range of wavelengths from 0.75µm to 1000µm (compare to 0.38µm to 0.75µm for the entire range of visible light). With such a broad range, it is not surprising that the properties of IR radiation vary widely with wavelength and therefore are usually categorized as follows:<br />
* near infrared (NIR, IR-A): 0.75–1.4&nbsp;µm, this range is defined by the water absorption properties and is commonly used in fiber optic communication because of low attenuation losses in the SiO<sub>2</sub> glass (silica) fiber.<br />
* short wavelength IR (SWIR, IR-B): 1.4–3&nbsp;µm, water absorption is substantial in this range.<br />
* mid wavelength IR (MWIR, IR-C) also intermediate-IR (IIR): 3–8&nbsp;µm<br />
* long wavelength IR (LWIR, IR-C): 8&ndash;15&nbsp;µm (The wavelength used by the Paparazzi IR sensors)<br />
* far infrared (FIR): 15–1,000&nbsp;µm (FIR lasers are used to detect explosives and chemical agents by infrared spectroscopy)<br />
Near IR behaves much like red light, and can be focused in a glass lens or used to illuminate objects and is commonly used for dramatic effects in photography. Digital cameras are highly sensitive to NIR and typically include a filter to prevent this light from degrading the quality of the visible range.<br />
[[Image:IR_skyline.jpg|thumb|left|Landscape in NIR]]<br />
[[Image:IR_chinook.jpg|thumb|left|Sea Knight helicopter in LWIR]]<br />
<br style="clear:both"><br />
LWIR is more similar to microwave, and is a form of radiation emitted from within any material of any temperature above absolute zero. The emitted frequency is dependent on the temperature of the material and objects of common "earthly" temperatures typically emit radiation in the range of 8-12µm. The IR sensors used by Paparazzi are sensitive only to this range and therefore are not affected by objects of higher temperature, such as the sun. This range of IR passes easily through smoke and rain but can be blocked with a simple piece of clear tape.<br />
<br><br />
[[Image:ir_sensor_bot_small.jpg|thumb|IR sensor board]]<br />
The IR thermopiles used for attitude detection use the thermoelectric effect to convert heat to voltage. They require no power and the voltage produced is extremely low ~ 40µV/K^4. To convert this low voltage into something that can be measured by the autopilot we first connect the sensors in geometrically opposed pairs and wire them together backwards - output-to-output, such that the system will produce 0V if the sensors are of equal temperature, and any difference between temperatures creates either a positive or negative voltage. Next we amplify this voltage by a factor of 500x and add a 1.65V DC offset. The result is that for normal earthly temperatures, the sensor pair will output a voltage of 0V - 3.3V at extreme temperature differences and 1.65V at equilibrium.<br />
<br><br />
[[Image:ir_response_curve.gif|thumb|IR voltage vs. angle]]<br />
As the Earth emits substantially more IR radiation than the sky, we can always measure the difference between Earth and sky - even in cloudy/rainy weather, over snow covered land, or at night. The voltage produced by the sensor pair is proportional to two factors:<br />
* The angle of the aircraft<br />
* The local ground/sky temperature difference<br />
The sensors typically have a 100 degree field of view and produce a somewhat sinusoidal voltage response relative to their angle orientation. as seen in the plot to the right. By combining the data from 3 orthogonal pairs of sensors (X, Y, Z axes) we can compute the exact bank and pitch angles of the aircraft in any weather/terrain conditions with the following caveats:<br />
* Thermopile response is not perfectly sinusoidal so some approximate correction factors must be manually tuned<br />
* Thermopiles react slowly (~25ms time constant), producing a phase delay that can cause oscillation on agile airplanes if a gyro is not implemented<br />
* Thermopiles must be dry. A water drop on the sensor will degrade its function. It is therefore not recommended to fly in precipitation or in heavy fog/clouds.<br />
<br><br />
For simple stable aircraft, a 2-axis IR system can be employed by simply measuring the absolute earth/sky temperature difference prior to flight and storing this value. The software has a function to make this easy - when enabled the user simply holds the aircraft nose-down and moves the aileron stick to store the value. This method can produce satisfactory results but will severely reduce navigation consistency as all bank angles will be computed relative to the patch of ground and cloud conditions of the launch site. <br />
[[Image:IR_example2.jpg|thumb|left|2-axis IR angle measurement]]<br />
<br style="clear:both"><br />
Further infrared sensor information:<br><br />
[http://www.ctie.monash.edu.au/hargrave/horizon_sensing_autopilot.pdf "Horizon Sensing Attitude Stabilisation: A VMC Autopilot"]<br><br />
[http://hdl.handle.net/2060/19720009937 "NASA Tech Note TN D-6616"] and other [http://ntrs.nasa.gov/search.jsp NASA reports].</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Theory_of_Operation&diff=7751Theory of Operation2010-08-30T08:56:22Z<p>Markgriffin: /* Infrared Sensors */</p>
<hr />
<div>== Formal Methods ==<br />
The critical core of the Paparazzi code has been proven by [http://en.wikipedia.org/wiki/Formal_methods formal methods] to ensure absolute reliability of the servo, R/C, and manual control portions of the code using the same tools and methods used for full-scale autopilots, nuclear power plants, and other critical control systems. See our page on [[Lustre|formally proving critical Paparazzi code using Lustre]]. <br />
<br />
== PID ==<br />
Paparazzi uses common Proportional Integral Derivative (PID) control for stability and navigation. PID is probably the most commonly used feedback control design as it is simple to implement and intuitive to operate. PID controllers use three terms operating on the measured error to produce a control output. If ''u(t)'' is the control signal sent to the system, ''y(t)'' is the measured output and ''r(t)'' is the desired output, and tracking error <math>e(t)=r(t)- y(t)</math>, a PID controller has the general form<br />
<br />
:<math>u(t) = K_P e(t) + K_I \int e(t)dt + K_D \dot{e}(t)</math><br />
<br />
The desired closed loop dynamics are obtained by adjusting the three parameters <math> K_P</math>, <math> K_I</math> and <math> K_D</math>, often iteratively by "tuning" and without specific knowledge of a plant model. Stability can often be ensured using only the proportional term in well damped systems. The integral term compensates for steady long-term errors, and the derivative term is used to provide damping to reduce oscillation.<br />
<br />
See more on Wikipedia: [http://en.wikipedia.org/wiki/PID_controller PID Controller]<br />
<br />
Paparazzi uses PID controllers on all loops but many of the I and D terms are not fully implemented as they are often unnecessary or difficult to tune. Below are some examples of the PID implementations in Paparazzi. There is a [[Control Loops|graphical description of the control loops]] as well.<br />
<br />
=== Roll Rate ===<br />
{{Box Code|In <b>sw/airborne/fw_h_ctl.c</b> we define the roll rate loop:|<br />
float cmd <nowiki>=</nowiki> throttle_dep_pgain * ( err + h_ctl_roll_rate_igain * roll_rate_sum_err / H_CTL_ROLL_RATE_SUM_NB_SAMPLES + h_ctl_roll_rate_dgain * d_err);<br />
}}<br />
Note that the roll Pgain is variable with throttle and multiplies through the entire equation affecting the I and D terms as well for ease of tuning.<br />
<br />
=== Roll Attitude ===<br />
{{Box Code|In <b>sw/airborne/fw_h_ctl.c</b> we define the roll attitude gain loop:|<br />
float err <nowiki>=</nowiki> estimator_phi - h_ctl_roll_setpoint;<br />
float cmd <nowiki>=</nowiki> - h_ctl_roll_attitude_gain * err- h_ctl_roll_rate_gain * estimator_p+ v_ctl_throttle_setpoint * h_ctl_aileron_of_throttle;<br />
}}<br />
<br />
<br />
=== Pitch Angle ===<br />
{{Box Code|In <b>sw/airborne/fw_h_ctl.c</b> we define the pitch angle loop:|<br />
float err <nowiki>=</nowiki> estimator_theta - h_ctl_pitch_setpoint;<br />
float d_err <nowiki>=</nowiki> err - last_err;<br />
last_err <nowiki>=</nowiki> err;<br />
float cmd <nowiki>=</nowiki> h_ctl_pitch_pgain * (err + h_ctl_pitch_dgain * d_err) + h_ctl_elevator_of_roll * fabs(estimator_phi);<br />
}}<br />
<br />
Here we use only Proportional as the Derivative is always set to zero. An integral term could prove useful here. Aircraft pitch response is normally very well damped. Those with "plank" style aircraft or other pitch-sensitive designs may benefit from implementing a gyro-based D term.<br />
<br />
=== Navigation ===<br />
{{Box Code|In <b>sw/airborne/fw_h_ctl.c</b> we define the navigation loop:|<br />
float err <nowiki>=</nowiki> estimator_hspeed_dir - h_ctl_course_setpoint;<br />
NormRadAngle(err);<br />
float speed_depend_nav <nowiki>=</nowiki> estimator_hspeed_mod/NOMINAL_AIRSPEED; <br />
Bound(speed_depend_nav, 0.66, 1.5);<br />
float cmd <nowiki>=</nowiki> h_ctl_course_pgain * err * speed_depend_nav;<br />
}}<br />
Here we only use the Proportional term though a Derivative would be useful as navigation is not well damped. Note that an Integral term cannot be used for navigation without accurate and reliable wind information and the necessary implementation of wind data. Note however that we increase/reduce the commanded bank angle for navigation based on the ground speed. This reduces "hunting" on upwind legs, keeps the navigation tight on fast downwind legs and helps keep circles round in a crosswind.<br />
<br />
=== Climb Rate ===<br />
{{Box Code|In <b>sw/airborne/fw_v_ctl.c</b> we compute the desired climb rate:|<br />
v_ctl_altitude_error <nowiki>=</nowiki> estimator_z - v_ctl_altitude_setpoint;<br />
v_ctl_climb_setpoint <nowiki>=</nowiki> v_ctl_altitude_pgain * v_ctl_altitude_error + v_ctl_altitude_pre_climb;<br />
}}<br />
Here we only use the Proportional term though a Derivative would be useful as climb rate is not well damped. An integral term may prove useful if well-implemented. The last term <b><tt>v_ctl_altitude_pre_climb</tt></b> represents the desired constant climb rate needed to follow a 3-dimensional navigation path. This term is zero for level flight, altitude maintenance, and commanded altitude changes.<br />
{{Box Code|Then we compute the throttle response:|<br />
float err <nowiki>=</nowiki> estimator_z_dot - v_ctl_climb_setpoint;<br />
float controlled_throttle <nowiki>=</nowiki> v_ctl_auto_throttle_cruise_throttle + v_ctl_auto_throttle_climb_throttle_increment * v_ctl_climb_setpoint <br />
+ v_ctl_auto_throttle_pgain * (err + v_ctl_auto_throttle_igain * v_ctl_auto_throttle_sum_err);<br />
and pitch response<br />
float v_ctl_pitch_of_vz <nowiki>=</nowiki> v_ctl_climb_setpoint * v_ctl_auto_throttle_pitch_of_vz_pgain;<br />
}}<br />
<br />
== Infrared Sensors ==<br />
[[Image:Electromagnetic-Spectrum.png|thumb|Electromagnetic Spectrum]]<br />
The infrared spectrum spans the gap between red light and microwave radiation and consists of a very large range of wavelengths from 0.75µm to 1000µm (compare to 0.38µm to 0.75µm for the entire range of visible light). With such a broad range, it is not surprising that the properties of IR radiation vary widely with wavelength and therefore are usually categorized as follows:<br />
* near infrared (NIR, IR-A): 0.75–1.4&nbsp;µm, this range is defined by the water absorption properties and is commonly used in fiber optic communication because of low attenuation losses in the SiO<sub>2</sub> glass (silica) fiber.<br />
* short wavelength IR (SWIR, IR-B): 1.4–3&nbsp;µm, water absorption is substantial in this range.<br />
* mid wavelength IR (MWIR, IR-C) also intermediate-IR (IIR): 3–8&nbsp;µm<br />
* long wavelength IR (LWIR, IR-C): 8&ndash;15&nbsp;µm (The wavelength used by the Paparazzi IR sensors)<br />
* far infrared (FIR): 15–1,000&nbsp;µm (FIR lasers are used to detect explosives and chemical agents by infrared spectroscopy)<br />
Near IR behaves much like red light, and can be focused in a glass lens or used to illuminate objects and is commonly used for dramatic effects in photography. Digital cameras are highly sensitive to NIR and typically include a filter to prevent this light from degrading the quality of the visible range.<br />
[[Image:IR_skyline.jpg|thumb|left|Landscape in NIR]]<br />
[[Image:IR_chinook.jpg|thumb|left|Sea Knight helicopter in LWIR]]<br />
<br style="clear:both"><br />
LWIR is more similar to microwave, and is a form of radiation emitted from within any material of any temperature above absolute zero. The emitted frequency is dependent on the temperature of the material and objects of common "earthly" temperatures typically emit radiation in the range of 8-12µm. The IR sensors used by Paparazzi are sensitive only to this range and therefore are not affected by objects of higher temperature, such as the sun. This range of IR passes easily through smoke and rain but can be blocked with a simple piece of clear tape.<br />
<br><br />
[[Image:ir_sensor_bot_small.jpg|thumb|IR sensor board]]<br />
The IR thermopiles used for attitude detection use the thermoelectric effect to convert heat to voltage. They require no power and the voltage produced is extremely low ~ 40µV/K^4. To convert this low voltage into something that can be measured by the autopilot we first connect the sensors in geometrically opposed pairs and wire them together backwards - output-to-output, such that the system will produce 0V if the sensors are of equal temperature, and any difference between temperatures creates either a positive or negative voltage. Next we amplify this voltage by a factor of 500x and add a 1.65V DC offset. The result is that for normal earthly temperatures, the sensor pair will output a voltage of 0V - 3.3V at extreme temperature differences and 1.65V at equilibrium.<br />
<br><br />
[[Image:ir_response_curve.gif|thumb|IR voltage vs. angle]]<br />
As the Earth emits substantially more IR radiation than the sky, we can always measure the difference between Earth and sky - even in cloudy/rainy weather, over snow covered land, or at night. The voltage produced by the sensor pair is proportional to two factors:<br />
* The angle of the aircraft<br />
* The local ground/sky temperature difference<br />
The sensors typically have a 100 degree field of view and produce a somewhat sinusoidal voltage response relative to their angle orientation. as seen in the plot to the right. By combining the data from 3 orthogonal pairs of sensors (X, Y, Z axes) we can compute the exact bank and pitch angles of the aircraft in any weather/terrain conditions with the following caveats:<br />
* Thermopile response is not perfectly sinusoidal so some approximate correction factors must be manually tuned<br />
* Thermopiles react slowly (~25ms time constant), producing a phase delay that can cause oscillation on agile airplanes if a gyro is not implemented<br />
* Thermopiles must be dry. A water drop on the sensor will degrade its function. It is therefore not recommended to fly in precipitation or in heavy fog/clouds.<br />
<br><br />
For simple stable aircraft, a 2-axis IR system can be employed by simply measuring the absolute earth/sky temperature difference prior to flight and storing this value. The software has a function to make this easy - when enabled the user simply holds the aircraft nose-down and moves the aileron stick to store the value. This method can produce satisfactory results but will severely reduce navigation consistency as all bank angles will be computed relative to the patch of ground and cloud conditions of the launch site. <br />
[[Image:IR_example2.jpg|thumb|left|2-axis IR angle measurement]]<br />
<br style="clear:both"><br />
Further information:<br><br />
[http://www.ctie.monash.edu.au/hargrave/horizon_sensing_autopilot.pdf "Horizon Sensing Attitude Stabilisation: A VMC Autopilot"]<br><br />
[http://hdl.handle.net/2060/19720009937 "NASA Tech Note TN D-6616"] and other [http://ntrs.nasa.gov/search.jsp NASA reports].</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Modules&diff=7233Modules2010-08-05T19:47:49Z<p>Markgriffin: /* In the airframe file */</p>
<hr />
<div>The modules allow to add new code in a flexible way with initialisation, periodic and event functions without modifying the main AP loop.<br />
<br />
=== Available modules ===<br />
<br />
See the [[Modules_list|list of modules]].<br />
<br />
=== In the airframe file ===<br />
<br />
To add a new module for an aircraft, add a section '''modules''' in his airframe xml file :<br />
<br />
<modules main_freq="60"><br />
<load name="demo_module.xml"/><br />
<load name="dummy.xml"/><br />
</modules><br />
<br />
* The main_freq parameter (in Hz) is optional. If present, it allows to specify the frequency of the main loop. Default is '''60 Hz'''. If not needed to be specified, then the first line is: <modules><br />
<br />
'''In the makefile section, add a flag -DUSE_MODULES in order to activate the service.'''<br />
<br />
=== In the module file ===<br />
<br />
The modules description files are located in '''conf/modules'''.<br />
<br />
<!DOCTYPE module SYSTEM "module.dtd"><br />
<module name="demo_module"><br />
<depend require="bla.xml" conflict="boo"/><br />
<header><br />
<file name="demo_module.h"/><br />
</header><br />
<init fun="init_demo()"/><br />
<periodic fun="periodic_1Hz_demo()" freq="1." start="start_demo()" stop="stop_demo()"/><br />
<periodic fun="periodic_10Hz_demo()" period="0.1" start="start_demo()" stop="stop_demo()"/><br />
<makefile><br />
<raw><br />
#Raw makefile section<br />
</raw><br />
<flag name="DEMO_MODULE_LED" value="2"/><br />
<file name="demo_module.c"/><br />
</makefile><br />
</module><br />
<br />
* module<br />
** name : this parameter is the name of the module and must match with the name of the directory in '''sw/airborne/modules''' where the source code is located (in the above exemple: sw/airborne/modules/demo_module)<br />
<br />
* depend (0 or 1 'depend' node)<br />
** require : the list of required modules<br />
** conflict : the list of conflicting modules<br />
** the elements of a list are separated with a pipe (|), ex: "bla|boo"<br />
** the elements can be a xml file (in conf/modules) or a module name (in sw/airborne/modules)<br />
<br />
* header (0 or 1 'header' node)<br />
** file : the name of the header to automatically include in modules.h<br />
<br />
* init (0 or more 'init' node)<br />
** fun : initialization function name, called once at startup<br />
<br />
* periodic (0 or more 'periodic' node)<br />
** fun : periodic function name (mandatory)<br />
** period : period of the function in seconds, cannot be higher than the main frequency (if not specified, use freq parameter)<br />
** freq : frequency of the function in Hz, cannot be higher than main frequency (used if period is not defined; if nor period nor freq are defined, the maximum frequency is used by default)<br />
** delay : integer that can be used to impose a sequence in the periodic functions (use values between 0 and main_freq/function_freq)<br />
** start : function to be executed before the periodic function starts<br />
** stop : function to be executed after the periodic function stops (never called if autorun=LOCK)<br />
** autorun : TRUE to make the periodic function starts automatically after init, FALSE to make it way for a user command to start, LOCK to make it always true (default is LOCK)<br />
<br />
* event (0 or more 'event' node)<br />
** fun : event function name called in each cycle of the main AP loop<br />
<br />
* datalink (0 or more 'datalink' node)<br />
** message : name of the datalink (uplink) message to be parsed<br />
** fun : name of the function called when a message arrived<br />
<br />
* makefile (0 or more 'makefile' node)<br />
** target : a list of build targets separated with pipes (ex: <makefile target="tunnel|foo">) (default is "ap|sim")<br />
** flag : each flag node specifies a CFLAGS for the current targets<br />
*** name : name of the flag (ex: name="USE_MODULE_LED" -> target.CFLAGS += -DUSE_MODULE_LED) (mandatory)<br />
*** value : the value to associate (ex: name="DEMO_MODULE_LED" value="2" -> target.CFLAGS += -DDEMO_MODULE_LED=2)<br />
*** type : the type of flag, possible values are "define" or "D", "include" or "I" (ex: name="$(ARCH_SRC)" type="include" -> target.CFLAGS += -I$(ARCH_SRC) ) (default is "define")<br />
** file<br />
*** name : the name of the c file to add in the Makefile (ex: name="demo_module.c" -> target.srcs += demo_module.c)<br />
** raw : allows to define a raw makefile section<br />
<br />
=== In the airborne code ===<br />
<br />
The code corresponding to a module should be placed in the directory "sw/airborne/modules/<module_name>" where module_name must match the one in your conf file.<br />
<br />
=== Starting / stopping a module ===<br />
<br />
If modules are loaded with periodical functions that are not locked, a new tab will automatically appear in the setting page of the GCS that allows you to start and stop them.<br />
<br />
An other possibility is that any file that includes the header "modules.h" can start or stop the periodic tasks.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Modules_list&diff=7232Modules list2010-08-05T19:44:34Z<p>Markgriffin: /* Available modules */</p>
<hr />
<div>Some part of the code is already available as [[Modules|modules]]. Some other parts could be easily adapted. A module may have several configuration files for the most common uses. The code of the modules is placed in sw/modules/<directory name>.<br />
<br />
=== Available modules ===<br />
<br />
{| class="wikitable" style="text-align:center" border="1"<br />
! Name !! directory !! configuration files !! airframe(s) !! description<br />
|-<br />
|Demo || demo_module || demo_module.xml || FW || basic example with blinking leds<br />
|-<br />
|Enose || enose || enose.xml || FW || chemical sensor<br />
|-<br />
|Booz cam || vision || booz_cam.xml || Booz || pointing of a simple camera on booz (servo for tilt, heading for pan<br />
|-<br />
|Booz drop || drop || booz_drop.xml || Booz || drop mechanism on booz<br />
|-<br />
|Formation flight || multi || formation_flight.xml || FW || formation flight control for fixed-wing aircraft<br />
|-<br />
|Gps i2c || gps_i2c || gps_i2c.xml || FW || i2c driver for Ubx GPS modules<br />
|-<br />
|Xsens || ins || ins_xsens.xml<br>ins_xsens_MTi_Uart0.xml<br>ins_xsens_MTiG_Uart0.xml || || driver for the Xsens AHRS/INS (incomplete, only read values, estimator is not updated)<br />
|-<br />
|Max 3100 || max3100 || max3100.xml || FW || max3100 driver (spi<->uart converter)<br />
|-<br />
|MPPT || MPPT || MPPT.xml || FW || maximum power point tracker (control board for solar cells, i2C interface)<br />
|-<br />
|Poles || poles || poles.xml || FW || special navigation functions to fly around poles and counting loops<br />
|-<br />
|Potential || multi || potential.xml || FW || use potential fields for collision avoidance<br />
|-<br />
|Sonar || sonar || sonar_maxbotix_booz.xml || Booz || driver for a Maxbotix ultrasonic sensor<br />
|-<br />
|Sys mon || core || sys_mon.xml || FW & Booz || measures CPU load & activity<br />
|}<br />
<br />
=== Possible modules ===<br />
<br />
A list of the parts of the FW airborne code that could be changed to modules.<br />
<br />
{| class="wikitable" style="text-align:center" border="1"<br />
! Name !! hedear !! init !! periodic !! event !! datalink !! description<br />
|-<br />
|Led || X || X || || || || control leds and GPIO<br />
|-<br />
|ADC Generic || X || X || 4Hz || || ||<br />
|-<br />
|Telemeter || X || X || 1Hz || || || <br />
|-<br />
|I2C || X || X || || || ||<br />
|-<br />
|DC || X || X || || || ||<br />
|-<br />
|Dpicco || X || || 4Hz || || ||<br />
|-<br />
|Humid || X || X || 4Hz || || || Humidity sensor<br />
|-<br />
|Baro SCP || X || X || 4Hz || || || Barometer<br />
|-<br />
|Baro MS || X || || 20Hz || X || || Barometer<br />
|-<br />
|Airspeed ETS || X || X || 20Hz || || || Eagle Tree airspeed sensor<br />
|-<br />
|Baro ETS || X || X || 20Hz || || || Eagle Tree barometric sensor<br />
|-<br />
|SPI || X || X || || || ||<br />
|-<br />
|Traffic || X || || || || X || update traffic information from datalink<br />
|-<br />
|TCAS || X || X || 1Hz - 4Hz || || ? || vertical collision avoidance<br />
|-<br />
|Cam || X || X || 4Hz - 60Hz || || || camera pointing system<br />
|-<br />
|Light || X || X || 1Hz || || || control blinking speed of the LEDs for night flights<br />
|-<br />
|Gyro || X || X || 60Hz || || ||<br />
|-<br />
|IR || X || X || 60Hz || || || Infrared sensors<br />
|-<br />
|GPS || X || X || || X || ||<br />
|-<br />
|Joystick || X || X || || X || X|| control a plane from telemetry<br />
|}</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Modules_list&diff=7231Modules list2010-08-05T19:43:50Z<p>Markgriffin: /* Available modules */</p>
<hr />
<div>Some part of the code is already available as [[Modules|modules]]. Some other parts could be easily adapted. A module may have several configuration files for the most common uses. The code of the modules is placed in sw/modules/<directory name>.<br />
<br />
=== Available modules ===<br />
<br />
{| class="wikitable" style="text-align:center" border="1"<br />
! Name !! directory !! configuration files !! airframe(s) !! description<br />
|-<br />
|Demo || demo_module || demo_module.xml || FW || basic example with blinking leds<br />
|-<br />
|Enose || enose || enose.xml || FW || chemical sensor<br />
|-<br />
|Booz cam || vision || booz_cam.xml || Booz || pointing of a simple camera on booz (servo for tilt, heading for pan<br />
|-<br />
|Booz drop || drop || booz_drop.xml || Booz || drop mechanism on booz<br />
|-<br />
|Formation flight || multi || formation_flight.xml || FW || formation flight control for fixed-wing aircraft<br />
|-<br />
|Gps i2c || gps_i2c || gps_i2c.xml || FW || i2c driver for Ubx GPS modules<br />
|-<br />
|Xsens || ins || ins_xsens.xml<br>ins_xsens_MTi_Uart0.xml<br>ins_xsens_MTiG_Uart0.xml || || driver for the Xsens AHRS/INS (incomplete, only read values, estimator is not updated)<br />
|-<br />
|Max 3100 || max3100 || max3100.xml || FW || max3100 driver (spi<->uart converter)<br />
|-<br />
|MPPT || MPPT || MPPT.xml || FW || maximum power point tracker (control board for solar cells, i2C interface)<br />
|-<br />
|Poles || poles || poles.xml || FW || special navigation functions to fly around poles and counting loops<br />
|-<br />
|Potential || multi || potential.xml || FW || use potential fields for collision avoidance<br />
|-<br />
|Sonar || sonar || sonar_maxbotix_booz.xml || Booz || driver for a Maxbotix ultrasonic sensor<br />
|-<br />
|Sys mon || sys_mon || sys_mon.xml || FW & Booz || measures CPU load & activity<br />
|}<br />
<br />
=== Possible modules ===<br />
<br />
A list of the parts of the FW airborne code that could be changed to modules.<br />
<br />
{| class="wikitable" style="text-align:center" border="1"<br />
! Name !! hedear !! init !! periodic !! event !! datalink !! description<br />
|-<br />
|Led || X || X || || || || control leds and GPIO<br />
|-<br />
|ADC Generic || X || X || 4Hz || || ||<br />
|-<br />
|Telemeter || X || X || 1Hz || || || <br />
|-<br />
|I2C || X || X || || || ||<br />
|-<br />
|DC || X || X || || || ||<br />
|-<br />
|Dpicco || X || || 4Hz || || ||<br />
|-<br />
|Humid || X || X || 4Hz || || || Humidity sensor<br />
|-<br />
|Baro SCP || X || X || 4Hz || || || Barometer<br />
|-<br />
|Baro MS || X || || 20Hz || X || || Barometer<br />
|-<br />
|Airspeed ETS || X || X || 20Hz || || || Eagle Tree airspeed sensor<br />
|-<br />
|Baro ETS || X || X || 20Hz || || || Eagle Tree barometric sensor<br />
|-<br />
|SPI || X || X || || || ||<br />
|-<br />
|Traffic || X || || || || X || update traffic information from datalink<br />
|-<br />
|TCAS || X || X || 1Hz - 4Hz || || ? || vertical collision avoidance<br />
|-<br />
|Cam || X || X || 4Hz - 60Hz || || || camera pointing system<br />
|-<br />
|Light || X || X || 1Hz || || || control blinking speed of the LEDs for night flights<br />
|-<br />
|Gyro || X || X || 60Hz || || ||<br />
|-<br />
|IR || X || X || 60Hz || || || Infrared sensors<br />
|-<br />
|GPS || X || X || || X || ||<br />
|-<br />
|Joystick || X || X || || X || X|| control a plane from telemetry<br />
|}</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Airspeed_sensor&diff=7020Airspeed sensor2010-07-26T13:16:46Z<p>Markgriffin: </p>
<hr />
<div>By default, airspeed is estimated by measuring the GPS ground speed. This gives reasonable results particularly in calm conditions. An airspeed sensor measures actual airspeed resulting in better throttle control and aircraft performance especially in windy conditions. <br />
<br />
==Connecting the EagleTree Airspeed Sensor==<br />
<br />
The [http://www.eagletreesystems.com/Support/manuals/airspeed-v3.pdf EagleTree Airspeed Sensor] is a low cost module and comes with a very good pitot tube (Prandtl style, pitot-static tube) that includes static and dynamic ports. It has an I2C interface that connects directly to the Tiny/TWOG I2C port. The autopilot code has been modified to regulate the throttle in order to keep the airspeed constant (and a minimum ground speed). The airspeed sensor should be set to operate in the default RAW mode (not switched to 3rd party mode).<br />
<br />
First, connect the sensor directly to the TWOG (J6/I2C connector). The sensor module wires are:<br />
Red wire: 5V<br />
White wire: Ground<br />
Yellow wire: SDA<br />
Brown wire: SCL<br />
<br />
Then, add the following to the end of the "VERTICAL CONTROL" section of the airframe file:<br />
<!-- auto airspeed and altitude inner loop (for airspeed sensor) --><br />
<define name="AUTO_AIRSPEED_SETPOINT" value="15.0" unit="m/s"/><br />
<define name="AUTO_AIRSPEED_PGAIN" value="0.060"/><br />
<define name="AUTO_AIRSPEED_IGAIN" value="0.050"/> <br />
<define name="AUTO_GROUNDSPEED_SETPOINT" value="6.0" unit="m/s"/><br />
<define name="AUTO_GROUNDSPEED_PGAIN" value="0.75"/><br />
<define name="AUTO_GROUNDSPEED_IGAIN" value="0.25"/> <br />
Note that the SETPOINT values may need to be adjusted to suit your aircraft.<br />
<br />
Then, add the following near the end of the airframe file:<br />
ap.CFLAGS += -DUSE_AIRSPEED_ETS -DUSE_AIRSPEED -DUSE_I2C0 -DAGR_CLIMB<br />
ap.srcs += airspeed.c airspeed_ets.c i2c.c $(SRC_ARCH)/i2c_hw.c<br />
<br />
See paparazzi3/conf/airframes/easystar2.xml for an example airframe configuration.<br />
<br />
The airspeed can be displayed in the Messages tool by adding the AIRSPEED message to /conf/telemetry/default.xml as follows:<br />
<process name="Ap"><br />
<mode name="default"><br />
<message name="AIRSPEED" period="1.0"/><br />
...<br />
Please note that in the GCS, the strip displays ground speed (not airspeed). In order to display airspeed, drag-and-drop the airspeed message field from the Messages tool onto the 2D map of the GCS. <br />
<br />
<br />
The altitude and airspeed loops are separated as shown in the diagram below. Basically the throttle and pitch are controlled independently and are not coupled in the control loops (of course one affects the other but the control loops are independent). The airspeed is controlled by two cascaded PI loops, the first is used to regulate the ground speed and the second the airspeed. This is needed to ensure that if the ground speed drops below a certain value the airspeed will be increased to compensate (in order to maintain a valid GPS heading).<br />
[[Image:Airspeed.png|left|800px]]<br />
<br style="clear:both"><br />
The following plot is from an actual test flight after spending some time setting the loop gains (the real-time tuning through the GCS is a time saver!). The plane was flying circles at a constant altitude (except in the end). The wind was about 5 m/s, judging from the ground speed variations. In the middle there is an example of what happens when the ground speed falls below the setpoint. Finally the altitude setpoint was changed to verify that the airspeed will be maintained while climbing.<br />
[[Image:PlotAS2.png|left|600px]]<br />
<br style="clear:both"><br />
The benefits of the airspeed hold are obvious in this example. The throttle adjusts to keep the airspeed close to the setpoint. <br />
[[Image:09_10_04__17_50_27_as1.png|left|600px]]<br />
<br style="clear:both"><br />
<br />
The following aspects still need to be looked at:<br />
* Support EagleTree sensor in 3rd party mode<br />
* Revert to GPS measurements if the sensor fails<br />
<br />
Thanks very much to [http://vrhome.net/vassilis/ Vassilis] for developing and testing the code.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Airspeed_sensor&diff=7019Airspeed sensor2010-07-26T13:14:39Z<p>Markgriffin: </p>
<hr />
<div>By default, airspeed is estimated by measuring the GPS ground speed. This gives reasonable results particularly in calm conditions. Airspeed sensors measure actual airspeed resulting in better throttle control and aircraft performance especially in windy conditions. <br />
<br />
==Connecting the EagleTree Airspeed Sensor==<br />
<br />
The [http://www.eagletreesystems.com/Support/manuals/airspeed-v3.pdf EagleTree Airspeed Sensor] is a low cost module and comes with a very good pitot tube (Prandtl style, pitot-static tube) that includes static and dynamic ports. It has an I2C interface that connects directly to the Tiny/TWOG I2C port. The autopilot code has been modified to regulate the throttle in order to keep the airspeed constant (and a minimum ground speed). The airspeed sensor should be set to operate in the default RAW mode (not switched to 3rd party mode).<br />
<br />
First, connect the sensor directly to the TWOG (J6/I2C connector). The sensor module wires are:<br />
Red wire: 5V<br />
White wire: Ground<br />
Yellow wire: SDA<br />
Brown wire: SCL<br />
<br />
Then, add the following to the end of the "VERTICAL CONTROL" section of the airframe file:<br />
<!-- auto airspeed and altitude inner loop (for airspeed sensor) --><br />
<define name="AUTO_AIRSPEED_SETPOINT" value="15.0" unit="m/s"/><br />
<define name="AUTO_AIRSPEED_PGAIN" value="0.060"/><br />
<define name="AUTO_AIRSPEED_IGAIN" value="0.050"/> <br />
<define name="AUTO_GROUNDSPEED_SETPOINT" value="6.0" unit="m/s"/><br />
<define name="AUTO_GROUNDSPEED_PGAIN" value="0.75"/><br />
<define name="AUTO_GROUNDSPEED_IGAIN" value="0.25"/> <br />
Note that the SETPOINT values may need to be adjusted to suit your aircraft.<br />
<br />
Then, add the following near the end of the airframe file:<br />
ap.CFLAGS += -DUSE_AIRSPEED_ETS -DUSE_AIRSPEED -DUSE_I2C0 -DAGR_CLIMB<br />
ap.srcs += airspeed.c airspeed_ets.c i2c.c $(SRC_ARCH)/i2c_hw.c<br />
<br />
See paparazzi3/conf/airframes/easystar2.xml for an example airframe configuration.<br />
<br />
The airspeed can be displayed in the Messages tool by adding the AIRSPEED message to /conf/telemetry/default.xml as follows:<br />
<process name="Ap"><br />
<mode name="default"><br />
<message name="AIRSPEED" period="1.0"/><br />
...<br />
Please note that in the GCS, the strip displays ground speed (not airspeed). In order to display airspeed, drag-and-drop the airspeed message field from the Messages tool onto the 2D map of the GCS. <br />
<br />
<br />
The altitude and airspeed loops are separated as shown in the diagram below. Basically the throttle and pitch are controlled independently and are not coupled in the control loops (of course one affects the other but the control loops are independent). The airspeed is controlled by two cascaded PI loops, the first is used to regulate the ground speed and the second the airspeed. This is needed to ensure that if the ground speed drops below a certain value the airspeed will be increased to compensate (in order to maintain a valid GPS heading).<br />
[[Image:Airspeed.png|left|800px]]<br />
<br style="clear:both"><br />
The following plot is from an actual test flight after spending some time setting the loop gains (the real-time tuning through the GCS is a time saver!). The plane was flying circles at a constant altitude (except in the end). The wind was about 5 m/s, judging from the ground speed variations. In the middle there is an example of what happens when the ground speed falls below the setpoint. Finally the altitude setpoint was changed to verify that the airspeed will be maintained while climbing.<br />
[[Image:PlotAS2.png|left|600px]]<br />
<br style="clear:both"><br />
The benefits of the airspeed hold are obvious in this example. The throttle adjusts to keep the airspeed close to the setpoint. <br />
[[Image:09_10_04__17_50_27_as1.png|left|600px]]<br />
<br style="clear:both"><br />
<br />
The following aspects still need to be looked at:<br />
* Support EagleTree sensor in 3rd party mode<br />
* Revert to GPS measurements if the sensor fails<br />
<br />
Thanks very much to [http://vrhome.net/vassilis/ Vassilis] for developing and testing the code.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Airspeed_sensor&diff=7017Airspeed sensor2010-07-26T10:00:36Z<p>Markgriffin: </p>
<hr />
<div>By default, airspeed is estimated by measuring the GPS ground speed. This gives reasonable results particularly in calm conditions. Airspeed sensors measure actual airspeed resulting in better performance especially in windy conditions. <br />
<br />
==Connecting the EagleTree Airspeed Sensor==<br />
<br />
The [http://www.eagletreesystems.com/Support/manuals/airspeed-v3.pdf EagleTree Airspeed Sensor] is a low cost module and comes with a very good pitot tube (Prandtl style, pitot-static tube) that includes static and dynamic ports. It has an I2C interface that connects directly to the Tiny/TWOG I2C port. The autopilot code has been modified to regulate the throttle in order to keep the airspeed constant (and a minimum ground speed). The airspeed sensor should be set to operate in the default RAW mode (not switched to 3rd party mode).<br />
<br />
First, connect the sensor directly to the TWOG (J6). The sensor module wires are:<br />
Red wire: 5V<br />
White wire: Ground<br />
Yellow wire: SDA<br />
Brown wire: SCL<br />
<br />
Add the following to the end of the "VERTICAL CONTROL" section of the airframe file:<br />
<!-- auto airspeed and altitude inner loop (for airspeed sensor) --><br />
<define name="AUTO_AIRSPEED_SETPOINT" value="15.0" unit="m/s"/><br />
<define name="AUTO_AIRSPEED_PGAIN" value="0.060"/><br />
<define name="AUTO_AIRSPEED_IGAIN" value="0.050"/> <br />
<define name="AUTO_GROUNDSPEED_SETPOINT" value="6.0" unit="m/s"/><br />
<define name="AUTO_GROUNDSPEED_PGAIN" value="0.75"/><br />
<define name="AUTO_GROUNDSPEED_IGAIN" value="0.25"/> <br />
Note that the SETPOINT values may need to be adjusted to suit your aircraft.<br />
<br />
Then, in the airframe file (near the end of the file), you have to add:<br />
ap.CFLAGS += -DUSE_AIRSPEED_ETS -DUSE_AIRSPEED -DUSE_I2C0 -DAGR_CLIMB<br />
ap.srcs += airspeed.c airspeed_ets.c i2c.c $(SRC_ARCH)/i2c_hw.c<br />
<br />
See paparazzi3/conf/airframes/easystar2.xml for an example airframe configuration.<br />
<br />
The airspeed can be displayed in the Messages tool by adding the AIRSPEED message to /conf/telemetry/default.xml as follows:<br />
<process name="Ap"><br />
<mode name="default"><br />
<message name="AIRSPEED" period="1.0"/><br />
...<br />
Please note that in the GCS, the strip displays ground speed (not airspeed). In order to display airspeed, drag-and-drop the airspeed message field from the Messages tool onto the 2D map of the GCS. <br />
<br />
<br />
The altitude and airspeed loops are separated as shown in the diagram below. Basically the throttle and pitch are controlled independently and are not coupled in the control loops (of course one affects the other but the control loops are independent). The airspeed is controlled by two cascaded PI loops, the first is used to regulate the ground speed and the second the airspeed. This is needed to ensure that if the ground speed drops below a certain value the airspeed will be increased to compensate (in order to maintain a valid GPS heading).<br />
[[Image:Airspeed.png|left|800px]]<br />
<br style="clear:both"><br />
The following plot is from an actual test flight after spending some time setting the loop gains (the real-time tuning through the GCS is a time saver!). The plane was flying circles at a constant altitude (except in the end). The wind was about 5 m/s, judging from the ground speed variations. In the middle there is an example of what happens when the ground speed falls below the setpoint. Finally the altitude setpoint was changed to verify that the airspeed will be maintained while climbing.<br />
[[Image:PlotAS2.png|left|600px]]<br />
<br style="clear:both"><br />
The benefits of the airspeed hold are obvious in this example. The throttle adjusts to keep the airspeed close to the setpoint. <br />
[[Image:09_10_04__17_50_27_as1.png|left|600px]]<br />
<br style="clear:both"><br />
<br />
The following aspects still need to be looked at:<br />
* Test EagleTree sensors in 3rd party mode<br />
* Revert to GPS measurements if the sensor fails<br />
<br />
Thanks very much to [http://vrhome.net/vassilis/ Vassilis] for developing and testing the code.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Airspeed_sensor&diff=7016Airspeed sensor2010-07-26T08:56:48Z<p>Markgriffin: /* Connecting the EagleTree Airspeed Sensor */</p>
<hr />
<div>By default, airspeed is estimated by measuring the GPS ground speed. This gives reasonable results particularly in calm conditions. Airspeed sensors measure actual airspeed resulting in better performance especially in windy conditions. <br />
<br />
==Connecting the EagleTree Airspeed Sensor==<br />
<br />
The [http://www.eagletreesystems.com/Support/manuals/airspeed-v3.pdf EagleTree Airspeed Sensor] is a low cost module and comes with a very good pitot tube (Prandtl style, pitot-static tube) that includes static and dynamic ports. It has an I2C interface that connects directly to the Tiny/TWOG I2C port. The autopilot code has been modified to regulate the throttle in order to keep the airspeed constant (and a minimum ground speed). The airspeed sensor should be set to operate in the default RAW mode (not switched to 3rd party mode).<br />
<br />
First, connect the sensor directly to the TWOG (J6). The sensor module wires are:<br />
Red wire: 5V<br />
White wire: Ground<br />
Yellow wire: SDA<br />
Brown wire: SCL<br />
<br />
Add the following to the end of the "VERTICAL CONTROL" section of the airframe file:<br />
<!-- auto airspeed and altitude inner loop (for airspeed sensor) --><br />
<define name="AUTO_AIRSPEED_SETPOINT" value="15.0" unit="m/s"/><br />
<define name="AUTO_AIRSPEED_PGAIN" value="0.060"/><br />
<define name="AUTO_AIRSPEED_IGAIN" value="0.050"/> <br />
<define name="AUTO_GROUNDSPEED_SETPOINT" value="6.0" unit="m/s"/><br />
<define name="AUTO_GROUNDSPEED_PGAIN" value="0.75"/><br />
<define name="AUTO_GROUNDSPEED_IGAIN" value="0.25"/> <br />
Note that the SETPOINT values may need to be adjusted to suit your aircraft.<br />
<br />
Then, in the airframe file (near the end of the file), you have to add:<br />
ap.CFLAGS += -DUSE_AIRSPEED_ETS -DUSE_AIRSPEED -DUSE_I2C0 -DAGR_CLIMB<br />
ap.srcs += airspeed.c airspeed_ets.c i2c.c $(SRC_ARCH)/i2c_hw.c<br />
<br />
See paparazzi3/conf/airframes/easystar2.xml for an example airframe configuration.<br />
<br />
The airspeed can be displayed in the Messages tool by adding the AIRSPEED message to /conf/telemetry/default.xml as follows:<br />
<process name="Ap"><br />
<mode name="default"><br />
<message name="AIRSPEED" period="1.0"/><br />
...<br />
Please note that in the GCS, the strip displays ground speed (not airspeed). In order to display airspeed, drag-and-drop the airspeed message field from the Messages tool onto the 2D map of the GCS. <br />
<br />
<br />
The altitude and airspeed loops are separated as shown in the diagram below. Basically the throttle and pitch are controlled independently and are not coupled in the control loops (of course one affects the other but the control loops are independent). The airspeed is controlled by two cascaded PI loops, the first is used to regulate the ground speed and the second the airspeed. This is needed to ensure that if the ground speed drops below a certain value the airspeed will be increased to compensate (in order to maintain a valid GPS heading).<br />
[[Image:Airspeed.png|left|800px]]<br />
<br style="clear:both"><br />
The following two plots are from an actual test flight after spending some time setting the loop gains (the real-time tuning through the GCS is a time saver!). The plane was flying circles at a constant altitude (except in the end). The wind was about 5 m/s, judging from the ground speed variations. In the middle there is an example of what happens when the ground speed falls below the setpoint. Finally the altitude setpoint was changed to verify that the airspeed will be maintained while climbing.<br />
[[Image:PlotAS2.png|left|600px]]<br />
<br style="clear:both"><br />
The altitude gains were the easiest to tune. Altitude is maintained fairly decently, at the end the altitude setpoint was changed (aggressive climb mode was disabled). This is still using the GPS altitude, barometric altitude has been implemented but not tested yet (Kalman parameters may need some tuning).<br />
[[Image:09_10_01__18_19_21_alt.png|left|600px]]<br />
<br style="clear:both"><br />
The benefits of the airspeed hold are obvious in this example. The throttle adjusts to keep the airspeed close to the setpoint. <br />
[[Image:09_10_04__17_50_27_as1.png|left|600px]]<br />
<br style="clear:both"><br />
<br />
The following aspects still need to be looked at:<br />
* Test EagleTree sensors in 3rd party mode<br />
* Revert to GPS measurements if the sensor fails<br />
<br />
Thanks very much to [http://vrhome.net/vassilis/ Vassilis] for developing and testing the code.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Airspeed_sensor&diff=7015Airspeed sensor2010-07-26T08:56:08Z<p>Markgriffin: </p>
<hr />
<div>By default, airspeed is estimated by measuring the GPS ground speed. This gives reasonable results particularly in calm conditions. Airspeed sensors measure actual airspeed resulting in better performance especially in windy conditions. <br />
<br />
==Connecting the EagleTree Airspeed Sensor==<br />
<br />
The [http://www.eagletreesystems.com/Support/manuals/airspeed-v3.pdf EagleTree Airspeed Sensor] is a low cost module and comes with a very good pitot tube (Prandtl style, pitot-static tube) that includes static and dynamic ports. It has an I2C interface that connects directly to the Tiny/TWOG I2C port. The autopilot code has been modified to regulate the throttle in order to keep the airspeed constant (and a minimum ground speed). The airspeed sensor should be set to operate in the default RAW mode (not switched to 3rd party mode).<br />
<br />
First, connect the sensor directly to the TWOG (J6). The sensor module wires are:<br />
Red wire: 5V<br />
White wire: Ground<br />
Yellow wire: SDA<br />
Brown wire: SCL<br />
<br />
Add the following to the end of the "VERTICAL CONTROL" section of the airframe file:<br />
<!-- auto airspeed and altitude inner loop (for airspeed sensor) --><br />
<define name="AUTO_AIRSPEED_SETPOINT" value="15.0" unit="m/s"/><br />
<define name="AUTO_AIRSPEED_PGAIN" value="0.060"/><br />
<define name="AUTO_AIRSPEED_IGAIN" value="0.050"/> <br />
<define name="AUTO_GROUNDSPEED_SETPOINT" value="6.0" unit="m/s"/><br />
<define name="AUTO_GROUNDSPEED_PGAIN" value="0.75"/><br />
<define name="AUTO_GROUNDSPEED_IGAIN" value="0.25"/> <br />
Note that the SETPOINT values may need to be adjusted to suit your aircraft.<br />
<br />
Then, in the airframe file (near the end of the file), you have to add:<br />
ap.CFLAGS += -DUSE_AIRSPEED_ETS -DUSE_AIRSPEED -DUSE_I2C0 -DAGR_CLIMB<br />
ap.srcs += airspeed.c airspeed_ets.c i2c.c $(SRC_ARCH)/i2c_hw.c<br />
<br />
See paparazzi3/conf/airframes/easystar2.xml for an example airframe configuration.<br />
<br />
The airspeed can be displayed in the Messages tool by adding the AIRSPEED message to /conf/telemetry/default.xml as follows:<br />
<process name="Ap"><br />
<mode name="default"><br />
<message name="AIRSPEED" period="1.0"/><br />
Please note that in the GCS, the strip displays ground speed (not airspeed). In order to display airspeed, drag-and-drop the airspeed message field from the Messages tool onto the 2D map of the GCS. <br />
<br />
<br />
The altitude and airspeed loops are separated as shown in the diagram below. Basically the throttle and pitch are controlled independently and are not coupled in the control loops (of course one affects the other but the control loops are independent). The airspeed is controlled by two cascaded PI loops, the first is used to regulate the ground speed and the second the airspeed. This is needed to ensure that if the ground speed drops below a certain value the airspeed will be increased to compensate (in order to maintain a valid GPS heading).<br />
[[Image:Airspeed.png|left|800px]]<br />
<br style="clear:both"><br />
The following two plots are from an actual test flight after spending some time setting the loop gains (the real-time tuning through the GCS is a time saver!). The plane was flying circles at a constant altitude (except in the end). The wind was about 5 m/s, judging from the ground speed variations. In the middle there is an example of what happens when the ground speed falls below the setpoint. Finally the altitude setpoint was changed to verify that the airspeed will be maintained while climbing.<br />
[[Image:PlotAS2.png|left|600px]]<br />
<br style="clear:both"><br />
The altitude gains were the easiest to tune. Altitude is maintained fairly decently, at the end the altitude setpoint was changed (aggressive climb mode was disabled). This is still using the GPS altitude, barometric altitude has been implemented but not tested yet (Kalman parameters may need some tuning).<br />
[[Image:09_10_01__18_19_21_alt.png|left|600px]]<br />
<br style="clear:both"><br />
The benefits of the airspeed hold are obvious in this example. The throttle adjusts to keep the airspeed close to the setpoint. <br />
[[Image:09_10_04__17_50_27_as1.png|left|600px]]<br />
<br style="clear:both"><br />
<br />
The following aspects still need to be looked at:<br />
* Test EagleTree sensors in 3rd party mode<br />
* Revert to GPS measurements if the sensor fails<br />
<br />
Thanks very much to [http://vrhome.net/vassilis/ Vassilis] for developing and testing the code.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Airspeed_sensor&diff=7014Airspeed sensor2010-07-26T08:52:33Z<p>Markgriffin: </p>
<hr />
<div>By default, airspeed is estimated by measuring the GPS ground speed. This gives reasonable results particularly in calm conditions. Airspeed sensors measure actual airspeed resulting in better performance especially in windy conditions. <br />
<br />
==Connecting the EagleTree Airspeed Sensor==<br />
<br />
The [http://www.eagletreesystems.com/Support/manuals/airspeed-v3.pdf EagleTree Airspeed Sensor] is a low cost module and comes with a very good pitot tube (Prandtl style, pitot-static tube) that includes static and dynamic ports. It has an I2C interface that connects directly to the Tiny/TWOG I2C port. The autopilot code has been modified to regulate the throttle in order to keep the airspeed constant (and a minimum ground speed). The airspeed sensor should be set to operate in the default RAW mode (not switched to 3rd party mode).<br />
<br />
First, connect the sensor directly to the TWOG (J6). The sensor module wires are:<br />
Red wire: 5V<br />
White wire: Ground<br />
Yellow wire: SDA<br />
Brown wire: SCL<br />
<br />
Add the following to the end of the "VERTICAL CONTROL" section of the airframe file:<br />
<!-- auto airspeed and altitude inner loop (for airspeed sensor) --><br />
<define name="AUTO_AIRSPEED_SETPOINT" value="15.0" unit="m/s"/><br />
<define name="AUTO_AIRSPEED_PGAIN" value="0.060"/><br />
<define name="AUTO_AIRSPEED_IGAIN" value="0.050"/> <br />
<define name="AUTO_GROUNDSPEED_SETPOINT" value="6.0" unit="m/s"/><br />
<define name="AUTO_GROUNDSPEED_PGAIN" value="0.75"/><br />
<define name="AUTO_GROUNDSPEED_IGAIN" value="0.25"/> <br />
Note that the SETPOINT values may need to be adjusted to suit your aircraft.<br />
<br />
Then, in the airframe file (near the end of the file), you have to add:<br />
ap.CFLAGS += -DUSE_AIRSPEED_ETS -DUSE_AIRSPEED -DUSE_I2C0 -DAGR_CLIMB<br />
ap.srcs += airspeed.c airspeed_ets.c i2c.c $(SRC_ARCH)/i2c_hw.c<br />
<br />
See paparazzi3/conf/airframes/easystar2.xml for an example airframe configuration.<br />
<br />
The airspeed can be displayed in the Messages tool by adding the AIRSPEED message to /conf/telemetry/default.xml as follows:<br />
<process name="Ap"><br />
<mode name="default"><br />
<message name="AIRSPEED" period="1.0"/><br />
Please note that in the GCS, the strip displays ground speed (not airspeed). In order to display airspeed, drag-and-drop the airspeed from "Messages" to the map. <br />
<br />
<br />
The altitude and airspeed loops are separated as shown in the diagram below. Basically the throttle and pitch are controlled independently and are not coupled in the control loops (of course one affects the other but the control loops are independent). The airspeed is controlled by two cascaded PI loops, the first is used to regulate the ground speed and the second the airspeed. This is needed to ensure that if the ground speed drops below a certain value the airspeed will be increased to compensate (in order to maintain a valid GPS heading).<br />
[[Image:Airspeed.png|left|800px]]<br />
<br style="clear:both"><br />
The following two plots are from an actual test flight after spending some time setting the loop gains (the real-time tuning through the GCS is a time saver!). The plane was flying circles at a constant altitude (except in the end). The wind was about 5 m/s, judging from the ground speed variations. In the middle there is an example of what happens when the ground speed falls below the setpoint. Finally the altitude setpoint was changed to verify that the airspeed will be maintained while climbing.<br />
[[Image:PlotAS2.png|left|600px]]<br />
<br style="clear:both"><br />
The altitude gains were the easiest to tune. Altitude is maintained fairly decently, at the end the altitude setpoint was changed (aggressive climb mode was disabled). This is still using the GPS altitude, barometric altitude has been implemented but not tested yet (Kalman parameters may need some tuning).<br />
[[Image:09_10_01__18_19_21_alt.png|left|600px]]<br />
<br style="clear:both"><br />
The benefits of the airspeed hold are obvious in this example. The throttle adjusts to keep the airspeed close to the setpoint. <br />
[[Image:09_10_04__17_50_27_as1.png|left|600px]]<br />
<br style="clear:both"><br />
<br />
The following aspects still need to be looked at:<br />
* Test EagleTree sensors in 3rd party mode<br />
* Revert to GPS measurements if the sensor fails<br />
<br />
Thanks very much to [http://vrhome.net/vassilis/ Vassilis] for developing and testing the code.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Airspeed_sensor&diff=7013Airspeed sensor2010-07-26T08:45:23Z<p>Markgriffin: </p>
<hr />
<div>By default, airspeed is estimated by measuring the GPS ground speed. This gives reasonable results particularly in calm conditions. Airspeed sensors measure actual airspeed resulting in better performance especially in windy conditions. <br />
<br />
==Connecting the EagleTree Airspeed Sensor==<br />
<br />
The [http://www.eagletreesystems.com/Support/manuals/airspeed-v3.pdf EagleTree Airspeed Sensor] is a low cost module and comes with a very good pitot tube (Prandtl style, pitot-static tube) that includes static and dynamic ports. It has an I2C interface that connects directly to the Tiny/TWOG I2C port. The autopilot code has been modified to regulate the throttle in order to keep the airspeed constant (and a minimum ground speed). The airspeed sensor should be set to operate in the default RAW mode (not switched to 3rd party mode).<br />
<br />
First, connect the sensor directly to the TWOG (J6). The sensor module wires are:<br />
Red wire: 5V<br />
White wire: Ground<br />
Yellow wire: SDA<br />
Brown wire: SCL<br />
<br />
Add the following to the end of the "VERTICAL CONTROL" section of the airframe file:<br />
<!-- auto airspeed and altitude inner loop (for airspeed sensor) --><br />
<define name="AUTO_AIRSPEED_SETPOINT" value="15.0" unit="m/s"/><br />
<define name="AUTO_AIRSPEED_PGAIN" value="0.060"/><br />
<define name="AUTO_AIRSPEED_IGAIN" value="0.050"/> <br />
<define name="AUTO_GROUNDSPEED_SETPOINT" value="6.0" unit="m/s"/><br />
<define name="AUTO_GROUNDSPEED_PGAIN" value="0.75"/><br />
<define name="AUTO_GROUNDSPEED_IGAIN" value="0.25"/> <br />
Note that the SETPOINT values may need to be adjusted to suit your aircraft.<br />
<br />
Then, in the airframe file (near the end of the file), you have to add:<br />
ap.CFLAGS += -DUSE_AIRSPEED_ETS -DUSE_AIRSPEED -DUSE_I2C0 -DAGR_CLIMB<br />
ap.srcs += airspeed.c airspeed_ets.c i2c.c $(SRC_ARCH)/i2c_hw.c<br />
<br />
See paparazzi3/conf/airframes/easystar2.xml for an example airframe configuration.<br />
<br />
The altitude and airspeed loops are separated as shown in the diagram below. Basically the throttle and pitch are controlled independently and are not coupled in the control loops (of course one affects the other but the control loops are independent). The airspeed is controlled by two cascaded PI loops, the first is used to regulate the ground speed and the second the airspeed. This is needed to ensure that if the ground speed drops below a certain value the airspeed will be increased to compensate (in order to maintain a valid GPS heading).<br />
[[Image:Airspeed.png|left|800px]]<br />
<br style="clear:both"><br />
The following two plots are from an actual test flight after spending some time setting the loop gains (the real-time tuning through the GCS is a time saver!). The plane was flying circles at a constant altitude (except in the end). The wind was about 5 m/s, judging from the ground speed variations. In the middle there is an example of what happens when the ground speed falls below the setpoint. Finally the altitude setpoint was changed to verify that the airspeed will be maintained while climbing.<br />
[[Image:PlotAS2.png|left|600px]]<br />
<br style="clear:both"><br />
The altitude gains were the easiest to tune. Altitude is maintained fairly decently, at the end the altitude setpoint was changed (aggressive climb mode was disabled). This is still using the GPS altitude, barometric altitude has been implemented but not tested yet (Kalman parameters may need some tuning).<br />
[[Image:09_10_01__18_19_21_alt.png|left|600px]]<br />
<br style="clear:both"><br />
The benefits of the airspeed hold are obvious in this example. The throttle adjusts to keep the airspeed close to the setpoint. <br />
[[Image:09_10_04__17_50_27_as1.png|left|600px]]<br />
<br style="clear:both"><br />
<br />
The following aspects still need to be looked at:<br />
* Test EagleTree sensors in 3rd party mode<br />
* Revert to GPS measurements if the sensor fails<br />
<br />
Thanks very much to [http://vrhome.net/vassilis/ Vassilis] for developing and testing the code.</div>Markgriffinhttp://wiki.paparazziuav.org/w/index.php?title=Airspeed_sensor&diff=7012Airspeed sensor2010-07-26T08:41:00Z<p>Markgriffin: </p>
<hr />
<div>By default, airspeed is estimated by measuring the GPS ground speed. This gives reasonable results particularly in calm conditions. Airspeed sensors measure actual airspeed resulting in better performance especially in windy conditions. <br />
<br />
==Connecting the EagleTree Airspeed Sensor==<br />
<br />
The [http://www.eagletreesystems.com/Support/manuals/airspeed-v3.pdf EagleTree Airspeed Sensor] is a low cost module and comes with a very good pitot tube (Prandtl style, pitot-static tube) that includes static and dynamic ports. It has an I2C interface that connects directly to the Tiny/TWOG I2C port. The autopilot code has been modified to regulate the throttle in order to keep the airspeed constant (and a minimum ground speed). The airspeed sensor should be set to operate in the default RAW mode (not switched to 3rd party mode).<br />
<br />
First, connect the sensor directly to the TWOG (J6). The sensor module wires are:<br />
Red wire: 5V<br />
White wire: Ground<br />
Yellow wire: SDA<br />
Brown wire: SCL<br />
<br />
Add the following to the end of the "VERTICAL CONTROL" section of the airframe file:<br />
<!-- auto airspeed and altitude inner loop (for airspeed sensor) --><br />
<define name="AUTO_AIRSPEED_SETPOINT" value="15.0" unit="m/s"/><br />
<define name="AUTO_AIRSPEED_PGAIN" value="0.060"/><br />
<define name="AUTO_AIRSPEED_IGAIN" value="0.050"/> <br />
<define name="AUTO_GROUNDSPEED_SETPOINT" value="6.0" unit="m/s"/><br />
<define name="AUTO_GROUNDSPEED_PGAIN" value="0.75"/><br />
<define name="AUTO_GROUNDSPEED_IGAIN" value="0.25"/> <br />
Note that the SETPOINT values may need to be adjusted to suit your airframe.<br />
<br />
Then, in the airframe file (near the end of the file), you have to add:<br />
ap.CFLAGS += -DUSE_AIRSPEED_ETS -DUSE_AIRSPEED -DUSE_I2C0 -DAGR_CLIMB<br />
ap.srcs += airspeed.c airspeed_ets.c i2c.c $(SRC_ARCH)/i2c_hw.c<br />
<br />
See paparazzi3/conf/airframes/easystar2.xml for an example airframe configuration.<br />
<br />
The altitude and airspeed loops are separated as shown in the diagram below. Basically the throttle and pitch are controlled independently and are not coupled in the control loops (of course one affects the other but the control loops are independent). The airspeed is controlled by two cascaded PI loops, the first is used to regulate the ground speed and the second the airspeed. This is needed to ensure that if the ground speed drops below a certain value the airspeed will be increased to compensate (in order to maintain a valid GPS heading).<br />
[[Image:Airspeed.png|left|800px]]<br />
<br style="clear:both"><br />
The following two plots are from an actual test flight after spending some time setting the loop gains (the real-time tuning through the GCS is a time saver!). The plane was flying circles at a constant altitude (except in the end). The wind was about 5 m/s, judging from the ground speed variations. In the middle there is an example of what happens when the ground speed falls below the setpoint. Finally the altitude setpoint was changed to verify that the airspeed will be maintained while climbing.<br />
[[Image:PlotAS2.png|left|500px]]<br />
<br style="clear:both"><br />
The altitude gains were the easiest to tune. Altitude is maintained fairly decently, at the end the altitude setpoint was changed (aggressive climb mode was disabled). This is still using the GPS altitude, barometric altitude has been implemented but not tested yet (Kalman parameters may need some tuning).<br />
[[Image:09_10_01__18_19_21_alt.png|left|500px]]<br />
<br style="clear:both"><br />
The benefits of the airspeed hold are obvious in this example. The throttle adjusts to keep the airspeed close to the setpoint. <br />
[[Image:09_10_04__17_50_27_as1.png|left|500px]]<br />
<br style="clear:both"><br />
<br />
The following aspects still need to be looked at:<br />
* Test EagleTree sensors in 3rd party mode<br />
* Revert to GPS measurements if the sensor fails<br />
<br />
Thanks very much to [http://vrhome.net/vassilis/ Vassilis] for developing and testing the code.</div>Markgriffin