Skip to content

Commit 935d78e

Browse files
authored
Merge pull request GeoscienceAustralia#274 from rogerfraser/1.2.9
VC proj files and LLh support for Y clusters
2 parents f877619 + 67eda1f commit 935d78e

29 files changed

+1014
-1110
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
including but not limited to software source code, documentation
2828
source, and configuration files.
2929

30-
"Object" form shall mean any form resulfirstting from mechanical
30+
"Object" form shall mean any form resulting from mechanical
3131
transformation or translation of a Source form, including but
3232
not limited to compiled object code, generated documentation,
3333
and conversions to other media types.

dynadjust/dynadjust/dnaadjust/dnaadjust.cpp

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ void dna_adjust::PrepareAdjustment(const project_settings& projectSettings)
261261
InitialiseAdjustment();
262262

263263
// Load network files
264-
LoadNetworkFiles();
264+
LoadNetworkFiles();
265265

266266
// Load type b uncertainties, method handler, and the station map
267267
InitialiseTypeBUncertainties();
@@ -2034,14 +2034,16 @@ void dna_adjust::FormConstraintStationVarianceMatrix(
20342034
// first element
20352035
if (_it_stn->stationConst[0] == 'F')
20362036
{
2037-
if (_it_stn->suppliedStationType == LLH_type_i)
2037+
if (_it_stn->suppliedStationType == LLH_type_i ||
2038+
_it_stn->suppliedStationType == LLh_type_i)
20382039
var_local.put(1, 1, _var_F); // Latitude: 'F'ree in the north-south (n/y) direction
20392040
else
20402041
var_local.put(0, 0, _var_F); // Easting/X: 'F'ree in the east-west or X direction
20412042
}
20422043
else
20432044
{
2044-
if (_it_stn->suppliedStationType == LLH_type_i)
2045+
if (_it_stn->suppliedStationType == LLH_type_i ||
2046+
_it_stn->suppliedStationType == LLh_type_i)
20452047
var_local.put(1, 1, _var_C); // Latitude: 'C'onstrained in the north-south (n/y) direction
20462048
else
20472049
var_local.put(0, 0, _var_C); // Easting/X: 'C'onstrained in the east-west or X direction
@@ -2050,14 +2052,16 @@ void dna_adjust::FormConstraintStationVarianceMatrix(
20502052
// second element
20512053
if (_it_stn->stationConst[1] == 'F')
20522054
{
2053-
if (_it_stn->suppliedStationType == LLH_type_i)
2055+
if (_it_stn->suppliedStationType == LLH_type_i ||
2056+
_it_stn->suppliedStationType == LLh_type_i)
20542057
var_local.put(0, 0, _var_F);
20552058
else
20562059
var_local.put(1, 1, _var_F);
20572060
}
20582061
else
20592062
{
2060-
if (_it_stn->suppliedStationType == LLH_type_i)
2063+
if (_it_stn->suppliedStationType == LLH_type_i ||
2064+
_it_stn->suppliedStationType == LLh_type_i)
20612065
var_local.put(0, 0, _var_C);
20622066
else
20632067
var_local.put(1, 1, _var_C);
@@ -5350,7 +5354,8 @@ void dna_adjust::LoadVarianceMatrix_Y(it_vmsr_t _it_msr, matrix_2d* var_cart, co
53505354
stn1_it = bstBinaryRecords_.begin() + _it_msr->station1;
53515355

53525356
// store latitude, longitude and ellipsoid height
5353-
if (scalePartial || coordType == LLH_type_i)
5357+
if (scalePartial || coordType == LLH_type_i ||
5358+
coordType == LLh_type_i)
53545359
{
53555360
mpositions.put(covr, 0, stn1_it->currentLatitude);
53565361
mpositions.put(covr+1, 0, stn1_it->currentLongitude);
@@ -5400,7 +5405,7 @@ void dna_adjust::LoadVarianceMatrix_Y(it_vmsr_t _it_msr, matrix_2d* var_cart, co
54005405
}
54015406

54025407
bool lowerisClear(true);
5403-
if (scaleMatrix || scalePartial || coordType == LLH_type_i)
5408+
if (scaleMatrix || scalePartial || coordType == LLH_type_i || coordType == LLh_type_i)
54045409
{
54055410
var_cart->filllower();
54065411
lowerisClear = false;
@@ -5419,7 +5424,7 @@ void dna_adjust::LoadVarianceMatrix_Y(it_vmsr_t _it_msr, matrix_2d* var_cart, co
54195424
pScale, lScale, hScale, coordType);
54205425

54215426
// Propagate variance matrix into cartesian reference frame?
5422-
else if (coordType == LLH_type_i)
5427+
else if (coordType == LLH_type_i || coordType == LLh_type_i)
54235428
PropagateVariances_GeoCart_Cluster<double>(*var_cart, var_cart,
54245429
mpositions,
54255430
datum_.GetEllipsoidRef(),
@@ -5433,7 +5438,7 @@ void dna_adjust::LoadVarianceMatrix_Y(it_vmsr_t _it_msr, matrix_2d* var_cart, co
54335438
// in PLH reference frame.
54345439
// This alleviates having to repeat any scaling for subsequent computations
54355440
// involving variances (i.e. sigma zero, Pelzer's reliability, etc)
5436-
if (scaleMatrix || scalePartial || coordType == LLH_type_i)
5441+
if (scaleMatrix || scalePartial || coordType == LLH_type_i || coordType == LLh_type_i)
54375442
SetGPSVarianceMatrix<it_vmsr_t>(_it_msr_first, *var_cart);
54385443

54395444
// Perform inverse
@@ -7057,7 +7062,7 @@ void dna_adjust::UpdateDesignNormalMeasMatrices_Y(pit_vmsr_t _it_msr, UINT32& de
70577062
stn1 = GetBlkMatrixElemStn1(block, _it_msr);
70587063

70597064
// Convert to cartesian reference frame?
7060-
if (coordType == LLH_type_i)
7065+
if (coordType == LLH_type_i || coordType == LLh_type_i)
70617066
{
70627067
// This section (and others in this function where coordType == LLH_type_i)
70637068
// will only be performed once because this measurement will be converted
@@ -7098,7 +7103,7 @@ void dna_adjust::UpdateDesignNormalMeasMatrices_Y(pit_vmsr_t _it_msr, UINT32& de
70987103
snprintf((*_it_msr)->coordType, sizeof((*_it_msr)->coordType), "%s", XYZ_type);
70997104

71007105
// retain original reference frame
7101-
(*_it_msr)->station3 = LLH_type_i;
7106+
(*_it_msr)->station3 = coordType;
71027107
}
71037108

71047109
// If this method is called via PrepareAdjustment() and the adjustment
@@ -7129,21 +7134,22 @@ void dna_adjust::UpdateDesignNormalMeasMatrices_Y(pit_vmsr_t _it_msr, UINT32& de
71297134
}
71307135

71317136
if (buildnewMatrices)
7132-
if (coordType != LLH_type_i && (*_it_msr)->station3 != LLH_type_i)
7137+
if (coordType != LLH_type_i && (*_it_msr)->station3 != LLH_type_i &&
7138+
coordType != LLh_type_i && (*_it_msr)->station3 != LLh_type_i)
71337139
(*_it_msr)->preAdjMeas = (*_it_msr)->term1;
71347140

71357141
// move to Y element
71367142
(*_it_msr)++;
71377143

71387144
// measurements matrix Y
7139-
if (coordType == LLH_type_i)
7145+
if (coordType == LLH_type_i || coordType == LLh_type_i)
71407146
{
71417147
// Update bms record
71427148
(*_it_msr)->term1 = y;
71437149
snprintf((*_it_msr)->coordType, sizeof((*_it_msr)->coordType), "%s", XYZ_type);
71447150

71457151
// retain original reference frame
7146-
(*_it_msr)->station3 = LLH_type_i;
7152+
(*_it_msr)->station3 = coordType;
71477153
}
71487154

71497155
// If this method is called via PrepareAdjustment() and the adjustment
@@ -7174,21 +7180,22 @@ void dna_adjust::UpdateDesignNormalMeasMatrices_Y(pit_vmsr_t _it_msr, UINT32& de
71747180
}
71757181

71767182
if (buildnewMatrices)
7177-
if (coordType != LLH_type_i && (*_it_msr)->station3 != LLH_type_i)
7183+
if ((coordType != LLH_type_i && (*_it_msr)->station3 != LLH_type_i) &&
7184+
(coordType != LLh_type_i && (*_it_msr)->station3 != LLh_type_i))
71787185
(*_it_msr)->preAdjMeas = (*_it_msr)->term1;
71797186

71807187
// move to Z element
71817188
(*_it_msr)++;
71827189

71837190
// measurements matrix Z
7184-
if (coordType == LLH_type_i)
7191+
if (coordType == LLH_type_i || coordType == LLh_type_i)
71857192
{
71867193
// Update bms record
71877194
(*_it_msr)->term1 = z;
71887195
snprintf((*_it_msr)->coordType, sizeof((*_it_msr)->coordType), "%s", XYZ_type);
71897196

71907197
// retain original reference frame
7191-
(*_it_msr)->station3 = LLH_type_i;
7198+
(*_it_msr)->station3 = coordType;
71927199
}
71937200

71947201
// If this method is called via PrepareAdjustment() and the adjustment
@@ -7221,7 +7228,8 @@ void dna_adjust::UpdateDesignNormalMeasMatrices_Y(pit_vmsr_t _it_msr, UINT32& de
72217228
}
72227229

72237230
if (buildnewMatrices)
7224-
if (coordType != LLH_type_i && (*_it_msr)->station3 != LLH_type_i)
7231+
if ((coordType != LLH_type_i && (*_it_msr)->station3 != LLH_type_i) &&
7232+
(coordType != LLh_type_i && (*_it_msr)->station3 != LLh_type_i))
72257233
(*_it_msr)->preAdjMeas = (*_it_msr)->term1;
72267234

72277235
covariance_count = (*_it_msr)->vectorCount2;
@@ -11555,7 +11563,7 @@ void dna_adjust::UpdateIgnoredMeasurements_Y(pit_vmsr_t _it_msr, bool storeOrigi
1155511563
(*_it_msr)->preAdjMeas = (*_it_msr)->term1;
1155611564

1155711565
// Convert to geographic coordinates?
11558-
if (coordType == LLH_type_i)
11566+
if (coordType == LLH_type_i || coordType == LLh_type_i)
1155911567
{
1156011568
CartToGeo<double>(x, y, z, &latitude, &longitude, &height, datum_.GetEllipsoidRef());
1156111569
(*_it_msr)->measAdj = latitude;
@@ -11569,7 +11577,7 @@ void dna_adjust::UpdateIgnoredMeasurements_Y(pit_vmsr_t _it_msr, bool storeOrigi
1156911577
if (storeOriginalMeasurement)
1157011578
(*_it_msr)->preAdjMeas = (*_it_msr)->term1;
1157111579

11572-
if (coordType == LLH_type_i)
11580+
if (coordType == LLH_type_i || coordType == LLh_type_i)
1157311581
(*_it_msr)->measAdj = longitude;
1157411582
else
1157511583
(*_it_msr)->measAdj = y;
@@ -11580,7 +11588,7 @@ void dna_adjust::UpdateIgnoredMeasurements_Y(pit_vmsr_t _it_msr, bool storeOrigi
1158011588
if (storeOriginalMeasurement)
1158111589
(*_it_msr)->preAdjMeas = (*_it_msr)->term1;
1158211590

11583-
if (coordType == LLH_type_i)
11591+
if (coordType == LLH_type_i || coordType == LLh_type_i)
1158411592
{
1158511593
// Reduce to ellipsoid height?
1158611594
if (fabs(stn1_it->geoidSep) > PRECISION_1E4)
@@ -12477,7 +12485,8 @@ void dna_adjust::PrintCompMeasurements_GXY(const UINT32& block, it_vmsr_t& _it_m
1247712485
// Is this a Y cluster specified in latitude, longitude, height?
1247812486
if (_it_msr->measType == 'Y')
1247912487
{
12480-
if (_it_msr->station3 == LLH_type_i)
12488+
if (_it_msr->station3 == LLH_type_i ||
12489+
_it_msr->station3 == LLh_type_i)
1248112490
{
1248212491
// Print phi, lambda, H
1248312492
PrintCompMeasurements_YLLH(_it_msr, design_row);
@@ -13186,8 +13195,8 @@ void dna_adjust::ReduceYLLHMeasurementsforPrinting(vmsr_t& y_msr, matrix_2d& mpo
1318613195
}
1318713196

1318813197
// Reduce ellipsoidal height to orthometric height
13189-
if (fabs(stn1_it->geoidSep) > PRECISION_1E4)
13190-
height -= stn1_it->geoidSep;
13198+
if (fabs(stn1_it->geoidSep) > PRECISION_1E4)
13199+
height -= stn1_it->geoidSep;
1319113200

1319213201
// Assign computed values
1319313202
_it_y_msr->measAdj = latitude;
@@ -13377,7 +13386,8 @@ void dna_adjust::PrintAdjMeasurements_GXY(it_vmsr_t& _it_msr, const uint32_uint3
1337713386
// Is this a Y cluster specified in latitude, longitude, height?
1337813387
if (_it_msr->measType == 'Y')
1337913388
{
13380-
if (_it_msr->station3 == LLH_type_i)
13389+
if (_it_msr->station3 == LLH_type_i ||
13390+
_it_msr->station3 == LLh_type_i)
1338113391
{
1338213392
// Print phi, lambda, H
1338313393
PrintAdjMeasurements_YLLH(_it_msr);

dynadjust/dynadjust/dnaadjust/dnaadjust.vcxproj.user

Lines changed: 0 additions & 4 deletions
This file was deleted.

dynadjust/dynadjust/dnaadjust/dnaadjust.vcxproj.filters renamed to dynadjust/dynadjust/dnaadjust/dnaadjust_mkl.vcxproj.filters

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@
6363
<ClInclude Include="..\..\include\parameters\dnadatum.hpp">
6464
<Filter>Header Files</Filter>
6565
</ClInclude>
66-
<ClInclude Include="precompile.h">
67-
<Filter>Header Files</Filter>
68-
</ClInclude>
6966
<ClInclude Include="..\..\include\memory\dnafile_mapping.hpp">
7067
<Filter>Header Files</Filter>
7168
</ClInclude>
@@ -84,11 +81,17 @@
8481
<ClInclude Include="..\..\include\io\dnaiotbu.hpp">
8582
<Filter>Header Files</Filter>
8683
</ClInclude>
84+
<ClInclude Include="precompile.h">
85+
<Filter>Header Files</Filter>
86+
</ClInclude>
8787
</ItemGroup>
8888
<ItemGroup>
8989
<ClCompile Include="dnaadjust.cpp">
9090
<Filter>Source Files</Filter>
9191
</ClCompile>
92+
<ClCompile Include="dnaadjust-stage.cpp">
93+
<Filter>Source Files</Filter>
94+
</ClCompile>
9295
<ClCompile Include="..\..\include\measurement_types\dnamsrtally.cpp">
9396
<Filter>Source Files</Filter>
9497
</ClCompile>
@@ -110,9 +113,6 @@
110113
<ClCompile Include="..\..\include\io\dnaioseg.cpp">
111114
<Filter>Source Files</Filter>
112115
</ClCompile>
113-
<ClCompile Include="dnaadjust-stage.cpp">
114-
<Filter>Source Files</Filter>
115-
</ClCompile>
116116
<ClCompile Include="..\..\include\functions\dnastringfuncs.cpp">
117117
<Filter>Source Files</Filter>
118118
</ClCompile>
@@ -140,9 +140,6 @@
140140
<ClCompile Include="..\..\include\parameters\dnadatum.cpp">
141141
<Filter>Source Files</Filter>
142142
</ClCompile>
143-
<ClCompile Include="precompile.cpp">
144-
<Filter>Source Files</Filter>
145-
</ClCompile>
146143
<ClCompile Include="..\..\include\memory\dnafile_mapping.cpp">
147144
<Filter>Source Files</Filter>
148145
</ClCompile>
@@ -161,6 +158,9 @@
161158
<ClCompile Include="..\..\include\io\dnaiotbu.cpp">
162159
<Filter>Source Files</Filter>
163160
</ClCompile>
161+
<ClCompile Include="precompile.cpp">
162+
<Filter>Source Files</Filter>
163+
</ClCompile>
164164
</ItemGroup>
165165
<ItemGroup>
166166
<ResourceCompile Include="..\..\dynadjust.rc">

dynadjust/dynadjust/dnaadjustwrapper/dnaadjustwrapper.vcxproj.user

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)