GuidoApp check_db "CHECK SURVEY DATABASE EXISTS"
set result [$check_db invoke]
$check_db destroy
if {$result == "0"} {
GuidoApp check_station_errors "CHECK STATION ERRORS EXISTS"
$check_station_errors setParam "displayMessages" "false"
set station_errors_exists [$check_station_errors invoke]
$check_station_errors destroy
GuidoApp get_handle "GET DATABASE HANDLE"
$get_handle setParam sessionType "SurveyDatabase"
set result [$get_handle invoke]
set dbHandle [$get_handle getParam DatabaseHandle]
$get_handle destroy
proc updateCombo {guidotable1 guidofield1 guidotable2 guidofield2 combobox} {
set values ""
for {set row_idx 0} {$row_idx < [$guidotable1 getRowCount]} {incr row_idx} {
set value [$guidofield1 getCurrentValue $row_idx]
lappend values $value
}
for {set row_idx 0} {$row_idx < [$guidotable2 getRowCount]} {incr row_idx} {
set value [$guidofield2 getCurrentValue $row_idx]
lappend values $value
}
eval [concat {$combobox} {setValues} $values]
}
GuidoForm networkObservations {
-default_buttons
-label "Use existing observations file?"
-tip SNA_EXISTING_OBS_FILE_TIP
GuidoCheckBox useExistingObsFile {
-default false
-label "Use existing observations file?"
-selected_value Y
-tip SNA_USE_EXISTING_OBS_TIP
-unselected_value N
}
GuidoFileBrowserField obsfile {
-label "Observations file"
-dependency {"[$useExistingObsFile getCurrentValue]" == "Y"}
-display_length 15
-format none
-max_length 256
-null false
-translate lower
-extension false
-file_mask *.sna
-tip SNA_EXISTING_OBS_NAME_TIP
}
}
proc setReportOrdersFileDep {field} {
global station_errors_exists
if {"$station_errors_exists" == "0"} {
$field setInputAllowed true
} else {
$field setInputAllowed false
}
}
GuidoForm form {
proc ssiforminitialisedvalue { } {
global ssiforminitialised
return $ssiforminitialised
}
set ssiforminitialised 0
-default_buttons
-label "Survey Network Observations"
-layout BoxLayout Y_AXIS
-tip SNA_SURVEY_NETWORK_ADJUSTMENT_TIP
-action initial {[setReportOrdersFileDep $reportOrdersFile]}
GuidoPanel frm_90 {
-layout BoxLayout X_AXIS
GuidoPanel frm_88 {
-border etched true
-label "Survey details"
-layout CentreLineLayout
GuidoField surveyor {
-action focusGained {[set ssiforminitialised 1]}
-display_length 16
-format none
-label Surveyor
-max_length 16
-tip SNA_SURVEY_DETAILS_TIP
-next_focus date
}
GuidoField date {
-display_length 16
-format datetime
-label "Survey date"
-max_length 23
-tip SNA_SURVEY_DETAILS_TIP
-next_focus checked_by
}
GuidoField checked_by {
-display_length 16
-format none
-label "Checked by"
-max_length 16
-tip SNA_SURVEY_DETAILS_TIP
-next_focus field_book
}
GuidoField field_book {
-display_length 16
-format none
-label "Field book"
-max_length 16
-tip SNA_SURVEY_DETAILS_TIP
-next_focus pages
}
GuidoField pages {
-display_length 16
-format none
-label Pages
-max_length 16
-tip SNA_SURVEY_DETAILS_TIP
-next_focus comment
}
GuidoField comment {
-display_length 16
-format none
-label Comment
-max_length 200
-tip SNA_SURVEY_COMMENT_TIP
}
}
GuidoFiller frm_91 {
-width 1
}
GuidoPanel frm_96 {
-border etched true
-label "Options"
-layout BoxLayout Y_AXIS
GuidoButtonGroupPanel dimension_of_adjustment {
GuidoRadioButton 3dadjust {
-caption "3D Adjustment"
-default true
-selected_value 3d_adjust
-tip SNA_3D_OR_2D_TIP
}
GuidoRadioButton 2dadjust {
-caption "2D Adjustment"
-selected_value 2d_adjust
-tip SNA_3D_OR_2D_TIP
}
}
GuidoPanel frm_100 {
-layout CentreLineLayout
GuidoField max_iterations {
-default 8
-display_length 3
-format integer
-high_bound 100
-label "Maximum number of iterations"
-low_bound 3
-max_length 3
-tip SNA_MAX_ITERATIONS_TIP
}
GuidoField conv_tol {
-default 0.001
-display_length 5
-format double
-decimals 3
-label "Convergence tolerance"
-max_length 7
-null false
-low_bound 0.001
-tip SNA_CONV_TOL_TIP
}
GuidoFileBrowserField reportFile {
-label "Adjustment report file"
-display_length 15
-format none
-max_length FIO_MAX_FILENAME_LENGTH
-null false
-translate lower
-extension false
-file_mask "*.not *.csv *.htm *.html *.rtf *.pdf *.ps"
-file_access write
-tip SNA_REPORT_FILE_TIP
}
GuidoFileBrowserField reportOrdersFile {
-label "Station orders report file"
-display_length 15
-format none
-max_length FIO_MAX_FILENAME_LENGTH
-null false
-translate lower
-extension false
-file_mask "*.not *.csv *.htm *.html *.rtf *.pdf *.ps"
-file_access write
-tip SNA_REPORT_ORDERS_FILE_TIP
}
GuidoComboBox reportFormat {
-display_length 21
-format none
-label "Report file format"
-max_length 50
-null false
-value_in ".not - Surpac Note File" ".csv - Comma Separated (Spreadsheet)" ".htm - Hypertext Markup Language (Web)" ".html - Hypertext Markup Language (Web)" ".rtf - Rich Text Format (Microsoft Word)" ".pdf - Adobe Acrobat" ".ps - Postscript"
-tip SNA_REPORT_FORMAT_TIP
}
GuidoCheckBox save_stations {
-default false
-label "Save stations to database?"
-selected_value Y
-unselected_value N
-tip SNA_SAVE_STATIONS_TIP
}
GuidoCheckBox saveObsFile {
-default true
-label "Save observations?"
-selected_value Y
-unselected_value N
-tip SNA_SAVE_OBSERVATIONS_TIP
}
GuidoFileBrowserField fileToSave {
-label "Observations file"
-dependency {"[$saveObsFile getCurrentValue]" == "Y"}
-display_length 15
-format none
-max_length FIO_MAX_FILENAME_LENGTH
-null false
-translate lower
-extension false
-file_mask *.sna
-file_access write
-tip SNA_SAVE_OBSERVATIONS_FILENAME_TIP
}
}
}
}
GuidoFiller f1 {
-height 1
}
GuidoTabbedPane inputs {
GuidoPanel fixed_stations_panel {
-font_style bold
-label "Stations"
GuidoPanel main_main_2 {
-layout BoxLayout X_AXIS
GuidoScrollPane frm_27 {
-height 20
GuidoTable fixed_stations {
-instances 1 1 500
-interactive true
GuidoColumnValueBrowser fixed {
-display_length 14
-format none
-label "Fixed stations"
-max_length 16
-translate upper
-exclusive false
-sorted_list true
-database_handle $dbHandle
-table_handle survey_stations
-column_handle station_id
-tip SNA_FIXED_STATIONS_TIP
}
$fixed updateBrowserList
}
}
GuidoFiller main_main_3 {
-width 3
}
GuidoScrollPane frm_33 {
-height 20
GuidoTable unfixed_stations {
-instances 1 1 500
-interactive true
GuidoColumnValueBrowser unfixed {
-display_length 14
-format none
-label "Unfixed stations"
-max_length 16
-translate upper
-exclusive false
-shared_list fixed
-sorted_list true
-tip SNA_UNFIXED_STATIONS_TIP
}
}
}
}
}
GuidoPanel directions_panel {
-font_style bold
-label "Directions"
GuidoScrollPane frm_51 {
-height 20
GuidoTable directions {
-instances 1 1 500
-interactive true
GuidoComboBox dir_from {
-format none
-label SURVEY_SETUP_STATION_TXT
-translate upper
-display_length 14
-max_length 16
-tip SNA_SETUP_STATION_TIP
}
GuidoComboBox dir_to {
-format none
-label Foresight
-translate upper
-display_length 14
-max_length 16
-tip SNA_FORESIGHT_STATION_TIP
}
GuidoField dir {
-default 0.0
-display_length 10
-format dms_angle
-decimals 6
-label Direction
-high_bound 6.283185307
-low_bound 0
-max_length 12
-null false
-tip SNA_DIR_ANGLE_TIP
}
GuidoField dir_inst_cent {
-action initial {[if {[string length [$dir_inst_cent getCurrentValueRelative -1]] > 0 && [ssiforminitialisedvalue] } { $dir_inst_cent setCurrentValue [$dir_inst_cent getCurrentValueRelative -1] }]}
-default 0.003
-display_length 10
-format double
-decimals 4
-label "Inst Centr Err"
-max_length 12
-null false
-low_bound 0.0001
-tip SNA_INST_CENTR_ERR_TIP
}
GuidoField dir_targ_cent {
-action initial {[if {[string length [$dir_targ_cent getCurrentValueRelative -1]] > 0 && [ssiforminitialisedvalue] } { $dir_targ_cent setCurrentValue [$dir_targ_cent getCurrentValueRelative -1] }]}
-default 0.003
-display_length 10
-format double
-decimals 4
-label "Targ Centr Err"
-max_length 12
-null false
-low_bound 0.0001
-tip SNA_TARG_CENTR_ERR_TIP
}
GuidoField dir_sd {
-action initial {[if {[string length [$dir_sd getCurrentValueRelative -1]] > 0 && [ssiforminitialisedvalue] } { $dir_sd setCurrentValue [$dir_sd getCurrentValueRelative -1] }]}
-default 3
-display_length 10
-format double
-decimals 6
-label "Std Dev."
-max_length 12
-null false
-low_bound 0.000001
-tip SNA_ANGLE_STAND_DEV_TIP
}
}
}
}
GuidoPanel distances_panel {
-font_style bold
-label "Distances"
GuidoScrollPane frm_69 {
-height 20
GuidoTable distances {
-instances 1 1 500
-interactive true
GuidoComboBox dist_from {
-format none
-label SURVEY_SETUP_STATION_TXT
-translate upper
-display_length 14
-max_length 16
-tip SNA_SETUP_STATION_TIP
}
GuidoComboBox dist_to {
-format none
-label Foresight
-translate upper
-display_length 14
-max_length 16
-tip SNA_FORESIGHT_STATION_TIP
}
GuidoField dist_inst_ht {
-dependency {"[$dimension_of_adjustment getCurrentValue]" == "3d_adjust"}
-default 0
-display_length 5
-format double
-decimals 4
-label "Inst Ht"
-max_length 10
-null false
-tip SNA_INSTRUMENT_HEIGHT_TIP
}
GuidoField dist_targ_ht {
-dependency {"[$dimension_of_adjustment getCurrentValue]" == "3d_adjust"}
-default 0
-display_length 5
-format double
-decimals 4
-label "Targ Ht"
-max_length 10
-null false
-tip SNA_TARGET_HEIGHT_TIP
}
GuidoField dist {
-default 0
-display_length 10
-format double
-decimals 4
-label Distance
-max_length 12
-null false
-tip "Enter the distance observed from the Setup to the Foresight station."
-tip SNA_SLOPE_DISTANCE_TIP
}
GuidoField dist_inst_cent {
-action initial {[if {[string length [$dist_inst_cent getCurrentValueRelative -1]] > 0 && [ssiforminitialisedvalue] } { $dist_inst_cent setCurrentValue [$dist_inst_cent getCurrentValueRelative -1] }]}
-default 0.003
-display_length 10
-format double
-decimals 4
-label "Inst Centr Err"
-max_length 12
-null false
-low_bound 0.0001
-tip SNA_INST_CENTR_ERR_TIP
}
GuidoField dist_targ_cent {
-action initial {[if {[string length [$dist_targ_cent getCurrentValueRelative -1]] > 0 && [ssiforminitialisedvalue] } { $dist_targ_cent setCurrentValue [$dist_targ_cent getCurrentValueRelative -1] }]}
-default 0.003
-display_length 10
-format double
-decimals 4
-label "Targ Centr Err"
-max_length 12
-null false
-low_bound 0.0001
-tip SNA_TARG_CENTR_ERR_TIP
}
GuidoField dist_inst_ht_sd {
-dependency {"[$dimension_of_adjustment getCurrentValue]" == "3d_adjust"}
-action initial {[if {[string length [$dist_inst_ht_sd getCurrentValueRelative -1]] > 0 && [ssiforminitialisedvalue] } { $dist_inst_ht_sd setCurrentValue [$dist_inst_ht_sd getCurrentValueRelative -1] }]}
-default 0.003
-display_length 7
-format double
-decimals 4
-label "Inst Ht SD"
-max_length 8
-null false
-low_bound 0.0
-tip SNA_INST_HT_STAND_DEV_TIP
}
GuidoField dist_targ_ht_sd {
-dependency {"[$dimension_of_adjustment getCurrentValue]" == "3d_adjust"}
-action initial {[if {[string length [$dist_targ_ht_sd getCurrentValueRelative -1]] > 0 && [ssiforminitialisedvalue] } { $dist_targ_ht_sd setCurrentValue [$dist_targ_ht_sd getCurrentValueRelative -1] }]}
-default 0.003
-display_length 7
-format double
-decimals 4
-label "Targ Ht SD"
-max_length 8
-null false
-low_bound 0.0
-tip SNA_TARG_HT_STAND_DEV_TIP
}
GuidoField dist_sd {
-action initial {[if {[string length [$dist_sd getCurrentValueRelative -1]] > 0 && [ssiforminitialisedvalue] } { $dist_sd setCurrentValue [$dist_sd getCurrentValueRelative -1] }]}
-default 0.005
-display_length 7
-format double
-decimals 4
-label "Std Dev."
-max_length 8
-null false
-low_bound 0.0001
-tip SNA_SLOPE_DIST_STAND_DEV_TIP
}
GuidoField dist_ppm {
-action initial {[if {[string length [$dist_ppm getCurrentValueRelative -1]] > 0 && [ssiforminitialisedvalue] } { $dist_ppm setCurrentValue [$dist_ppm getCurrentValueRelative -1] }]}
-default 2
-display_length 5
-format double
-decimals 4
-label PPM
-max_length 8
-null false
-low_bound 0.0001
-tip SNA_SLOPE_DIST_PPM_TIP
}
}
}
}
GuidoPanel horiz_angles_panel {
-font_style bold
-label "Horizontal Angles"
GuidoScrollPane frm_86 {
-height 20
GuidoTable horiz_angles {
-instances 1 1 500
-interactive true
GuidoComboBox ha_from {
-format none
-label Backsight
-translate upper
-display_length 14
-max_length 16
-tip SNA_BACKSIGHT_STATION_TIP
}
GuidoComboBox ha_at {
-format none
-label SURVEY_SETUP_STATION_TXT
-translate upper
-display_length 14
-max_length 16
-tip SNA_SETUP_STATION_TIP
}
GuidoComboBox ha_to {
-format none
-label Foresight
-translate upper
-display_length 14
-max_length 16
-tip SNA_FORESIGHT_STATION_TIP
}
GuidoField ha_angle {
-decimals 6
-default 0.0
-display_length 10
-format dms_angle
-label Angle
-high_bound 6.283185307
-low_bound 0
-max_length 12
-null false
-tip SNA_ANGLE_TIP
}
GuidoField ha_back_cent {
-action initial {[if {[string length [$ha_back_cent getCurrentValueRelative -1]] > 0 && [ssiforminitialisedvalue] } { $ha_back_cent setCurrentValue [$ha_back_cent getCurrentValueRelative -1] }]}
-default 0.003
-display_length 10
-format double
-decimals 4
-label "Back Centr Err"
-max_length 12
-null false
-low_bound 0.0001
-tip SNA_BACK_CENTR_ERR_TIP
}
GuidoField ha_inst_cent {
-action initial {[if {[string length [$ha_inst_cent getCurrentValueRelative -1]] > 0 && [ssiforminitialisedvalue] } { $ha_inst_cent setCurrentValue [$ha_inst_cent getCurrentValueRelative -1] }]}
-default 0.003
-display_length 10
-format double
-decimals 4
-label "Inst Centr Err"
-max_length 12
-null false
-low_bound 0.0001
-tip SNA_INST_CENTR_ERR_TIP
}
GuidoField ha_targ_cent {
-action initial {[if {[string length [$ha_targ_cent getCurrentValueRelative -1]] > 0 && [ssiforminitialisedvalue] } { $ha_targ_cent setCurrentValue [$ha_targ_cent getCurrentValueRelative -1] }]}
-default 0.003
-display_length 10
-format double
-decimals 4
-label "Targ Centr Err"
-max_length 12
-null false
-low_bound 0.0001
-tip SNA_TARG_CENTR_ERR_TIP
}
GuidoField ha_sd {
-action initial {[if {[string length [$ha_sd getCurrentValueRelative -1]] > 0 && [ssiforminitialisedvalue] } { $ha_sd setCurrentValue [$ha_sd getCurrentValueRelative -1] }]}
-default 3
-display_length 10
-format double
-decimals 6
-label "Std Dev."
-max_length 12
-null false
-low_bound 0.000001
-tip SNA_ANGLE_STAND_DEV_TIP
}
}
}
}
GuidoPanel vert_angles_panel {
-font_style bold
-label "Vertical Angles"
GuidoScrollPane frm_69 {
-height 20
GuidoTable vert_angles {
-dependency {"[$dimension_of_adjustment getCurrentValue]" == "3d_adjust"}
-instances 1 1 500
-interactive true
GuidoComboBox va_from {
-format none
-label SURVEY_SETUP_STATION_TXT
-translate upper
-display_length 14
-max_length 16
-tip SNA_SETUP_STATION_TIP
}
GuidoComboBox va_to {
-format none
-label Foresight
-translate upper
-display_length 14
-max_length 16
-tip SNA_FORESIGHT_STATION_TIP
}
GuidoField va_inst_ht {
-default 0
-display_length 5
-format double
-decimals 4
-label "Inst Ht"
-max_length 10
-null false
-tip SNA_INSTRUMENT_HEIGHT_TIP
}
GuidoField va_targ_ht {
-default 0
-display_length 5
-format double
-decimals 4
-label "Targ Ht"
-max_length 10
-null false
-tip SNA_TARGET_HEIGHT_TIP
}
GuidoField va_angle {
-decimals 6
-default 0.0
-display_length 10
-format dms_angle
-label Angle
-high_bound 3.14159265
-low_bound -3.14159265
-max_length 12
-null false
-tip SNA_ANGLE_TIP
}
GuidoField va_inst_cent {
-action initial {[if {[string length [$va_inst_cent getCurrentValueRelative -1]] > 0 && [ssiforminitialisedvalue] } { $va_inst_cent setCurrentValue [$va_inst_cent getCurrentValueRelative -1] }]}
-default 0.003
-display_length 10
-format double
-decimals 4
-label "Inst Centr Err"
-max_length 12
-null false
-low_bound 0.0001
-tip SNA_INST_CENTR_ERR_TIP
}
GuidoField va_targ_cent {
-action initial {[if {[string length [$va_targ_cent getCurrentValueRelative -1]] > 0 && [ssiforminitialisedvalue] } { $va_targ_cent setCurrentValue [$va_targ_cent getCurrentValueRelative -1] }]}
-default 0.003
-display_length 10
-format double
-decimals 4
-label "Targ Centr Err"
-max_length 12
-null false
-low_bound 0.0001
-tip SNA_TARG_CENTR_ERR_TIP
}
GuidoField va_inst_ht_sd {
-action initial {[if {[string length [$va_inst_ht_sd getCurrentValueRelative -1]] > 0 && [ssiforminitialisedvalue] } { $va_inst_ht_sd setCurrentValue [$va_inst_ht_sd getCurrentValueRelative -1] }]}
-default 0.003
-display_length 7
-format double
-decimals 4
-label "Inst Ht SD"
-max_length 8
-null false
-low_bound 0.0
-tip SNA_INST_HT_STAND_DEV_TIP
}
GuidoField va_targ_ht_sd {
-action initial {[if {[string length [$va_targ_ht_sd getCurrentValueRelative -1]] > 0 && [ssiforminitialisedvalue] } { $va_targ_ht_sd setCurrentValue [$va_targ_ht_sd getCurrentValueRelative -1] }]}
-default 0.003
-display_length 7
-format double
-decimals 4
-label "Targ Ht SD"
-max_length 8
-null false
-low_bound 0.0
-tip SNA_TARG_HT_STAND_DEV_TIP
}
GuidoField va_sd {
-action initial {[if {[string length [$va_sd getCurrentValueRelative -1]] > 0 && [ssiforminitialisedvalue] } { $va_sd setCurrentValue [$va_sd getCurrentValueRelative -1] }]}
-default 3
-display_length 10
-format double
-decimals 6
-label "Std Dev."
-max_length 12
-null false
-low_bound 0.000001
-tip SNA_ANGLE_STAND_DEV_TIP
}
}
}
}
}
}
$inputs setActionCallback mousePressed {[
updateCombo $fixed_stations $fixed $unfixed_stations $unfixed $dir_from
updateCombo $fixed_stations $fixed $unfixed_stations $unfixed $dir_to
updateCombo $fixed_stations $fixed $unfixed_stations $unfixed $dist_from
updateCombo $fixed_stations $fixed $unfixed_stations $unfixed $dist_to
updateCombo $fixed_stations $fixed $unfixed_stations $unfixed $ha_from
updateCombo $fixed_stations $fixed $unfixed_stations $unfixed $ha_at
updateCombo $fixed_stations $fixed $unfixed_stations $unfixed $ha_to
updateCombo $fixed_stations $fixed $unfixed_stations $unfixed $va_from
updateCombo $fixed_stations $fixed $unfixed_stations $unfixed $va_to
]}
$inputs setActionCallback keyReleased {[
updateCombo $fixed_stations $fixed $unfixed_stations $unfixed $dir_from
updateCombo $fixed_stations $fixed $unfixed_stations $unfixed $dir_to
updateCombo $fixed_stations $fixed $unfixed_stations $unfixed $dist_from
updateCombo $fixed_stations $fixed $unfixed_stations $unfixed $dist_to
updateCombo $fixed_stations $fixed $unfixed_stations $unfixed $ha_from
updateCombo $fixed_stations $fixed $unfixed_stations $unfixed $ha_at
updateCombo $fixed_stations $fixed $unfixed_stations $unfixed $ha_to
updateCombo $fixed_stations $fixed $unfixed_stations $unfixed $va_from
updateCombo $fixed_stations $fixed $unfixed_stations $unfixed $va_to
]}
set return_code [$networkObservations interact]
if {$return_code == "apply"} {
set use_existing_file [$useExistingObsFile getCurrentValue]
if {$use_existing_file == "Y"} {
set databuf [ GuidoExecServer GetNetworkAdjustmentObservations [subst {textFile = [$obsfile getCurrentValue]}] ]
set file_ok [GuidoGetParamBufferValue $databuf FileOK]
if {$file_ok == "true"} {
$surveyor setCurrentValue [GuidoGetParamBufferValue $databuf "Surveyor"]
$date setCurrentValue [GuidoGetParamBufferValue $databuf "surveyDate"]
$checked_by setCurrentValue [GuidoGetParamBufferValue $databuf "checkedBy"]
$field_book setCurrentValue [GuidoGetParamBufferValue $databuf "fieldBook"]
$pages setCurrentValue [GuidoGetParamBufferValue $databuf "Pages"]
$comment setCurrentValue [GuidoGetParamBufferValue $databuf "Comment"]
$dimension_of_adjustment setCurrentValue [GuidoGetParamBufferValue $databuf "AdjustmentDimension"]
set num_initial_fixed_stations [GuidoGetParamBufferValue $databuf NumFixedStations]
$fixed_stations setInitialRows $num_initial_fixed_stations 1 500
for {set i 0} {$i < $num_initial_fixed_stations} {incr i} {
$fixed setCurrentValue $i [GuidoGetParamBufferValue $databuf "FixedStation($i)"]
}
set num_initial_unfixed_stations [GuidoGetParamBufferValue $databuf NumUnFixedStations]
$unfixed_stations setInitialRows $num_initial_unfixed_stations 1 500
for {set i 0} {$i < $num_initial_unfixed_stations} {incr i} {
$unfixed setCurrentValue $i [GuidoGetParamBufferValue $databuf "unFixedStation($i)"]
}
set num_initial_directions [GuidoGetParamBufferValue $databuf NumDirections]
$directions setInitialRows $num_initial_directions 1 500
for {set i 0} {$i < $num_initial_directions} {incr i} {
$dir_from setCurrentValue $i [GuidoGetParamBufferValue $databuf "dirFrom($i)"]
$dir_to setCurrentValue $i [GuidoGetParamBufferValue $databuf "dirTo($i)"]
$dir setCurrentValue $i [GuidoGetParamBufferValue $databuf "dir($i)"]
$dir_inst_cent setCurrentValue $i [GuidoGetParamBufferValue $databuf "dirInstCent($i)"]
$dir_targ_cent setCurrentValue $i [GuidoGetParamBufferValue $databuf "dirTargCent($i)"]
$dir_sd setCurrentValue $i [GuidoGetParamBufferValue $databuf "dirSD($i)"]
}
set num_initial_distances [GuidoGetParamBufferValue $databuf NumDistances]
$distances setInitialRows $num_initial_distances 1 500
for {set i 0} {$i < $num_initial_distances} {incr i} {
$dist_from setCurrentValue $i [GuidoGetParamBufferValue $databuf "distFrom($i)"]
$dist_to setCurrentValue $i [GuidoGetParamBufferValue $databuf "distTo($i)"]
$dist_inst_ht setCurrentValue $i [GuidoGetParamBufferValue $databuf "distInstHt($i)"]
$dist_targ_ht setCurrentValue $i [GuidoGetParamBufferValue $databuf "distTargHt($i)"]
$dist setCurrentValue $i [GuidoGetParamBufferValue $databuf "dist($i)"]
$dist_inst_cent setCurrentValue $i [GuidoGetParamBufferValue $databuf "distInstCent($i)"]
$dist_targ_cent setCurrentValue $i [GuidoGetParamBufferValue $databuf "distTargCent($i)"]
$dist_inst_ht_sd setCurrentValue $i [GuidoGetParamBufferValue $databuf "distInstHtSD($i)"]
$dist_targ_ht_sd setCurrentValue $i [GuidoGetParamBufferValue $databuf "distTargHtSD($i)"]
$dist_sd setCurrentValue $i [GuidoGetParamBufferValue $databuf "distSD($i)"]
$dist_ppm setCurrentValue $i [GuidoGetParamBufferValue $databuf "distPPM($i)"]
}
set num_initial_horiz_angles [GuidoGetParamBufferValue $databuf NumHorizAngles]
$horiz_angles setInitialRows $num_initial_horiz_angles 1 500
for {set i 0} {$i < $num_initial_horiz_angles} {incr i} {
$ha_from setCurrentValue $i [GuidoGetParamBufferValue $databuf "haFrom($i)"]
$ha_at setCurrentValue $i [GuidoGetParamBufferValue $databuf "haAt($i)"]
$ha_to setCurrentValue $i [GuidoGetParamBufferValue $databuf "haTo($i)"]
$ha_angle setCurrentValue $i [GuidoGetParamBufferValue $databuf "haAngle($i)"]
$ha_back_cent setCurrentValue $i [GuidoGetParamBufferValue $databuf "haBackCent($i)"]
$ha_inst_cent setCurrentValue $i [GuidoGetParamBufferValue $databuf "haInstCent($i)"]
$ha_targ_cent setCurrentValue $i [GuidoGetParamBufferValue $databuf "haTargCent($i)"]
$ha_sd setCurrentValue $i [GuidoGetParamBufferValue $databuf "haSD($i)"]
}
set num_initial_vert_angles [GuidoGetParamBufferValue $databuf NumVertAngles]
$vert_angles setInitialRows $num_initial_vert_angles 1 500
for {set i 0} {$i < $num_initial_vert_angles} {incr i} {
$va_from setCurrentValue $i [GuidoGetParamBufferValue $databuf "vaFrom($i)"]
$va_to setCurrentValue $i [GuidoGetParamBufferValue $databuf "vaTo($i)"]
$va_inst_ht setCurrentValue $i [GuidoGetParamBufferValue $databuf "vaInstHt($i)"]
$va_targ_ht setCurrentValue $i [GuidoGetParamBufferValue $databuf "vaTargHt($i)"]
$va_angle setCurrentValue $i [GuidoGetParamBufferValue $databuf "vaAngle($i)"]
$va_inst_cent setCurrentValue $i [GuidoGetParamBufferValue $databuf "vaInstCent($i)"]
$va_targ_cent setCurrentValue $i [GuidoGetParamBufferValue $databuf "vaTargCent($i)"]
$va_inst_ht_sd setCurrentValue $i [GuidoGetParamBufferValue $databuf "vaInstHtSD($i)"]
$va_targ_ht_sd setCurrentValue $i [GuidoGetParamBufferValue $databuf "vaTargHtSD($i)"]
$va_sd setCurrentValue $i [GuidoGetParamBufferValue $databuf "vaSD($i)"]
}
}
}
if {$use_existing_file == "N" || $file_ok == "true"} {
while {1} {
set return_code1 [$form interact]
if {$return_code1 != "cancel"} {
GuidoApp app "SURVEY NETWORK ADJUSTMENT"
$app setParam "Surveyor" [$surveyor getCurrentValue]
$app setParam "surveyDate" [$date getCurrentValue]
$app setParam "checkedBy" [$checked_by getCurrentValue]
$app setParam "fieldBook" [$field_book getCurrentValue]
$app setParam "Pages" [$pages getCurrentValue]
$app setParam "Comment" [$comment getCurrentValue]
$app setParam "AdjustmentDimension" [$dimension_of_adjustment getCurrentValue]
$app setParam "maxIterations" [$max_iterations getCurrentValue]
$app setParam "convergenceTol" [$conv_tol getCurrentValue]
$app setParam "saveStations" [$save_stations getCurrentValue]
$app setParam "saveObservations" [$saveObsFile getCurrentValue]
if {[$saveObsFile getCurrentValue] == "Y"} {
$app setParam "saveFileName" [$fileToSave getCurrentValue]
}
$app setParam "reportFileName" [$reportFile getCurrentValue]
if {$station_errors_exists == "0"} {
$app setParam "reportOrdersFileName" [$reportOrdersFile getCurrentValue]
}
$app setParam "reportFileFormat" [$reportFormat getCurrentValue]
set num_fixed_stations [$fixed_stations getRowCount]
$app setParam NumFixedStations $num_fixed_stations
for {set i 0} {$i < $num_fixed_stations} {incr i} {
$app setParam "FixedStation($i)" [$fixed getCurrentValue $i]
}
set num_unfixed_stations [$unfixed_stations getRowCount]
$app setParam NumUnFixedStations $num_unfixed_stations
for {set i 0} {$i < $num_unfixed_stations} {incr i} {
$app setParam "unFixedStation($i)" [$unfixed getCurrentValue $i]
}
set num_directions [$directions getRowCount]
$app setParam NumDirections $num_directions
for {set i 0} {$i < $num_directions} {incr i} {
$app setParam "dirFrom($i)" [$dir_from getCurrentValue $i]
$app setParam "dirTo($i)" [$dir_to getCurrentValue $i]
$app setParam "dir($i)" [$dir getCurrentValue $i]
$app setParam "dirInstCent($i)" [$dir_inst_cent getCurrentValue $i]
$app setParam "dirTargCent($i)" [$dir_targ_cent getCurrentValue $i]
$app setParam "dirSD($i)" [$dir_sd getCurrentValue $i]
}
set num_distances [$distances getRowCount]
$app setParam NumDistances $num_distances
for {set i 0} {$i < $num_distances} {incr i} {
$app setParam "distFrom($i)" [$dist_from getCurrentValue $i]
$app setParam "distTo($i)" [$dist_to getCurrentValue $i]
$app setParam "distInstHt($i)" [$dist_inst_ht getCurrentValue $i]
$app setParam "distTargHt($i)" [$dist_targ_ht getCurrentValue $i]
$app setParam "dist($i)" [$dist getCurrentValue $i]
$app setParam "distInstCent($i)" [$dist_inst_cent getCurrentValue $i]
$app setParam "distTargCent($i)" [$dist_targ_cent getCurrentValue $i]
$app setParam "distInstHtSD($i)" [$dist_inst_ht_sd getCurrentValue $i]
$app setParam "distTargHtSD($i)" [$dist_targ_ht_sd getCurrentValue $i]
$app setParam "distSD($i)" [$dist_sd getCurrentValue $i]
$app setParam "distPPM($i)" [$dist_ppm getCurrentValue $i]
}
set num_horiz_angles [$horiz_angles getRowCount]
$app setParam NumHorizAngles $num_horiz_angles
for {set i 0} {$i < $num_horiz_angles} {incr i} {
$app setParam "haFrom($i)" [$ha_from getCurrentValue $i]
$app setParam "haAt($i)" [$ha_at getCurrentValue $i]
$app setParam "haTo($i)" [$ha_to getCurrentValue $i]
$app setParam "haAngle($i)" [$ha_angle getCurrentValue $i]
$app setParam "haBackCent($i)" [$ha_back_cent getCurrentValue $i]
$app setParam "haInstCent($i)" [$ha_inst_cent getCurrentValue $i]
$app setParam "haTargCent($i)" [$ha_targ_cent getCurrentValue $i]
$app setParam "haSD($i)" [$ha_sd getCurrentValue $i]
}
set num_vert_angles [$vert_angles getRowCount]
$app setParam NumVertAngles $num_vert_angles
for {set i 0} {$i < $num_vert_angles} {incr i} {
$app setParam "vaFrom($i)" [$va_from getCurrentValue $i]
$app setParam "vaTo($i)" [$va_to getCurrentValue $i]
$app setParam "vaInstHt($i)" [$va_inst_ht getCurrentValue $i]
$app setParam "vaTargHt($i)" [$va_targ_ht getCurrentValue $i]
$app setParam "vaAngle($i)" [$va_angle getCurrentValue $i]
$app setParam "vaInstCent($i)" [$va_inst_cent getCurrentValue $i]
$app setParam "vaTargCent($i)" [$va_targ_cent getCurrentValue $i]
$app setParam "vaInstHtSD($i)" [$va_inst_ht_sd getCurrentValue $i]
$app setParam "vaTargHtSD($i)" [$va_targ_ht_sd getCurrentValue $i]
$app setParam "vaSD($i)" [$va_sd getCurrentValue $i]
}
set return_status [$app invoke]
$app destroy
} else {
break
}
if {$return_code1 == "apply" && $return_status != "-2"} {
break
}
}
}
$form destroy
}
$networkObservations destroy
}
