plotAAC
Description
plotAAC is an interactive plotting utility designed to visualize data from AAC (Applanix Attitude and Navigation Controller) Ring Laser Gyro (RLG) systems. It reads binary data files containing various navigation and motion parameters (e.g., time, position, velocity, acceleration, angular rates, roll, pitch, heading, heave errors) and generates time-series plots.
The tool allows users to select which parameters to plot, define plotting ranges, and can overlay data from multiple sources (e.g., primary RLG, HIPPY, TSSB systems). It also applies simple filtering for spike removal.
Usage
plotAAC -infile <file1> [-outfile <filename.meta>] [-size <dx> <dy>] [-vref] [-sens] [-xrange <min> <max>]
Arguments
| Option | Description | |
|---|---|---|
-infile <file1> | Required. Specifies the base name for the input binary data files (e.g., bet will look for bet.out, hippmbet.out, tssbmbet.out). | |
-outfile <filename.meta> | Specifies the output PostScript metafile name. | plot.meta |
-size <dx> <dy> | Specifies the total plot size in centimeters (X and Y dimensions). | 20.0 25.0 |
-vref | Selects a specific set of parameters for plotting (VREF, noval=17). | |
-sens | Selects a specific set of parameters for plotting (SENS, noval=5). | |
-sparse | (Present in USAGE but not fully implemented) Likely intended for sparse plotting. | |
-xrange <min> <max> | Sets the X-axis (time since start of window) range for the plot. | Auto-determined. |
-v | Enable verbose output (not explicitly used). |
Interactive Mode
After launching, plotAAC will guide the user through a series of prompts:
- Plotting Area Dimensions: Prompts for the maximum dimensions of the plotting area (
dx,dyin cm). - Number of Plots (
noplots): Prompts for how many plots (time series of different parameters) to create. - Y-axis Bounds (per plot): For each plot, it prompts for Y-axis minimum (
ymin[i]) and maximum (ymax[i]) values. - Parameter Selection: For each plot, it presents a menu of available parameters from the RLG, HIPPY, and TSSB systems and prompts the user to choose which parameter to plot.
- Continue Plotting: After plotting the selected parameters for one plot, it asks if the user wants to plot another line in the current graph.
How It Works
- Initialization: Parses command-line arguments to set plotting options and input filenames. Initializes a
plotlibPostScript output (plot.meta). - Data Loading:
- Opens three binary input files:
bet.out(main RLG data),hippmbet.out(HIPPY data), andtssbmbet.out(TSSB data). - Reads
range(number of records) from the file sizes. - Reads all data from these three files into a 2D array
values[parameter_index][record_index]. - Performs unit conversions (e.g., radians to degrees, m/s² to g’s) on the loaded data.
- Applies a simple spike removal filter to TSSB roll error.
- Calculates
Clean Horizontal VelocityandFiltered TSSB Roll Error.
- Opens three binary input files:
- Plot Generation (using
plotliblibrary):- Calls
plot_opento initialize the PostScript output. - Sets up the overall plot dimensions (
xlength,ylength,xoff). - Iterates through each graph (
ifrom0tonoplots - 1):- Draws the main plot border.
- Draws X and Y grid lines and labels.
- Parameter Selection: Prompts the user to choose a parameter to plot from a menu.
- Data Plotting: Iterates through
nopoints(records):- Extracts
xval(time) andyval(chosen parameter). - If
xvalandyvalare within their respective plot bounds, it draws a line segment from the previous point to the current point.
- Extracts
- Adds labels for the plotted parameter.
- Calls
- Cleanup: Calls
plot_closeto finalize the PostScript output and closes input files.
Output Files
<outfile_name>: A PostScript metafile (.meta) containing time-series plots of the selected parameters.
Dependencies
plotlib.h: Forplotlibfunctions.support.h: For general utility functions.math.h: For mathematical functions.
Notes
plotAAC is a valuable tool for quality control and detailed analysis of RLG/GNSS motion data, allowing for visual inspection of navigation and attitude parameters. The interactive mode enables flexible selection of parameters and plotting ranges. The tool applies some basic filtering to improve data quality for visualization. The input binary format is specific to AAC data.