Connecting an Aprs.fi track callsign Sensor to a GoogleMap Actuator

Goal
Register on Paraimpu a track callsign Sensor of aprs.fi  and connect it to a GoogleMap Actuator. The connection is configured in order to transform the callsign in KML format.

First step: Select the thing of interest and get its track callsign
  1. click on the thing of interest
  2. on the balloon, click on the thing name and
  3. copy the value filling the “Track callsign” field.



We are curious on the “Vincenzo” fishing vessel and its track callsign is i/227321170




Second step: Create  a new aprs.fi Sensor instance in Paraimpu


On Paraimpu:
  1. create an aprs.fi instance clicking on the aprs.fi icon ()
  2. fill the fields on the showed window (like the next picture)
    • in the “Track callsign”, paste the value copied in First Step - C
    • eventually change policy of this sensor. By default is “Public”.
  1. click “Register” button




Third step: Create a new GoogleMap Actuator

On Paraimpu things palette:
  1. click on the GoogleMap actuator icon ()
  2. fill the fields on the showed window (like the next image)
    • leave “KML” as “Content Type”
  3. click “Register” button




Fourth step: Connecting Things


To create the connection between the two created instances:
  1. with the mouse pointer on the “Vincenzo” instance, the tools are showed
  2. click on the black arrow tool
  3. on the Actuator list in the dialog, select “ShowVincenzo”
  4. click “Connect” button



Fifth step: Open “Connection Details” page

  1. like for the things, with the mouse pointer on the  just added connection, the tools are showed
  2. click on the first button from the top, the manage wheel



Sixth step: Configure the connection


Configure the mapping to translate the JSON coming from the aprs.fi Sensor into a KML format for the GoogleMap Actuator:
  1. click on “Add mapping”
  2. on the left textarea, insert


Vincenzo.name!=""
  1. on the right textarea, insert


<?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2"> <Placemark> <name><%Vincenzo.name%> </name><description> <b>Last Time:</b> <%Vincenzo.last_time%></description> <Point><coordinates><%Vincenzo.lng%>,<%Vincenzo.lat%>,0</coordinates></Point> </Placemark> </kml>


  1. Click the “Save Connection Configuration” button


Filters and mappings are expressed by means of Javascript expressions. Given the JSON structure of aprs.fi records, the condition Vincenzo.name!="" means that each time the sensor position is translated in KML format filled by the values retrieved thanks to templates (the expression between <% and %>)



Seventh step: Activate the connection
Click on the start button (the third from top)

Done!


Now the aprs.fi Sensor and the GoogleMap Actuator are connected. Data are collected each 30 minutes and translated into KML format.


On the “VincenzoShow” GoogleMap Actuator page you could see the last position of the “Vincenzo” fishing vessel.

4 responses to “Connecting an Aprs.fi track callsign Sensor to a GoogleMap Actuator

  1. Thank you. In order to send a tweet based upon APRS... if I want to tweet anytime the LAT is greater than 47.64 but less than 47.69 would the mapping match be:
    Sidecars_aprs>47.64 && Sidecars_aprs<=47.69
    or do I need to define that it look at the LAT from the JSON
    {"name": "WB7NXC-8", "lat": 11.11111, "lgn": 22.22222, "last_time": "Sat Jan 1 10:50:20 2011"}
    I assume yes. COuld you tell me how to narrow the match down to the specific LAT segment? Thank you for letting me into the Alpha.

  2. Dear Bryan,

    for a sensor producing JSON, as in this case, you need to reference each single key in mappings and filters using the standard JavaScript notation.
    In you case the condition should be something like the following:

    Sidecars_aprs.lat>47.64 && Sidecars_aprs.lat<=47.69

    Hope this help. Please, let us know, also via email.

    Thank you!

  3. Hi Bryan,
    assuming your APRS.fi sensor is named Sidecars_aprs and you'd like to tweet only when LAT is between 47.64 and 47.69, in the connection details you should set the filter and one mapping.
    The filter should be:

    Sidecars_aprs.lat > 47.64 && Sidecars_aprs.lat < 47.69

    In this way, only the values you want can be used for in mapping and all other values are discarded.

    In the mapping you should set:
    - for match (the same of filter condition of filter):

    Sidecars_aprs.lat > 47.64 && Sidecars_aprs.lat < 47.69

    - and on replace the text you like. Some example:
    * "The sidecar is close to home"
    * "Sidecar at <% Sidecars_aprs.lat %>! It's arriving!"

    We hope it could help.
    Enjoy!

  4. works great. Thanks for the help. For me this is a learning tool, as well as a cool interface between my various hobby and home interests. Thanks! Bryan

Leave a Reply

© 2014-2015 Paraimpu Srl . Powered by Blogger.