Esri / vehicle-commander-java

The Vehicle Commander template demonstrates best practices for building in-vehicle military applications with ArcGIS Runtime. The Vehicle Commander template contains source code for an in-vehicle application.
Apache License 2.0
16 stars 12 forks source link
native-development

This repository is no longer maintained. For information on Defense Solutions apps, including the most current version of the code in this repository, please visit the Defense Solutions Proofs of Concept repository.

vehicle-commander-java

The Vehicle Commander template demonstrates best practices for building in-vehicle military applications with ArcGIS. The Vehicle Commander template contains source code for an in-vehicle application and directions for building the application from source.

Image of Vehicle Commander

The Vehicle Commander

About the Readme documentation

The documentation is divided between Quick Start, Detailed Usage, and other sections. These sections include:

General Help

Hardware and Software Requirements

Hardware Requirements

Hardware requirements for this template are the same as those for ArcGIS Runtime SDK for Java. See the Runtime SDK documentation for more information.

Software Requirements

Quick Start Instructions

This section is for developers who just need to quickly build and run the application.

Verify your development environment

Build and run the application

Release Notes

4.1.1

What's New in Vehicle Commander 4.1.1

4.1.0

What's New in Vehicle Commander 4.1.0

4.0.0

What's New in Vehicle Commander 4.0.0

10.2.3

What's New in Vehicle Commander 10.2.3

10.2

What’s New in Vehicle Commander 10.2

10.1.1

What’s New in Vehicle Commander 10.1.1

Detailed Instructions

This section contains more detailed instructions that will help you learn more about the Vehicle Commander application. This part is divided into the following sections:

Configuring the Build

  1. (Optional) If you want to open map packages and/or run viewshed analysis in the compiled application, you need to use an ArcGIS Runtime license string. Copy your license string from the ArcGIS Runtime SDK License Viewer. Open the class com.esri.vehiclecommander.VehicleCommanderJFrame Java source file. Look for the BUILT_IN_LICENSE_STRING static field, and paste your license string as the value of this field. (Alternatively, you can pass a license string as a command line argument to the application.)
  2. (Optional) If you want to run viewshed analysis in the compiled application, you need to use an ArcGIS Runtime Spatial Analyst license string. Copy your license string from the ArcGIS Runtime SDK License Viewer. Open the class com.esri.vehiclecommander.VehicleCommanderJFrame Java source file. Look for the BUILT_IN_EXTS_STRING static field, and paste your license string as the value of this field.
  3. Build the application for deployment using Ant with the build.xml file in source/VehicleCommander:

    C:\vehicle-commander\source\VehicleCommander>ant deploy

If you wish to use an IDE, configure it to use the included Ant build.xml script for best results. For Eclipse, you may wish to follow the documentation on installing the ArcGIS Runtime SDK Eclipse plugin. For NetBeans, you must mount all the JARs in /SDK/jars, using a NetBeans Ant library or adding JARs directly to your project.

Note: if you wish to run the application from your IDE on Linux, you must run the initialization shell script found in , and then run your IDE from the same shell. If desired, you can automate running this script using /etc/profile or ~/.bash_profile.

Notes on Submodules Used by the Repo

Vehicle Commander leverages the following as a submodule of the vehicle-commander repository.

If you should want to update to the latest commit instead of the commit used by the vehicle-commander commit you're using, you can open a GitHub shell in vehicle-commander and run the following:

$ cd .\source\military-apps-library-java
$ git pull origin master

Deploying the Application

  1. Using the directions in Quick Start Instructions, build the Vehicle Commander application using ant deploy. This will build the application.
  2. Add an ArcGIS Runtime deployment to the application/VehicleCommander directory. The simplest way is to use the ArcGISRuntime{Version} directory that came with the prebuilt template from ArcGIS Online in the application/VehicleCommander. You can also create an ArcGIS Runtime deployment with the the ArcGIS Runtime SDK Deployment Builder. If you create your own:
    • Include at least Local Server, GPS, and Military Message Processing (MIL2525C).
    • If you want to run viewshed analysis, include Geoprocessing and Spatial Analyst.
    • In a file browser or shell, navigate to source/VehicleCommander and copy all the afm*.json files to your deployment’s ArcGISRuntime{Version}/resources/symbols/mil2525c/messagetypes directory. The Ant build script will do this for you if your ArcGIS Runtime deployment is in applications/VehicleCommander/ArcGISRuntime{Version}.
  3. Your application deployment should contain at least the following:
    • ArcGISRuntime{Version} directory (ArcGIS Runtime deployment)
    • lib directory (populated by Ant build script)
    • ArcGIS Runtime SDK JAR files from /SDK/jars
    • beansbinding-1.2.1.jar from source/VehicleCommander/lib
    • mapconfig.xml file from source/VehicleCommander (populated by Ant build script)
    • VehicleCommander.jar file compiled using directions in Quick Start
  4. Edit your copy of mapconfig.xml as instructed in the user guide.
  5. (Optional) If you want to set initial user settings using appconfig.xml, copy it from source\VehicleCommander\src\com\esri\vehiclecommander\resources to your application directory, alongside VehicleCommander.jar. (If appconfig.xml is absent the first time the application runs, the application will use default values. The user can change these values in the running application, as described in the user guide.) Open appconfig.xml in your application directory. You can set the following:
    • User name: a display name for position updates the Vehicle Commander application sends to other applications. This name does not need to be unique. Set the value of the element’s name attribute to the desired user name.
    • User ID: an ID that uniquely identifies the user in position updates that the Vehicle Commander application sends to other applications. The ID should be unique among other machines that will be able to send and receive position updates with this machine. It is recommended, though not required, that the value be a GUID. Set the value of the <user> element’s id attribute to the desired unique ID.
    • User code: a MIL-STD-2525C 15-character SIC code that the Vehicle Commander application will include in the position reports it sends. Set the value of <code>to the desired SIC.
    • Messaging port: the UDP port on which the Vehicle Commander sends and receives position reports. Set the value of to the desired port number. Vehicle Commander will receive messages from GeoEvent Simulator instances that send messages over this port. It will send and receive messages to and from instances of Vehicle Commander and Squad Leader, and it will send messages to the GeoMessage Adapter for ArcGIS GeoEvent Extension for Server. Note that this port needs to be open in your firewall in order to see military messages on the map.
    • Messaging interval: the number of milliseconds the Vehicle Commander will wait between sending out its position reports. Set the value of to the desired number of milliseconds.
    • GPS type: “simulated” for simulated GPS, or “onboard” for serial GPS. The default is “simulated.” Set the value of the element’s type attribute to the desired GPS type. [Is this installed in the Dev versions? needs a link to where to get it, unless it is in the GIT pakage, in which case we need to include it in the Template Contents section]
    • GPS GPX file: the filename of a GPX file to use when GPS type is “simulated.” Set the value of the element’s gpx attribute to the filename. If absent and the GPS type is “simulated,” the application uses a built-in GPS file over Jalalabad, Afghanistan.
    • GPS speed multiplier: a multiplier for simulated GPS speed. The default is 1 (actual speed). 0.5 means half-speed, and 2 means double-speed. Set the value of the element’s speedMultiplier attribute to the desired GPS speed multiplier.

Using the Application

See the user guide for details on running and using Vehicle Commander.

Conclusion

You can use the Vehicle Commander application as-is for in-vehicle situations. You can also use the Vehicle Commander application as a starting point for your own application development. Refer to the ArcGIS Runtime SDK for Java documentation, as well as the ArcGIS Runtime SDK for Java Resource Center, in order to get the most out of ArcGIS Runtime.

Resources

Issues

Find a bug or want to request a new feature? Please let us know by submitting an issue.

Known Issues

Contributing

Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.

Licensing

Copyright 2012-2015 Esri

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

A copy of the license is available in the repository's license.txt file.

Note: Portions of this code use Beans Binding (JSR-295) which is licensed under GNU Lesser General Public License 2.1. See license-ThirdParty.txt for the details of this license or visit the Beans Binding project for more details