Tracking Data Provider Plugin

The Tracking Data Provider Plugin accommodates tracking data in various formats. You can use your own tracking data in any format and integrate them with the Ansys Orbit Determination Tool Kit (ODTK®) application.

Prerequisites

For the ODTK Runtime application, you need to write a tracking data provider plugin in Python. For general Python requirements (version, installation, etc.) for the ODTK application, see Python Guidance.

  • On Windows, the Python location must be in the system path.
  • On Linux, the LD_LIBRARY_PATH environment variable must be set to the Python lib folder.

How to implement a plugin

Code samples are provided for plugin development.

  • On Linux, this is at <Install_Dir>\CodeSamples\ODTKCodeSamples.zip\TrackingDataProviders\Python.
  • On Windows, this is at <Install_Dir>\CodeSamples\ODTKCodeSamples.zip\Extend\ODTK\TrackingDataProviders\Python.

Do the following to implement a tracking data provider plugin:

  • Make a copy of the CAgODProvideTrackingData_Template.py tracking data provider plugin template in the code samples folder.
  • Provide your custom implementation in functions as desired. Do not rename the class; the ODTK application will look for the plugin class to be named 'CAgODProvideTrackingData'.

A sample plugin implementation, COBTrackingDataProvider.py, is available in the code samples folder.

ODTK types available to a plugin

Various types are available to the plugin via the provided AgODPythonPluginLib module in the AgODPythonPluginLib.pyd file located in the ODTK bin folder. The module's docstring documentation, AgODPythonPluginLib_help.html, is in the code samples folder. You can also discover the types and documentation interactively from the Python console using the 'help' command. Do the following to get help on the available types:

  1. Run Python.
  2. Import the library with an 'agi' alias by typing 'import agi.odtk13.plugins.trackingdata as agi' at the Python console.
  3. List the available types by typing 'help(agi)' at the Python console.
  4. Get help for a type by typing "help(agi.<type>)" at the Python console, where <type> is the name of the type. For example, "help(agi.AgODObsSet)" will display help for the AgODObsSet class.

The Python plugin code should be running in ODTK in order to access types in code; that is, you cannot use the types in a stand-alone script.

How to register a plugin on Linux

Register a plugin on Linux using the ODTK Cross-Platform API. A sample function is available in the register_tracking_data_provider_plugin.py file in the code samples folder.

How to register a plugin on Windows

You can register a plugin on Windows using the ODTK Desktop application's user interface; ODTK Runtime on Windows uses the ODTK desktop configuration. Follow these steps to register the plugin:

  1. Run ODTK Desktop.
  2. In the Edit menu, select Preferences....
  3. Select Plugins from the left pane of the Preferences dialog box.
  4. Click Add... to add a new line to the Tracking Data Files Providers list.
  5. Click the first field in the new line, Extensions, and list the file extension(s) to which the plugin will apply. If more than one extension is listed, separate them with semicolons (;).
  6. Click the second field, Description, and add a brief description of the measurement file type(s).
  7. Click into the fourth field, PluginID, and enter "AgODPythonPlugins13.AgODProvidePythonTrackingData.1"(with no quotes).
  8. Click OK to exit the Preferences dialog.
  9. Go back into the Preferences dialog box by selecting Preferences... from the Edit menu.
  10. Select Plugins from the left pane of the Preferences dialog.
  11. Locate the row that you added from the previous steps and click its Config field (labeled "click to display") to display the Plugin Configuration dialog.
  12. Click the PythonFile field (labeled "click to edit").
  13. Select your Python plugin file.
  14. Click OK to exit the plugin configuration dialog.
  15. Click OK to exit the Preferences dialog.

Migrating Python Plugins from ODTK version 7 to ODTK version 13

In ODTK application version 13, there is a different way of loading the ODTK Python API to use Python plugins, including a few minor changes to some classes. You will need to update the following lines in ODTK 7 plugins to have them load and run successfully in ODTK application version 13.

Old ODTK version 7 plugin line New required ODTK version 13 plugin line
import AgODPythonPluginLib as agi import agi.odtk13.plugins.trackingdata as agi
AgODRealList.getItem(...) AgODRealList.item(...)
AgODTrackingIDList.getItem(...) AgODTrackingIDList.Item(...)
AgODTrackingNameList.getItem(...) AgODTrackingNameList.Item(...)