• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

icsm-au / DynAdjust / 13494567994

24 Feb 2025 09:15AM UTC coverage: 81.168% (+2.0%) from 79.161%
13494567994

push

github

web-flow
Merge pull request #234 from icsm-au/1.2.8

Version 1.2.8 (fixes, ehnacements, improved datum management)

6131 of 8137 new or added lines in 90 files covered. (75.35%)

162 existing lines in 33 files now uncovered.

32214 of 39688 relevant lines covered (81.17%)

11775.25 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

85.38
/dynadjust/include/measurement_types/dnagpsbaseline.cpp
1
//============================================================================
2
// Name         : dnagpsbaseline.cpp
3
// Author       : Roger Fraser
4
// Contributors :
5
// Version      : 1.00
6
// Copyright    : Copyright 2017 Geoscience Australia
7
//
8
//                Licensed under the Apache License, Version 2.0 (the "License");
9
//                you may not use this file except in compliance with the License.
10
//                You may obtain a copy of the License at
11
//               
12
//                http ://www.apache.org/licenses/LICENSE-2.0
13
//               
14
//                Unless required by applicable law or agreed to in writing, software
15
//                distributed under the License is distributed on an "AS IS" BASIS,
16
//                WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
//                See the License for the specific language governing permissions and
18
//                limitations under the License.
19
//
20
// Description  : CDnaGpsBaseline and CDnaGpsBaselineCluster implementation file
21
//============================================================================
22

23
#include <include/exception/dnaexception.hpp>
24
#include <include/parameters/dnaepsg.hpp>
25
#include <include/measurement_types/dnagpsbaseline.hpp>
26

27
using namespace dynadjust::exception;
28
using namespace dynadjust::epsg;
29

30
namespace dynadjust {
31
namespace measurements {
32

33
CDnaGpsBaseline::CDnaGpsBaseline(void)
3,918✔
34
        : m_strTarget("")
7,836✔
35
        , m_lRecordedTotal(0)
3,918✔
36
        , m_dX(0.)
3,918✔
37
        , m_dY(0.)
3,918✔
38
        , m_dZ(0.)
3,918✔
39
        , m_dSigmaXX(0.)
3,918✔
40
        , m_dSigmaXY(0.)
3,918✔
41
        , m_dSigmaXZ(0.)
3,918✔
42
        , m_dSigmaYY(0.)
3,918✔
43
        , m_dSigmaYZ(0.)
3,918✔
44
        , m_dSigmaZZ(0.)
3,918✔
45
        , m_dPscale(1.)
3,918✔
46
        , m_dLscale(1.)
3,918✔
47
        , m_dHscale(1.)
3,918✔
48
        , m_dVscale(1.)
3,918✔
49
        , m_referenceFrame(DEFAULT_DATUM)
3,918✔
50
        , m_lclusterID(0)
7,836✔
51
{
52
        SetEpoch(DEFAULT_EPOCH);
7,836✔
53
        SetEpsg(epsgStringFromName<std::string>(m_referenceFrame));
3,918✔
54

55
        m_vGpsCovariances.clear();
3,918✔
56
        m_vGpsCovariances.reserve(0);
3,918✔
57
        m_MSmeasurementStations = TWO_STATION;
3,918✔
58
}
3,918✔
59

60

61
CDnaGpsBaseline::~CDnaGpsBaseline(void)
7,296✔
62
{
63

64
}
20,690✔
65

66
// move constructor
67
CDnaGpsBaseline::CDnaGpsBaseline(CDnaGpsBaseline&& g)
3,373✔
68
{
69
        m_strType = g.m_strType;
3,373✔
70
        m_strFirst = g.m_strFirst;
3,373✔
71
        m_strTarget = g.m_strTarget;
3,373✔
72
        m_bIgnore = g.m_bIgnore;
3,373✔
73
        m_lRecordedTotal = g.m_lRecordedTotal;
3,373✔
74
        
75
        m_referenceFrame = g.m_referenceFrame;
3,373✔
76
        m_epsgCode = g.m_epsgCode;
3,373✔
77
        m_epoch = g.m_epoch;
3,373✔
78
        
79
        m_dX = g.m_dX;
3,373✔
80
        m_dY = g.m_dY;
3,373✔
81
        m_dZ = g.m_dZ;
3,373✔
82
        m_dSigmaXX = g.m_dSigmaXX;
3,373✔
83
        m_dSigmaXY = g.m_dSigmaXY;
3,373✔
84
        m_dSigmaXZ = g.m_dSigmaXZ;
3,373✔
85
        m_dSigmaYY = g.m_dSigmaYY;
3,373✔
86
        m_dSigmaYZ = g.m_dSigmaYZ;
3,373✔
87
        m_dSigmaZZ = g.m_dSigmaZZ;
3,373✔
88
        
89
        m_dPscale = g.m_dPscale;
3,373✔
90
        m_dLscale = g.m_dLscale;
3,373✔
91
        m_dHscale = g.m_dHscale;
3,373✔
92
        m_dVscale = g.m_dVscale;
3,373✔
93
        
94
        m_lclusterID = g.m_lclusterID;
3,373✔
95
        m_MSmeasurementStations = g.m_MSmeasurementStations;
3,373✔
96
        
97
        m_vGpsCovariances = std::move(g.m_vGpsCovariances);
3,373✔
98
        
99
        m_msr_db_map = g.m_msr_db_map;
3,373✔
100
}
3,373✔
101

102
// move assignment operator
103
CDnaGpsBaseline& CDnaGpsBaseline::operator= (CDnaGpsBaseline&& rhs)
5✔
104
{
105
        // check for assignment to self!
106
        if (this == &rhs)
5✔
107
                return *this;
108

109
        CDnaMeasurement::operator=(std::move(rhs));
5✔
110
        m_strTarget = rhs.m_strTarget;
5✔
111
        m_lRecordedTotal = rhs.m_lRecordedTotal;
5✔
112

113
        m_referenceFrame = rhs.m_referenceFrame;
5✔
114
        m_epsgCode = rhs.m_epsgCode;
5✔
115
        m_epoch = rhs.m_epoch;
5✔
116

117
        m_dX = rhs.m_dX;
5✔
118
        m_dY = rhs.m_dY;
5✔
119
        m_dZ = rhs.m_dZ;
5✔
120
        m_dSigmaXX = rhs.m_dSigmaXX;
5✔
121
        m_dSigmaXY = rhs.m_dSigmaXY;
5✔
122
        m_dSigmaXZ = rhs.m_dSigmaXZ;
5✔
123
        m_dSigmaYY = rhs.m_dSigmaYY;
5✔
124
        m_dSigmaYZ = rhs.m_dSigmaYZ;
5✔
125
        m_dSigmaZZ = rhs.m_dSigmaZZ;
5✔
126

127
        m_dPscale = rhs.m_dPscale;
5✔
128
        m_dLscale = rhs.m_dLscale;
5✔
129
        m_dHscale = rhs.m_dHscale;
5✔
130
        m_dVscale = rhs.m_dVscale;
5✔
131

132
        m_lclusterID = rhs.m_lclusterID;
5✔
133
        m_MSmeasurementStations = rhs.m_MSmeasurementStations;
5✔
134

135
        m_vGpsCovariances = std::move(rhs.m_vGpsCovariances);
5✔
136

137
        m_msr_db_map = rhs.m_msr_db_map;
5✔
138

139
        return *this;
5✔
140
}
141
        
142

143
bool CDnaGpsBaseline::operator== (const CDnaGpsBaseline& rhs) const
28✔
144
{
145
        return (
28✔
146
                m_strFirst == rhs.m_strFirst &&
56✔
147
                m_strTarget == rhs.m_strTarget &&
28✔
148
                m_strType == rhs.m_strType &&
11✔
149
                m_lRecordedTotal == rhs.m_lRecordedTotal &&
11✔
150
                m_bIgnore == rhs.m_bIgnore &&
11✔
151
                fabs(m_dX - rhs.m_dX) < PRECISION_1E4 &&
11✔
152
                fabs(m_dY - rhs.m_dY) < PRECISION_1E4 &&
6✔
153
                fabs(m_dZ - rhs.m_dZ) < PRECISION_1E4 &&
12✔
154
                boost::iequals(m_referenceFrame, rhs.m_referenceFrame) &&
40✔
155
                m_epoch == rhs.m_epoch
6✔
156
                );
28✔
157
}
158

159
bool CDnaGpsBaseline::operator< (const CDnaGpsBaseline& rhs) const
70✔
160
{
161
        if (m_strFirst == rhs.m_strFirst) {
70✔
162
                if (m_strTarget == rhs.m_strTarget) {
70✔
163
                        if (m_strType == rhs.m_strType) {
21✔
164
                                if (m_lRecordedTotal == rhs.m_lRecordedTotal) {
21✔
165
                                        if (m_bIgnore == rhs.m_bIgnore) {
21✔
166
                                                if (m_epoch == rhs.m_epoch) {
21✔
167
                                                        if (fabs(m_dX - rhs.m_dX) < PRECISION_1E4) {
21✔
168
                                                                if (fabs(m_dY - rhs.m_dY) < PRECISION_1E4) {
12✔
169
                                                                        return m_dZ < rhs.m_dZ; }
12✔
170
                                                                else
171
                                                                        return m_dY < rhs.m_dY; }
×
172
                                                        else
173
                                                                return m_dX < rhs.m_dX; }
9✔
174
                                                else
175
                                                        return m_epoch < rhs.m_epoch; }
×
176
                                        else
177
                                                return m_bIgnore < rhs.m_bIgnore; }
×
178
                                else
179
                                        return m_lRecordedTotal < rhs.m_lRecordedTotal;        }
×
180
                        else
181
                                return m_strType < rhs.m_strType; }
×
182
                else
183
                        return m_strTarget < rhs.m_strTarget; }
49✔
184
        else
185
                return m_strFirst < rhs.m_strFirst;
×
186
}
187

188
void CDnaGpsBaseline::ReserveGpsCovariancesCount(const UINT32& size)
2,832✔
189
{
190
        m_vGpsCovariances.reserve(size);
2,832✔
191
}
2,832✔
192

193

194
void CDnaGpsBaseline::ResizeGpsCovariancesCount(const UINT32& size)
2,774✔
195
{
196
        m_vGpsCovariances.resize(size);
2,774✔
197
}
2,774✔
198

199

200
void CDnaGpsBaseline::AddGpsCovariance(const CDnaCovariance* pGpsCovariance)
104✔
201
{
202
        m_vGpsCovariances.push_back(std::move((CDnaCovariance&)*pGpsCovariance));
104✔
203
}
104✔
204
        
205

206
UINT32 CDnaGpsBaseline::CalcBinaryRecordCount() const
3,189✔
207
{
208
        UINT32 RecordCount = 3;
3,189✔
209
        std::vector<CDnaCovariance>::const_iterator _it_cov = m_vGpsCovariances.begin();
3,189✔
210
        for (; _it_cov!=m_vGpsCovariances.end(); ++_it_cov)
3,296✔
211
                RecordCount += _it_cov->CalcBinaryRecordCount();
107✔
212
        return RecordCount;
3,189✔
213
}
214
        
215

216
void CDnaGpsBaseline::WriteDynaMLMsr(std::ofstream* dynaml_stream, const std::string&, bool) const
824✔
217
{
218
        *dynaml_stream << "    <First>" << m_strFirst << "</First>" << std::endl;
824✔
219
        *dynaml_stream << "    <Second>" << m_strTarget << "</Second>" << std::endl;
824✔
220

221
        UINT32 precision = 4;
824✔
222
        
223
        *dynaml_stream << "    <GPSBaseline>" << std::endl;
824✔
224
        *dynaml_stream << "      <X>" << std::fixed << std::setprecision(precision) << m_dX << "</X>" << std::endl;
824✔
225
        *dynaml_stream << "      <Y>" << m_dY << "</Y>" << std::endl;
824✔
226
        *dynaml_stream << "      <Z>" << m_dZ << "</Z>" << std::endl;
824✔
227

228
        if (m_msr_db_map.is_msr_id_set)
824✔
229
                *dynaml_stream << "      <MeasurementID>" << m_msr_db_map.msr_id << "</MeasurementID>" << std::endl;
99✔
230

231
        *dynaml_stream << "      <SigmaXX>" << std::scientific << std::setprecision(13) << m_dSigmaXX << "</SigmaXX>" << std::endl;
824✔
232
        *dynaml_stream << "      <SigmaXY>" << m_dSigmaXY << "</SigmaXY>" << std::endl;
824✔
233
        *dynaml_stream << "      <SigmaXZ>" << m_dSigmaXZ << "</SigmaXZ>" << std::endl;
824✔
234
        *dynaml_stream << "      <SigmaYY>" << m_dSigmaYY << "</SigmaYY>" << std::endl;
824✔
235
        *dynaml_stream << "      <SigmaYZ>" << m_dSigmaYZ << "</SigmaYZ>" << std::endl;
824✔
236
        *dynaml_stream << "      <SigmaZZ>" << m_dSigmaZZ << "</SigmaZZ>" << std::endl;
824✔
237

238
        // write GPSPoint covariances
239
        std::vector<CDnaCovariance>::const_iterator _it_cov = m_vGpsCovariances.begin();
824✔
240
        for (; _it_cov!=m_vGpsCovariances.end(); ++_it_cov)
875✔
241
                _it_cov->WriteDynaMLMsr(dynaml_stream);
51✔
242

243
        *dynaml_stream << "    </GPSBaseline>" << std::endl;
824✔
244

245
}
824✔
246

247

248
void CDnaGpsBaseline::WriteDNAMsr(std::ofstream* dna_stream, const dna_msr_fields& dmw, const dna_msr_fields& dml, bool) const
476✔
249
{
250
        *dna_stream << std::setw(dmw.msr_type) << m_strType;
476✔
251
        if (m_bIgnore)
476✔
NEW
252
                *dna_stream << std::setw(dmw.msr_ignore) << "*";
×
253
        else
254
                *dna_stream << std::setw(dmw.msr_ignore) << " ";
476✔
255

256
        *dna_stream << std::left << std::setw(dmw.msr_inst) << m_strFirst;
476✔
257
        *dna_stream << std::left << std::setw(dmw.msr_targ1) << m_strTarget;
476✔
258

259
        // Print header for G baseline and first X cluster baseline
260
        bool printHeader(true);
476✔
261
        
262
        if (GetTypeC() == 'X')
476✔
263
        {
264
                if (m_lRecordedTotal != m_vGpsCovariances.size() + 1)
48✔
265
                {
266
                        printHeader = false;
24✔
267

268
                        // print database ids
269
                        if (m_msr_db_map.is_msr_id_set)
24✔
270
                                *dna_stream << std::setw(dml.msr_id_msr - dml.msr_targ2) << " " <<
6✔
271
                                        std::right << std::setw(dmw.msr_id_msr) << m_msr_db_map.msr_id;
6✔
272
                        if (m_msr_db_map.is_cls_id_set)
24✔
273
                                *dna_stream << std::setw(dmw.msr_id_cluster) << m_msr_db_map.cluster_id;                        
6✔
274
                }
275
        }
276

277
        if (printHeader)
278
        {
279
                if (GetTypeC() == 'X')
452✔
280
                        *dna_stream << std::left << std::setw(dmw.msr_targ2) << m_lRecordedTotal;
24✔
281
                else
282
                        *dna_stream << std::right << std::setw(dmw.msr_targ2) << " ";
428✔
283
                
284
                // print scaling
285
                *dna_stream << 
452✔
286
                        std::fixed << std::setprecision(2) << 
452✔
287
                        std::right << std::setw(dmw.msr_gps_vscale) << double_string_width<double, UINT32, std::string>(m_dVscale, dmw.msr_gps_vscale) <<
904✔
288
                        std::right << std::setw(dmw.msr_gps_pscale) << double_string_width<double, UINT32, std::string>(m_dPscale, dmw.msr_gps_vscale) <<
1,356✔
289
                        std::right << std::setw(dmw.msr_gps_lscale) << double_string_width<double, UINT32, std::string>(m_dLscale, dmw.msr_gps_vscale) <<
1,356✔
290
                        std::right << std::setw(dmw.msr_gps_hscale) << double_string_width<double, UINT32, std::string>(m_dHscale, dmw.msr_gps_vscale);
1,356✔
291

292
                // print reference frame and epoch
293
                *dna_stream <<
452✔
294
                        std::right << std::setw(dmw.msr_gps_reframe) << m_referenceFrame <<
452✔
295
                        std::right << std::setw(dmw.msr_gps_epoch) << m_epoch;
452✔
296

297
                // print database ids
298
                if (m_msr_db_map.is_msr_id_set)
452✔
299
                        *dna_stream << std::setw(dmw.msr_id_msr) << m_msr_db_map.msr_id;
12✔
300
                if (m_msr_db_map.is_cls_id_set)
452✔
301
                        *dna_stream << std::setw(dmw.msr_id_cluster) << m_msr_db_map.cluster_id;
12✔
302
        }
303

304
        *dna_stream << std::endl;
476✔
305

306
        UINT32 pad(dmw.msr_type + dmw.msr_ignore + dmw.msr_inst + dmw.msr_targ1 + dmw.msr_targ2);
476✔
307

308
        // X
309
        *dna_stream << std::setw(pad) << " ";
476✔
310
        *dna_stream << std::right << std::setw(dmw.msr_gps) << std::fixed << std::setprecision(4) << m_dX;
476✔
311
        *dna_stream << std::right << std::setw(dmw.msr_gps_vcv_1) << std::scientific << std::setprecision(13) << m_dSigmaXX;
476✔
312
        *dna_stream << std::endl;
476✔
313
                
314
        // Y
315
        *dna_stream << std::setw(pad) << " ";
476✔
316
        *dna_stream << std::right << std::setw(dmw.msr_gps) << std::fixed << std::setprecision(4) << m_dY;
476✔
317
        *dna_stream << 
476✔
318
                std::right << std::setw(dmw.msr_gps_vcv_1) << std::scientific << std::setprecision(13) << m_dSigmaXY << 
476✔
319
                std::right << std::setw(dmw.msr_gps_vcv_2) << m_dSigmaYY;
476✔
320
        *dna_stream << std::endl;
476✔
321

322
        // Z
323
        *dna_stream << std::setw(pad) << " ";
476✔
324
        *dna_stream << std::right << std::setw(dmw.msr_gps) << std::fixed << std::setprecision(4) << m_dZ;
476✔
325
        *dna_stream << 
476✔
326
                std::right << std::setw(dmw.msr_gps_vcv_1) << std::scientific << std::setprecision(13) << m_dSigmaXZ <<
476✔
327
                std::right << std::setw(dmw.msr_gps_vcv_2) << m_dSigmaYZ << 
476✔
328
                std::right << std::setw(dmw.msr_gps_vcv_3) << m_dSigmaZZ;
476✔
329
        *dna_stream << std::endl;
476✔
330

331
        // write GPSBaseline covariances (not supported by DNA format)
332
        std::vector<CDnaCovariance>::const_iterator _it_cov = m_vGpsCovariances.begin();
476✔
333
        for (_it_cov=m_vGpsCovariances.begin(); _it_cov!=m_vGpsCovariances.end(); ++_it_cov)
512✔
334
                _it_cov->WriteDNAMsr(dna_stream, dmw, dml);
36✔
335
}
476✔
336
        
337

338
void CDnaGpsBaseline::SimulateMsr(vdnaStnPtr* vStations, const CDnaEllipsoid* ellipsoid)
4✔
339
{
340
        m_dX = (vStations->at(m_lstn2Index).get()->GetXAxis() - vStations->at(m_lstn1Index).get()->GetXAxis());
4✔
341
        m_dY = (vStations->at(m_lstn2Index).get()->GetYAxis() - vStations->at(m_lstn1Index).get()->GetYAxis());
4✔
342
        m_dZ = (vStations->at(m_lstn2Index).get()->GetZAxis() - vStations->at(m_lstn1Index).get()->GetZAxis());
4✔
343

344
        m_dSigmaXX = 4.022E-05;                    
4✔
345
        m_dSigmaXY = -1.369E-05;
4✔
346
        m_dSigmaXZ = 3.975E-05;
4✔
347
        m_dSigmaYY = 1.487E-05;
4✔
348
        m_dSigmaYZ = -2.035E-05;
4✔
349
        m_dSigmaZZ = 6.803E-05;
4✔
350

351
        std::vector<CDnaCovariance>::iterator _it_cov = m_vGpsCovariances.begin();
4✔
352
        for (_it_cov=m_vGpsCovariances.begin(); _it_cov!=m_vGpsCovariances.end(); ++_it_cov)
5✔
353
                _it_cov->SimulateMsr(vStations, ellipsoid);
1✔
354
}
4✔
355
        
356

357
UINT32 CDnaGpsBaseline::SetMeasurementRec(const vstn_t& binaryStn, it_vmsr_t& it_msr, it_vdbid_t& dbidmap)
579✔
358
{
359
        // first station
360
        m_lstn1Index = it_msr->station1;
579✔
361
        m_strFirst = binaryStn.at(it_msr->station1).stationName;
579✔
362

363
        // target station
364
        m_lstn2Index = it_msr->station2;
579✔
365
        m_strTarget = binaryStn.at(it_msr->station2).stationName;
579✔
366
        
367
        m_dPscale = it_msr->scale1;
579✔
368
        m_dLscale = it_msr->scale2;
579✔
369
        m_dHscale = it_msr->scale3;
579✔
370
        m_dVscale = it_msr->scale4;
579✔
371

372
        m_epoch = it_msr->epoch;
579✔
373
        m_epsgCode = it_msr->epsgCode;
579✔
374
        m_referenceFrame = datumFromEpsgString<std::string>(it_msr->epsgCode);
1,737✔
375

376
        m_lclusterID = it_msr->clusterID;
579✔
377
        m_MSmeasurementStations = (MEASUREMENT_STATIONS)it_msr->measurementStations;
579✔
378

379
        // X, sigmaXX
380
        m_bIgnore = it_msr->ignore;
579✔
381
        m_strType = it_msr->measType;
579✔
382
        m_dX = it_msr->term1;
579✔
383
        m_dSigmaXX = it_msr->term2;
579✔
384
        m_lRecordedTotal = it_msr->vectorCount1;
579✔
385

386
        it_msr++;
579✔
387
        
388
        m_dY = it_msr->term1;
579✔
389
        m_dSigmaXY = it_msr->term2;
579✔
390
        m_dSigmaYY = it_msr->term3;
579✔
391

392
        it_msr++;
579✔
393

394
        m_dZ = it_msr->term1;
579✔
395
        m_dSigmaXZ = it_msr->term2;
579✔
396
        m_dSigmaYZ = it_msr->term3;
579✔
397
        m_dSigmaZZ = it_msr->term4;
579✔
398
        m_lRecordedTotal = it_msr->vectorCount1;
579✔
399

400
        m_vGpsCovariances.clear();
579✔
401
        m_vGpsCovariances.resize(it_msr->vectorCount2);
579✔
402

403
        CDnaMeasurement::SetDatabaseMap(*dbidmap);
579✔
404
        dbidmap += 2;
579✔
405
        dbidmap += (it_msr->vectorCount2 * 3);
579✔
406

407
        // now covariances
408
        std::vector<CDnaCovariance>::iterator _it_cov = m_vGpsCovariances.begin();
579✔
409
        for (; _it_cov!=m_vGpsCovariances.end(); ++_it_cov)
623✔
410
                _it_cov->SetMeasurementRec(binaryStn, it_msr);
44✔
411

412
        return it_msr->vectorCount1;
579✔
413
}
414

415

416
void CDnaGpsBaseline::WriteBinaryMsr(std::ofstream* binary_stream, PUINT32 msrIndex) const
3,189✔
417
{
418
        measurement_t measRecord;
3,189✔
419
        measRecord.measType = GetTypeC();
3,189✔
420
        measRecord.measStart = xMeas;
3,189✔
421
        measRecord.ignore = m_bIgnore;
3,189✔
422
        measRecord.station1 = m_lstn1Index;
3,189✔
423
        measRecord.station2 = m_lstn2Index;
3,189✔
424
        measRecord.vectorCount1 = m_lRecordedTotal;                                                                        // number of GpsBaselines in the parent cluster
3,189✔
425
        measRecord.vectorCount2 = static_cast<UINT32>(m_vGpsCovariances.size());        // number of Covariances in the GpsBaseline
3,189✔
426

427
        measRecord.clusterID = m_lclusterID;
3,189✔
428
        measRecord.measurementStations = m_MSmeasurementStations;
3,189✔
429

430
        measRecord.scale1 = m_dPscale;
3,189✔
431
        measRecord.scale2 = m_dLscale;
3,189✔
432
        measRecord.scale3 = m_dHscale;
3,189✔
433
        measRecord.scale4 = m_dVscale;
3,189✔
434

435
        sprintf(measRecord.epsgCode, "%s", m_epsgCode.substr(0, STN_EPSG_WIDTH).c_str());
3,189✔
436
        sprintf(measRecord.epoch, "%s", m_epoch.substr(0, STN_EPOCH_WIDTH).c_str());
3,189✔
437

438
        // X
439
        measRecord.measAdj = m_measAdj;
3,189✔
440
        measRecord.measCorr = m_measCorr;
3,189✔
441
        measRecord.measAdjPrec = m_measAdjPrec;
3,189✔
442
        measRecord.residualPrec = m_residualPrec;
3,189✔
443
        measRecord.preAdjCorr = m_preAdjCorr;
3,189✔
444
        measRecord.term1 = m_dX;
3,189✔
445
        measRecord.term2 = m_dSigmaXX;        // already a variance
3,189✔
446
        measRecord.term3 = 0.;
3,189✔
447
        measRecord.term4 = 0.;
3,189✔
448
        measRecord.fileOrder = ((*msrIndex)++);
3,189✔
449

450
        binary_stream->write(reinterpret_cast<char *>(&measRecord), sizeof(measurement_t));
3,189✔
451

452
        // Y
453
        measRecord.measStart = yMeas;
3,189✔
454
        measRecord.measAdj = m_measAdj;
3,189✔
455
        measRecord.measCorr = m_measCorr;
3,189✔
456
        measRecord.measAdjPrec = m_measAdjPrec;
3,189✔
457
        measRecord.residualPrec = m_residualPrec;
3,189✔
458
        measRecord.preAdjCorr = m_preAdjCorr;
3,189✔
459
        measRecord.term1 = m_dY;
3,189✔
460
        measRecord.term2 = m_dSigmaXY;        // already a variance
3,189✔
461
        measRecord.term3 = m_dSigmaYY;
3,189✔
462
        measRecord.term4 = 0.;
3,189✔
463
        measRecord.fileOrder = ((*msrIndex)++);
3,189✔
464

465
        binary_stream->write(reinterpret_cast<char *>(&measRecord), sizeof(measurement_t));
3,189✔
466

467
        // Z
468
        measRecord.measStart = zMeas;
3,189✔
469
        measRecord.measAdj = m_measAdj;
3,189✔
470
        measRecord.measCorr = m_measCorr;
3,189✔
471
        measRecord.measAdjPrec = m_measAdjPrec;
3,189✔
472
        measRecord.residualPrec = m_residualPrec;
3,189✔
473
        measRecord.preAdjCorr = m_preAdjCorr;
3,189✔
474
        measRecord.term1 = m_dZ;
3,189✔
475
        measRecord.term2 = m_dSigmaXZ;                // already a variance
3,189✔
476
        measRecord.term3 = m_dSigmaYZ;
3,189✔
477
        measRecord.term4 = m_dSigmaZZ;
3,189✔
478
        measRecord.fileOrder = ((*msrIndex)++);
3,189✔
479

480
        binary_stream->write(reinterpret_cast<char *>(&measRecord), sizeof(measurement_t));
3,189✔
481

482
        // now write covariance elements
483
        std::vector<CDnaCovariance>::const_iterator _it_cov;
3,189✔
484
        for (_it_cov=m_vGpsCovariances.begin(); _it_cov!=m_vGpsCovariances.end(); ++_it_cov)
3,296✔
485
                _it_cov->WriteBinaryMsr(binary_stream, msrIndex, m_epsgCode, m_epoch);
107✔
486
}
3,189✔
487

488
void CDnaGpsBaseline::SerialiseDatabaseMap(std::ofstream* os)
3,189✔
489
{
490
        // X
491
        CDnaMeasurement::SerialiseDatabaseMap(os);
3,189✔
492
        
493
        // Y
494
        CDnaMeasurement::SerialiseDatabaseMap(os);
3,189✔
495
        
496
        // Z
497
        CDnaMeasurement::SerialiseDatabaseMap(os);
3,189✔
498

499
        for_each(m_vGpsCovariances.begin(), m_vGpsCovariances.end(),
3,189✔
500
                [this, os](const CDnaCovariance& cov) {
107✔
501
                ((CDnaCovariance*)&cov)->SerialiseDatabaseMap(os, m_msr_db_map);
107✔
502
        });
503
}
3,189✔
504

505

506

507
void CDnaGpsBaseline::SetX(const std::string& str)
3,369✔
508
{
509
        DoubleFromString(m_dX, trimstr(str));
3,369✔
510
}
3,369✔
511

512
void CDnaGpsBaseline::SetY(const std::string& str)
3,369✔
513
{
514
        DoubleFromString(m_dY, trimstr(str));
3,369✔
515
}
3,369✔
516

517
void CDnaGpsBaseline::SetZ(const std::string& str)
3,369✔
518
{
519
        DoubleFromString(m_dZ, trimstr(str));
3,369✔
520
}
3,369✔
521

522
void CDnaGpsBaseline::SetSigmaXX(const std::string& str)
3,369✔
523
{
524
        if (DoubleFromString_ZeroCheck(m_dSigmaXX, trimstr(str)))
6,738✔
525
        {
NEW
526
                std::stringstream ss;
×
527
                ss << "SetSigmaXX(): Variances cannot be zero: " << str << ".";
×
528
                throw XMLInteropException(ss.str(), 0);
×
529
        }
×
530
}
3,369✔
531

532
void CDnaGpsBaseline::SetSigmaXY(const std::string& str)
3,369✔
533
{
534
        DoubleFromString(m_dSigmaXY, trimstr(str));
3,369✔
535
}
3,369✔
536

537
void CDnaGpsBaseline::SetSigmaXZ(const std::string& str)
3,369✔
538
{
539
        DoubleFromString(m_dSigmaXZ, trimstr(str));
3,369✔
540
}
3,369✔
541

542
void CDnaGpsBaseline::SetSigmaYY(const std::string& str)
3,369✔
543
{
544
        if (DoubleFromString_ZeroCheck(m_dSigmaYY, trimstr(str)))
6,738✔
545
        {
NEW
546
                std::stringstream ss;
×
547
                ss << "SetSigmaYY(): Variances cannot be zero: " << str << ".";
×
548
                throw XMLInteropException(ss.str(), 0);
×
549
        }
×
550
}
3,369✔
551

552
void CDnaGpsBaseline::SetSigmaYZ(const std::string& str)
3,369✔
553
{
554
        DoubleFromString(m_dSigmaYZ, trimstr(str));
3,369✔
555
}
3,369✔
556

557
void CDnaGpsBaseline::SetSigmaZZ(const std::string& str)
3,369✔
558
{
559
        if (DoubleFromString_ZeroCheck(m_dSigmaZZ, trimstr(str)))
6,738✔
560
        {
NEW
561
                std::stringstream ss;
×
562
                ss << "SetSigmaZZ(): Variances cannot be zero: " << str << ".";
×
563
                throw XMLInteropException(ss.str(), 0);
×
564
        }
×
565
}
3,369✔
566
        
567

568
void CDnaGpsBaseline::SetEpsg(const std::string& epsg) 
9,996✔
569
{
570
        m_epsgCode = epsg;
9,996✔
571
}
9,996✔
572

573

574
void CDnaGpsBaseline::SetReferenceFrame(const std::string& refFrame) 
6,078✔
575
{
576
        m_referenceFrame = refFrame;
6,078✔
577
        SetEpsg(epsgStringFromName<std::string>(refFrame));
6,078✔
578
}
6,078✔
579

580

NEW
581
void CDnaGpsBaseline::SetPscale(const std::string& str)
×
582
{
583
        DoubleFromString(m_dPscale, trimstr(str));
×
584
}
×
585

NEW
586
void CDnaGpsBaseline::SetLscale(const std::string& str)
×
587
{
588
        DoubleFromString(m_dLscale, trimstr(str));
×
589
}
×
590

NEW
591
void CDnaGpsBaseline::SetHscale(const std::string& str)
×
592
{
593
        DoubleFromString(m_dHscale, trimstr(str));
×
594
}
×
595

NEW
596
void CDnaGpsBaseline::SetVscale(const std::string& str)
×
597
{
598
        DoubleFromString(m_dVscale, trimstr(str));
×
599
}
×
600

601

602

603

604

605

606

607

608

609
CDnaGpsBaselineCluster::CDnaGpsBaselineCluster(void)
550✔
610
        : m_strTarget("")
1,100✔
611
        , m_lRecordedTotal(1)
550✔
612
        , m_dPscale(1.)
550✔
613
        , m_dLscale(1.)
550✔
614
        , m_dHscale(1.)
550✔
615
        , m_dVscale(1.)
550✔
616
        , m_referenceFrame(DEFAULT_DATUM)
550✔
617
        , m_lclusterID(0)
550✔
618
{
619
        SetEpoch(DEFAULT_EPOCH);
1,100✔
620
        SetEpsg(epsgStringFromName<std::string>(m_referenceFrame));
550✔
621

622
        m_vGpsBaselines.clear();
550✔
623
        m_vGpsBaselines.reserve(1);
550✔
624

625
        // m_strType will be set by the parsing function as "X" or "G"
626
        m_MSmeasurementStations = TWO_STATION;
550✔
627
}
550✔
628

629

630
CDnaGpsBaselineCluster::~CDnaGpsBaselineCluster(void)
6,580✔
631
{
632

633
}
13,160✔
634

635
// move constructor
636
CDnaGpsBaselineCluster::CDnaGpsBaselineCluster(CDnaGpsBaselineCluster&& g)
×
637
{
638
        m_strType = g.m_strType;
×
639
        m_bIgnore = g.m_bIgnore;
×
640
        m_strTarget = g.m_strTarget;
×
641
        m_lRecordedTotal = g.m_lRecordedTotal;
×
642
        m_vGpsBaselines = std::move(g.m_vGpsBaselines);
×
643

644
        m_dPscale = g.m_dPscale;
×
645
        m_dLscale = g.m_dLscale;
×
646
        m_dHscale = g.m_dHscale;
×
647
        m_dVscale = g.m_dVscale;
×
648
        m_lclusterID = g.m_lclusterID;
×
649
        m_MSmeasurementStations = g.m_MSmeasurementStations;
×
650
        
651
        m_referenceFrame = g.m_referenceFrame;
×
652
        m_epsgCode = g.m_epsgCode;
×
653
        m_epoch = g.m_epoch;
×
654

655
        m_msr_db_map = g.m_msr_db_map;
×
656

657
        m_dbidmap = g.m_dbidmap;
×
658
}
×
659

660
// move assignment operator 
661
CDnaGpsBaselineCluster& CDnaGpsBaselineCluster::operator= (CDnaGpsBaselineCluster&& rhs)
×
662
{
663
        // check for assignment to self!
664
        if (this == &rhs)
×
665
                return *this;
666

667
        CDnaMeasurement::operator=(std::move(rhs));
×
668
        m_strTarget = rhs.m_strTarget;
×
669
        m_lRecordedTotal = rhs.m_lRecordedTotal;
×
670

671
        m_referenceFrame = rhs.m_referenceFrame;
×
672
        m_epsgCode = rhs.m_epsgCode;
×
673
        m_epoch = rhs.m_epoch;
×
674

675
        m_dPscale = rhs.m_dPscale;
×
676
        m_dLscale = rhs.m_dLscale;
×
677
        m_dHscale = rhs.m_dHscale;
×
678
        m_dVscale = rhs.m_dVscale;
×
679

680
        m_lclusterID = rhs.m_lclusterID;
×
681
        m_MSmeasurementStations = rhs.m_MSmeasurementStations;
×
682

683
        m_vGpsBaselines = std::move(rhs.m_vGpsBaselines);
×
684

685
        m_msr_db_map = rhs.m_msr_db_map;
×
686

687
        m_dbidmap = rhs.m_dbidmap;
×
688

689
        return *this;
×
690
}
691
        
692

693
CDnaGpsBaselineCluster::CDnaGpsBaselineCluster(const UINT32 lclusterID, const std::string& referenceframe, const std::string& epoch)
3,305✔
694
        : m_strTarget("")
6,610✔
695
        , m_lRecordedTotal(1)
3,305✔
696
        , m_dPscale(1.)
3,305✔
697
        , m_dLscale(1.)
3,305✔
698
        , m_dHscale(1.)
3,305✔
699
        , m_dVscale(1.)
3,305✔
700
        , m_referenceFrame(referenceframe)
3,305✔
701
        , m_lclusterID(lclusterID)
3,305✔
702
{
703
        SetEpoch(epoch);
3,305✔
704
        SetEpsg(epsgStringFromName<std::string>(referenceframe));
3,305✔
705

706
        m_vGpsBaselines.clear();
3,305✔
707
        m_vGpsBaselines.reserve(1);
3,305✔
708
        // m_strType will be set by the parsing function as "X" or "G"
709
        m_MSmeasurementStations = TWO_STATION;
3,305✔
710
}
3,305✔
711
        
712

713
bool CDnaGpsBaselineCluster::operator== (const CDnaGpsBaselineCluster& rhs) const
73✔
714
{
715
        return (
73✔
716
                m_strType == rhs.m_strType &&
146✔
717
                m_strFirst == rhs.m_strFirst &&
73✔
718
                m_bIgnore == rhs.m_bIgnore &&
45✔
719
                m_strTarget == rhs.m_strTarget &&
45✔
720
                m_lRecordedTotal == rhs.m_lRecordedTotal &&
26✔
721
                m_dPscale == rhs.m_dPscale &&
26✔
722
                m_dLscale == rhs.m_dLscale &&
26✔
723
                m_dHscale == rhs.m_dHscale &&
26✔
724
                m_dVscale == rhs.m_dVscale &&
52✔
725
                m_vGpsBaselines == rhs.m_vGpsBaselines &&
30✔
726
                boost::iequals(m_referenceFrame, rhs.m_referenceFrame) &&
81✔
727
                m_epoch == rhs.m_epoch
4✔
728
                );
73✔
729
}
730

731
bool CDnaGpsBaselineCluster::operator< (const CDnaGpsBaselineCluster& rhs) const
383✔
732
{
733
        if (m_strFirst == rhs.m_strFirst) {
383✔
734
                if (m_strType == rhs.m_strType) {        // could be G, X
102✔
735
                        if (m_bIgnore == rhs.m_bIgnore) {
102✔
736
                                if (m_epoch == rhs.m_epoch) {
102✔
737
                                        if (m_strTarget == rhs.m_strTarget) {
102✔
738
                                                if (m_lRecordedTotal == rhs.m_lRecordedTotal) 
48✔
739
                                                        return m_vGpsBaselines < rhs.m_vGpsBaselines;
48✔
740
                                                else
741
                                                        return m_lRecordedTotal < rhs.m_lRecordedTotal; }
×
742
                                        else
743
                                                return m_strTarget < rhs.m_strTarget; }
54✔
744
                                else
745
                                        return m_epoch < rhs.m_epoch; }
×
746
                        else
747
                                return m_bIgnore < rhs.m_bIgnore; }
×
748
                else
749
                        return m_strType < rhs.m_strType; }
×
750
        else
751
                return m_strFirst < rhs.m_strFirst;
281✔
752
}
753

754

755
void CDnaGpsBaselineCluster::ReserveGpsBaselinesCount(const UINT32& size)
×
756
{
757
        m_vGpsBaselines.reserve(size);
×
758
}
×
759

760
void CDnaGpsBaselineCluster::AddGpsBaseline(const CDnaMeasurement* pGpsBaseline)
3,373✔
761
{
762
        m_vGpsBaselines.push_back(std::move((CDnaGpsBaseline&)*pGpsBaseline));
3,373✔
763
}
3,373✔
764

765

766
void CDnaGpsBaselineCluster::ClearBaselines()
×
767
{
768
        m_vGpsBaselines.clear();
×
769
}
×
770
        
771

772
void CDnaGpsBaselineCluster::SerialiseDatabaseMap(std::ofstream* os)
3,117✔
773
{
774
        for_each(m_vGpsBaselines.begin(), m_vGpsBaselines.end(),
3,117✔
775
                [this, os](const CDnaGpsBaseline& bsl) {
3,189✔
776
                ((CDnaGpsBaseline*)&bsl)->SerialiseDatabaseMap(os);
3,189✔
777
        });
778
        
779
}
3,117✔
780
        
781

782
void CDnaGpsBaselineCluster::SetDatabaseMaps(it_vdbid_t& dbidmap) 
×
783
{
784
        m_dbidmap = dbidmap;
×
785

786
        CDnaMeasurement::SetDatabaseMap(*m_dbidmap);
×
787

788
        for_each(m_vGpsBaselines.begin(), m_vGpsBaselines.end(),
×
789
                [this](const CDnaGpsBaseline& bsl) {
×
790
                        ((CDnaGpsBaseline*)&bsl)->SetDatabaseMap(*m_dbidmap);
×
791
                        m_dbidmap += ((CDnaGpsBaseline*)&bsl)->GetCovariances_ptr()->size();
×
792
                });
×
793
        
794
}
×
795
        
796

797
UINT32 CDnaGpsBaselineCluster::CalcBinaryRecordCount() const
3,117✔
798
{
799
        UINT32 recordCount(0);
3,117✔
800
        for_each(m_vGpsBaselines.begin(), m_vGpsBaselines.end(),
3,117✔
801
                [&recordCount](const CDnaGpsBaseline& bsl) {
3,189✔
802
                        recordCount += bsl.CalcBinaryRecordCount();
3,189✔
803
        });
3,189✔
804
        return recordCount;
3,117✔
805
}
806

807

808
void CDnaGpsBaselineCluster::WriteDynaMLMsr(std::ofstream* dynaml_stream, const std::string& comment, bool) const
791✔
809
{
810
        const size_t bslCount = m_vGpsBaselines.size();
791✔
811
        char cType = GetTypeC();
791✔
812

813
        if (comment.empty())
791✔
814
        {
815
                *dynaml_stream << "  <!-- Type " << measurement_name<char, std::string>(GetTypeC());
1,582✔
816
                if (cType == 'X')
791✔
817
                {
818
                        if (bslCount > 1)
37✔
819
                                *dynaml_stream << " (set of " << bslCount << ")" << std::endl;
21✔
820
                        else
821
                                *dynaml_stream << "  (single)" << std::endl;
16✔
822
                }
823
                *dynaml_stream << " -->" << std::endl;
791✔
824
        }
825
        else
NEW
826
                *dynaml_stream << "  <!-- " << comment << " -->" << std::endl;
×
827
        
828
        *dynaml_stream << "  <DnaMeasurement>" << std::endl;
791✔
829
        *dynaml_stream << "    <Type>" << cType << "</Type>" << std::endl;
791✔
830
        // Source file from which the measurement came
831
        *dynaml_stream << "    <Source>" << m_sourceFile << "</Source>" << std::endl;
791✔
832
        if (m_bIgnore)
791✔
833
                *dynaml_stream << "    <Ignore>*</Ignore>" << std::endl;
6✔
834
        else
835
                *dynaml_stream << "    <Ignore/>" << std::endl;
785✔
836
        
837
        // Reference frame and epoch
838
        *dynaml_stream << "    <ReferenceFrame>" << m_referenceFrame << "</ReferenceFrame>" << std::endl;
791✔
839
        *dynaml_stream << "    <Epoch>" << m_epoch << "</Epoch>" << std::endl;
791✔
840

841
        // Scalars
842
        *dynaml_stream << "    <Vscale>" << std::fixed << std::setprecision(3) << m_dVscale << "</Vscale>" << std::endl;
791✔
843
        *dynaml_stream << "    <Pscale>" << m_dPscale << "</Pscale>" << std::endl;
791✔
844
        *dynaml_stream << "    <Lscale>" << m_dLscale << "</Lscale>" << std::endl;
791✔
845
        *dynaml_stream << "    <Hscale>" << m_dHscale << "</Hscale>" << std::endl;
791✔
846

847
        if (m_msr_db_map.is_cls_id_set)
791✔
848
                *dynaml_stream << "    <ClusterID>" << m_msr_db_map.cluster_id << "</ClusterID>" << std::endl;
86✔
849

850
        // baseline count
851
        if (cType == 'X')
791✔
852
                *dynaml_stream << "    <Total>" << bslCount << "</Total>" << std::endl;
37✔
853

854
        // write GpsBaselines
855
        std::vector<CDnaGpsBaseline>::const_iterator _it_bsl;
791✔
856
        for (_it_bsl=m_vGpsBaselines.begin(); _it_bsl!=m_vGpsBaselines.end(); ++_it_bsl)
1,615✔
857
                _it_bsl->WriteDynaMLMsr(dynaml_stream, comment, true);
824✔
858
        
859
        *dynaml_stream << "  </DnaMeasurement>" << std::endl;
791✔
860

861
}
791✔
862
        
863

864
void CDnaGpsBaselineCluster::WriteDNAMsr(std::ofstream* dna_stream, const dna_msr_fields& dmw, const dna_msr_fields& dml, bool) const
452✔
865
{
866
        // write GpsBaselines
867
        std::vector<CDnaGpsBaseline>::const_iterator _it_bsl;
452✔
868
        for (_it_bsl=m_vGpsBaselines.begin(); _it_bsl!=m_vGpsBaselines.end(); ++_it_bsl)
928✔
869
                _it_bsl->WriteDNAMsr(dna_stream, dmw, dml, true);
476✔
870
}
452✔
871
        
872

873
void CDnaGpsBaselineCluster::SimulateMsr(vdnaStnPtr* vStations, const CDnaEllipsoid* ellipsoid)
3✔
874
{
875
        std::vector<CDnaGpsBaseline>::iterator _it_bsl;
3✔
876
        for (_it_bsl=m_vGpsBaselines.begin(); _it_bsl!=m_vGpsBaselines.end(); ++_it_bsl)
7✔
877
                _it_bsl->SimulateMsr(vStations, ellipsoid);
4✔
878
}
3✔
879
        
880

881
UINT32 CDnaGpsBaselineCluster::SetMeasurementRec(const vstn_t& binaryStn, it_vmsr_t& it_msr, it_vdbid_t& dbidmap)
550✔
882
{
883
        m_lclusterID = it_msr->clusterID;
550✔
884
        m_MSmeasurementStations = (MEASUREMENT_STATIONS)it_msr->measurementStations;
550✔
885
        m_lRecordedTotal = it_msr->vectorCount1;
550✔
886
        m_vGpsBaselines.clear();
550✔
887
        m_vGpsBaselines.resize(m_lRecordedTotal);
550✔
888

889
        m_referenceFrame = datumFromEpsgString<std::string>(it_msr->epsgCode);
1,650✔
890
        m_epoch = it_msr->epoch;
550✔
891
        m_epsgCode = it_msr->epsgCode;
550✔
892

893
        m_dPscale = it_msr->scale1;
550✔
894
        m_dLscale = it_msr->scale2;
550✔
895
        m_dHscale = it_msr->scale3;
550✔
896
        m_dVscale = it_msr->scale4;
550✔
897

898
        UINT32 measrecordCount(it_msr->vectorCount1);
550✔
899

900
        CDnaMeasurement::SetDatabaseMap(*dbidmap);
550✔
901

902
        // read remaining GpsPoint data and all Covariances from file
903
        for (UINT32 i=0; i<m_lRecordedTotal; i++)
1,129✔
904
        {
905
                if (i > 0)
579✔
906
                {
907
                        it_msr++;
29✔
908
                        dbidmap++;
29✔
909
                }
910

911
                m_strType = it_msr->measType;
579✔
912
                m_bIgnore = it_msr->ignore;
579✔
913
                m_vGpsBaselines.at(i).SetMeasurementRec(binaryStn, it_msr, dbidmap);
579✔
914
        }
915
        return measrecordCount - 1;        
550✔
916
}
917

918

919
void CDnaGpsBaselineCluster::WriteBinaryMsr(std::ofstream* binary_stream, PUINT32 msrIndex) const
3,117✔
920
{
921
        std::vector<CDnaGpsBaseline>::const_iterator _it_bsl;
3,117✔
922
        for (_it_bsl=m_vGpsBaselines.begin(); _it_bsl!=m_vGpsBaselines.end(); ++_it_bsl)
6,306✔
923
                _it_bsl->WriteBinaryMsr(binary_stream, msrIndex);
3,189✔
924
}
3,117✔
925

926

927
void CDnaGpsBaselineCluster::SetEpsg(const std::string& epsg) 
7,724✔
928
{
929
        // m_epsgCode is a member of CDnaMeasurement
930
        m_epsgCode = epsg;
7,724✔
931
}
7,724✔
932

933

934
void CDnaGpsBaselineCluster::SetReferenceFrame(const std::string& refFrame) 
3,869✔
935
{
936
        // m_referenceFrame is a member of CDnaGpsBaselineCluster
937
        m_referenceFrame = refFrame;
3,869✔
938
        SetEpsg(epsgStringFromName<std::string>(refFrame));
3,869✔
939
}
3,869✔
940

941

942
void CDnaGpsBaselineCluster::SetTotal(const std::string& str)
65✔
943
{
944
        m_lRecordedTotal = LongFromString<UINT32>(trimstr(str));
65✔
945
        m_vGpsBaselines.reserve(m_lRecordedTotal);
65✔
946
}
65✔
947

948
void CDnaGpsBaselineCluster::SetPscale(const std::string& str)
3,305✔
949
{
950
        DoubleFromString(m_dPscale, trimstr(str));
3,305✔
951
}
3,305✔
952

953
void CDnaGpsBaselineCluster::SetLscale(const std::string& str)
3,305✔
954
{
955
        DoubleFromString(m_dLscale, trimstr(str));
3,305✔
956
}
3,305✔
957

958
void CDnaGpsBaselineCluster::SetHscale(const std::string& str)
3,305✔
959
{
960
        DoubleFromString(m_dHscale, trimstr(str));
3,305✔
961
}
3,305✔
962

963
void CDnaGpsBaselineCluster::SetVscale(const std::string& str)
3,305✔
964
{
965
        DoubleFromString(m_dVscale, trimstr(str));
3,305✔
966
}
3,305✔
967

968

969

970

971
}        // namespace measurements
972
}        // namespace dynadjust
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc