Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.2.7 (various fixes and enhancements) #213

Merged
merged 132 commits into from
Mar 29, 2023
Merged
Changes from 1 commit
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
72c3617
Update the User's Guide to address #80
rogerfraser Sep 5, 2022
14a6e3e
Merge pull request #184 from rogerfraser/master
rogerfraser Sep 5, 2022
992012f
Fix issue with direction sets wholly ignored
rogerfraser Sep 5, 2022
2755c0e
Update version information
rogerfraser Sep 5, 2022
910fc22
Initial changes to address #31
rogerfraser Sep 6, 2022
e43b04a
Merge branch 'master' into type-b
rogerfraser Sep 6, 2022
499bd05
Change interface option text
rogerfraser Sep 6, 2022
0ba9132
Fix spelling mistake
rogerfraser Sep 6, 2022
6bab146
Merge branch 'master' of https://github.com/rogerfraser/DynAdjust
rogerfraser Sep 6, 2022
a38bfad
Fix spelling mistakes
rogerfraser Sep 7, 2022
fad4800
Fix defect on geoid user interface
rogerfraser Sep 8, 2022
ccfc73f
Handle invalid N values
rogerfraser Sep 12, 2022
e3509b7
Report geoid transformation direction
rogerfraser Sep 12, 2022
b765a87
Remove reporting on interactive (geoid) interpolation
rogerfraser Sep 12, 2022
7729a29
Remove unnecessary code
rogerfraser Sep 13, 2022
a440415
Merge branch 'master' of https://github.com/rogerfraser/DynAdjust
rogerfraser Sep 13, 2022
8f87964
updated docker file to only get required mkl and tbb rather than whol…
jameslevershadelwp Oct 13, 2022
8d130b2
Merge pull request #205 from jameslevershadelwp/docker_update
rogerfraser Oct 13, 2022
410c732
Only get mkl and tbb rather than whole basekit
rogerfraser Nov 10, 2022
b8b2d04
Rename template files
rogerfraser Dec 6, 2022
705b233
Update Dockerfile
rogerfraser Dec 6, 2022
833cf20
Update github actions yml
rogerfraser Dec 6, 2022
f0efc1b
Initial changes to address #31
rogerfraser Sep 6, 2022
a0a637d
Update the User's Guide to address #80
rogerfraser Sep 5, 2022
a96e511
Fix issue with direction sets wholly ignored
rogerfraser Sep 5, 2022
9661755
Update version information
rogerfraser Sep 5, 2022
2d6f058
Change interface option text
rogerfraser Sep 6, 2022
bf759f0
Merge branch 'type-b' of https://github.com/rogerfraser/DynAdjust int…
rogerfraser Dec 6, 2022
67f7015
Update the User's Guide to address #80
rogerfraser Sep 5, 2022
989a99b
Fix issue with direction sets wholly ignored
rogerfraser Sep 5, 2022
e35e945
Update version information
rogerfraser Sep 5, 2022
034720b
Fix spelling mistake
rogerfraser Sep 6, 2022
af2525f
Initial changes to address #31
rogerfraser Sep 6, 2022
48e5ef5
Change interface option text
rogerfraser Sep 6, 2022
0125563
Fix spelling mistakes
rogerfraser Sep 7, 2022
748e42e
Fix defect on geoid user interface
rogerfraser Sep 8, 2022
571d57c
Remove unnecessary code
rogerfraser Sep 13, 2022
34fe166
Handle invalid N values
rogerfraser Sep 12, 2022
571b2f2
Report geoid transformation direction
rogerfraser Sep 12, 2022
c6cecb4
Remove reporting on interactive (geoid) interpolation
rogerfraser Sep 12, 2022
49fbcb5
Merge branch 'master' of https://github.com/rogerfraser/DynAdjust
rogerfraser Dec 6, 2022
07e70a7
Further work to support #31
rogerfraser Dec 7, 2022
6cb39c4
Further work to support #31
rogerfraser Dec 8, 2022
90142ef
Further work to support #31
rogerfraser Dec 9, 2022
e13ee2c
Further changes to support #31
rogerfraser Dec 9, 2022
6568094
Further changes to support #31
rogerfraser Dec 9, 2022
631d6ab
Further work to support #31
rogerfraser Dec 9, 2022
8aaf04c
Further changes to support #31
rogerfraser Dec 9, 2022
59086f5
Update dsg.typeb
rogerfraser Dec 9, 2022
add737a
Initial changes to address #185
rogerfraser Dec 9, 2022
ccd7640
Deprecate convert-stn-hts
rogerfraser Dec 11, 2022
6aaeeaf
Minor enhancements to address #187
rogerfraser Dec 11, 2022
09fadeb
Further changes to address #185 and #189
rogerfraser Dec 12, 2022
d0d4547
Changes to address #203
rogerfraser Dec 23, 2022
b17b08b
Minor enhancement to error message
rogerfraser Jan 30, 2023
53a2e0a
Correct a mistake in the file comments
rogerfraser Jan 31, 2023
fa59628
Add cake test for type-b uncertainties
rogerfraser Feb 1, 2023
511760d
Update cmake test
rogerfraser Feb 1, 2023
e184421
Merge branch 'type-b'
rogerfraser Feb 1, 2023
17f6633
Initial commit of ITRF2020 params
rogerfraser Feb 1, 2023
02e51a7
Further changes to support ITRF2020
rogerfraser Feb 2, 2023
bbce6db
Additional enhancements to manage database IDs
rogerfraser Feb 9, 2023
5c0cf8e
Merge remote-tracking branch 'refs/remotes/origin/master'
rogerfraser Feb 9, 2023
29aa5c8
Merge branch 'itrf2020'
rogerfraser Feb 9, 2023
4373caa
Enhance UI label
rogerfraser Feb 9, 2023
8c7da93
updated docker file to only get required mkl and tbb rather than whol…
jameslevershadelwp Oct 13, 2022
9b28278
Update Dockerfile
rogerfraser Oct 18, 2022
b4bb341
[skip-ci] update cmake_release.yml
rogerfraser Oct 18, 2022
51a8938
Update test_coverage.yml
rogerfraser Oct 18, 2022
5fa2e15
[skip ci] Update bug report template
rogerfraser Oct 25, 2022
f53af20
[skip ci] Update feature improve issue template
rogerfraser Oct 25, 2022
0721f5a
Update install_dynadjust_prerequisites.sh
rogerfraser Nov 10, 2022
8fb500f
Fix oneapi filename
rogerfraser Dec 5, 2022
46a6b63
Update the User's Guide to address #80
rogerfraser Sep 5, 2022
f31c464
Fix issue with direction sets wholly ignored
rogerfraser Sep 5, 2022
29cbcfa
Update version information
rogerfraser Sep 5, 2022
4dbd0c4
Fix spelling mistake
rogerfraser Sep 6, 2022
0f6a5e7
Initial changes to address #31
rogerfraser Sep 6, 2022
474e5a1
Change interface option text
rogerfraser Sep 6, 2022
3e04611
Fix spelling mistakes
rogerfraser Sep 7, 2022
725ee2e
Fix defect on geoid user interface
rogerfraser Sep 8, 2022
d20bf16
Remove unnecessary code
rogerfraser Sep 13, 2022
93adc55
Handle invalid N values
rogerfraser Sep 12, 2022
799b454
Report geoid transformation direction
rogerfraser Sep 12, 2022
06ed80b
Remove reporting on interactive (geoid) interpolation
rogerfraser Sep 12, 2022
a9212cc
Initial changes to address #185
rogerfraser Dec 9, 2022
54da3bf
Deprecate convert-stn-hts
rogerfraser Dec 11, 2022
eec9ca9
Minor enhancements to address #187
rogerfraser Dec 11, 2022
72bcb3e
Further changes to address #185 and #189
rogerfraser Dec 12, 2022
7d8cc56
Changes to address #203
rogerfraser Dec 23, 2022
1a954c8
Further work to support #31
rogerfraser Dec 7, 2022
635f92d
Further work to support #31
rogerfraser Dec 8, 2022
12bfd5e
Further work to support #31
rogerfraser Dec 9, 2022
c20755b
Further changes to support #31
rogerfraser Dec 9, 2022
e0f6746
Further changes to support #31
rogerfraser Dec 9, 2022
00c0750
Further work to support #31
rogerfraser Dec 9, 2022
c51f926
Further changes to support #31
rogerfraser Dec 9, 2022
bc517b2
Update dsg.typeb
rogerfraser Dec 9, 2022
6b94d14
Minor enhancement to error message
rogerfraser Jan 30, 2023
d27921a
Correct a mistake in the file comments
rogerfraser Jan 31, 2023
1cdd88f
Add cake test for type-b uncertainties
rogerfraser Feb 1, 2023
c88a00d
Update cmake test
rogerfraser Feb 1, 2023
fc9d453
Initial commit of ITRF2020 params
rogerfraser Feb 1, 2023
1124846
Additional enhancements to manage database IDs
rogerfraser Feb 9, 2023
f9b57b7
Further changes to support ITRF2020
rogerfraser Feb 2, 2023
af25ca8
Enhance UI label
rogerfraser Feb 9, 2023
3e46329
Merge branch 'master' of https://github.com/rogerfraser/DynAdjust
rogerfraser Feb 10, 2023
3185bd2
Update UI label
rogerfraser Feb 10, 2023
8984ebf
Merge remote-tracking branch 'upstream/master'
rogerfraser Feb 10, 2023
ed37c4b
Update User's Guide
rogerfraser Feb 10, 2023
0e78cb7
Update User's Guide
rogerfraser Feb 16, 2023
d249e97
Add sample files
rogerfraser Feb 16, 2023
536d486
Remove 'convert-stn-hts' option reporting
rogerfraser Feb 17, 2023
9cb5e63
Update User's Guide
rogerfraser Feb 17, 2023
58e3a00
Minor update to help on Type B
rogerfraser Feb 20, 2023
5610337
Parse msr id forbaselines and points
rogerfraser Mar 23, 2023
b7301ce
Add condition for printing msr id
rogerfraser Mar 23, 2023
27048e4
Remove printing of msr id for covariances
rogerfraser Mar 23, 2023
a3a7dd6
Remove unused and deprecated functions
rogerfraser Mar 23, 2023
f07bda3
Refer to current phoenix headers
rogerfraser Mar 23, 2023
bfcaeb8
Remove unused function variables
rogerfraser Mar 23, 2023
b1bdbed
Replace bind1st with lambda
rogerfraser Mar 23, 2023
7894f9b
Fix defect with printing msr id on adjustment
rogerfraser Mar 24, 2023
9859722
Fix broken measurement-id output from reftran
rogerfraser Mar 26, 2023
8ac19e0
Improve database id handling
rogerfraser Mar 28, 2023
704e0c0
Add test case for ITRF2020
rogerfraser Mar 28, 2023
645ef96
Further improvement to measurement id handling
rogerfraser Mar 28, 2023
572370d
Remove unnecessary (comented out) code
rogerfraser Mar 28, 2023
e72a5b4
Further improvement to measurement id handling
rogerfraser Mar 28, 2023
e1ba5ff
Fix dbid referencing for clusters
rogerfraser Mar 28, 2023
4d8db32
Update User's Guide
rogerfraser Mar 29, 2023
c078a4c
Merge pull request #212 from rogerfraser/master
rogerfraser Mar 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Further changes to support #31
  • Loading branch information
rogerfraser committed Dec 9, 2022
commit 8aaf04c71a50a92e903eb41962d50ac1a0e9be65
162 changes: 100 additions & 62 deletions dynadjust/dynadjust/dnaadjust/dnaadjust.cpp
Original file line number Diff line number Diff line change
@@ -286,6 +286,9 @@ void dna_adjust::PrepareAdjustment(const project_settings& projectSettings)
// Load network files
LoadNetworkFiles();

// Load type b uncertainties, method handler, and the station map
InitialiseTypeBUncertainties();

isFirstTimeAdjustment_ = !bms_meta_.reduced;

// Resizes matrix vectors using blockCount_.
@@ -2413,8 +2416,8 @@ void dna_adjust::PrintAdjustedNetworkStations()
switch (projectSettings_.a.adjust_mode)
{
case SimultaneousMode:
PrintAdjStations(adj_file, 0, &v_estimatedStations_.at(0), &v_rigorousVariances_.at(0), false, true, true, printHeader);
PrintAdjStations(xyz_file, 0, &v_estimatedStations_.at(0), &v_rigorousVariances_.at(0), false, false, false, printHeader);
PrintAdjStations(adj_file, 0, &v_estimatedStations_.at(0), &v_rigorousVariances_.at(0), false, true, true, printHeader, true);
PrintAdjStations(xyz_file, 0, &v_estimatedStations_.at(0), &v_rigorousVariances_.at(0), false, false, false, printHeader, false);
break;
case PhasedMode:
case Phased_Block_1Mode:
@@ -2424,11 +2427,11 @@ void dna_adjust::PrintAdjustedNetworkStations()
PrintAdjStationsUniqueList(adj_file,
&v_rigorousStations_,
&v_rigorousVariances_,
true, true);
true, true, true);
PrintAdjStationsUniqueList(xyz_file,
&v_rigorousStations_,
&v_rigorousVariances_,
true, true);
true, true, false);
return;
}

@@ -2450,12 +2453,12 @@ void dna_adjust::PrintAdjustedNetworkStations()
PrintAdjStations(adj_file, block,
&v_rigorousStations_.at(block),
&v_rigorousVariances_.at(block),
true, true, true, printHeader);
true, true, true, printHeader, true);
// xyz file
PrintAdjStations(xyz_file, block,
&v_rigorousStations_.at(block),
&v_rigorousVariances_.at(block),
true, false, false, printHeader);
true, false, false, printHeader, false);

printHeader = false;

@@ -2559,15 +2562,19 @@ void dna_adjust::PrintPositionalUncertainty()

apu_file << setw(PRINT_VAR_PAD) << left << "File name:" << system_complete(projectSettings_.o._apu_file).string() << endl << endl;

apu_file << setw(PRINT_VAR_PAD) << left << "PU confidence interval" << setprecision(1) << fixed <<
apu_file << setw(PRINT_VAR_PAD) << left << "PU confidence interval:" << setprecision(1) << fixed <<
// projectSettings_.a.confidence_interval << "%" << endl;
// the SP1 standard for PU is 95% and the formula is designed to achieve that end,
// irrespective of the adjustment confidence interval
95.0 << "%" << endl;

apu_file << setw(PRINT_VAR_PAD) << left << "Error ellipse axes:" << setprecision(1) << fixed <<
68.3 << "% (1 sigma)" << endl;

apu_file << setw(PRINT_VAR_PAD) << left << "Variances:" << setprecision(1) << fixed <<
68.3 << "% (1 sigma)" << endl;


apu_file << setw(PRINT_VAR_PAD) << left << "Stations printed in blocks";
apu_file << setw(PRINT_VAR_PAD) << left << "Stations printed in blocks:";
if (projectSettings_.a.adjust_mode != SimultaneousMode)
{
if (projectSettings_.o._output_stn_blocks)
@@ -2583,7 +2590,7 @@ void dna_adjust::PrintPositionalUncertainty()
else
apu_file << left << "No" << endl;

apu_file << setw(PRINT_VAR_PAD) << left << "Variance matrix units";
apu_file << setw(PRINT_VAR_PAD) << left << "Variance matrix units:";
switch (projectSettings_.o._apu_vcv_units)
{
case ENU_apu_ui:
@@ -2596,12 +2603,23 @@ void dna_adjust::PrintPositionalUncertainty()
}

apu_file <<
setw(PRINT_VAR_PAD) << left << "Full covariance matrix";
setw(PRINT_VAR_PAD) << left << "Full covariance matrix:";
if (projectSettings_.o._output_pu_covariances)
apu_file << left << "Yes" << endl;
else
apu_file << left << "No" << endl;

if (projectSettings_.o._apply_type_b_file || projectSettings_.o._apply_type_b_global)
{
if (projectSettings_.o._apply_type_b_global)
apu_file << setw(PRINT_VAR_PAD) << left << "Type B uncertainties:" <<
projectSettings_.a.type_b_global << endl;

if (projectSettings_.o._apply_type_b_file)
apu_file << setw(PRINT_VAR_PAD) << left << "Type B uncertainty file:" <<
system_complete(projectSettings_.a.type_b_file).string() << endl;
}

apu_file << OUTPUTLINE << endl << endl;

apu_file << "Positional uncertainty of adjusted station coordinates" << endl;
@@ -2613,7 +2631,7 @@ void dna_adjust::PrintPositionalUncertainty()
{
case SimultaneousMode:
PrintPosUncertainties(apu_file, 0,
&v_normals_.at(0));
&v_rigorousVariances_.at(0));
break;
case PhasedMode:
// Output phased blocks as a single block?
@@ -2669,7 +2687,7 @@ void dna_adjust::PrintNetworkStationCorrections()
print_file_header(cor_file, "DYNADJUST CORRECTIONS OUTPUT FILE");
cor_file << setw(PRINT_VAR_PAD) << left << "File name:" << system_complete(projectSettings_.o._cor_file).string() << endl << endl;

cor_file << setw(PRINT_VAR_PAD) << left << "Stations printed in blocks";
cor_file << setw(PRINT_VAR_PAD) << left << "Stations printed in blocks:";
if (projectSettings_.a.adjust_mode != SimultaneousMode &&
projectSettings_.o._output_stn_blocks)
cor_file << "Yes" << endl << endl;
@@ -3455,7 +3473,7 @@ void dna_adjust::AdjustSimultaneous()
if (projectSettings_.o._adj_stn_iteration)
// computes geographic coordinates if required
PrintAdjStations(adj_file, 0, &v_estimatedStations_.at(0), &v_normals_.at(0),
false, !v_msrTally_.at(0).ContainsNonGPS(), !v_msrTally_.at(0).ContainsNonGPS(), true);
false, !v_msrTally_.at(0).ContainsNonGPS(), !v_msrTally_.at(0).ContainsNonGPS(), true, false);

// Update normals and measured-computed matrices for the next iteration.
UpdateAdjustment(iterate);
@@ -4076,7 +4094,7 @@ void dna_adjust::CarryForwardJunctions(const UINT32 thisBlock, const UINT32 next

PrintAdjStations(adj_file, thisBlock,
&v_estimatedStations_.at(thisBlock), &v_normals_.at(thisBlock),
false, true, false, true);
false, true, false, true, false);
adj_file_mutex.unlock();
}

@@ -4714,7 +4732,7 @@ void dna_adjust::UpdateEstimatesReverse(const UINT32 currentBlock, bool MT_Rever

PrintAdjStations(adj_file, currentBlock,
estimatedStations, aposterioriVariances,
false, true, false, true);
false, true, false, true, false);
adj_file_mutex.unlock();
}

@@ -4832,7 +4850,7 @@ void dna_adjust::UpdateEstimatesFinal(const UINT32 currentBlock)

PrintAdjStations(adj_file, currentBlock,
&v_rigorousStations_.at(currentBlock), &v_rigorousVariances_.at(currentBlock),
false, true, false, true); // update coordinates
false, true, false, true, false); // update coordinates

#ifdef MULTI_THREAD_ADJUST
adj_file_mutex.unlock();
@@ -9471,6 +9489,7 @@ void dna_adjust::PrintOutputFileHeaderInfo()
adj_file << setw(PRINT_VAR_PAD) << left << "Iteration threshold:" << projectSettings_.a.iteration_threshold << endl;
adj_file << setw(PRINT_VAR_PAD) << left << "Maximum iterations:" << setprecision(0) << fixed << projectSettings_.a.max_iterations << endl;
adj_file << setw(PRINT_VAR_PAD) << left << "Test confidence interval:" << setprecision(1) << fixed << projectSettings_.a.confidence_interval << "%" << endl;
adj_file << setw(PRINT_VAR_PAD) << left << "Uncertainties SD(e,n,up):" << setprecision(1) << "68.3% (1 sigma)" << endl;

if (!projectSettings_.a.station_constraints.empty())
adj_file << setw(PRINT_VAR_PAD) << left << "Station constraints:" << projectSettings_.a.station_constraints << endl;
@@ -9507,10 +9526,21 @@ void dna_adjust::PrintOutputFileHeaderInfo()

if (projectSettings_.o._apply_type_b_file || projectSettings_.o._apply_type_b_global)
{
adj_file << setw(PRINT_VAR_PAD) << left << "Add Type B uncertainties:" <<
"Yes" << endl;
xyz_file << setw(PRINT_VAR_PAD) << left << "Add Type B uncertainties:" <<
"Yes" << endl;
if (projectSettings_.o._apply_type_b_global)
{
adj_file << setw(PRINT_VAR_PAD) << left << "Type B uncertainties:" <<
projectSettings_.a.type_b_global << endl;
xyz_file << setw(PRINT_VAR_PAD) << left << "Type B uncertainties:" <<
projectSettings_.a.type_b_global << endl;
}

if (projectSettings_.o._apply_type_b_file)
{
adj_file << setw(PRINT_VAR_PAD) << left << "Type B uncertainty file:" <<
system_complete(projectSettings_.a.type_b_file).string() << endl;
xyz_file << setw(PRINT_VAR_PAD) << left << "Type B uncertainty file:" <<
system_complete(projectSettings_.a.type_b_file).string() << endl;
}
}

// Print user-supplied comments.
@@ -9659,8 +9689,9 @@ void dna_adjust::PrintCorStation(ostream& os,

void dna_adjust::PrintAdjStation(ostream& os,
const UINT32& block, const UINT32& stn, const UINT32& mat_idx,
const matrix_2d* stationEstimates, const matrix_2d* stationVariances,
bool recomputeGeographicCoords, bool updateGeographicCoords)
const matrix_2d* stationEstimates, matrix_2d* stationVariances,
bool recomputeGeographicCoords, bool updateGeographicCoords,
bool reapplyTypeBUncertainties)
{
double estLatitude, estLongitude, estHeight, E, N, Zo(-1.);

@@ -9802,16 +9833,15 @@ void dna_adjust::PrintAdjStation(ostream& os,

// Standard deviation in local reference frame
matrix_2d var_local(3, 3), var_cart(3, 3);
var_cart.copyelements(0, 0, stationVariances, mat_idx, mat_idx, 3, 3);

// TODO. The code below adds type b uncertainties to a variance matrix extracted from the estimated variances held in memory.
// To minimise re-computation when printing to .adj and .apu, the type b uncertainties should be added to the estimated
// variances held in memory. This is not a problem since, if adjust is re-run and the user does not supply type b
// uncertainties, the variances held in memory will be re-estimated which will overwrite the type b values that were
// previously applied.
// To minimise re-computation when printing to .xyz, .adj and .apu, the type b uncertainties are
// added to the estimated variances held in memory. This is not a problem since, if adjust is
// re-run and the user does not supply type b uncertainties, the variances held in memory will be
// re-estimated which will overwrite the type b values that were previously applied.

// Add type B uncertainties (if required)
if (projectSettings_.o._apply_type_b_global || projectSettings_.o._apply_type_b_file)
if (reapplyTypeBUncertainties &&
(projectSettings_.o._apply_type_b_global || projectSettings_.o._apply_type_b_file))
{
if (v_typeBUncertaintyMethod_.at(stn).apply)
{
@@ -9820,7 +9850,10 @@ void dna_adjust::PrintAdjStation(ostream& os,
{
// Add the cartesian type b variances
// Note: Cartesian variances for this station were computed in dna_io_tbu::reduce_uncertainties_local(...)
var_cart.add(v_typeBUncertaintiesLocal_.at(v_stationTypeBMap_.at(stn).second).type_b);
//var_cart.add(v_typeBUncertaintiesLocal_.at(v_stationTypeBMap_.at(stn).second).type_b);
stationVariances->blockadd(mat_idx, mat_idx,
v_typeBUncertaintiesLocal_.at(v_stationTypeBMap_.at(stn).second).type_b,
0, 0, 3, 3);
}
else if (v_typeBUncertaintyMethod_.at(stn).method == type_b_global)
{
@@ -9832,11 +9865,15 @@ void dna_adjust::PrintAdjStation(ostream& os,
estLatitude, estLongitude, true);

// Add the cartesian type b variances
var_cart.add(var_cart_typeb);
//var_cart.add(var_cart_typeb);
stationVariances->blockadd(mat_idx, mat_idx,
var_cart_typeb, 0, 0, 3, 3);
}
}
}

var_cart.copyelements(0, 0, stationVariances, mat_idx, mat_idx, 3, 3);

PropagateVariances_LocalCart(var_cart, var_local,
estLatitude, estLongitude, false);

@@ -9878,8 +9915,9 @@ void dna_adjust::PrintAdjStation(ostream& os,
}

void dna_adjust::PrintAdjStations(ostream& os, const UINT32& block,
const matrix_2d* stationEstimates, const matrix_2d* stationVariances, bool printBlockID,
bool recomputeGeographicCoords, bool updateGeographicCoords, bool printHeader)
const matrix_2d* stationEstimates, matrix_2d* stationVariances, bool printBlockID,
bool recomputeGeographicCoords, bool updateGeographicCoords, bool printHeader,
bool reapplyTypeBUncertainties)
{
vUINT32 v_blockStations(v_parameterStationList_.at(block));

@@ -9945,7 +9983,8 @@ void dna_adjust::PrintAdjStations(ostream& os, const UINT32& block,

PrintAdjStation(os, block, stn, mat_idx,
stationEstimates, stationVariances,
recomputeGeographicCoords, updateGeographicCoords);
recomputeGeographicCoords, updateGeographicCoords,
reapplyTypeBUncertainties);
}

os << endl;
@@ -9956,8 +9995,9 @@ void dna_adjust::PrintAdjStations(ostream& os, const UINT32& block,
}

void dna_adjust::PrintAdjStationsUniqueList(ostream& os,
const v_mat_2d* stationEstimates, const v_mat_2d* stationVariances,
bool recomputeGeographicCoords, bool updateGeographicCoords)
const v_mat_2d* stationEstimates, v_mat_2d* stationVariances,
bool recomputeGeographicCoords, bool updateGeographicCoords,
bool reapplyTypeBUncertainties)
{
try {
// Print header info and columns to adj file. Throws runtime_error on failure.
@@ -10038,7 +10078,8 @@ void dna_adjust::PrintAdjStationsUniqueList(ostream& os,
PrintAdjStation(*outstream,
block, stn, mat_index,
&stationEstimates->at(block), &stationVariances->at(block),
recomputeGeographicCoords, updateGeographicCoords);
recomputeGeographicCoords, updateGeographicCoords,
reapplyTypeBUncertainties);

if (projectSettings_.a.stage)
{
@@ -14225,9 +14266,6 @@ void dna_adjust::LoadNetworkFiles()
}

v_measurementParams_ = v_measurementCount_;

// Load type b uncertainties, method handler, and the station map
InitialiseTypeBUncertainties();
}

void dna_adjust::AddDiscontinuitySites(vstring& constraintStns)
@@ -14279,7 +14317,7 @@ void dna_adjust::InitialiseTypeBUncertainties()
dna_io_tbu tbu;

// Apply global type B uncertainties to all sites
if (!projectSettings_.a.type_b_global.empty())
if (projectSettings_.o._apply_type_b_global)
{
// Load the typeb argument. The typeb argument contains type b uncertainties to be
// applied (by default) to all sies
@@ -14296,29 +14334,29 @@ void dna_adjust::InitialiseTypeBUncertainties()
}

// Apply (or overwrite) type B uncertainties to specific sites
if (projectSettings_.a.type_b_file.empty())
return;

// load station map
v_string_uint32_pair vStnsMap;
if (projectSettings_.a.map_file.empty())
projectSettings_.a.map_file = projectSettings_.g.input_folder + FOLDER_SLASH + projectSettings_.g.network_name + ".map";
LoadStationMap(&vStnsMap, projectSettings_.a.map_file);
if (projectSettings_.o._apply_type_b_file)
{
// load station map
v_string_uint32_pair vStnsMap;
if (projectSettings_.a.map_file.empty())
projectSettings_.a.map_file = projectSettings_.g.input_folder + FOLDER_SLASH + projectSettings_.g.network_name + ".map";
LoadStationMap(&vStnsMap, projectSettings_.a.map_file);

// Load the typeb file. The typeb file contains site-specific type b uncertainties
try {
// Load the typeb file. The typeb file contains site-specific type b uncertainties
try {

tbu.load_tbu_file(projectSettings_.a.type_b_file, v_typeBUncertaintiesLocal_, vStnsMap);
sort(v_typeBUncertaintiesLocal_.begin(), v_typeBUncertaintiesLocal_.end());
tbu.load_tbu_file(projectSettings_.a.type_b_file, v_typeBUncertaintiesLocal_, vStnsMap);
sort(v_typeBUncertaintiesLocal_.begin(), v_typeBUncertaintiesLocal_.end());

// reduce to the cartesian reference frame
tbu.reduce_uncertainties_local(v_typeBUncertaintiesLocal_, bstBinaryRecords_);
}
catch (const std::ifstream::failure& f) {
SignalExceptionAdjustment(f.what(), 0);
}
catch (const runtime_error& e) {
SignalExceptionAdjustment(e.what(), 0);
// reduce to the cartesian reference frame
tbu.reduce_uncertainties_local(v_typeBUncertaintiesLocal_, bstBinaryRecords_);
}
catch (const std::ifstream::failure& f) {
SignalExceptionAdjustment(f.what(), 0);
}
catch (const runtime_error& e) {
SignalExceptionAdjustment(e.what(), 0);
}
}

// Now, set the method of application
8 changes: 4 additions & 4 deletions dynadjust/dynadjust/dnaadjust/dnaadjust.hpp
Original file line number Diff line number Diff line change
@@ -796,10 +796,10 @@ class dna_adjust {
void PrintAdjMeasurements_YLLH(it_vmsr_t& _it_msr);
void ReduceYLLHMeasurementsforPrinting(vmsr_t& y_msr, matrix_2d& mpositions, printMeasurementsMode print_mode);

void PrintAdjStation(ostream& os, const UINT32& block, const UINT32& stn, const UINT32& mat_idx, const matrix_2d* stationEstimates, const matrix_2d* stationVariances, bool recomputeGeographicCoords, bool updateGeographicCoords);
void PrintAdjStations(ostream& os, const UINT32& block, const matrix_2d* stationEstimates, const matrix_2d* stationVariances,
bool printBlockID, bool recomputeGeographicCoords, bool updateGeographicCoords, bool printHeader);
void PrintAdjStationsUniqueList(ostream& os, const v_mat_2d* stationEstimates, const v_mat_2d* stationVariances, bool recomputeGeographicCoords, bool updateGeographicCoords);
void PrintAdjStation(ostream& os, const UINT32& block, const UINT32& stn, const UINT32& mat_idx, const matrix_2d* stationEstimates, matrix_2d* stationVariances, bool recomputeGeographicCoords, bool updateGeographicCoords, bool reapplyTypeBUncertainties);
void PrintAdjStations(ostream& os, const UINT32& block, const matrix_2d* stationEstimates, matrix_2d* stationVariances,
bool printBlockID, bool recomputeGeographicCoords, bool updateGeographicCoords, bool printHeader, bool reapplyTypeBUncertainties);
void PrintAdjStationsUniqueList(ostream& os, const v_mat_2d* stationEstimates, v_mat_2d* stationVariances, bool recomputeGeographicCoords, bool updateGeographicCoords, bool reapplyTypeBUncertainties);

void PrintCorStations(ostream &cor_file, const UINT32& block);
void PrintCorStationsUniqueList(ostream& cor_file);
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerCommandArguments>dsg --type-b-sd-glob "0.006,0.006,0.012" --type-b-sd-file ./dsg.typeb</LocalDebuggerCommandArguments>
<LocalDebuggerCommandArguments>dsg --type-b-sd-glob "0.006,0.006,0.012" --type-b-sd-file ./dsg.typeb --output-pos</LocalDebuggerCommandArguments>
<LocalDebuggerWorkingDirectory>$(DIST)_git_issues\type-b</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
Loading