Pendragon Forms enables your mobile users to capture GPS and extract data including UTM coordinates.
The GPS functionality for aquiring and fixing is controlled by the Special Field called "GPS".
All other fields, to store the data, should be created as Freeform Text fields.
Add the following script to retrieve the GPS data from your device and put the data into the temp variable:
click:
callmethod 1 "GPSINFO"
temp = result
The command callmethod 1 "GPSINFO" refers to the GPS field in your form. If the GPS Special Field were to be in field 5, the script would be callmethod 5 "GPSINFO"
Additionally, to retrieve the standard latitude and longitude information, you can add the following script to your click command: (Note: $[Lat] means the value in a field whose Field Label on the Scripting tab is Lat.):
extract "GPS.LAT" from temp
$[Lat] = result
extract "GPS.LONG" from temp
$[Long] = result
For advanced scripting and to retrieve further GPS information, please see the "Parsing data and getting UTM" tab above.
Example Script in the GPS field will fire when you tap the FIX button, which appears after tapping the ACQUIRE button:
Note: When the script references $[Lat], $[Long], $[DECLAT], $[DECLONG], $[Accuracy] etc., you must have fields on your form with the Field Label on the Script tab filled in as Lat, Long, DECLAT, DECLONG, Accuracy. etc.
click:
callmethod 1 "GPSINFO"
temp = result
extract "GPS.LAT" from temp
$[Lat] = result
extract "GPS.LONG" from temp
$[Long] = result
extract "GPS.DECLAT" from temp
$[DECLAT] = result
extract "GPS.DECLONG" from temp
$[DECLONG] = result
extract "GPS.ACCURACY" from temp
$[Accuracy] = result
extract "GPS.ALT" from temp
$[Altitude] = result
extract "GPS.UTM" from temp
$[UTM] = result
extract "GPS.UTMZONE" from temp
$[UTMzone] = result
extract "GPS.UTMNS" from temp
$[UTMns] = result
extract "GPS.UTMX" from temp
$[UTMx] = result
extract "GPS.UTMY" from temp
$[UTMy] = result
Please see our tutorial for Mapping GPS on Google Charts for examples of how to map your collected data.
(847) 816-9660
info@pendragonforms.com
Copyright © 2021 Pendragon Software Corporation. All Rights Reserved.