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

Bug fix, code enhancements, increase code coverage tests #107

Merged
merged 4 commits into from
Apr 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions dynadjust/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ if (BUILD_TESTING)
add_test (NAME import-urban-network-stage COMMAND $<TARGET_FILE:dnaimportwrapper> -n urban_st ${CMAKE_SOURCE_DIR}/../sampleData/urban-network.stn ${CMAKE_SOURCE_DIR}/../sampleData/urban-network.msr)
add_test (NAME geoid-urban-network-stage COMMAND $<TARGET_FILE:dnageoidwrapper> urban_st -g ${CMAKE_SOURCE_DIR}/../sampleData/urban-network-geoid.gsb --convert-stn-hts --export-dna-geo)
add_test (NAME segment-urban-network-stage COMMAND $<TARGET_FILE:dnasegmentwrapper> urban_st --min 90 --max 90)
add_test (NAME adjust-urban-network-stage COMMAND $<TARGET_FILE:dnaadjustwrapper> urban_st --phased --verbose 3 --staged-adjustment --create-stage-files --output-adj-msr --export-sinex-file --output-pos-uncertainty --export-xml-stn-file --export-xml-msr-file --export-dna-stn-file --export-dna-msr --output-iter-adj-stn --output-iter-adj-stat --output-iter-adj-msr --output-iter-cmp-msr --stn-corrections --output-corrections-file)
add_test (NAME adjust-urban-network-stage COMMAND $<TARGET_FILE:dnaadjustwrapper> urban_st --phased --staged-adjustment --create-stage-files --output-adj-msr --export-sinex-file --output-pos-uncertainty --export-xml-stn-file --export-xml-msr-file --export-dna-stn-file --export-dna-msr --output-iter-adj-stn --output-iter-adj-stat --output-iter-adj-msr --output-iter-cmp-msr --stn-corrections --output-corrections-file)

# 5. dynadjust project mode
file (COPY ${CMAKE_SOURCE_DIR}/../sampleData/urban-network.stn DESTINATION ./)
Expand Down Expand Up @@ -333,7 +333,7 @@ if (BUILD_TESTING)
add_test (NAME import-dbid COMMAND $<TARGET_FILE:dnaimportwrapper> -n dbid ${CMAKE_SOURCE_DIR}/../sampleData/dsg.stn ${CMAKE_SOURCE_DIR}/../sampleData/dsg.msr ${CMAKE_SOURCE_DIR}/../sampleData/dsg-ignored.msr)
add_test (NAME adjust-dbid-01 COMMAND $<TARGET_FILE:dnaadjustwrapper> dbid --output-adj-msr --output-database-ids --output-ignored-msrs --sort-adj-msr-field 6 --output-msr-to-stn --sort-msr-to-stn-field 1 --output-iter-adj-stn --output-iter-adj-stat --output-iter-adj-msr --output-iter-cmp-msr)
add_test (NAME adjust-dbid-02 COMMAND $<TARGET_FILE:dnaadjustwrapper> dbid --scale-normals-to-unity)
add_test (NAME adjust-dbid-03 COMMAND $<TARGET_FILE:dnaadjustwrapper> dbid --report-results --output-adj-msr--output-pos-uncertainty --output-apu-vcv-units 1)
add_test (NAME adjust-dbid-03 COMMAND $<TARGET_FILE:dnaadjustwrapper> dbid --report-results --output-adj-msr --output-pos-uncertainty --output-apu-vcv-units 1)
add_test (NAME adjust-dbid-04 COMMAND $<TARGET_FILE:dnaadjustwrapper> dbid --comments "This is a comment that is quite lengthy in content and is relatively meaningless. Feel free to delete this comment.")

# set execution dependencies (the execution of tests must be sequential)
Expand Down
8 changes: 8 additions & 0 deletions dynadjust/dynadjust/dnaadjust/dnaadjust.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8249,11 +8249,19 @@ void dna_adjust::ComputeandPrintAdjMsrOnIteration()
// blocks at the end of an iteration
for (UINT32 block(0); block<blockCount_; ++block)
{
if (projectSettings_.a.stage)
DeserialiseBlockFromMappedFile(block, 4, sf_normals,
sf_meas_minus_comp, sf_design, sf_prec_adj_msrs);

// send subvector of measurements from this block
end = begin + v_CML_.at(block).size();
ComputeandPrintAdjMsrBlockOnIteration(block, v_uint32_u32u32_pair(begin, end), printHeader);
begin = end;
printHeader = false;

if (projectSettings_.a.stage)
UnloadBlock(block, 4, sf_normals,
sf_meas_minus_comp, sf_design, sf_prec_adj_msrs);
}
}

Expand Down
7 changes: 0 additions & 7 deletions dynadjust/dynadjust/dnageoid/dnageoid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,6 @@ void dna_geoid_interpolation::PopulateStationRecords(const int& method, bool con
}


void dna_geoid_interpolation::Version(char* version)
{
string msg;
fileproc_help_header(&msg);
sprintf(version, "%s", msg.c_str());
}

void dna_geoid_interpolation::ProcessCsvFile(std::ifstream* f_in, std::ofstream* f_out, std::ofstream* f_dnageo, const int& method, const int& intEllipsoidtoOrtho, const int& intDmsFlag)
{
m_fileMode = true;
Expand Down
2 changes: 0 additions & 2 deletions dynadjust/dynadjust/dnageoid/dnageoid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@ class dna_geoid_interpolation {
dna_geoid_interpolation& operator=(const dna_geoid_interpolation&);

public:
static void Version(char* version);

// Interpolates AusGeoid values using bi linear interpolation
void FileTransformation(const char* fileIn, const char* fileOut, const int& method,
const int& intEllipsoidtoOrtho, const int& intDmsFlag,
Expand Down