Plotting shapes onto GCS

From PaparazziUAV
Revision as of 11:22, 15 August 2016 by Rijesh (talk | contribs) (Adding information about shape message)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Messages can be sent over the IVY bus to plot shapes onto the GCS.

These shapes include circles, polygons, lines and text. Shapes such as circles and polygons may have a fill with varying opacity.

Message Definition

 <message name="SHAPE" id="38">
   <description>
     The SHAPE message used to draw shapes onto the Paparazzi GCS.
     Field name shape is used to define the type of shape i.e. Circle, Polygon, Line, or Text.
     This is indexed from 0-3 respectively.
     Each shape drawn must have an id number associated with it. 
     This id number in conjunction with the shapetype will be needed to update or delete the shape. 
     A circle can be defined with the same id as a polygon but since they have different shape types they are considered unique.
     linecolor and fillcolor take in a color string ie: "red", "blue" 
     opacity will change the level of transparency of the fill.
     0 - Transparent
     1 - Light Fill
     2 - Medium Fill
     3 - Opaque
     Passing a status of 0 will create or update the shape specified by id and type.
     Passing a status of 1 will delete the shape specified by id and type.
     latarr is an array of coordinates that contain the latitude coordinate for each point in the shape. 
     The array is comma separated.
     lonarr is similar to latarr but contain the longitude coordinate for each point in the shape.
     Circle and Text type will take the first coordinates given to place the shape.
     Polygon will take all the coordinates given.
     Line will take the first two coordinates given.
     Radius is only used for the circle.
     Text will always be populated with each message using the first set of coordinates.
     The text field can not be blank or have spaces.
     If text is not desired for a shape then pass "NULL" into the text field.
   </description>
   <field name="id"         type="uint8"/>
   <field name="linecolor"  type="string"/>
   <field name="fillcolor"  type="string"/>
   <field name="opacity"    type="uint8" values="Transparent|Light|Medium|Opaque"/>
   <field name="shape"      type="uint8" values="Circle|Polygon|Line"/>
   <field name="status"     type="uint8"  values="create|delete"/>
   <field name="latarr"     type="int32[]"  unit="1e7deg" alt_unit="deg" alt_unit_coef="0.0000001"/>
   <field name="lonarr"     type="int32[]"  unit="1e7deg" alt_unit="deg" alt_unit_coef="0.0000001"/>
   <field name="radius"     type="float" unit="m"/>
   <field name="text"       type="string"/>
 </message>


Example Messages: