Defining the residual listing format

The listing of residuals is generally the most important component of the output. In SNAP you can choose what information you want in that listing and how it is to be laid out. The commands that control this section are:

define_residual_format: Defines the data that will be included in the residual listing (described below)

add_residual_column: Appends additional columns to the residual listing (described below)

output_precision: Specifies the precision used to list the observations and residuals

error_type: Chooses a priori or a posteriori errors

flag_significance: Defines the significance at which residuals are flagged as being potential errors

redundancy_flag_level: Defines the level at which a warning flag is shown for observations with low redundancy

sort_observations: specifies the order in which the observations are presented.

file_location_frequency: Specifies how frequently in the listing the input data file and line number are listed

The define_residual_format and add_residual_column commands define the columns that will be output for each data type. define_residual_format creates an entirely new format, whereas add_residual_column extends the existing formats. The syntax for these two commands is identical:

define_residual_format data_types columns
add_residual_column data_types columns

In these commands data_types specifies the data types for which the format applies. This can be any of the data type codes (e.g. HA, SD, GB), or it can be ALL (all data types), POINT (point data types - latitude and longitude), LINE (line data types such as angles and distances), or VECTOR (vector data types, currently only GPS). You can also combine several data types separating them with a / character, e.g. ED/SD/HD.

The columns parameter specifies the data to be output in the residual listing. Each column in the output is specified by a string of the form

field_name:width:title1:title2

Here field is the name of the field to output (see table below), width is the number of characters allowed for the field in the residual listing, and title1 and title2 are the titles used to head the output columns. The width and titles do not need to be specified - SNAP will choose defaults for these.

The column definition cannot include any blank characters. To put a blank into the title use an underscore character in the definition. If you need an underscore, colon, or backslash in the title then these must be preceded by a backslash in the definition. As a rather contrived example, the definition

from:12:Obs_station\::\\code\_name

would create a column 12 characters wide listing the instrument station codes and headed

Obs station: \code_name

By default a single blank character is inserted between each output field. If you want to insert extra space, you can do this with the field specification S:n, where n is the number of spaces to leave. You can also spread the information over more than one line by using the NL field specification to start a new line.

Here is an example of a simple residual listing format:

define_residual_format line from to type res_val res_err alt_res std_res flags

The add_residual_column command can be used to add a column to the default format, or to build up the format where it cannot easily be represented on just one line of the command file. (That is, you can start a format with the define_residual_format command, and add each column with the add_residual_column command).

An example of this command to add part per million residuals to distance observations would be

add_residual_column sd/hd/ed alt_res:8:ppm:residual

The following fields can be included in the residuals listing.

Field name Contents
from Station code of the instrument station
to Station code of the target station
from_name Station name of the instrument station
to_name Station name of the target station
hgt_inst Height of the instrument
hgt_trgt Height of the target
type Code for the type of observation (e.g. SD, HA...)
date Date of the observation if known
file Name of the source data file
file_no Number of the source data file
line_no Line number of the observation in the data file
obs_val Observed value
obs_err Error of the observed value
calc_val Calculated value
calc_err Error of the calculated value
res_val Residual
res_err Error of the residual
alt_res Alternative representation of the residual
std_res Standardized residual
redundancy Redundancy factor of the observation
mde Marginal detectable error
flags Significant residual and rejected observation flags
azimuth Azimuth of the line
prj_azimuth Projection azimuth (blank for geodetic coordinate files)
hgt_diff Height difference on the line
arc_dist Ellipsoidal arc distance of the line
slp_dist Slope distance of the line
C=xxxx The xxxx classification of the observation
S a blank space
NL start a new line

The alternative representation of the residual (alt_res) depends upon the data type. For distances, height differences, and GPS baselines it gives the error in part per million of the line length. For horizontal angles and azimuths it the equivalent horizontal offset perpendicular to the line. For zenith distances it is the equivalent error in the height difference.

See also:

The output_precision command

The error_type command

The flag_significance command

The redundancy_flag_level command

The sort_observations command

The file_location_frequency command

Command file syntax

Alphabetical list of commands

Summary of commands by function