Paparazzi UAS  v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
laser_range_array module

Reads out values through uart of an laser range ring (array), containing multiple ToF IR laser range modules

No detailed description...

Example for airframe file

Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!

1 <module name="laser_range_array">
2  <define name="LASER_RANGE_ARRAY_NUM_SENSORS" value="0" />
3  <define name="LASER_RANGE_ARRAY_ORIENTATIONS" type="float[]" value="0,0" />
4  <configure name="LASER_RANGE_ARRAY_PORT" value="UART2" />
5  <configure name="LASER_RANGE_ARRAY_BAUD" value="38400" />
6 </module>

Module configuration options

Configure Options

  • name: LASER_RANGE_ARRAY_PORT value: UART2
    Description: select which uart it is connected to
  • name: LASER_RANGE_ARRAY_BAUD value: 38400
    Description: set the baudrate of the uart

Define Options

  • name: LASER_RANGE_ARRAY_NUM_SENSORS value: 0
    Description: Total amount of laser range sensors on the airframe
  • name: LASER_RANGE_ARRAY_ORIENTATIONS value: 0,0
    Description: The orientation per laser range sensor in the order: elevation,heading. The array is built up like (elv_1, head_1, elv_2, head_2,...elv_n, head_n) with n=LASER_RANGE_ARRAY_NUM_SENSORS

Module functions

Init Functions

These initialization functions are called once on startup.

Event Functions

These event functions are called in each cycle of the module event loop.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw laser_range_array.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="laser_range_array" dir="range_finder">
<doc>
<description>Reads out values through uart of an laser range ring (array), containing multiple ToF IR laser range modules</description>
<configure name="LASER_RANGE_ARRAY_PORT" value="UART2" description="select which uart it is connected to"/>
<configure name="LASER_RANGE_ARRAY_BAUD" value="38400" description="set the baudrate of the uart"/>
<define name="LASER_RANGE_ARRAY_NUM_SENSORS" value="0" description="Total amount of laser range sensors on the airframe"/>
<define name="LASER_RANGE_ARRAY_ORIENTATIONS" value="0,0" type="float[]" description="The orientation per laser range sensor in the order: elevation,heading. The array is built up like (elv_1, head_1, elv_2, head_2,...elv_n, head_n) with n=LASER_RANGE_ARRAY_NUM_SENSORS"/>
</doc>
<header>
<file name="laser_range_array.h"/>
</header>
<init fun="laser_range_array_init()"/>
<event fun="laser_range_array_event()"/>
<makefile>
<!-- Configure default UART port and baudrate -->
<configure name="LASER_RANGE_ARRAY_PORT" default="UART5" case="upper|lower"/>
<configure name="LASER_RANGE_ARRAY_BAUD" default="38400"/>
<!-- Enable UART and set baudrate -->
<define name="USE_$(LASER_RANGE_ARRAY_PORT_UPPER)"/>
<define name="USE_$(LASER_RANGE_ARRAY_PORT_UPPER)_TX" value="FALSE"/>
<define name="$(LASER_RANGE_ARRAY_PORT_UPPER)_BAUD" value="$(LASER_RANGE_ARRAY_BAUD)"/>
<define name="LASER_RANGE_ARRAY_PORT" value="$(LASER_RANGE_ARRAY_PORT_LOWER)"/>
<file name="laser_range_array.c"/>
<file name="pprz_transport.c" dir="pprzlink/src"/>
</makefile>
<makefile target="nps">
<define name="NPS_SIMULATE_LASER_RANGE_ARRAY" value="1"/>
</makefile>
</module>