Logging GPS locations on a mobile device
How to log GPS locations on field device
To save a Global Positioning System (GPS) log of where your field workers have been to, you can configure the GpsConnection.xml file used by the field applications. You can specify a location and file name to save the GPS log file on your Windows Mobile or Windows devices. See the following steps:
- On your desktop machine, create a text document named GpsConnection, and copy the following text into the document:
<GpsConnection assemblyQualifiedName="ESRI.ArcGIS.Mobile.Gps.SerialPortGpsConnection, ESRI.ArcGIS.Mobile"> <SerialPortGpsConnection> <BaudRate>BaudRate4800</BaudRate> <PortName>AUTO</PortName> <LoggingFile>YourFolderPath\YourFileName.txt</LoggingFile> </SerialPortGpsConnection> </GpsConnection>
- Change BaudRate4800 and Auto to your device's actual baud rate and COM port, respectively.
- For the LoggingFile tag, change YourFolderPath to your designated location for the log file, and YourFileName.txt to your log file name.
- Save the file and change the full file name to be GpsConnection.xml.
- Follow these steps to use the ArcGIS application on Windows Mobile device to log GPS locations:
- Connect the device to the computer via Active Sync (WinXP) or Windows Mobile Device Center (Windows Vista or Windows 7).
- Copy the GpsConnection.xml file into the device folder \Program Files\ArcGIS Mobile\3.1.
If there is an existing copy of GpsConnection.xml on the same folder, rename it so you have a backup.
When your field worker opens the ArcGIS application on Windows Mobile device with GPS connected, it will start logging NMEA sentences into the log file you specified.
- Follow these steps to use the ArcGIS application for Windows device to log GPS locations:
- Copy the GpsConnection.xml file to the folder C:\Users\YourUserName\AppData\Local\Esri\ArcGIS Mobile (Vista or Windows 7) or C:\Documents and Settings\YourUserName\Local Settings\Application Data\ESRI\ArcGIS Mobile (WinXP). Backup your existing GpsConnection.xml file if there is one on the same folder.
When your field worker opens the ArcGIS application on Windows device with GPS connected, it will start logging NMEA sentences into the log file you specified.
- Copy the GpsConnection.xml file to the folder C:\Users\YourUserName\AppData\Local\Esri\ArcGIS Mobile (Vista or Windows 7) or C:\Documents and Settings\YourUserName\Local Settings\Application Data\ESRI\ArcGIS Mobile (WinXP). Backup your existing GpsConnection.xml file if there is one on the same folder.
How to simulate a GPS from a log file
If you have a properly formatted NMEA log file, you can simulate a GPS in the office for testing or other purposes. See the following steps:
- On the computer, create a text document named GpsConnection.xml the same as the example below, while replacing the content of the FileName tag with the location where you store your GPS log file on the device:
<GpsConnection assemblyQualifiedName="ESRI.ArcGIS.Mobile.Gps.FileGpsConnection, ESRI.ArcGIS.Mobile"> <FileGpsConnection> <FileName>YourFolderPath\YourFileName.txt</FileName> <Cycling>True</Cycling> </FileGpsConnection> </GpsConnection>
- Save the file and ensure the file is named GpsConnection.xml.
- Follow these steps to simulate GPS using the log file in the ArcGIS application for Windows Mobile device:
- Connect the device to the computer via Active Sync (WinXP) or Windows Mobile Device Center (Windows Vista or Windows 7).
- Open file explorer on desktop, copy the GpsConnection.xml file into the device under folder \Program Files\ArcGIS Mobile\3.1.
If there is an existing GpsConnection.xml file, rename it so that you have a backup copy.
- Open file explorer on desktop, check the location and the name of the log file to ensure they match with the values you specify in the FileName tag of the GpsConnection.xml file.
- Open the ArcGIS application for Windows Mobile device, and click Connect To GPS on the GPS settings page.
GPS simulation starts running as if your device is out in the field.
- Follow these steps to simulate GPS using the log file in the ArcGIS application for Windows device:
- Open file explorer, copy the GpsConnection.xml file into the folder C:\Users\YourUserName\AppData\Local\Esri\ArcGIS Mobile (Vista or Windows 7) or C:\Documents and Settings\YourUserName\Local Settings\Application Data\ESRI\ArcGIS Mobile (WinXP).
If there is an existing copy of GPSConnection.xml file on the same folder, rename it so you have a backup.
- Open file explorer, check the location and the name of the log file to ensure they match with the value you specify in the FileName tag of the GpsConnection.xml file.
- Open the ArcGIS application for Windows device and click Connect on the GPS Settings & Status page.
GPS simulation starts running as if you are carrying your device out in the field.
- Open file explorer, copy the GpsConnection.xml file into the folder C:\Users\YourUserName\AppData\Local\Esri\ArcGIS Mobile (Vista or Windows 7) or C:\Documents and Settings\YourUserName\Local Settings\Application Data\ESRI\ArcGIS Mobile (WinXP).