Skip to content

inReach Device Support

Decheng Zhang edited this page Feb 14, 2020 · 5 revisions

Nunaliit provides integration of inReach devices. It is possible to load inReach devices with preset forms that can be filled out in the field and sent back to the Nunaliit database.

Device forms are defined using a XML file with a format resembling this example:

<?xml version="1.0" encoding="utf-8"?>
<root>
  <table tableName="Forms" version="1">
    <form id="1">
      <title>Place</title>
      <destination>[email protected]</destination>
      <prefix>TSFN-P-1-</prefix>
      <delimiter>|</delimiter>
      <field id="1">
        <name>Type</name>
        <type>PickList</type>
        <value>camp</value>
        <value>waypoint</value>
        <value>historic</value>
        <value>other (put in notes)</value>
        <required>Y</required>
      </field>
      <field id="2">
        <name>Name</name>
        <type>Text</type>
        <length>140</length>
        <required>N</required>
        <default/>
      </field>
      <field id="3">
        <name>Notes</name>
        <type>Text</type>
        <length>140</length>
        <required>N</required>
        <default/>
      </field>
    </form>
  </table>
</root>

To configure Nunaliit to accepts the messages sent by inReach devices, copy the form definition file to <atlas>/config/inreach_forms.xml After copying the file, the server must be restarted.

This configuration is read and passed to the Nunaliit robot. The robot monitors the database for new incoming messages (documents) and augments them with the following information:

  • The geometry (nunaliit_geom) is derived from geographic information
  • A schema name (nunaliit_schema) is assigned. If a form is associated with the message, then the schema name is "inReach_<form title>". In the case that no form is associated with the message, then the schema name is set to "inReach".
  • The form data is added to a special document location. An object is added at location "inReach_<form title>". Each field is added to this structure with the appropriate value.

In order to display the values in the augmented documents, schemas are needed. These schemas can be generated from schema definitions automatically generated from the device forms. This command is explained in this section.