Customizing the Legend
During operation, when IRIS draws the legend
and the product type is PROD_USER, PROD_USERV, or
PROD_OTHER, it searches the out_legend.dat file.
During the search, IRIS identifies the matches:
- If it finds a match of the product type, product name, resolutions, and line number, it is considered a match.
- If it matches everything except the product name, then the first such match in the table is taken as a default for product names, and is considered a match.
- If it would otherwise match, except that the desired resolution is larger than the table, it is considered a match.
The resulting string is displayed on the legend.
You can edit the out_legend.dat file to customize the legend on user-defined products by overwriting the following lines
- The text displayed in the 5-line legend box on the window legend.
- The 6 lines above the time on the old-medium sized legend.
- The 4 lines above the time on the old-small sized legend.
-
Edit each line as needed.
The column headed by
Lstands for line: "1" means line 7 on the text legend, and "2" means line 8 on the text legend.The first entry in the table is the product type, which must be USER, VUSER, or OTHER.
-
For each line, in the
Rcolumn, edit the resolution, the number of characters on the line.- Low resolution windows can fit 13 characters
- Medium and high resolution can fit 17 characters
In general you must add 2 definitions for each string you want to control.IRIS defaults to the 11-character format for bigger displays if no 17-character entry is defined.
-
For each line, edit the flag values.
out_legend.dat Flag Values Flag Value Description SCALEA 32-bit word is grabbed from the first byte of the product header
product_specific_infofield offset by the offset in the file. This number is converted to floating point, and multiplied by the scale factor in the file.The C library routine
sprintfis called with the format statement and the resulting number as arguments.REFA pointer to the product header
product_specific_infofield offset by the offset in the file is passed tosprintf.This is useful if you want to display a character string from the header.
Neither If the flag is neither of the above, a 32-bit word is grabbed from the first byte of the product header
product_specific_infofield offset by the offset in the file without any conversion.The C library routine sprintf is called with the format statement and the 32-bit number as arguments.
For example:
# File: output_legend.dat
# Format:
# Valid flags are: SCALE, REF, <anything else>
# R=resolution, L=line, O=offset
#ptype productname R L O scale flag format
USER DEFAULT 11 1 4 0.00001 SCALE "Hght:%3.1f"
USER Z_010_120 11 1 4 0.00001 SCALE "Hght:%3.1f"
USER DEFAULT 11 2 8 1 - "Flag:%d"
USER Z_010_120 11 2 8 1 - " "
VUSER DEFAULT 11 1 4 1 - " "
USER DEFAULT 17 1 4 0.00001 SCALE "Height:%3.1f"
USER Z_010_120 17 1 4 0.00001 SCALE "Height:%3.1f"
USER DEFAULT 17 2 8 1 - "Flag:%d"
USER Z_010_120 17 2 8 1 - " "
VUSER DEFAULT 17 1 4 1 - " "
