Using DME Component Libraries with Matlab |
The Mathworks product MATLAB supports using Jar files as an external interface. This means that DME Component Libraries can be used from within the MATLAB environment. Help from Mathworks is located on their site here.
This topic will show you how to setup and use DME Component Libraries with MATLAB to perform some simple analysis.
You must have the following prerequisites met to integrate DME Component Libraries with MATLAB:
DME Component Libraries, Release 2009r3 or later
A valid DME Component Libraries license
Mathwork's MATLAB product, version R2009a or later installed
Sample MATLAB files located in the Examples\MATLAB directory of the DME Component Libraries install
This section will show you how to set up MATLAB using DME Component Libraries and the sample files provided with the DME Component Libraries install.
Start MATLAB.
Within MATLAB, change directories to the MATLAB directory in your DME Component Libraries install: Examples\Matlab
Open the LoadComponents.m file in the MATLAB editor.
Open your DME Component Libraries License file in any text editor (the MATLAB editor will work fine here too).
In the LoadComponents.m file, update the MATLAB string with your license information. Note that the MATLAB string containing your license must be an exact match to the license file you received from AGI, including all XML elements.
Save the LoadComponents.m file.
Open the RunComponentDemo.m file in the MATLAB Editor.
This file runs all the demos, after first loading the components libraries. You can run this file to execute all the demos at once, or can also step through each file using the Matlab debugger, seeing what each line does.
RunComponentDemo.m - Loads each file in order, running the entire demo.
LoadComponents.m - Loads DME Component Libraries into MATLAB, and activates the license. You can clear the imported Java classes using the clear java MATLAB command.
NavigationExample.m - Example DME Component Libraries code that sets up and runs the navigation examples, using the Navigation Accuracy Library. The example calculates Dilution of Precision (DOP), and assessed and predicted navigation accuracy for a single site. If you don't have a license for the Navigation Accuracy Library, simply comment out the NavigationExample line in the RunComponentDemo.m file.
DGLExample.m - This file contains example DGL code that creates an SGP4 propagator from a TLE, and a facility. It then calculates access over a three day period from that facility to the satellite using an ElevationAngleConstraint. The access times are then output to the MATLAB Command Window.