New component type
GPS is now available in the Dev Console.
This component takes advantage of the new ChipChop engine data type "value array" that allows storing combined numeric data, which in this case is
GPS latitude & longitude coordinates combined in one.
Dev Console setup
You will find the GPS in the list of pre-set components. There is nothing special you need to do, simply select it as a component and there are no additional settings required.
ChipChop App view
In the ChipChop App the GPS component shows combined values and also provides a "View Map" button that opens Google Maps in a browser window with the marker set at the coordinates values.
UsageThe format of the status you would send from your device has to be an array as a
String, meaning that the values have to be enclosed in square brackets
[ ] Important: 1. The
latitude value is the first item in the array and the
longitude is second. If you reverse the order it will not show the correct location in Google Maps
2. The values have to be numbers (float)
3. There is no floating precision limit but large numbers (over 9 decimal places) may look very small in the App widget view
Example
float latitude = 51.5285262;
float longitude = -0.2664036;
String status = "[" + String(latitude) + "," + String(longitude) + "]"; // so it would look like this >>> [51.5285262,-0.2664036]
ChipChop.updateStatus("gps_coordinates",status);
LimitationsCurrently there is no option for using this component in an Action trigger IF statement simply because the IF expects a single value and here we have two.
Don't worry, as this will be a standard component I will be expanding the Actions soon and you will be able to use it as any other component.
Future ImprovementsAs requested by some users I will be expanding the Small Log so you will be able to log a set of coordinates that can be later viewed as a "route map" so you can use this component to log and view nicely walking or driving routes.