From 04de6b5fc619804e12c4db139e9f2bd412fe2157 Mon Sep 17 00:00:00 2001 From: Chris Crook Date: Thu, 23 Nov 2023 21:54:28 +1300 Subject: [PATCH] feat: gps_antenna_height command --- linux/makefile | 3 +- .../snap/check/testom40/testom40.lst | 154 ++++ regression_tests/snap/in/testom40.snp | 31 + src/dat2site/dat2site.c | 1 + .../files/cmdcfg/cmd_alphabetic_summary.html | 680 ++++++++-------- .../files/cmdcfg/cmd_function_summary.html | 767 +++++++++--------- .../files/cmdcfg/cmd_gps_antenna_height.html | 61 ++ src/snap/control.c | 1 + src/snaplib/snap/cfgprocs.c | 13 +- src/snaplib/snapdata/obsmod.c | 25 +- src/snaplib/snapdata/obsmod.h | 1 + src/snapplot/plotcmd.c | 1 + 12 files changed, 1025 insertions(+), 713 deletions(-) create mode 100644 regression_tests/snap/check/testom40/testom40.lst create mode 100644 regression_tests/snap/in/testom40.snp create mode 100644 src/help/help/files/cmdcfg/cmd_gps_antenna_height.html diff --git a/linux/makefile b/linux/makefile index c5681bf3..9b77da59 100644 --- a/linux/makefile +++ b/linux/makefile @@ -33,9 +33,8 @@ BOOSTRELIB=$(shell find /usr/lib -name libboost_regex.a) BOOSTSYSLIB=$(shell find /usr/lib -name libboost_system.a) ifeq ($(type),debug) -#LDFLAGS = -lm -lboost_regex LDFLAGS = $(BOOSTFSLIB) $(BOOSTRELIB) $(BOOSTSYSLIB) -lm -lpthread -#LDFLAGS = -lm -lboost_regex -lpthread -lefence +#LDFLAGS = $(LDFLAGS) -lefence LDWXFLAGS = $(BOOSTFSLIB) $(BOOSTRELIB) $(BOOSTSYSLIB) -lm CCPARAM = -Wall -g -fpermissive -std=c++0x $(WXFLAGS) MACROS = UNIX CHECKBLT diff --git a/regression_tests/snap/check/testom40/testom40.lst b/regression_tests/snap/check/testom40/testom40.lst new file mode 100644 index 00000000..518465e1 --- /dev/null +++ b/regression_tests/snap/check/testom40/testom40.lst @@ -0,0 +1,154 @@ +================================================================================ + + PROGRAM SNAP Version 2.8.6-5cc438d6 + + Survey Network Adjustment Program + + Copyright: Land Information New Zealand + Author: Chris Crook + Version date: Nov 19 2023 17:30:07 + +================================================================================ + Run at 23-NOV-2023 21:23:56 by ccrook + + +The command file testom40.snp contains: + title Regression test om30 - obs modifications - GX offset reweighting + + coordinate_file testom30.crd ! Comment to be ignored + data_file testom30.dat + + mode 3d data_check + error_type apriori + + list command_file + list file_summary + list no_observation_equations + list residuals + list no_solution_summary + list no_iteration_summary + list no_station_coordinates + list no_reference_frames + list no_parameters + list no_worst_residuals + list no_notes + list no_file_locations + list no_distance_ratio_scales + list no_error_summary + output no_coordinate_file + + gps_antenna_height 0.5 m data_type=GX using_stations 2 4 + gps_antenna_height 0.8 m data_type=GX using_stations 3 + gps_antenna_height 0.6 m data_type=GB using_stations 1 + gps_antenna_height 0.3 m data_type=GB using_stations 2 + + + + + + + +================================================================================ +Regression test om30 - obs modifications - GX offset reweighting 23-NOV-2023 21:23:56 + + SUMMARY OF INPUT FILES + +================================================================================ + + +Program options read from testom40.snp + +Job: Regression test om30 - obs modifications - GX offset reweighting + + +Solution type: 3d data checking + + +Coordinates file testom30.crd + 5 stations read + +Data file 1: testom30.dat + 6 observations do not have a date + 1 GPS baseline + 5 GPS point coords + +Antenna offset 0.800 m applied to the following GX/GB observations + Observations: + - which are of type GX (GPS point coord), and + - which use stations 3 + +Antenna offset 0.600 m applied to the following GX/GB observations + Observations: + - which are of type GB (GPS baseline), and + - which use stations 1 + +Antenna offset 0.500 m applied to the following GX/GB observations + Observations: + - which are of type GX (GPS point coord), and + - which use stations 2 4 + +Antenna offset 0.300 m applied to the following GX/GB observations + Observations: + - which are of type GB (GPS baseline), and + - which use stations 2 + + + +================================================================================ +Regression test om30 - obs modifications - GX offset reweighting 23-NOV-2023 21:23:56 + + OBSERVATION RESIDUALS + +================================================================================ + +This table lists apriori errors +Residuals outside the 95.000% confidence limit are flagged ? +Residuals outside the 99.000% confidence limit are flagged ??? + +Significance is based on the Normal distribution function + +Rejected observations are flagged * +Observations to or from rejected stations are flagged # +Observations with redundancy less than 0.10 are flagged @ + +Vector residual east, north, up directions are calculated at baseline midpoint + +The following codes are used to identify data types + GB GPS baselines + GX GPS point coords + +From Type Value +/- Calc +/- Res +/- S.R. + X,Y,Z X,Y,Z E,N,U + +1 GX -4787185.5859 0.0982 -4787185.5859 0.0000 0.0000 0.0400 0.00 + 560571.4708 0.0414 560571.4708 0.0000 -0.0000 0.0600 0.00 + -4163474.5066 0.0908 -4163474.5066 0.0000 -0.0000 0.1200 0.00 + 6369137.0039 6369137.0039 0.0000 0.00 + +2 GX -4787763.2856 0.0982 -4787763.6604 0.0000 0.0000 0.0400 0.00 + 560046.1603 0.0414 560046.2041 0.0000 0.0000 0.0600 0.00 + -4163037.2916 0.0908 -4163037.6197 0.0000 -0.5000 0.1200 4.17 ??? + 6369239.2381 6369239.7381 0.5000 2.41 ??? + +3 GX -4787604.8448 0.0982 -4787605.4444 0.0000 0.0000 0.0400 0.00 + 559604.1132 0.0414 559604.1833 0.0000 0.0000 0.0600 0.00 + -4163002.9955 0.0908 -4163003.5204 0.0000 -0.8000 0.1200 6.67 ??? + 6369058.8672 6369059.6672 0.8000 3.85 ??? + +4 GX -4787185.5859 0.0982 -4787185.9606 0.0000 0.0000 0.0400 0.00 + 560571.4708 0.0414 560571.5147 0.0000 -0.0000 0.0600 0.00 + -4163474.5066 0.0908 -4163474.8347 0.0000 -0.5000 0.1200 4.17 ??? + 6369137.0039 6369137.5039 0.5000 2.41 ??? + +5 GX -4787763.2856 0.0982 -4787763.2856 0.0000 0.0000 0.0400 0.00 + 560046.1603 0.0414 560046.1603 0.0000 0.0000 0.0600 0.00 + -4163037.2916 0.0908 -4163037.2916 0.0000 0.0000 0.1200 0.00 + 6369239.2381 6369239.2381 0.0000 0.00 + +From To Type Value +/- Calc +/- Res +/- S.R. + X,Y,Z X,Y,Z E,N,U + +1 2 GB* -577.6997 0.0982 -577.4749 0.0000 -0.0000 0.0400 0.00 * + -525.3105 0.0414 -525.3369 0.0000 -0.0000 0.0600 0.00 * + 437.2150 0.0908 437.4119 0.0000 0.3000 0.1200 2.50 *? + 894.8994 894.8660 0.3000 1.44 * diff --git a/regression_tests/snap/in/testom40.snp b/regression_tests/snap/in/testom40.snp new file mode 100644 index 00000000..649c19df --- /dev/null +++ b/regression_tests/snap/in/testom40.snp @@ -0,0 +1,31 @@ +title Regression test om30 - obs modifications - GX offset reweighting + +coordinate_file testom30.crd ! Comment to be ignored +data_file testom30.dat + +mode 3d data_check +error_type apriori + +list command_file +list file_summary +list no_observation_equations +list residuals +list no_solution_summary +list no_iteration_summary +list no_station_coordinates +list no_reference_frames +list no_parameters +list no_worst_residuals +list no_notes +list no_file_locations +list no_distance_ratio_scales +list no_error_summary +output no_coordinate_file + +gps_antenna_height 0.5 m data_type=GX using_stations 2 4 +gps_antenna_height 0.8 m data_type=GX using_stations 3 +gps_antenna_height 0.6 m data_type=GB using_stations 1 +gps_antenna_height 0.3 m data_type=GB using_stations 2 + + + diff --git a/src/dat2site/dat2site.c b/src/dat2site/dat2site.c index cba30f20..73a5a8e3 100644 --- a/src/dat2site/dat2site.c +++ b/src/dat2site/dat2site.c @@ -2954,6 +2954,7 @@ static config_item snap_commands[] = {"data_file",NULL,CFG_ABSOLUTE,0,load_data_file,CFG_REQUIRED,1}, {"recode",NULL,CFG_ABSOLUTE,0,read_recode_command,0,1}, {"include",NULL,CFG_ABSOLUTE,0,read_include_file,0,0}, + // {"gps_antenna_height",NULL,CFG_ABSOLUTE,0,read_obs_modification_command,0,OBS_MOD_ANTENNA_OFFSET}, {NULL} }; diff --git a/src/help/help/files/cmdcfg/cmd_alphabetic_summary.html b/src/help/help/files/cmdcfg/cmd_alphabetic_summary.html index 645a9e0e..8b38ab97 100644 --- a/src/help/help/files/cmdcfg/cmd_alphabetic_summary.html +++ b/src/help/help/files/cmdcfg/cmd_alphabetic_summary.html @@ -1,347 +1,355 @@ + - - -Alphabetical list of commands - + + + Alphabetical list of commands + -

Alphabetical list of commands

- -

Commands marked with an asterisk may be used in a configuration file. There is also a list of commands by function.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CommandDescription
acceptDefine accepted (not rejected) stations
add_coordinate_fileAdds information from a secondary coordinate file
add_residual_column*Modify the layout of the residual listing
bearing_orientation_errorDefine handling of bearing orientation errors
classification(deprecated) Modify observations based on classifications.
configurationInclude settings from configuration file
convergence_tolerance*Set the convergence tolerance
coordinate_fileDefine coordinate file
coordinate_precision*Define the precision of listed coordinates
data_fileDefine a data file
default_refraction_coefficient*Set the default refraction coefficient
define_residual_format*Define the layout of the residual listing
deformationDefines a deformation model to apply in the adjustment
distance_scale_errorDefine handling of distance scale errors
error_type*Define error type, apriori or aposteriori
file_location_frequency*Define source location information in listing
fixDefine fixed stations
flag_significance*Set significance at which residuals are flagged
floatDefine floated stations
freeDefine free (not fixed) stations
geoid*Defines a geoid model to apply in the adjustment
gps_vertical*Define handling of GPS covariances
horizontal_float_error*Set horizontal error for float stations
ignoreDefine ignored stations
ignore_observationsDefine observations that will be ignored (not read from the data file)
ignore_missing_stations*Allows missing stations in data files
includeRead information from another command file
list*Define options for list file
max_adjustment*Set the maximum change to a station position
max_iterations*Set the maximum number of iterations
mde_power*Set the power used to calculate the marginal detectable error
min_iterations*Set the minimum number of iterations
mode*Set the adjustment mode
number_of_worst_residuals*Define number of bad residuals identified
output*Define additional output files such as SINEX files and covariance output files.
output_coordinate_fileSpecifies the name of the output coordinate file
output_csv*Output CSV files of station and observation data
output_precision*Define the precision of data in the listing
plotUsed by the plot program
printDefine options for list file
proj_bearing_use_datumDefine how projection bearings are calculated
recodeDefines recoding of a station code as it is read from data files
redundancy_flag_level*Set maximum redundancy that is flagged
reference_frameDefine handling of GPS reference frames
reference_frame_scale_errorDefine the reference frame scale error
refraction_coefficientDefine handling of refraction coefficients
rejectDefine rejected stations
reject_observationsDefine observations that will be rejected (not used to calculate coordinates)
reorder_stations*Define handling of bandwidth minimization
reweight_observationsDefine reweighting of observations
set_observation_optionSets options affecting how observations are used in the adjustment.
sort_observations*Define how observations are sorted
specification*Define a relative accuracy specification
spec_test_options*Define options controlling the tests
station_code_width*Define number of characters in station code
station_offset_fileDefines a time series of offsets or deformation applying at stations
summarize_errors_by*Define error summary
systematic_errorDefine handling of systematic errors
test_specificationDefine which stations to apply accuracy tests to.
titleDefine job title for output
topocentreDefine network topocentre
use_distance_ratios*Define handling of distance ratio data
use_zero_inverseDo not calculate the inverse of the normal equations
vertical_float_errorSet vertical error for float stations
+

Alphabetical list of commands

+ +

Commands marked with an asterisk may be used in a configuration file. There is also a + list of commands by function.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CommandDescription
acceptDefine accepted (not rejected) stations
add_coordinate_fileAdds information from a secondary coordinate file
add_residual_column*Modify the layout of the residual listing
bearing_orientation_errorDefine handling of bearing orientation errors
classification(deprecated) Modify observations based on classifications.
configurationInclude settings from configuration file
convergence_tolerance*Set the convergence tolerance
coordinate_fileDefine coordinate file
coordinate_precision*Define the precision of listed coordinates
data_fileDefine a data file
default_refraction_coefficient*Set the default refraction coefficient
define_residual_format*Define the layout of the residual listing
deformationDefines a deformation model to apply in the adjustment
distance_scale_errorDefine handling of distance scale errors
error_type*Define error type, apriori or aposteriori
file_location_frequency*Define source location information in listing
fixDefine fixed stations
flag_significance*Set significance at which residuals are flagged
floatDefine floated stations
freeDefine free (not fixed) stations
geoid*Defines a geoid model to apply in the adjustment
gps_vertical*Adds a specified antenna height to GPS observations
gps_vertical*Define handling of GPS covariances
horizontal_float_error*Set horizontal error for float stations
ignoreDefine ignored stations
ignore_observationsDefine observations that will be ignored (not read from the data file)
ignore_missing_stations*Allows missing stations in data files
includeRead information from another command file
list*Define options for list file
max_adjustment*Set the maximum change to a station position
max_iterations*Set the maximum number of iterations
mde_power*Set the power used to calculate the marginal detectable error
min_iterations*Set the minimum number of iterations
mode*Set the adjustment mode
number_of_worst_residuals*Define number of bad residuals identified
output*Define additional output files such as SINEX files and covariance output files.
output_coordinate_fileSpecifies the name of the output coordinate file
output_csv*Output CSV files of station and observation data
output_precision*Define the precision of data in the listing
plotUsed by the plot program
printDefine options for list file
proj_bearing_use_datumDefine how projection bearings are calculated
recodeDefines recoding of a station code as it is read from data files
redundancy_flag_level*Set maximum redundancy that is flagged
reference_frameDefine handling of GPS reference frames
reference_frame_scale_errorDefine the reference frame scale error
refraction_coefficientDefine handling of refraction coefficients
rejectDefine rejected stations
reject_observationsDefine observations that will be rejected (not used to calculate coordinates)
reorder_stations*Define handling of bandwidth minimization
reweight_observationsDefine reweighting of observations
set_observation_optionSets options affecting how observations are used in the adjustment.
sort_observations*Define how observations are sorted
specification*Define a relative accuracy specification
spec_test_options*Define options controlling the tests
station_code_width*Define number of characters in station code
station_offset_fileDefines a time series of offsets or deformation applying at stations
summarize_errors_by*Define error summary
systematic_errorDefine handling of systematic errors
test_specificationDefine which stations to apply accuracy tests to.
titleDefine job title for output
topocentreDefine network topocentre
use_distance_ratios*Define handling of distance ratio data
use_zero_inverseDo not calculate the inverse of the normal equations
vertical_float_errorSet vertical error for float stations
- + + \ No newline at end of file diff --git a/src/help/help/files/cmdcfg/cmd_function_summary.html b/src/help/help/files/cmdcfg/cmd_function_summary.html index 8e4b2228..80750ecb 100644 --- a/src/help/help/files/cmdcfg/cmd_function_summary.html +++ b/src/help/help/files/cmdcfg/cmd_function_summary.html @@ -1,382 +1,407 @@ + - - -Summary of commands by function - + + + Summary of commands by function + -

Summary of commands by function

- -

Commands marked with an asterisk may be used in a configuration file

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Station selection
coordinate_fileDefine coordinate file
add_coordinate_fileAdds information from a secondary coordinate file
station_offset_fileDefines a time series of offsets or deformation applying at stations
topocentreDefine network topocentre
fixDefine fixed stations
freeDefine free (not fixed) stations
floatDefine floated stations
horizontal_float_error*Set horizontal error for float stations
vertical_float_error*Set vertical error for float stations
rejectDefine rejected stations
ignoreDefine ignored stations
acceptDefine accepted (not rejected) stations
*ignore_missing_stationsAllows missing stations in data files
  
Input data 
data_fileDefine a data file
reweight_observationsDefine reweighting of observations
reject_observationsDefine observations that will be rejected (not used to calculate coordinates)
ignore_observationsDefine observations that will be ignored (not read from the data file)
recodeDefines recoding of a station code as it is read from data files
gps_vertical*Define handling of GPS covariances
classification(deprecated) Modify observations based on classifications.
  
Additional parameters 
refraction_coefficientDefine handling of refraction coefficients
default_refraction_coefficient*Set the default refraction coefficient
distance_scale_errorDefine handling of distance scale errors
bearing_orientation_errorDefine handling of bearing orientation errors
systematic_errorDefine handling of systematic errors
reference_frame_scale_errorDefine the reference frame scale error
reference_frameDefine handling of GPS reference frames
  
Adjustment options 
mode*Set the adjustment mode
convergence_tolerance*Set the convergence tolerance
max_iterations*Set the maximum number of iterations
min_iterations*Set the minimum number of iterations
max_adjustment*Set the maximum change to a station position
reorder_stations*Define handling of bandwidth minimization
use_zero_inverseDo not calculate the inverse of the normal equations
geoid*Defines a geoid model to apply in the adjustment
deformationDefines a deformation model to apply in the adjustment
set_observation_optionSets options affecting how observations are used in the adjustment.
use_distance_ratios*Define handling of distance ratio data
proj_bearing_use_datumDefine how projection bearings are calculated
  
Output options 
titleDefine job title for output
list*Define options for list file
print*Define options for list file
output_coordinate_fileSpecifies the name of the output coordinate file
output*Define additional output files such as SINEX files and covariance output files.
output_csv*Output CSV files of station and observation data
define_residual_format*Define the layout of the residual listing
add_residual_column*Modify the layout of the residual listing
output_precision*Define the precision of data in the listing
coordinate_precision*Define the precision of listed coordinates
sort_observations*Define how observations are sorted
station_code_width*Define number of characters in station code
file_location_frequency*Define source location information in listing
number_of_worst_residuals*Define number of bad residuals identified
flag_significance*Set significance at which residuals are flagged
redundancy_flag_level*Set maximum redundancy that is flagged
mde_power*Set the power used to calculate the marginal detectable error
summarize_errors_by*Define error summary
error_type*Define error type, apriori or aposteriori
  
Testing accuracy specifications 
specification*Define a relative accuracy specification
test_specificationDefine which stations to test
spec_test_options*Define options controlling the tests
  
Miscellaneous commands 
configurationInclude settings from configuration file
includeRead information from another command file
plotUsed by the plot program
+

Summary of commands by function

+ +

Commands marked with an asterisk may be used in a configuration file

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Station selection
coordinate_fileDefine coordinate file
add_coordinate_fileAdds information from a secondary coordinate file
station_offset_fileDefines a time series of offsets or deformation applying at stations
topocentreDefine network topocentre
fixDefine fixed stations
freeDefine free (not fixed) stations
floatDefine floated stations
horizontal_float_error*Set horizontal error for float stations
vertical_float_error*Set vertical error for float stations
rejectDefine rejected stations
ignoreDefine ignored stations
acceptDefine accepted (not rejected) stations
*ignore_missing_stationsAllows missing stations in data files
  
Input data 
data_fileDefine a data file
reweight_observationsDefine reweighting of observations
reject_observationsDefine observations that will be rejected (not used to calculate coordinates)
ignore_observationsDefine observations that will be ignored (not read from the data file)
recodeDefines recoding of a station code as it is read from data files
gps_vertical*Adds a specified antenna height to GPS observations
gps_vertical*Define handling of GPS covariances
classification(deprecated) Modify observations based on classifications.
  
Additional parameters 
refraction_coefficientDefine handling of refraction coefficients
default_refraction_coefficient*Set the default refraction coefficient
distance_scale_errorDefine handling of distance scale errors
bearing_orientation_errorDefine handling of bearing orientation errors
systematic_errorDefine handling of systematic errors
reference_frame_scale_errorDefine the reference frame scale error
reference_frameDefine handling of GPS reference frames
  
Adjustment options 
mode*Set the adjustment mode
convergence_tolerance*Set the convergence tolerance
max_iterations*Set the maximum number of iterations
min_iterations*Set the minimum number of iterations
max_adjustment*Set the maximum change to a station position
reorder_stations*Define handling of bandwidth minimization
use_zero_inverseDo not calculate the inverse of the normal equations
geoid*Defines a geoid model to apply in the adjustment
deformationDefines a deformation model to apply in the adjustment
set_observation_optionSets options affecting how observations are used in the adjustment.
use_distance_ratios*Define handling of distance ratio data
proj_bearing_use_datumDefine how projection bearings are calculated
  
Output options 
titleDefine job title for output
list*Define options for list file
print*Define options for list file
output_coordinate_fileSpecifies the name of the output coordinate file
output*Define additional output files such as SINEX files and covariance output files.
output_csv*Output CSV files of station and observation data
define_residual_format*Define the layout of the residual listing
add_residual_column*Modify the layout of the residual listing
output_precision*Define the precision of data in the listing
coordinate_precision*Define the precision of listed coordinates
sort_observations*Define how observations are sorted
station_code_width*Define number of characters in station code
file_location_frequency*Define source location information in listing
number_of_worst_residuals*Define number of bad residuals identified
flag_significance*Set significance at which residuals are flagged
redundancy_flag_level*Set maximum redundancy that is flagged
mde_power*Set the power used to calculate the marginal detectable error
summarize_errors_by*Define error summary
error_type*Define error type, apriori or aposteriori
  
Testing accuracy specifications 
specification*Define a relative accuracy specification
test_specificationDefine which stations to test
spec_test_options*Define options controlling the tests
  
Miscellaneous commands 
configurationInclude settings from configuration file
includeRead information from another command file
plotUsed by the plot program
- + + \ No newline at end of file diff --git a/src/help/help/files/cmdcfg/cmd_gps_antenna_height.html b/src/help/help/files/cmdcfg/cmd_gps_antenna_height.html new file mode 100644 index 00000000..fce4ea55 --- /dev/null +++ b/src/help/help/files/cmdcfg/cmd_gps_antenna_height.html @@ -0,0 +1,61 @@ + + + + + + + The reweight_observations command + + + + + + + +

The gps_antenna_height command

+ +

gps_antenna_height height_offset m selection_criteria

+ +

The gps_antenna_height command is used apply an antenna height to GX (GNSS coordinates) or GB (GNSS baseline) + observations. + Observations can be selected based upon observation type, observation date, stations used, and observation classifications.

+ +

The antenna height is applied by adding it to the instrument/target height.

+ +

Warning: if more than one gps_antenna_height command could apply to an observation, then the heights will be + cumulated into the instrument/target height.

+ +

This command is intended to provide a way of testing antenna height errors. Note that a reweight_observations + command specifying an uncertainty in the height information for an observation may sometimes be more + appropriate.

+ +

The height_offset value is the offset that is applied in metres.

+ +

The selection_criteriai> are the same as defined in the reject_observations command.

+ +

An example of a gps_antenna_height command is:

+ +

gps_antenna_height 0.25 data_file=obs220901.snx

+ +
+

See also:

+ +

Command file syntax

+ +

Alphabetical list of commands

+ +

Summary of commands by function

+ +

The reject_observations command

+ +

The reweight_observations command

+ +

Station lists

+ +
+ + + \ No newline at end of file diff --git a/src/snap/control.c b/src/snap/control.c index e147017e..27b76cc3 100644 --- a/src/snap/control.c +++ b/src/snap/control.c @@ -191,6 +191,7 @@ static config_item snap_commands[] = {"reweight_observations",NULL,CFG_ABSOLUTE,0,read_obs_modification_command,0,OBS_MOD_REWEIGHT}, {"reject_observations",NULL,CFG_ABSOLUTE,0,read_obs_modification_command,0,OBS_MOD_REJECT}, {"ignore_observations",NULL,CFG_ABSOLUTE,0,read_obs_modification_command,0,OBS_MOD_IGNORE}, + {"gps_antenna_height",NULL,CFG_ABSOLUTE,0,read_obs_modification_command,0,OBS_MOD_ANTENNA_OFFSET}, {"sort_observations",NULL,CFG_ABSOLUTE,0,read_sort_option,CONFIG_CMD,0}, {"summarize_errors_by",NULL,CFG_ABSOLUTE,0,read_error_summary,CONFIG_CMD,0}, {"summarise_errors_by",NULL,CFG_ABSOLUTE,0,read_error_summary,CONFIG_CMD,0}, diff --git a/src/snaplib/snap/cfgprocs.c b/src/snaplib/snap/cfgprocs.c index 88e61db8..2c076852 100644 --- a/src/snaplib/snap/cfgprocs.c +++ b/src/snaplib/snap/cfgprocs.c @@ -438,7 +438,18 @@ int read_obs_modification_command( CFG_FILE *cfg, char *string, void *, int, int } if( ok != OK ) { - send_config_error(cfg, INVALID_DATA, "Invalid or missing data in reweight observations command"); + send_config_error(cfg, INVALID_DATA, "Invalid or missing data in reweight_observations command"); + return OK; + } + string=unread_string(&is); + } + else if( code == OBS_MOD_ANTENNA_OFFSET ) + { + input_string_def is; + set_input_string_def(&is,string); + if( double_from_string(&is,&errval1) != OK || ! test_next_string_field(&is,"m")) + { + send_config_error(cfg, INVALID_DATA, "Invalid or missing data in gps_antenna_height command"); return OK; } string=unread_string(&is); diff --git a/src/snaplib/snapdata/obsmod.c b/src/snaplib/snapdata/obsmod.c index ee71f86f..8476e1c3 100644 --- a/src/snaplib/snapdata/obsmod.c +++ b/src/snaplib/snapdata/obsmod.c @@ -833,6 +833,18 @@ static void apply_obs_criteria_action( obs_criteria *ocr, obsmod_context *oac ) { action = OBS_MOD_IGNORE; } + else if ( ocr->action & OBS_MOD_ANTENNA_OFFSET ) + { + if( (oac->tgt->type == GB || oac->tgt->type == GX) && oac->matchto ) + { + oac->tgt->tohgt += ocr->factor; + } + if( oac->tgt->type==GB && oac->matchfrom && ocr->setid != oac->obsmod->setid ) + { + ocr->setid=oac->obsmod->setid; + oac->sd->fromhgt += ocr->factor; + } + } else { action |= ocr->action; @@ -1409,7 +1421,7 @@ static void prepare_obs_modifications( obs_modifications *obsmod ) grpid[ncriteria].criteria=ocr; grpid[ncriteria].groupid=groupid; grpid[ncriteria].valueid=valueid; - if( ocr->action & (OBS_MOD_SET_OPTION | OBS_MOD_UNSET_OPTION)) continue; + if( ocr->action & (OBS_MOD_SET_OPTION | OBS_MOD_UNSET_OPTION | OBS_MOD_ANTENNA_OFFSET )) continue; obs_criterion *groupoc=nullptr; ocr->pnext=nullptr; for( obs_criterion *oc=ocr->first; oc; oc=oc->next ) @@ -1743,14 +1755,15 @@ void summarize_obs_modifications( void *pobsmod, FILE *lst, const char *prefix ) obs_modifications *obsmod = (obs_modifications *) pobsmod; if( ! obsmod ) return; - for( int modtype=0; modtype < 6; modtype++ ) + for( int modtype=0; modtype < 7; modtype++ ) { int action= modtype==0 ? OBS_MOD_IGNORE : modtype==1 ? OBS_MOD_REJECT : modtype==2 ? OBS_MOD_REWEIGHT : modtype==3 ? OBS_MOD_REWEIGHT_SET : modtype==4 ? OBS_MOD_OFFSET_ERROR : - OBS_MOD_CENTROID_ERROR; + modtype==5 ? OBS_MOD_CENTROID_ERROR : + OBS_MOD_ANTENNA_OFFSET; int ordered=modtype > 1; bool firsterr=true; double minerrfct=0.0; @@ -1823,6 +1836,12 @@ void summarize_obs_modifications( void *pobsmod, FILE *lst, const char *prefix ) fprintf(lst,"\n%sCentroid error %0.3lf %0.3lf m applied to the following observations\n", prefix, match->factor, match->factor2 ); } + else if( action == OBS_MOD_ANTENNA_OFFSET ) + { + fprintf(lst,"\n%sAntenna offset %0.3lf m applied to the following GX/GB observations\n", + prefix, match->factor ); + + } while( match ) { summarize_obs_criteria( lst, prefix, match, obsmod->classes ); diff --git a/src/snaplib/snapdata/obsmod.h b/src/snaplib/snapdata/obsmod.h index 9735c40c..807f6665 100644 --- a/src/snaplib/snapdata/obsmod.h +++ b/src/snaplib/snapdata/obsmod.h @@ -25,6 +25,7 @@ #define OBS_MOD_UNSET_OPTION 32 #define OBS_MOD_OFFSET_ERROR 64 #define OBS_MOD_CENTROID_ERROR 128 +#define OBS_MOD_ANTENNA_OFFSET 256 /* Note: network and classifications are not held by the obs_modifications object * so must remain valid for as long as the obs_modifications are used. diff --git a/src/snapplot/plotcmd.c b/src/snapplot/plotcmd.c index 852bb521..58ceaccb 100644 --- a/src/snapplot/plotcmd.c +++ b/src/snapplot/plotcmd.c @@ -73,6 +73,7 @@ static config_item snapplot_general_commands[] = {"reweight_observations",NULL,CFG_ABSOLUTE,0,read_obs_modification_command,0,OBS_MOD_REWEIGHT}, {"reject_observations",NULL,CFG_ABSOLUTE,0,read_obs_modification_command,0,OBS_MOD_REJECT}, {"ignore_observations",NULL,CFG_ABSOLUTE,0,read_obs_modification_command,0,OBS_MOD_IGNORE}, + {"gps_antenna_height",NULL,CFG_ABSOLUTE,0,read_obs_modification_command,0,OBS_MOD_ANTENNA_OFFSET}, {"recode",NULL,CFG_ABSOLUTE,0,read_recode_command,0,0}, {"plot",NULL,CFG_ABSOLUTE,0,load_plot_data,0,0}, {"include",NULL,CFG_ABSOLUTE,0,read_include_command,0,0},