From a5fad270b963a78bec66400706b3f034570e5a25 Mon Sep 17 00:00:00 2001 From: Richard Penney Date: Fri, 2 Sep 2016 16:50:27 +0100 Subject: [PATCH 01/12] Patched various signed/unsigned warnings in SatPass & StringUtils. --- core/lib/Utilities/StringUtils.hpp | 2 +- ext/lib/Geomatics/SatPass.cpp | 2 +- ext/lib/Geomatics/SatPass.hpp | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/lib/Utilities/StringUtils.hpp b/core/lib/Utilities/StringUtils.hpp index bb30af7cb..86347df24 100644 --- a/core/lib/Utilities/StringUtils.hpp +++ b/core/lib/Utilities/StringUtils.hpp @@ -2813,7 +2813,7 @@ namespace gpstk size_t len = aStr.length(); rv.reserve(len); - for (int i = 0; i < len; i++) + for (size_t i = 0; i < len; i++) { char c = aStr[i]; if (c > 31 && c < 127) // Handle printable ASCII characters diff --git a/ext/lib/Geomatics/SatPass.cpp b/ext/lib/Geomatics/SatPass.cpp index f57ca883e..02c936268 100644 --- a/ext/lib/Geomatics/SatPass.cpp +++ b/ext/lib/Geomatics/SatPass.cpp @@ -581,7 +581,7 @@ catch(Exception& e) { GPSTK_RETHROW(e); } // -------------------------- get and set routines ---------------------------- // NB may be used as rvalue or lvalue -double& SatPass::data(unsigned int i, string type) throw(Exception) +double& SatPass::data(unsigned int i, const string &type) throw(Exception) { if(i >= spdvector.size()) { Exception e("Invalid index in data() " + asString(i)); diff --git a/ext/lib/Geomatics/SatPass.hpp b/ext/lib/Geomatics/SatPass.hpp index 2d6a5bcef..4473d313f 100644 --- a/ext/lib/Geomatics/SatPass.hpp +++ b/ext/lib/Geomatics/SatPass.hpp @@ -103,7 +103,7 @@ class SatPass { data.resize(right.data.size()); lli.resize(right.lli.size()); ssi.resize(right.ssi.size()); - int i; + unsigned i; for(i=0; i getObsTypes(void) throw() { std::vector v; - for(int i=0; i getObstypes(void) { std::vector ots; - for(int i=0; i ots = getObstypes(); - for(int i=0; i Date: Fri, 2 Sep 2016 19:32:34 +0100 Subject: [PATCH 02/12] Improved const-correctness of SatPass. Avoided unnecessary copying of std::strings passed to getter methods. Improved support for treating SatPass objects as constants in client code. --- core/lib/FileHandling/SP3/SP3Header.hpp | 5 ++- ext/lib/Geomatics/SatPass.cpp | 49 ++++++++++++++++--------- ext/lib/Geomatics/SatPass.hpp | 36 +++++++++++------- 3 files changed, 58 insertions(+), 32 deletions(-) diff --git a/core/lib/FileHandling/SP3/SP3Header.hpp b/core/lib/FileHandling/SP3/SP3Header.hpp index 461675dd7..9989238ff 100644 --- a/core/lib/FileHandling/SP3/SP3Header.hpp +++ b/core/lib/FileHandling/SP3/SP3Header.hpp @@ -78,9 +78,10 @@ namespace gpstk }; /// constructor - SP3Header() : version(undefined), numberOfEpochs(0), + SP3Header() : version(undefined), + allowSP3aEvents(false), numberOfEpochs(0), system(1, SP3SatID::systemGPS), timeSystem(TimeSystem::Any), - basePV(0.0), baseClk(0.0), allowSP3aEvents(false) + basePV(0.0), baseClk(0.0) {} /// destructor diff --git a/ext/lib/Geomatics/SatPass.cpp b/ext/lib/Geomatics/SatPass.cpp index 02c936268..d4dbbaa0a 100644 --- a/ext/lib/Geomatics/SatPass.cpp +++ b/ext/lib/Geomatics/SatPass.cpp @@ -98,7 +98,7 @@ void SatPass::init(RinexSatID insat, double indt, vector obstypes) throw ngood = 0; Status = 0; - for(int i=0; i& ots, vector& data) - throw(Exception) +int SatPass::addData(const Epoch tt, const vector& ots, + const vector& data) throw(Exception) { vector lli(data.size(),0),ssi(data.size(),0); try { return addData(tt, ots, data, lli, ssi); } @@ -159,7 +159,7 @@ int SatPass::addData(const Epoch tt, // create a new SatPassData SatPassData spd(data.size()); spd.flag = flag; - for(int k=0; k dN1,dN2; @@ -482,7 +482,7 @@ try { Stats PB1,PB2; // get the biases B = L - DP - for(first=true,i=0; i= spdvector.size()) { + Exception e("Invalid index in data() " + asString(i)); + GPSTK_THROW(e); + } + map::const_iterator it; + if((it = indexForLabel.find(type)) == indexForLabel.end()) { + Exception e("Invalid obs type in data() " + type); + GPSTK_THROW(e); + } + return spdvector[i].data[it->second]; +} + +double& SatPass::data(unsigned int i, const string& type) throw(Exception) { if(i >= spdvector.size()) { Exception e("Invalid index in data() " + asString(i)); @@ -604,7 +618,7 @@ double& SatPass::timeoffset(unsigned int i) throw(Exception) return spdvector[i].toffset; } -unsigned short& SatPass::LLI(unsigned int i, string type) throw(Exception) +unsigned short& SatPass::LLI(unsigned int i, const string& type) throw(Exception) { if(i >= spdvector.size()) { Exception e("Invalid index in LLI() " + asString(i)); @@ -618,7 +632,7 @@ unsigned short& SatPass::LLI(unsigned int i, string type) throw(Exception) return spdvector[i].lli[it->second]; } -unsigned short& SatPass::SSI(unsigned int i, string type) throw(Exception) +unsigned short& SatPass::SSI(unsigned int i, const string& type) throw(Exception) { if(i >= spdvector.size()) { Exception e("Invalid index in SSI() " + asString(i)); @@ -647,7 +661,7 @@ void SatPass::setFlag(unsigned int i, unsigned short f) throw(Exception) // ---------------------------------- get routines ---------------------------- // get value of flag at one index -unsigned short SatPass::getFlag(unsigned int i) throw(Exception) +unsigned short SatPass::getFlag(unsigned int i) const throw(Exception) { if(i >= spdvector.size()) { Exception e("Invalid index in getFlag() " + asString(i)); @@ -673,7 +687,8 @@ Epoch SatPass::getFirstTime(void) const throw() { return time(0); } Epoch SatPass::getLastTime(void) const throw() { return time(spdvector.size()-1); } // these allow you to get e.g. P1 or C1. NB return double not double& as above: rvalue -double SatPass::data(unsigned int i, string type1, string type2) throw(Exception) +double SatPass::data(unsigned int i, const string& type1, + const string& type2) const throw(Exception) { if(i >= spdvector.size()) { Exception e("Invalid index in data() " + asString(i)); @@ -690,8 +705,8 @@ double SatPass::data(unsigned int i, string type1, string type2) throw(Exception } } -unsigned short SatPass::LLI(unsigned int i, string type1, string type2) - throw(Exception) +unsigned short SatPass::LLI(unsigned int i, const string& type1, + const string& type2) const throw(Exception) { if(i >= spdvector.size()) { Exception e("Invalid index in LLI() " + asString(i)); @@ -708,8 +723,8 @@ unsigned short SatPass::LLI(unsigned int i, string type1, string type2) } } -unsigned short SatPass::SSI(unsigned int i, string type1, string type2) - throw(Exception) +unsigned short SatPass::SSI(unsigned int i, const string& type1, + const string& type2) const throw(Exception) { if(i >= spdvector.size()) { Exception e("Invalid index in SSI() " + asString(i)); diff --git a/ext/lib/Geomatics/SatPass.hpp b/ext/lib/Geomatics/SatPass.hpp index 4473d313f..f969d92b6 100644 --- a/ext/lib/Geomatics/SatPass.hpp +++ b/ext/lib/Geomatics/SatPass.hpp @@ -245,8 +245,8 @@ class SatPass { /// @return n>=0 if data was added successfully, n is the index of the new data /// -1 if a gap is found (no data is added), /// -2 if time tag is out of order (no data is added) - int addData(const Epoch tt, std::vector& obstypes, - std::vector& data) throw(Exception); + int addData(const Epoch tt, const std::vector& obstypes, + const std::vector& data) throw(Exception); /// Add vector of data, identified by obstypes (same as used in c'tor) at tt, /// Flag, lli and ssi are set using input (parallel to data). @@ -285,11 +285,17 @@ class SatPass { /// Access the status; l-value may be assigned SP.status() = 1; int& status(void) throw() { return Status; } + /// Access the (constant) data for one obs type at one index + /// @param i index of the data of interest + /// @param type observation type (e.g. "L1") of the data of interest + /// @return the data of the given type at the given index + double data(unsigned int i, const std::string& type) const throw(Exception); + /// Access the data for one obs type at one index, as either l-value or r-value /// @param i index of the data of interest /// @param type observation type (e.g. "L1") of the data of interest /// @return the data of the given type at the given index - double& data(unsigned int i, const std::string &type) throw(Exception); + double& data(unsigned int i, const std::string& type) throw(Exception); /// Access the time offset from the nominal time (i.e. timetag) at one index /// (epoch), as either l-value or r-value @@ -301,13 +307,13 @@ class SatPass { /// @param i index of the data of interest /// @param type observation type (e.g. "L1") of the data of interest /// @return the LLI of the given type at the given index - unsigned short& LLI(unsigned int i, std::string type) throw(Exception); + unsigned short& LLI(unsigned int i, const std::string& type) throw(Exception); /// Access the ssi for one obs type at one index, as either l-value or r-value /// @param i index of the data of interest /// @param type observation type (e.g. "L1") of the data of interest /// @return the SSI of the given type at the given index - unsigned short& SSI(unsigned int i, std::string type) throw(Exception); + unsigned short& SSI(unsigned int i, const std::string& type) throw(Exception); // -------------------------------- set only -------------------------------- /// change the maximum time gap (in seconds) allowed within any SatPass @@ -338,16 +344,19 @@ class SatPass { /// get the list of obstypes /// @return the vector of strings giving RINEX obs types - std::vector getObsTypes(void) throw() { + std::vector getObsTypes(void) const throw() { std::vector v; - for(unsigned i=0; i::const_iterator li; + for (li=labelForIndex.begin(); li!=labelForIndex.end(); ++li) { + v.push_back(li->second); + } return v; } /// get the flag at one index /// @param i index of the data of interest /// @return the flag for the given index - unsigned short getFlag(unsigned int i) throw(Exception); + unsigned short getFlag(unsigned int i) const throw(Exception); /// @return the earliest time (full, including toffset) in this SatPass data Epoch getFirstTime(void) const throw(); @@ -398,23 +407,24 @@ class SatPass { /// @param type1 observation type (e.g. "P1") of the data of interest /// @param type2 observation type (e.g. "C1") of the data of interest /// @return the data of the given type at the given index - double data(unsigned int i, std::string type1, std::string type2) throw(Exception); + double data(unsigned int i, const std::string& type1, + const std::string& type2) const throw(Exception); /// Access the LLI for either of two obs type at one index, as r-value only /// @param i index of the data of interest /// @param type1 observation type (e.g. "P1") of the data of interest /// @param type2 observation type (e.g. "C1") of the data of interest /// @return the LLI of the given type at the given index - unsigned short LLI(unsigned int i, std::string type1, std::string type2) - throw(Exception); + unsigned short LLI(unsigned int i, const std::string& type1, + const std::string& type2) const throw(Exception); /// Access the ssi for either of two obs type at one index, as r-value only /// @param i index of the data of interest /// @param type1 observation type (e.g. "P2") of the data of interest /// @param type2 observation type (e.g. "C2") of the data of interest /// @return the SSI of the given type at the given index - unsigned short SSI(unsigned int i, std::string type1, std::string type2) - throw(Exception); + unsigned short SSI(unsigned int i, const std::string& type1, + const std::string& type2) const throw(Exception); /// Test whether the object has obstype type /// @return true if this obstype was passed to the c'tor (i.e. is in indexForLabel) From b7cfb16a14ad166768ef9c2d81e147c86bbb15c4 Mon Sep 17 00:00:00 2001 From: Richard Penney Date: Fri, 2 Sep 2016 20:48:26 +0100 Subject: [PATCH 03/12] Removed another load of Subversion $Id$ markers. --- .gitignore | 11 +++++++++++ core/apps/positioning/PRSplot.pl | 2 +- core/lib/CommandLine/getopt.c | 1 - core/lib/CommandLine/getopt1.c | 1 - core/lib/FileHandling/SINEX/SinexBase.cpp | 2 -- core/lib/FileHandling/SINEX/SinexData.cpp | 2 -- core/lib/FileHandling/SINEX/SinexHeader.cpp | 2 -- core/lib/FileHandling/SINEX/SinexTypes.cpp | 2 -- ext/apps/clocktools/ORDPhaseParser.cpp | 1 - ext/apps/clocktools/TIAPhaseParser.cpp | 1 - ext/apps/clocktools/allanplot.py | 1 - ext/apps/clocktools/autoc.cpp | 1 - ext/apps/clocktools/bias1.cpp | 1 - ext/apps/clocktools/clockgui/src/clockgui.cpp | 2 -- ext/apps/clocktools/clockgui/src/datapoint.cpp | 2 -- ext/apps/clocktools/clockgui/src/datapoint.h | 2 -- ext/apps/clocktools/clockgui/src/glbox.cpp | 2 -- ext/apps/clocktools/clockgui/src/glbox.h | 2 -- ext/apps/clocktools/clockgui/src/mainimpl.cpp | 2 -- ext/apps/clocktools/clockgui/src/mainimpl.h | 2 -- ext/apps/clocktools/clockgui/src/result.cpp | 2 -- ext/apps/clocktools/clockgui/src/result.h | 2 -- ext/apps/clocktools/clockgui/src/resvec.cpp | 2 -- ext/apps/clocktools/clockgui/src/resvec.h | 2 -- ext/apps/clocktools/dallandev.cpp | 1 - ext/apps/clocktools/ffp.cpp | 1 - ext/apps/clocktools/lag1ac.cpp | 1 - ext/apps/clocktools/mallandev.cpp | 1 - ext/apps/clocktools/nallandev.cpp | 1 - ext/apps/clocktools/oallandev.cpp | 1 - ext/apps/clocktools/ohadamarddev.cpp | 1 - ext/apps/clocktools/pff.cpp | 1 - ext/apps/clocktools/scale.cpp | 1 - ext/apps/clocktools/tallandev.cpp | 1 - ext/apps/clocktools/trunc.cpp | 1 - ext/apps/swrx/complex_math.h | 2 -- ext/apps/swrx/plot | 1 - ext/tests/GPSOrbElemStore/xOrbElemCNAV.cpp | 1 - ext/tests/GPSOrbElemStore/xOrbElemCNAV2.cpp | 1 - ext/tests/GPSOrbElemStore/xOrbElemICE.cpp | 1 - ext/tests/SEM/SEM_T.cpp | 1 - ext/tests/Yuma/Yuma_T.cpp | 1 - ext/tests/gpsNavMsg/xBrcClockCorrection.cpp | 1 - ext/tests/gpsNavMsg/xBrcClockCorrectiongpsNavMsg.cpp | 1 - ext/tests/gpsNavMsg/xBrcKeplerOrbit.cpp | 1 - ext/tests/gpsNavMsg/xBrcKeplerOrbitgpsNavMsg.cpp | 1 - ext/tests/gpsNavMsg/xCNAV2EphClk.cpp | 1 - ext/tests/gpsNavMsg/xCNAV2EphClockPNB.cpp | 1 - ext/tests/gpsNavMsg/xCNAV2PNBgpsNavMsg.cpp | 1 - ext/tests/gpsNavMsg/xCNAV2gpsNavMsg.cpp | 1 - ext/tests/gpsNavMsg/xCNAVClock.cpp | 1 - ext/tests/gpsNavMsg/xCNAVClockPNB.cpp | 1 - ext/tests/gpsNavMsg/xCNAVClockPNBgpsNavMsg.cpp | 1 - ext/tests/gpsNavMsg/xCNAVClockgpsNavMsg.cpp | 1 - ext/tests/gpsNavMsg/xCNAVEphemeris.cpp | 1 - ext/tests/gpsNavMsg/xCNAVEphemerisPNB.cpp | 1 - ext/tests/gpsNavMsg/xCNAVEphemerisPNBgpsNavMsg.cpp | 1 - ext/tests/gpsNavMsg/xCNAVEphemerisgpsNavMsg.cpp | 1 - ext/tests/gpsNavMsg/xEngEphemerisgpsNavMsg.cpp | 1 - ext/tests/oldtests/FileSpecTest.pl | 9 --------- ext/tests/oldtests/Jamfile | 1 - ext/tests/oldtests/Makefile.am | 1 - ext/tests/oldtests/Rinex_dl.pl | 1 - ext/tests/oldtests/Xbegweek.cpp | 2 +- ext/tests/oldtests/Xendweek.cpp | 2 +- ext/tests/oldtests/configfile.txt | 1 - ext/tests/oldtests/delFileSpecTestDirs.pl | 2 -- ext/tests/oldtests/genFileSpecTestDirs.pl | 1 - ext/tests/oldtests/runAllTests.bat | 1 - ext/tests/oldtests/testscript.pl | 1 - 70 files changed, 14 insertions(+), 94 deletions(-) diff --git a/.gitignore b/.gitignore index 991265181..9a2d6d27d 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,14 @@ build*/ # Sublime Test temp files ._* + +# Build-system artefacts +CMakeCache.txt +CMakeFiles/ +cmake_install.cmake +CPackConfig.cmake +CPackSourceConfig.cmake +generated/ +GPSTKConfig.cmake +GPSTKConfigVersion.cmake +Makefile diff --git a/core/apps/positioning/PRSplot.pl b/core/apps/positioning/PRSplot.pl index 1393a06db..fa06c0856 100755 --- a/core/apps/positioning/PRSplot.pl +++ b/core/apps/positioning/PRSplot.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: PRSplot.pl 89 2012-02-09 21:14:16Z btolman $ + use strict; use warnings; diff --git a/core/lib/CommandLine/getopt.c b/core/lib/CommandLine/getopt.c index 36c4362bc..a9bf51d55 100644 --- a/core/lib/CommandLine/getopt.c +++ b/core/lib/CommandLine/getopt.c @@ -1,4 +1,3 @@ -#pragma ident "$Id$" /* Getopt for GNU. NOTE: getopt is now part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org diff --git a/core/lib/CommandLine/getopt1.c b/core/lib/CommandLine/getopt1.c index 88d86778d..22a7efbdd 100644 --- a/core/lib/CommandLine/getopt1.c +++ b/core/lib/CommandLine/getopt1.c @@ -1,4 +1,3 @@ -#pragma ident "$Id$" /* getopt_long and getopt_long_only entry points for GNU getopt. Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98 Free Software Foundation, Inc. diff --git a/core/lib/FileHandling/SINEX/SinexBase.cpp b/core/lib/FileHandling/SINEX/SinexBase.cpp index c5e7db089..874637c64 100644 --- a/core/lib/FileHandling/SINEX/SinexBase.cpp +++ b/core/lib/FileHandling/SINEX/SinexBase.cpp @@ -1,5 +1,3 @@ -#pragma ident "$Id: //depot/msn/main/code/shared/gpstk/SinexBase.cpp#6 $" - /** * @file SinexBase.cpp * Base constants, types, and functions for SINEX files diff --git a/core/lib/FileHandling/SINEX/SinexData.cpp b/core/lib/FileHandling/SINEX/SinexData.cpp index ad4c32c3a..24a584c97 100644 --- a/core/lib/FileHandling/SINEX/SinexData.cpp +++ b/core/lib/FileHandling/SINEX/SinexData.cpp @@ -1,5 +1,3 @@ -#pragma ident "$Id: //depot/msn/main/code/shared/gpstk/SinexData.cpp#5 $" - //lgpl-license START //lgpl-license END diff --git a/core/lib/FileHandling/SINEX/SinexHeader.cpp b/core/lib/FileHandling/SINEX/SinexHeader.cpp index a56c367f5..08ed6873a 100644 --- a/core/lib/FileHandling/SINEX/SinexHeader.cpp +++ b/core/lib/FileHandling/SINEX/SinexHeader.cpp @@ -1,5 +1,3 @@ -#pragma ident "$Id: //depot/msn/main/code/shared/gpstk/SinexHeader.cpp#4 $" - /** * @file SinexHeader.cpp * Encapsulate header of SINEX file data, including I/O diff --git a/core/lib/FileHandling/SINEX/SinexTypes.cpp b/core/lib/FileHandling/SINEX/SinexTypes.cpp index 22234a63e..e5c185b36 100644 --- a/core/lib/FileHandling/SINEX/SinexTypes.cpp +++ b/core/lib/FileHandling/SINEX/SinexTypes.cpp @@ -1,5 +1,3 @@ -#pragma ident "$Id: //depot/msn/main/code/shared/gpstk/SinexTypes.cpp#7 $" - //lgpl-license START //lgpl-license END diff --git a/ext/apps/clocktools/ORDPhaseParser.cpp b/ext/apps/clocktools/ORDPhaseParser.cpp index e47a4324b..6dab3c582 100755 --- a/ext/apps/clocktools/ORDPhaseParser.cpp +++ b/ext/apps/clocktools/ORDPhaseParser.cpp @@ -1,4 +1,3 @@ -#pragma ident "$Id$" /********************************************** / GPSTk: Clock Tools / ORDPhaseParser.cpp diff --git a/ext/apps/clocktools/TIAPhaseParser.cpp b/ext/apps/clocktools/TIAPhaseParser.cpp index ff4c0cd11..fca7eaa00 100755 --- a/ext/apps/clocktools/TIAPhaseParser.cpp +++ b/ext/apps/clocktools/TIAPhaseParser.cpp @@ -1,4 +1,3 @@ -#pragma ident "$Id$" /********************************************** / GPSTk: Clock Tools / TIAPhaseParser.cpp diff --git a/ext/apps/clocktools/allanplot.py b/ext/apps/clocktools/allanplot.py index 9d868d24e..bef777e00 100755 --- a/ext/apps/clocktools/allanplot.py +++ b/ext/apps/clocktools/allanplot.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# $Id: allanplot 1210 2008-04-22 03:46:29Z ocibu $ # A routine to plot the output of the oallandev and ohadamarddev. # import sys, string, time, datetime, numpy, matplotlib, pylab diff --git a/ext/apps/clocktools/autoc.cpp b/ext/apps/clocktools/autoc.cpp index 8792aea95..4a85c210c 100755 --- a/ext/apps/clocktools/autoc.cpp +++ b/ext/apps/clocktools/autoc.cpp @@ -1,4 +1,3 @@ -#pragma ident "$Id$" /*******************************************************************************/ /* This program reads in clock phase data provided by any of the phase parsers */ /* and calculates the autocorrelation function, outputting the the alpha value*/ diff --git a/ext/apps/clocktools/bias1.cpp b/ext/apps/clocktools/bias1.cpp index 46b45ed38..5849a7b91 100755 --- a/ext/apps/clocktools/bias1.cpp +++ b/ext/apps/clocktools/bias1.cpp @@ -1,4 +1,3 @@ -#pragma ident "$Id$" /*******************************************************************************/ /* This program reads in clock phase data provided by any of the phase parsers */ /* and calculates the Bias Function, outputting the results to */ diff --git a/ext/apps/clocktools/clockgui/src/clockgui.cpp b/ext/apps/clocktools/clockgui/src/clockgui.cpp index a49a9df4c..c4ccbd07c 100755 --- a/ext/apps/clocktools/clockgui/src/clockgui.cpp +++ b/ext/apps/clocktools/clockgui/src/clockgui.cpp @@ -1,5 +1,3 @@ -#pragma ident "$Id$" - //============================================================================ // // This file is part of GPSTk, the GPS Toolkit. diff --git a/ext/apps/clocktools/clockgui/src/datapoint.cpp b/ext/apps/clocktools/clockgui/src/datapoint.cpp index fcb0203ae..3428e6523 100755 --- a/ext/apps/clocktools/clockgui/src/datapoint.cpp +++ b/ext/apps/clocktools/clockgui/src/datapoint.cpp @@ -1,5 +1,3 @@ -#pragma ident "$Id$" - //============================================================================ // // This file is part of GPSTk, the GPS Toolkit. diff --git a/ext/apps/clocktools/clockgui/src/datapoint.h b/ext/apps/clocktools/clockgui/src/datapoint.h index 1fe8941b6..cdac23c2a 100755 --- a/ext/apps/clocktools/clockgui/src/datapoint.h +++ b/ext/apps/clocktools/clockgui/src/datapoint.h @@ -1,5 +1,3 @@ -#pragma ident "$Id$" - //============================================================================ // // This file is part of GPSTk, the GPS Toolkit. diff --git a/ext/apps/clocktools/clockgui/src/glbox.cpp b/ext/apps/clocktools/clockgui/src/glbox.cpp index e621ed2b6..0491861c8 100755 --- a/ext/apps/clocktools/clockgui/src/glbox.cpp +++ b/ext/apps/clocktools/clockgui/src/glbox.cpp @@ -1,5 +1,3 @@ -#pragma ident "$Id$" - //============================================================================ // // This file is part of GPSTk, the GPS Toolkit. diff --git a/ext/apps/clocktools/clockgui/src/glbox.h b/ext/apps/clocktools/clockgui/src/glbox.h index e055d7312..68db84d18 100755 --- a/ext/apps/clocktools/clockgui/src/glbox.h +++ b/ext/apps/clocktools/clockgui/src/glbox.h @@ -1,5 +1,3 @@ -#pragma ident "$Id$" - //============================================================================ // // This file is part of GPSTk, the GPS Toolkit. diff --git a/ext/apps/clocktools/clockgui/src/mainimpl.cpp b/ext/apps/clocktools/clockgui/src/mainimpl.cpp index 02f2c6488..f48bd83fe 100755 --- a/ext/apps/clocktools/clockgui/src/mainimpl.cpp +++ b/ext/apps/clocktools/clockgui/src/mainimpl.cpp @@ -1,5 +1,3 @@ -#pragma ident "$Id$" - //============================================================================ // // This file is part of GPSTk, the GPS Toolkit. diff --git a/ext/apps/clocktools/clockgui/src/mainimpl.h b/ext/apps/clocktools/clockgui/src/mainimpl.h index bc44d442a..5ba698675 100755 --- a/ext/apps/clocktools/clockgui/src/mainimpl.h +++ b/ext/apps/clocktools/clockgui/src/mainimpl.h @@ -1,5 +1,3 @@ -#pragma ident "$Id$" - //============================================================================ // // This file is part of GPSTk, the GPS Toolkit. diff --git a/ext/apps/clocktools/clockgui/src/result.cpp b/ext/apps/clocktools/clockgui/src/result.cpp index b4404f4d6..0638a3469 100755 --- a/ext/apps/clocktools/clockgui/src/result.cpp +++ b/ext/apps/clocktools/clockgui/src/result.cpp @@ -1,5 +1,3 @@ -#pragma ident "$Id$" - //============================================================================ // // This file is part of GPSTk, the GPS Toolkit. diff --git a/ext/apps/clocktools/clockgui/src/result.h b/ext/apps/clocktools/clockgui/src/result.h index fe2cf2e91..bc7e1abcf 100755 --- a/ext/apps/clocktools/clockgui/src/result.h +++ b/ext/apps/clocktools/clockgui/src/result.h @@ -1,5 +1,3 @@ -#pragma ident "$Id$" - //============================================================================ // // This file is part of GPSTk, the GPS Toolkit. diff --git a/ext/apps/clocktools/clockgui/src/resvec.cpp b/ext/apps/clocktools/clockgui/src/resvec.cpp index 587e7836d..d2ab5014f 100755 --- a/ext/apps/clocktools/clockgui/src/resvec.cpp +++ b/ext/apps/clocktools/clockgui/src/resvec.cpp @@ -1,5 +1,3 @@ -#pragma ident "$Id$" - //============================================================================ // // This file is part of GPSTk, the GPS Toolkit. diff --git a/ext/apps/clocktools/clockgui/src/resvec.h b/ext/apps/clocktools/clockgui/src/resvec.h index b00a05f24..6401fd8fd 100755 --- a/ext/apps/clocktools/clockgui/src/resvec.h +++ b/ext/apps/clocktools/clockgui/src/resvec.h @@ -1,5 +1,3 @@ -#pragma ident "$Id$" - //============================================================================ // // This file is part of GPSTk, the GPS Toolkit. diff --git a/ext/apps/clocktools/dallandev.cpp b/ext/apps/clocktools/dallandev.cpp index 0db8ccdef..410df2445 100755 --- a/ext/apps/clocktools/dallandev.cpp +++ b/ext/apps/clocktools/dallandev.cpp @@ -1,4 +1,3 @@ -#pragma ident "$Id$" /********************************************** / GPSTk: Clock Tools / dallandev.cpp diff --git a/ext/apps/clocktools/ffp.cpp b/ext/apps/clocktools/ffp.cpp index e79f65e67..5554692c9 100755 --- a/ext/apps/clocktools/ffp.cpp +++ b/ext/apps/clocktools/ffp.cpp @@ -1,4 +1,3 @@ -#pragma ident "$Id$" /********************************************** / GPSTk: Clock Tools / ffp.cpp diff --git a/ext/apps/clocktools/lag1ac.cpp b/ext/apps/clocktools/lag1ac.cpp index e913d3fa7..a279c9c77 100755 --- a/ext/apps/clocktools/lag1ac.cpp +++ b/ext/apps/clocktools/lag1ac.cpp @@ -1,4 +1,3 @@ -#pragma ident "$Id$" /*******************************************************************************/ /* This program reads in clock phase data provided by any of the phase parsers */ /* and calculates the lag 1 autocorrelation function, outputting the the alpha*/ diff --git a/ext/apps/clocktools/mallandev.cpp b/ext/apps/clocktools/mallandev.cpp index 714a378d7..811b3b82a 100755 --- a/ext/apps/clocktools/mallandev.cpp +++ b/ext/apps/clocktools/mallandev.cpp @@ -1,4 +1,3 @@ -#pragma ident "$Id$" /********************************************** / GPSTk: Clock Tools / mallandev.cpp diff --git a/ext/apps/clocktools/nallandev.cpp b/ext/apps/clocktools/nallandev.cpp index 621623d51..7a583fb48 100755 --- a/ext/apps/clocktools/nallandev.cpp +++ b/ext/apps/clocktools/nallandev.cpp @@ -1,4 +1,3 @@ -#pragma ident "$Id$" /********************************************** / GPSTk: Clock Tools / nallandev.cpp diff --git a/ext/apps/clocktools/oallandev.cpp b/ext/apps/clocktools/oallandev.cpp index c1d94eb51..2c5542159 100755 --- a/ext/apps/clocktools/oallandev.cpp +++ b/ext/apps/clocktools/oallandev.cpp @@ -1,4 +1,3 @@ -#pragma ident "$Id$" /********************************************** / GPSTk: Clock Tools / oallandev.cpp diff --git a/ext/apps/clocktools/ohadamarddev.cpp b/ext/apps/clocktools/ohadamarddev.cpp index 0dcbb9162..39aa9af15 100755 --- a/ext/apps/clocktools/ohadamarddev.cpp +++ b/ext/apps/clocktools/ohadamarddev.cpp @@ -1,4 +1,3 @@ -#pragma ident "$Id$" /********************************************** / GPSTk: Clock Tools / ohadamarddev.cpp diff --git a/ext/apps/clocktools/pff.cpp b/ext/apps/clocktools/pff.cpp index 6c3f5993f..5d3effd69 100755 --- a/ext/apps/clocktools/pff.cpp +++ b/ext/apps/clocktools/pff.cpp @@ -1,4 +1,3 @@ -#pragma ident "$Id$" /********************************************** / GPSTk: Clock Tools / pff.cpp diff --git a/ext/apps/clocktools/scale.cpp b/ext/apps/clocktools/scale.cpp index 3da0ba8ff..58b86a337 100755 --- a/ext/apps/clocktools/scale.cpp +++ b/ext/apps/clocktools/scale.cpp @@ -1,4 +1,3 @@ -#pragma ident "$Id$" /********************************************** / GPSTk: Clock Tools / scale.cpp diff --git a/ext/apps/clocktools/tallandev.cpp b/ext/apps/clocktools/tallandev.cpp index 033ed5ecd..548691f86 100755 --- a/ext/apps/clocktools/tallandev.cpp +++ b/ext/apps/clocktools/tallandev.cpp @@ -1,4 +1,3 @@ -#pragma ident "$Id$" /********************************************** / GPSTk: Clock Tools / tallandev.cpp diff --git a/ext/apps/clocktools/trunc.cpp b/ext/apps/clocktools/trunc.cpp index 8d3564330..5b24129f0 100755 --- a/ext/apps/clocktools/trunc.cpp +++ b/ext/apps/clocktools/trunc.cpp @@ -1,4 +1,3 @@ -#pragma ident "$Id$" /********************************************** / GPSTk: Clock Tools / trunc.cpp diff --git a/ext/apps/swrx/complex_math.h b/ext/apps/swrx/complex_math.h index e6a14522b..8754c0449 100755 --- a/ext/apps/swrx/complex_math.h +++ b/ext/apps/swrx/complex_math.h @@ -1,5 +1,3 @@ -#pragma ident "$Id$" - //============================================================================ // // This file is part of GPSTk, the GPS Toolkit. diff --git a/ext/apps/swrx/plot b/ext/apps/swrx/plot index ae0bdb4b3..a5c0a09d1 100755 --- a/ext/apps/swrx/plot +++ b/ext/apps/swrx/plot @@ -1,5 +1,4 @@ #!/usr/bin/env python -# $Id$ ##============================================================================ ## diff --git a/ext/tests/GPSOrbElemStore/xOrbElemCNAV.cpp b/ext/tests/GPSOrbElemStore/xOrbElemCNAV.cpp index d9ea225c7..dea12c766 100644 --- a/ext/tests/GPSOrbElemStore/xOrbElemCNAV.cpp +++ b/ext/tests/GPSOrbElemStore/xOrbElemCNAV.cpp @@ -35,7 +35,6 @@ //============================================================================= /********************************************************************* -* $Id$ * * Test program from July 2011. Written to test the CNAVEphemeris * and PackedNavBits modules as they were being developed. First, nav diff --git a/ext/tests/GPSOrbElemStore/xOrbElemCNAV2.cpp b/ext/tests/GPSOrbElemStore/xOrbElemCNAV2.cpp index 47b69a880..de2327554 100644 --- a/ext/tests/GPSOrbElemStore/xOrbElemCNAV2.cpp +++ b/ext/tests/GPSOrbElemStore/xOrbElemCNAV2.cpp @@ -35,7 +35,6 @@ //============================================================================= /********************************************************************* -* $Id$ * * Test program from July 2012. Written to test the OrbElemCNAV2 and * PackedNavBits modules as they were being developed. First, nav diff --git a/ext/tests/GPSOrbElemStore/xOrbElemICE.cpp b/ext/tests/GPSOrbElemStore/xOrbElemICE.cpp index b9e300308..3405c10d1 100644 --- a/ext/tests/GPSOrbElemStore/xOrbElemICE.cpp +++ b/ext/tests/GPSOrbElemStore/xOrbElemICE.cpp @@ -35,7 +35,6 @@ //============================================================================= /********************************************************************* -* $Id$ * * Test program from July 2012. Written to test the OrbElemCNAV2 and * PackedNavBits modules as they were being developed. First, nav diff --git a/ext/tests/SEM/SEM_T.cpp b/ext/tests/SEM/SEM_T.cpp index e18c4c6be..34ee27b62 100644 --- a/ext/tests/SEM/SEM_T.cpp +++ b/ext/tests/SEM/SEM_T.cpp @@ -35,7 +35,6 @@ //============================================================================= /********************************************************************* -* $Id$ * * Test program from November 2006. Written to test the SEMAlmRecord.cpp * module.. diff --git a/ext/tests/Yuma/Yuma_T.cpp b/ext/tests/Yuma/Yuma_T.cpp index 998bb0dbc..3671ee0e6 100644 --- a/ext/tests/Yuma/Yuma_T.cpp +++ b/ext/tests/Yuma/Yuma_T.cpp @@ -35,7 +35,6 @@ //============================================================================= /********************************************************************* -* $Id$ * * Test program from November 2006. Written to test the YumaAlmRecord.cpp * module.. diff --git a/ext/tests/gpsNavMsg/xBrcClockCorrection.cpp b/ext/tests/gpsNavMsg/xBrcClockCorrection.cpp index edb6759e5..44827695e 100644 --- a/ext/tests/gpsNavMsg/xBrcClockCorrection.cpp +++ b/ext/tests/gpsNavMsg/xBrcClockCorrection.cpp @@ -35,7 +35,6 @@ //============================================================================= /********************************************************************* -* $Id:$ * * Test program from June 2011. Written to test the BrcClockCorrection * module as it was being developed. diff --git a/ext/tests/gpsNavMsg/xBrcClockCorrectiongpsNavMsg.cpp b/ext/tests/gpsNavMsg/xBrcClockCorrectiongpsNavMsg.cpp index 103aa963e..07d0fd91c 100644 --- a/ext/tests/gpsNavMsg/xBrcClockCorrectiongpsNavMsg.cpp +++ b/ext/tests/gpsNavMsg/xBrcClockCorrectiongpsNavMsg.cpp @@ -35,7 +35,6 @@ //============================================================================= /********************************************************************* -* $Id:$ * * Test program from August 2011. Written to test the BrcClockCorrection * module as it was being developed using the cppunit test module. diff --git a/ext/tests/gpsNavMsg/xBrcKeplerOrbit.cpp b/ext/tests/gpsNavMsg/xBrcKeplerOrbit.cpp index 1c6ad2656..cb6d75ff6 100644 --- a/ext/tests/gpsNavMsg/xBrcKeplerOrbit.cpp +++ b/ext/tests/gpsNavMsg/xBrcKeplerOrbit.cpp @@ -35,7 +35,6 @@ //============================================================================= /********************************************************************* -* $Id:$ * * Test program from June 2011. Written to test the BrcKeplerOrbit * module as it was being developed. diff --git a/ext/tests/gpsNavMsg/xBrcKeplerOrbitgpsNavMsg.cpp b/ext/tests/gpsNavMsg/xBrcKeplerOrbitgpsNavMsg.cpp index 286fdb231..3554a028e 100644 --- a/ext/tests/gpsNavMsg/xBrcKeplerOrbitgpsNavMsg.cpp +++ b/ext/tests/gpsNavMsg/xBrcKeplerOrbitgpsNavMsg.cpp @@ -35,7 +35,6 @@ //============================================================================= /********************************************************************* -* $Id:$ * * Test program from August 2011. Written to test the BrcKeplerOrbit * module as it was being developed using the cppunit test module. diff --git a/ext/tests/gpsNavMsg/xCNAV2EphClk.cpp b/ext/tests/gpsNavMsg/xCNAV2EphClk.cpp index 37e6e3605..18e6ff74b 100644 --- a/ext/tests/gpsNavMsg/xCNAV2EphClk.cpp +++ b/ext/tests/gpsNavMsg/xCNAV2EphClk.cpp @@ -35,7 +35,6 @@ //============================================================================= /********************************************************************* -* $Id:$ * * Test program from June 2011. Written to test the CNAV2EphClk * module as it was being developed. diff --git a/ext/tests/gpsNavMsg/xCNAV2EphClockPNB.cpp b/ext/tests/gpsNavMsg/xCNAV2EphClockPNB.cpp index ce0f715aa..7591e2a03 100644 --- a/ext/tests/gpsNavMsg/xCNAV2EphClockPNB.cpp +++ b/ext/tests/gpsNavMsg/xCNAV2EphClockPNB.cpp @@ -35,7 +35,6 @@ //============================================================================= /********************************************************************* -* $Id:$ * * Test program from July 2011. Written to test the CNAV2EphClk and * PackedNavBits modules as they were being developed. First, nav diff --git a/ext/tests/gpsNavMsg/xCNAV2PNBgpsNavMsg.cpp b/ext/tests/gpsNavMsg/xCNAV2PNBgpsNavMsg.cpp index f238855a5..e1749b7d9 100644 --- a/ext/tests/gpsNavMsg/xCNAV2PNBgpsNavMsg.cpp +++ b/ext/tests/gpsNavMsg/xCNAV2PNBgpsNavMsg.cpp @@ -35,7 +35,6 @@ //============================================================================= /********************************************************************* -* $Id:$ * * Test program from August 2011. Written to test the CNAV2EphClk and * PackedNavBits modules as they were being developed. First, nav diff --git a/ext/tests/gpsNavMsg/xCNAV2gpsNavMsg.cpp b/ext/tests/gpsNavMsg/xCNAV2gpsNavMsg.cpp index 8a07a8ffc..469437de2 100644 --- a/ext/tests/gpsNavMsg/xCNAV2gpsNavMsg.cpp +++ b/ext/tests/gpsNavMsg/xCNAV2gpsNavMsg.cpp @@ -35,7 +35,6 @@ //============================================================================= /********************************************************************* -* $Id:$ * * Test program from June 2011. Written to test the CNAV2EphClk * module as it was being developed. diff --git a/ext/tests/gpsNavMsg/xCNAVClock.cpp b/ext/tests/gpsNavMsg/xCNAVClock.cpp index b6ecc3bdc..7af4a9cb7 100644 --- a/ext/tests/gpsNavMsg/xCNAVClock.cpp +++ b/ext/tests/gpsNavMsg/xCNAVClock.cpp @@ -35,7 +35,6 @@ //============================================================================= /********************************************************************* -* $Id:$ * * Test program from July 2011. Written to test the CNAVClock * module as it was being developed. diff --git a/ext/tests/gpsNavMsg/xCNAVClockPNB.cpp b/ext/tests/gpsNavMsg/xCNAVClockPNB.cpp index 9a049b510..83f3aa178 100644 --- a/ext/tests/gpsNavMsg/xCNAVClockPNB.cpp +++ b/ext/tests/gpsNavMsg/xCNAVClockPNB.cpp @@ -35,7 +35,6 @@ //============================================================================= /********************************************************************* -* $Id:$ * * Test program from July 2011. Written to test the CNAVClockPNB and * PackedNavBits modules as they were being developed. First, nav diff --git a/ext/tests/gpsNavMsg/xCNAVClockPNBgpsNavMsg.cpp b/ext/tests/gpsNavMsg/xCNAVClockPNBgpsNavMsg.cpp index 16c36f7e5..83a188b8e 100644 --- a/ext/tests/gpsNavMsg/xCNAVClockPNBgpsNavMsg.cpp +++ b/ext/tests/gpsNavMsg/xCNAVClockPNBgpsNavMsg.cpp @@ -35,7 +35,6 @@ //============================================================================= /********************************************************************* -* $Id:$ * * Test program from August 2011. Written to test the CNAVClockPNB and * PackedNavBits modules as they were being developed. First, nav diff --git a/ext/tests/gpsNavMsg/xCNAVClockgpsNavMsg.cpp b/ext/tests/gpsNavMsg/xCNAVClockgpsNavMsg.cpp index 776062fa2..fc22353c5 100644 --- a/ext/tests/gpsNavMsg/xCNAVClockgpsNavMsg.cpp +++ b/ext/tests/gpsNavMsg/xCNAVClockgpsNavMsg.cpp @@ -35,7 +35,6 @@ //============================================================================= /********************************************************************* -* $Id:$ * * Test program from August 2011. Written to test the CNAVClock * module as it was being developed using the cppunit test module. diff --git a/ext/tests/gpsNavMsg/xCNAVEphemeris.cpp b/ext/tests/gpsNavMsg/xCNAVEphemeris.cpp index 22c21632e..6529a0e2d 100644 --- a/ext/tests/gpsNavMsg/xCNAVEphemeris.cpp +++ b/ext/tests/gpsNavMsg/xCNAVEphemeris.cpp @@ -35,7 +35,6 @@ //============================================================================= /********************************************************************* -* $Id:$ * * Test program from June 2011. Written to test the CNAVEphemeris * module as it was being developed. diff --git a/ext/tests/gpsNavMsg/xCNAVEphemerisPNB.cpp b/ext/tests/gpsNavMsg/xCNAVEphemerisPNB.cpp index 8bffbcc69..76be9dd46 100644 --- a/ext/tests/gpsNavMsg/xCNAVEphemerisPNB.cpp +++ b/ext/tests/gpsNavMsg/xCNAVEphemerisPNB.cpp @@ -35,7 +35,6 @@ //============================================================================= /********************************************************************* -* $Id:$ * * Test program from July 2011. Written to test the CNAVEphemeris * and PackedNavBits modules as they were being developed. First, nav diff --git a/ext/tests/gpsNavMsg/xCNAVEphemerisPNBgpsNavMsg.cpp b/ext/tests/gpsNavMsg/xCNAVEphemerisPNBgpsNavMsg.cpp index a98aaad76..26fb2cc56 100644 --- a/ext/tests/gpsNavMsg/xCNAVEphemerisPNBgpsNavMsg.cpp +++ b/ext/tests/gpsNavMsg/xCNAVEphemerisPNBgpsNavMsg.cpp @@ -35,7 +35,6 @@ //============================================================================= /********************************************************************* -* $Id:$ * * Test program from August 2011. Written to test the CNAVEphemeris * and PackedNavBits modules as they were being developed. First, nav diff --git a/ext/tests/gpsNavMsg/xCNAVEphemerisgpsNavMsg.cpp b/ext/tests/gpsNavMsg/xCNAVEphemerisgpsNavMsg.cpp index ba969e63e..e90fff174 100644 --- a/ext/tests/gpsNavMsg/xCNAVEphemerisgpsNavMsg.cpp +++ b/ext/tests/gpsNavMsg/xCNAVEphemerisgpsNavMsg.cpp @@ -35,7 +35,6 @@ //============================================================================= /********************************************************************* -* $Id:$ * * Test program from August 2011. Written to test the CNAVEphemeris * module as it was being developed using the cppunit test module. diff --git a/ext/tests/gpsNavMsg/xEngEphemerisgpsNavMsg.cpp b/ext/tests/gpsNavMsg/xEngEphemerisgpsNavMsg.cpp index c4918591e..e72d32612 100644 --- a/ext/tests/gpsNavMsg/xEngEphemerisgpsNavMsg.cpp +++ b/ext/tests/gpsNavMsg/xEngEphemerisgpsNavMsg.cpp @@ -35,7 +35,6 @@ //============================================================================= /********************************************************************* -* $Id:$ * * Test program from August 2011. Written to test the EngEphemeris * module using the CPPUNIT test module. diff --git a/ext/tests/oldtests/FileSpecTest.pl b/ext/tests/oldtests/FileSpecTest.pl index e437310c3..2a602ce4c 100755 --- a/ext/tests/oldtests/FileSpecTest.pl +++ b/ext/tests/oldtests/FileSpecTest.pl @@ -1,13 +1,4 @@ #!/usr/bin/perl -# $Id$ -# -# -# -# -# -# -# -# $exedir=$ARGV[0]; system "$exedir/genFileSpecTestDirs"; diff --git a/ext/tests/oldtests/Jamfile b/ext/tests/oldtests/Jamfile index c03569434..085a4c311 100755 --- a/ext/tests/oldtests/Jamfile +++ b/ext/tests/oldtests/Jamfile @@ -1,5 +1,4 @@ # -# $Id$ # SubDir TOP tests ; diff --git a/ext/tests/oldtests/Makefile.am b/ext/tests/oldtests/Makefile.am index 34037e5f3..54f67084c 100755 --- a/ext/tests/oldtests/Makefile.am +++ b/ext/tests/oldtests/Makefile.am @@ -1,4 +1,3 @@ -# $Id$ INCLUDES = -I$(srcdir)/../src LDADD = ../src/libgpstk.la diff --git a/ext/tests/oldtests/Rinex_dl.pl b/ext/tests/oldtests/Rinex_dl.pl index ae88d8422..5c0356837 100755 --- a/ext/tests/oldtests/Rinex_dl.pl +++ b/ext/tests/oldtests/Rinex_dl.pl @@ -1,5 +1,4 @@ #!/usr/bin/perl -# $Id$ # Ryan Mire ARL SGL # July 2005 diff --git a/ext/tests/oldtests/Xbegweek.cpp b/ext/tests/oldtests/Xbegweek.cpp index 428caef5e..a4f9a1fbb 100644 --- a/ext/tests/oldtests/Xbegweek.cpp +++ b/ext/tests/oldtests/Xbegweek.cpp @@ -1,4 +1,4 @@ -/* $Id$ +/* * Xbegweek.cpp - Test scaffold for demonstrating correctness of the * SVPCodeGen class. * diff --git a/ext/tests/oldtests/Xendweek.cpp b/ext/tests/oldtests/Xendweek.cpp index a136223d8..0c1435bb3 100644 --- a/ext/tests/oldtests/Xendweek.cpp +++ b/ext/tests/oldtests/Xendweek.cpp @@ -1,4 +1,4 @@ -/* $Id$ +/* * Xendweek.c - Test scaffold for demonstrating correctness of the * SVPCodeGen class. In this case, the test is to correctly generate * the P-code for the last 6 seconds of the week for each possible diff --git a/ext/tests/oldtests/configfile.txt b/ext/tests/oldtests/configfile.txt index cdd2143ba..198b4410e 100755 --- a/ext/tests/oldtests/configfile.txt +++ b/ext/tests/oldtests/configfile.txt @@ -1,4 +1,3 @@ -# $Id$ # Configuration file for GPSTk regression test script # AnotherFileFilterTest; diff --git a/ext/tests/oldtests/delFileSpecTestDirs.pl b/ext/tests/oldtests/delFileSpecTestDirs.pl index d3532a5f6..a418320ee 100755 --- a/ext/tests/oldtests/delFileSpecTestDirs.pl +++ b/ext/tests/oldtests/delFileSpecTestDirs.pl @@ -1,6 +1,4 @@ #!/usr/bin/perl -w -# $Id$ -# # # This script eliminates the set of dummy files and directories created # by genFileSpecTestDirs. The dummy files/directories are used while diff --git a/ext/tests/oldtests/genFileSpecTestDirs.pl b/ext/tests/oldtests/genFileSpecTestDirs.pl index 93b69192f..38e348e43 100755 --- a/ext/tests/oldtests/genFileSpecTestDirs.pl +++ b/ext/tests/oldtests/genFileSpecTestDirs.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -w # -# "$Id$" # diff --git a/ext/tests/oldtests/runAllTests.bat b/ext/tests/oldtests/runAllTests.bat index a330a1d8b..8d0656492 100755 --- a/ext/tests/oldtests/runAllTests.bat +++ b/ext/tests/oldtests/runAllTests.bat @@ -1,6 +1,5 @@ echo off REM Run all tests in the tests directory -REM $Id$ echo. echo. diff --git a/ext/tests/oldtests/testscript.pl b/ext/tests/oldtests/testscript.pl index 0f4d3e265..4bb1e6199 100755 --- a/ext/tests/oldtests/testscript.pl +++ b/ext/tests/oldtests/testscript.pl @@ -1,5 +1,4 @@ #!/usr/bin/perl -# $Id$ # Ryan Mire ARL SGL # June 2005 From dfd4c6a6aef65bb1f18791a14674e0cefcc8fb9a Mon Sep 17 00:00:00 2001 From: Richard Penney Date: Sat, 3 Sep 2016 07:09:08 +0100 Subject: [PATCH 04/12] Reduced duplicated & redundant code in SatPass. Centralized out-of-bounds logic in SatPass getter/setter methods. Added typedef for index/label std::map types. Simplified copying of std::vectors within SatPassData. --- ext/lib/Geomatics/SatPass.cpp | 119 ++++++++++++---------------------- ext/lib/Geomatics/SatPass.hpp | 31 ++++++--- 2 files changed, 62 insertions(+), 88 deletions(-) diff --git a/ext/lib/Geomatics/SatPass.cpp b/ext/lib/Geomatics/SatPass.cpp index d4dbbaa0a..3cd8726da 100644 --- a/ext/lib/Geomatics/SatPass.cpp +++ b/ext/lib/Geomatics/SatPass.cpp @@ -183,7 +183,7 @@ int SatPass::addData(const RinexObsData& robs) throw() RinexObsData::RinexSatMap::const_iterator it; RinexObsData::RinexObsTypeMap::const_iterator jt; - map::const_iterator kt; + LabelToIndexMap::const_iterator kt; SatPassData spd(indexForLabel.size()); // loop over satellites @@ -258,7 +258,7 @@ try { // make sure L1, L2, C1/P1, P2 are present bool useC1=false; - map::const_iterator it; + LabelToIndexMap::const_iterator it; if(indexForLabel.find("L1") == indexForLabel.end() || indexForLabel.find("L2") == indexForLabel.end() || (indexForLabel.find("C1") == indexForLabel.end() && @@ -580,70 +580,30 @@ catch(Exception& e) { GPSTK_RETHROW(e); } } // -------------------------- get and set routines ---------------------------- -// NB may be used as rvalue or lvalue double SatPass::data(unsigned int i, const string& type) const throw(Exception) { - if(i >= spdvector.size()) { - Exception e("Invalid index in data() " + asString(i)); - GPSTK_THROW(e); - } - map::const_iterator it; - if((it = indexForLabel.find(type)) == indexForLabel.end()) { - Exception e("Invalid obs type in data() " + type); - GPSTK_THROW(e); - } - return spdvector[i].data[it->second]; + return getData(i).data[findValidLabel(type)]; } +// NB may be used as rvalue or lvalue double& SatPass::data(unsigned int i, const string& type) throw(Exception) { - if(i >= spdvector.size()) { - Exception e("Invalid index in data() " + asString(i)); - GPSTK_THROW(e); - } - map::const_iterator it; - if((it = indexForLabel.find(type)) == indexForLabel.end()) { - Exception e("Invalid obs type in data() " + type); - GPSTK_THROW(e); - } - return spdvector[i].data[it->second]; + return getData(i).data[findValidLabel(type)]; } double& SatPass::timeoffset(unsigned int i) throw(Exception) { - if(i >= spdvector.size()) { - Exception e("Invalid index in timeoffset() " + asString(i)); - GPSTK_THROW(e); - } - return spdvector[i].toffset; + return getData(i).toffset; } unsigned short& SatPass::LLI(unsigned int i, const string& type) throw(Exception) { - if(i >= spdvector.size()) { - Exception e("Invalid index in LLI() " + asString(i)); - GPSTK_THROW(e); - } - map::const_iterator it; - if((it = indexForLabel.find(type)) == indexForLabel.end()) { - Exception e("Invalid obs type in LLI() " + type); - GPSTK_THROW(e); - } - return spdvector[i].lli[it->second]; + return getData(i).lli[findValidLabel(type)]; } unsigned short& SatPass::SSI(unsigned int i, const string& type) throw(Exception) { - if(i >= spdvector.size()) { - Exception e("Invalid index in SSI() " + asString(i)); - GPSTK_THROW(e); - } - map::const_iterator it; - if((it = indexForLabel.find(type)) == indexForLabel.end()) { - Exception e("Invalid obs type in SSI() " + type); - GPSTK_THROW(e); - } - return spdvector[i].ssi[it->second]; + return getData(i).ssi[findValidLabel(type)]; } // ---------------------------------- set routines ---------------------------- @@ -690,15 +650,13 @@ Epoch SatPass::getLastTime(void) const throw() { return time(spdvector.size()-1) double SatPass::data(unsigned int i, const string& type1, const string& type2) const throw(Exception) { - if(i >= spdvector.size()) { - Exception e("Invalid index in data() " + asString(i)); - GPSTK_THROW(e); - } - map::const_iterator it; + const SatPassData& spd_i = getData(i); + LabelToIndexMap::const_iterator it; + if((it = indexForLabel.find(type1)) != indexForLabel.end()) - return spdvector[i].data[it->second]; + return spd_i.data[it->second]; else if((it = indexForLabel.find(type2)) != indexForLabel.end()) - return spdvector[i].data[it->second]; + return spd_i.data[it->second]; else { Exception e("Invalid obs types in data() " + type1 + " " + type2); GPSTK_THROW(e); @@ -708,15 +666,13 @@ double SatPass::data(unsigned int i, const string& type1, unsigned short SatPass::LLI(unsigned int i, const string& type1, const string& type2) const throw(Exception) { - if(i >= spdvector.size()) { - Exception e("Invalid index in LLI() " + asString(i)); - GPSTK_THROW(e); - } - map::const_iterator it; + const SatPassData& spd_i = getData(i); + LabelToIndexMap::const_iterator it; + if((it = indexForLabel.find(type1)) != indexForLabel.end()) - return spdvector[i].lli[it->second]; + return spd_i.lli[it->second]; else if((it = indexForLabel.find(type2)) != indexForLabel.end()) - return spdvector[i].lli[it->second]; + return spd_i.lli[it->second]; else { Exception e("Invalid obs types in LLI() " + type1 + " " + type2); GPSTK_THROW(e); @@ -726,15 +682,13 @@ unsigned short SatPass::LLI(unsigned int i, const string& type1, unsigned short SatPass::SSI(unsigned int i, const string& type1, const string& type2) const throw(Exception) { - if(i >= spdvector.size()) { - Exception e("Invalid index in SSI() " + asString(i)); - GPSTK_THROW(e); - } - map::const_iterator it; + const SatPassData& spd_i = getData(i); + LabelToIndexMap::const_iterator it; + if((it = indexForLabel.find(type1)) == indexForLabel.end()) - return spdvector[i].ssi[it->second]; + return spd_i.ssi[it->second]; else if((it = indexForLabel.find(type2)) == indexForLabel.end()) - return spdvector[i].ssi[it->second]; + return spd_i.ssi[it->second]; else { Exception e("Invalid obs types in SSI() " + type1 + " " + type2); GPSTK_THROW(e); @@ -745,12 +699,10 @@ unsigned short SatPass::SSI(unsigned int i, const string& type1, // return the time corresponding to the given index in the data array Epoch SatPass::time(unsigned int i) const throw(Exception) { - if(i >= spdvector.size()) { - Exception e("Invalid index in time() " + asString(i)); - GPSTK_THROW(e); - } + const SatPassData& spd_i = getData(i); + // computing toff first is necessary to avoid a rare bug in Epoch.. - double toff = spdvector[i].ndt * dt + spdvector[i].toffset; + const double toff = spd_i.ndt * dt + spd_i.toffset; return (firstTime + toff); } @@ -771,7 +723,7 @@ bool SatPass::includesTime(const Epoch& tt) const throw() // return true if successful. bool SatPass::split(int N, SatPass &newSP) { try { - int i,j,n,oldgood,ilast; + int j,n,oldgood,ilast; Epoch tt; newSP = SatPass(sat, dt); // create new SatPass @@ -781,7 +733,7 @@ try { oldgood = ngood; ngood = ilast = 0; - for(i=0; i= spdvector.size()) { // TD ?? keep this - its private + Exception e("invalid in getData() " + asString(i)); + GPSTK_THROW(e); + } + return spdvector[i]; +} + +// get one (l-value) element of the data array of this SatPass (private) +SatPass::SatPassData& SatPass::getData(unsigned int i) throw(Exception) { if(i >= spdvector.size()) { // TD ?? keep this - its private diff --git a/ext/lib/Geomatics/SatPass.hpp b/ext/lib/Geomatics/SatPass.hpp index f969d92b6..03d676b60 100644 --- a/ext/lib/Geomatics/SatPass.hpp +++ b/ext/lib/Geomatics/SatPass.hpp @@ -100,13 +100,10 @@ class SatPass { flag = right.flag; ndt = right.ndt; toffset = right.toffset; - data.resize(right.data.size()); - lli.resize(right.lli.size()); - ssi.resize(right.ssi.size()); - unsigned i; - for(i=0; i indexForLabel; - std::map labelForIndex; + typedef std::map LabelToIndexMap; + typedef std::map IndexToLabelMap; + LabelToIndexMap indexForLabel; + IndexToLabelMap labelForIndex; + + inline unsigned findValidLabel(const std::string& type) const throw(Exception) { + const LabelToIndexMap::const_iterator it = indexForLabel.find(type); + + if (it == indexForLabel.end()) { + Exception e("Invalid obs type " + type); + GPSTK_THROW(e); + } + + return it->second; + } // above determined at construction; the rest determined by input data @@ -153,7 +163,8 @@ class SatPass { int push_back(const Epoch tt, SatPassData& spd) throw(); /// get a complete SatPassData at count i - struct SatPassData getData(unsigned int i) const throw(Exception); + const SatPassData& getData(unsigned int i) const throw(Exception); + SatPassData& getData(unsigned int i) throw(Exception); public: // ------------------ friends -------------------------------------- From 861ecb8f9c3d7811610e04b5f58dc4df16f4d900 Mon Sep 17 00:00:00 2001 From: Richard Penney Date: Sat, 3 Sep 2016 17:13:12 +0100 Subject: [PATCH 05/12] Patched to reduce compiler warnings (gcc-4.9) Removed various unused variables. Reordered various constructor member initializers. Reduced usage of clang-specific #pragmas. --- core/lib/CommandLine/CommandOption.cpp | 1 - core/lib/FileDirProc/FileSpec.hpp | 4 ++-- core/lib/FileHandling/Binex/BinexData.cpp | 14 +++++++------- core/lib/FileHandling/RINEX/RinexClockHeader.cpp | 2 +- core/lib/FileHandling/RINEX/RinexClockHeader.hpp | 2 +- core/lib/FileHandling/RINEX3/Rinex3ClockHeader.hpp | 3 --- core/lib/FileHandling/RINEX3/Rinex3ObsData.cpp | 3 ++- core/lib/FileHandling/RINEX3/Rinex3ObsHeader.cpp | 6 +++--- core/lib/FileHandling/RINEX3/RinexDatum.cpp | 5 +++-- core/lib/FileHandling/SINEX/SinexBase.cpp | 2 +- core/lib/FileHandling/SP3/SP3Data.hpp | 3 --- core/lib/GNSSCore/SVNumXRef.cpp | 3 --- core/lib/Geomatics/Namelist.hpp | 10 +++++----- core/lib/NavFilter/LNavCrossSourceFilter.cpp | 2 -- 14 files changed, 25 insertions(+), 35 deletions(-) diff --git a/core/lib/CommandLine/CommandOption.cpp b/core/lib/CommandLine/CommandOption.cpp index 9a577f510..454a5254f 100644 --- a/core/lib/CommandLine/CommandOption.cpp +++ b/core/lib/CommandLine/CommandOption.cpp @@ -356,7 +356,6 @@ namespace gpstk string manyerrstr("No more than " + StringUtils::asString(maxCount)); string errstr(" of the following options must be specified: "); - bool found = false; unsigned long n = 0; for (CommandOptionVec::size_type i = 0; i < optionVec.size(); i++) diff --git a/core/lib/FileDirProc/FileSpec.hpp b/core/lib/FileDirProc/FileSpec.hpp index c0e5db4e3..d8a71a374 100644 --- a/core/lib/FileDirProc/FileSpec.hpp +++ b/core/lib/FileDirProc/FileSpec.hpp @@ -289,10 +289,10 @@ namespace gpstk /// in the strings bool operator() (const std::string& l, const std::string& r) const; private: - /// ascending or descending - FileSpecSortType sortDir; /// The FileSpec doing the sorting const FileSpec &fileSpec; + /// ascending or descending + FileSpecSortType sortDir; }; /// Holds all of the FileSpecElements for this FileSpec diff --git a/core/lib/FileHandling/Binex/BinexData.cpp b/core/lib/FileHandling/Binex/BinexData.cpp index a16824330..69de59b71 100644 --- a/core/lib/FileHandling/Binex/BinexData.cpp +++ b/core/lib/FileHandling/Binex/BinexData.cpp @@ -1429,13 +1429,13 @@ namespace gpstk std::string& crc) const { size_t crcDataLen = head.size() + message.size(); - size_t crcLen = 0; + //size_t crcLen = 0; unsigned long crcTmp = 0; if (crcDataLen >= 1048576) { // @todo - Use 16-byte CRC (128-bit MD5 checksum) - crcLen = 16; + //crcLen = 16; } else // (crcLen < 1048576) { @@ -1452,7 +1452,7 @@ namespace gpstk crcTmp = BinUtils::computeCRC((const unsigned char*)message.data(), message.size(), params); - crcLen = 2; + //crcLen = 2; } else { @@ -1465,7 +1465,7 @@ namespace gpstk crcTmp = BinUtils::computeCRC((const unsigned char*)message.data(), message.size(), params); - crcLen = 4; + //crcLen = 4; } } else // Regular CRC @@ -1485,7 +1485,7 @@ namespace gpstk { crcTmp ^= *ptr; } - crcLen = 1; + //crcLen = 1; } else if (crcDataLen < 4096) { @@ -1498,7 +1498,7 @@ namespace gpstk crcTmp = BinUtils::computeCRC((const unsigned char*)message.data(), message.size(), params); - crcLen = 2; + //crcLen = 2; } else { @@ -1511,7 +1511,7 @@ namespace gpstk crcTmp = BinUtils::computeCRC((const unsigned char*)message.data(), message.size(), params); - crcLen = 4; + //crcLen = 4; } } // Regular CRC diff --git a/core/lib/FileHandling/RINEX/RinexClockHeader.cpp b/core/lib/FileHandling/RINEX/RinexClockHeader.cpp index 794f88957..3af19d85c 100644 --- a/core/lib/FileHandling/RINEX/RinexClockHeader.cpp +++ b/core/lib/FileHandling/RINEX/RinexClockHeader.cpp @@ -716,7 +716,7 @@ namespace gpstk std::list::iterator itr = refClkList.end(); --itr; - if ( itr->numClkRef <= itr->clocks.size() ) + if ( itr->numClkRef <= (int)itr->clocks.size() ) { // Excessive # of clock references - throw FFStreamError e("\"ANALYSIS CLK REF\" entry exceeds " "\"# of CLK REF\": " + asString(itr->numClkRef)); diff --git a/core/lib/FileHandling/RINEX/RinexClockHeader.hpp b/core/lib/FileHandling/RINEX/RinexClockHeader.hpp index f34181593..40bd19e1e 100644 --- a/core/lib/FileHandling/RINEX/RinexClockHeader.hpp +++ b/core/lib/FileHandling/RINEX/RinexClockHeader.hpp @@ -61,7 +61,7 @@ namespace gpstk public: /// A Simple Constructor. - RinexClockHeader() : valid(0), version(2.00) + RinexClockHeader() : version(2.00), valid(0) {} /// Destructor diff --git a/core/lib/FileHandling/RINEX3/Rinex3ClockHeader.hpp b/core/lib/FileHandling/RINEX3/Rinex3ClockHeader.hpp index e22d22d91..fd7771411 100644 --- a/core/lib/FileHandling/RINEX3/Rinex3ClockHeader.hpp +++ b/core/lib/FileHandling/RINEX3/Rinex3ClockHeader.hpp @@ -138,10 +138,7 @@ namespace gpstk * their num. * 1: above plus all the stations and satellites * 2: above plus all invalid header strings (dumpValid) */ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Woverloaded-virtual" virtual void dump(std::ostream& s=std::cout, short detail = 0) const throw(); -#pragma clang diagnostic pop /// Dump validity bits -> header strings void dumpValid(std::ostream& s=std::cout) const throw(); diff --git a/core/lib/FileHandling/RINEX3/Rinex3ObsData.cpp b/core/lib/FileHandling/RINEX3/Rinex3ObsData.cpp index edad4675d..f42a40106 100644 --- a/core/lib/FileHandling/RINEX3/Rinex3ObsData.cpp +++ b/core/lib/FileHandling/RINEX3/Rinex3ObsData.cpp @@ -477,7 +477,8 @@ namespace gpstk if(rod.epochFlag==0 || rod.epochFlag==1 || rod.epochFlag==6) { // first read the SatIDs off the epoch line - int isv, ndx, line_ndx; + unsigned isv, line_ndx; + int ndx; string satsys; RinexSatID sat; vector satIndex(rod.numSVs); diff --git a/core/lib/FileHandling/RINEX3/Rinex3ObsHeader.cpp b/core/lib/FileHandling/RINEX3/Rinex3ObsHeader.cpp index d041f72ab..1e941b9ed 100755 --- a/core/lib/FileHandling/RINEX3/Rinex3ObsHeader.cpp +++ b/core/lib/FileHandling/RINEX3/Rinex3ObsHeader.cpp @@ -1789,7 +1789,7 @@ namespace gpstk // "beyond RINEX v2.11" extra-special handling. // bool hasL2P = find(R2ObsTypes.begin(),R2ObsTypes.end(), string("P2")) != R2ObsTypes.end(); - bool hasL2C = find(R2ObsTypes.begin(),R2ObsTypes.end(), string("C2")) != R2ObsTypes.end(); + //bool hasL2C = find(R2ObsTypes.begin(),R2ObsTypes.end(), string("C2")) != R2ObsTypes.end(); string code2 = "X"; // Correct condition as long as P2 is not in the list string code2P = "X"; // Condition is irrelvant unless P2 is in the list @@ -1864,11 +1864,11 @@ namespace gpstk // This assumes that any files claiming to track GLONASS P1 is // actually doing so with a codeless technique. There is no RINEX V3 // "C1W" for GLONASS, so we'll leave P1 as C1P as the closest approximation. - bool hasL1P = find(R2ObsTypes.begin(),R2ObsTypes.end(), string("P1")) != R2ObsTypes.end(); + //bool hasL1P = find(R2ObsTypes.begin(),R2ObsTypes.end(), string("P1")) != R2ObsTypes.end(); string code1 = "C"; // Assume D2, S2, and L2 come from C/A. Same logic as above. - bool hasL2P = find(R2ObsTypes.begin(),R2ObsTypes.end(), string("P2")) != R2ObsTypes.end(); + //bool hasL2P = find(R2ObsTypes.begin(),R2ObsTypes.end(), string("P2")) != R2ObsTypes.end(); string code2 = "C"; string syss("R"); diff --git a/core/lib/FileHandling/RINEX3/RinexDatum.cpp b/core/lib/FileHandling/RINEX3/RinexDatum.cpp index f00e51991..a041fb898 100644 --- a/core/lib/FileHandling/RINEX3/RinexDatum.cpp +++ b/core/lib/FileHandling/RINEX3/RinexDatum.cpp @@ -46,8 +46,9 @@ namespace gpstk { RinexDatum :: RinexDatum() - : data(0), lli(0), ssi(0), - dataBlank(false), lliBlank(false), ssiBlank(false) + : data(0), dataBlank(false), + lli(0), lliBlank(false), + ssi(0), ssiBlank(false) { // blanks are false by default for backwards compatibility } diff --git a/core/lib/FileHandling/SINEX/SinexBase.cpp b/core/lib/FileHandling/SINEX/SinexBase.cpp index 874637c64..c39b4e623 100644 --- a/core/lib/FileHandling/SINEX/SinexBase.cpp +++ b/core/lib/FileHandling/SINEX/SinexBase.cpp @@ -115,7 +115,7 @@ namespace Sinex /// Check for valid field dividers if (divs != NULL) { - int pos; + size_t pos; for (size_t i = 0; (pos = divs[i]) >= 0; ++i) { if ( (pos >= sz) || (line[pos] != FIELD_DIV) ) diff --git a/core/lib/FileHandling/SP3/SP3Data.hpp b/core/lib/FileHandling/SP3/SP3Data.hpp index a957173d6..75826f89f 100644 --- a/core/lib/FileHandling/SP3/SP3Data.hpp +++ b/core/lib/FileHandling/SP3/SP3Data.hpp @@ -109,10 +109,7 @@ namespace gpstk virtual bool isData() const {return true;} /// Debug output function. -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Woverloaded-virtual" virtual void dump(std::ostream& s=std::cout, bool includeC=true) const throw(); -#pragma clang diagnostic pop char RecType; ///< Data type indicator. P position, V velocity, * epoch SatID sat; ///< Satellite ID diff --git a/core/lib/GNSSCore/SVNumXRef.cpp b/core/lib/GNSSCore/SVNumXRef.cpp index fb976022a..62d9c4a4e 100644 --- a/core/lib/GNSSCore/SVNumXRef.cpp +++ b/core/lib/GNSSCore/SVNumXRef.cpp @@ -603,7 +603,6 @@ void SVNumXRef::dump(std::ostream& out) const { //iterate through the data multimap::const_iterator it; - bool pastCurrent = false; //header std::string start_end_h = " START" " END\n"; @@ -620,8 +619,6 @@ void SVNumXRef::dump(std::ostream& out) const out << "\n\n\n"; //iterate through the data multimap::const_iterator iter; - //resest pastCurrent - pastCurrent = false; //header std::string prn_h = " PRN SVN MM/DD/YYYY DOY HH:MM:SS" " MM/DD/YYYY DOY HH:MM:SS\n"; diff --git a/core/lib/Geomatics/Namelist.hpp b/core/lib/Geomatics/Namelist.hpp index db6fe9625..2684fde21 100644 --- a/core/lib/Geomatics/Namelist.hpp +++ b/core/lib/Geomatics/Namelist.hpp @@ -81,11 +81,11 @@ class LabeledVector { /// class LabeledMatrix. Pretty print a Matrix using the labels in a Namelist. class LabeledMatrix { public: - int wid,prec; - int form; // format: 1=fixed, 2=scientific - int rc; // rows only (1) columns only (2) or both (0) bool sym; // if true, print only lower triangle bool cln; // if true, print 0.0 as "0" + int wid, prec; + int form; // format: 1=fixed, 2=scientific + int rc; // rows only (1) columns only (2) or both (0) std::string msg; std::string tag; const Namelist& NLrows; @@ -93,10 +93,10 @@ class LabeledMatrix { const Matrix& M; LabeledMatrix(const Namelist& nl, const Matrix& m) : sym(false), cln(false), wid(12), prec(5), form(1), rc(0), - M(m), NLrows(nl), NLcols(nl) { } + NLrows(nl), NLcols(nl), M(m) { } LabeledMatrix(const Namelist& nr, const Namelist& nc, const Matrix& m) : sym(false), cln(false), wid(12), prec(5), form(1), rc(0), - M(m), NLrows(nr), NLcols(nc) { } + NLrows(nr), NLcols(nc), M(m) { } LabeledMatrix& setw(int w) { wid = w; return *this; } LabeledMatrix& setprecision(int p) { prec = p; return *this; } LabeledMatrix& fixed(void) { form = 1; return *this; } diff --git a/core/lib/NavFilter/LNavCrossSourceFilter.cpp b/core/lib/NavFilter/LNavCrossSourceFilter.cpp index 6e6a3f493..39dbe88f2 100644 --- a/core/lib/NavFilter/LNavCrossSourceFilter.cpp +++ b/core/lib/NavFilter/LNavCrossSourceFilter.cpp @@ -42,8 +42,6 @@ namespace gpstk // loop over each PRN/SV for (nmi = groupedNav.begin(); nmi != groupedNav.end(); nmi++) { - // count of unique messages - size_t uniqueBits = nmi->second.size(); // count of total messages size_t msgCount = 0; // store the vote winner here From 6b12109794d9ce5f2bc2a41abb590d4c9bfe41cb Mon Sep 17 00:00:00 2001 From: Richard Penney Date: Sat, 3 Sep 2016 18:39:27 +0100 Subject: [PATCH 06/12] Fixed testMakeDir() unit-test to handle umask. Temporarily set umask to 000 when checking FileUtils::makeDir(). --- core/tests/FileDirProc/FileUtils_T.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/tests/FileDirProc/FileUtils_T.cpp b/core/tests/FileDirProc/FileUtils_T.cpp index 2e6e0d1ca..5c3f169c8 100644 --- a/core/tests/FileDirProc/FileUtils_T.cpp +++ b/core/tests/FileDirProc/FileUtils_T.cpp @@ -141,6 +141,7 @@ void FileUtils_T :: cleanup() int FileUtils_T :: testMakeDir() { TestUtil tester( "FileUtils", "makeDir", __FILE__, __LINE__ ); + const mode_t oldUmask = umask(0); // @note - These tests are kinda odd because makeDir always returns 0 // regardless of success or failure. @@ -241,6 +242,7 @@ int FileUtils_T :: testMakeDir() tester.assert( false, "unexpected exception", __LINE__ ); } + umask(oldUmask); return tester.countFails(); } From 737d53687f03d0b31422ea3279a30cc106da25bd Mon Sep 17 00:00:00 2001 From: Richard Penney Date: Sat, 3 Sep 2016 20:06:25 +0100 Subject: [PATCH 07/12] Further patches to reduce compiler warnings (gcc-4.9) Fixed various signed/unsigned mismatches etc. --- .../lib/FileHandling/RINEX3/Rinex3ObsData.cpp | 8 +++----- core/lib/GNSSEph/ClockSatStore.cpp | 4 ++-- core/lib/GNSSEph/NavID.hpp | 3 ++- core/lib/GNSSEph/PackedNavBits.cpp | 15 +++++++------- core/lib/GNSSEph/PositionSatStore.cpp | 2 +- core/lib/Math/Matrix/MatrixFunctors.hpp | 2 +- core/lib/PosSol/PRSolution.cpp | 20 ++++++++++--------- core/lib/PosSol/PRSolution.hpp | 2 +- core/lib/TestFramework/TestUtil.hpp | 2 +- ext/lib/AstroEph/PlanetEphemeris.cpp | 2 +- ext/lib/Geomatics/DiscCorr.hpp | 2 +- ext/lib/Geomatics/SatPassIterator.hpp | 4 ++-- ext/lib/Procframe/EquationSystem.cpp | 4 ++-- ext/lib/Procframe/SolverPPP.cpp | 10 +++++----- 14 files changed, 40 insertions(+), 40 deletions(-) diff --git a/core/lib/FileHandling/RINEX3/Rinex3ObsData.cpp b/core/lib/FileHandling/RINEX3/Rinex3ObsData.cpp index f42a40106..f1d3d60e7 100644 --- a/core/lib/FileHandling/RINEX3/Rinex3ObsData.cpp +++ b/core/lib/FileHandling/RINEX3/Rinex3ObsData.cpp @@ -477,12 +477,10 @@ namespace gpstk if(rod.epochFlag==0 || rod.epochFlag==1 || rod.epochFlag==6) { // first read the SatIDs off the epoch line - unsigned isv, line_ndx; - int ndx; string satsys; RinexSatID sat; vector satIndex(rod.numSVs); - for(isv=1, ndx=0; ndx data; // loop over data in the line - for(ndx=0, line_ndx=0; ndx < numObs; ndx++, line_ndx++) + for(unsigned ndx=0, line_ndx=0; ndx < numObs; ndx++, line_ndx++) { if(! (line_ndx % 5)) { // get a new line diff --git a/core/lib/GNSSEph/ClockSatStore.cpp b/core/lib/GNSSEph/ClockSatStore.cpp index eb4ed14ff..069a14999 100644 --- a/core/lib/GNSSEph/ClockSatStore.cpp +++ b/core/lib/GNSSEph/ClockSatStore.cpp @@ -104,7 +104,7 @@ namespace gpstk ++n; }; - if(isExact && Nmatch == (int)(Nhalf-1)) { Nlow++; Nhi++; } + if(isExact && Nmatch == (Nhalf-1)) { Nlow++; Nhi++; } // interpolate rec.accel = rec.sig_accel = 0.0; // defaults @@ -280,7 +280,7 @@ namespace gpstk ++n; }; - if(isExact && Nhi == (int)(Nhalf-1)) Nhi++; + if(isExact && Nhi == (Nhalf-1)) Nhi++; // interpolate double drift, dt(ttag-ttag0), err, slope; diff --git a/core/lib/GNSSEph/NavID.hpp b/core/lib/GNSSEph/NavID.hpp index 6768838ec..6d450219d 100644 --- a/core/lib/GNSSEph/NavID.hpp +++ b/core/lib/GNSSEph/NavID.hpp @@ -105,7 +105,8 @@ namespace gpstk case ntGloCivilF: {retVal = NavTypeStrings[6]; break;} case ntGloCivilC: {retVal = NavTypeStrings[7]; break;} case ntGalOS: {retVal = NavTypeStrings[8]; break;} - default: ntUnknown: {retVal = NavTypeStrings[9]; break;} + case ntUnknown: // fall through... + default: {retVal = NavTypeStrings[9]; break;} }; //return retVal in case switch isn't reached return retVal; diff --git a/core/lib/GNSSEph/PackedNavBits.cpp b/core/lib/GNSSEph/PackedNavBits.cpp index 756f6abb7..253700402 100755 --- a/core/lib/GNSSEph/PackedNavBits.cpp +++ b/core/lib/GNSSEph/PackedNavBits.cpp @@ -53,10 +53,10 @@ namespace gpstk { using namespace std; PackedNavBits::PackedNavBits() - : transmitTime(CommonTime::BEGINNING_OF_TIME), + : rxID(""), + transmitTime(CommonTime::BEGINNING_OF_TIME), bits(900), bits_used(0), - rxID(""), xMitCoerced(false) { transmitTime.setTimeSystem(TimeSystem::GPS); @@ -64,9 +64,9 @@ namespace gpstk PackedNavBits::PackedNavBits(const SatID& satSysArg, const ObsID& obsIDArg, const CommonTime& transmitTimeArg) - : bits(900), + : rxID(""), + bits(900), bits_used(0), - rxID(""), xMitCoerced(false) { satSys = satSysArg; @@ -79,9 +79,9 @@ namespace gpstk const ObsID& obsIDArg, const std::string rxString, const CommonTime& transmitTimeArg) - : bits(900), + : rxID(""), + bits(900), bits_used(0), - rxID(""), xMitCoerced(false) { satSys = satSysArg; @@ -607,7 +607,7 @@ namespace gpstk return false; } - for (int i=0;i V(N,T(0)); diff --git a/core/lib/PosSol/PRSolution.cpp b/core/lib/PosSol/PRSolution.cpp index 31f4faed3..ce63335bb 100644 --- a/core/lib/PosSol/PRSolution.cpp +++ b/core/lib/PosSol/PRSolution.cpp @@ -206,8 +206,7 @@ namespace gpstk GPSTK_THROW(e); } - int iret(0),k,n; - size_t i, j; + int iret(0); double rho,wt,svxyz[3]; GPSEllipsoid ellip; @@ -220,7 +219,8 @@ namespace gpstk { // define the Syss (system IDs) vector, and count good satellites vector tempSyss; - for(Nsvs=0,i=0; i 0) { LOG(DEBUG) << "Build inverse MCov"; iMC = Matrix(Nsvs,Nsvs,0.0); - for(n=0,i=0; i MaxSlope) MaxSlope = Slopes(j); j++; diff --git a/core/lib/PosSol/PRSolution.hpp b/core/lib/PosSol/PRSolution.hpp index 15860fdf1..f921c99e8 100644 --- a/core/lib/PosSol/PRSolution.hpp +++ b/core/lib/PosSol/PRSolution.hpp @@ -463,7 +463,7 @@ namespace gpstk double Convergence; /// the number of good satellites used in the final computation - int Nsvs; + unsigned Nsvs; /// if true, the solution was constructed from a mixed dataset, including /// both GPS and Glonass satellites. This means the Solution vector will have diff --git a/core/lib/TestFramework/TestUtil.hpp b/core/lib/TestFramework/TestUtil.hpp index 192252aae..1cc62fe04 100755 --- a/core/lib/TestFramework/TestUtil.hpp +++ b/core/lib/TestFramework/TestUtil.hpp @@ -682,7 +682,7 @@ namespace gpstk // Use a flag because break/continue in C++ doesn't // allow you to skip multiple levels. bool ignore = false; - for (int i = 0; i < ignoreRegex.size(); i++) + for (size_t i = 0; i < ignoreRegex.size(); i++) { if (gpstk::StringUtils::isLike(refLine, ignoreRegex[i])) { diff --git a/ext/lib/AstroEph/PlanetEphemeris.cpp b/ext/lib/AstroEph/PlanetEphemeris.cpp index 035f91aa5..63ff78435 100644 --- a/ext/lib/AstroEph/PlanetEphemeris.cpp +++ b/ext/lib/AstroEph/PlanetEphemeris.cpp @@ -727,7 +727,7 @@ namespace gpstk else if(center == EarthMoonBarycenter) CENTER = EMBARY; // Earth and Moon need special treatment - double PVMOON[6], PVEMBARY[6], Eratio, Mratio=0.0; + double PVMOON[6], PVEMBARY[6], Eratio=0.0, Mratio=0.0; // special cases of Earth AND Moon: Moon result is always geocentric if(target == Earth && center == Moon) TARGET = NONE; diff --git a/ext/lib/Geomatics/DiscCorr.hpp b/ext/lib/Geomatics/DiscCorr.hpp index fc221ef8c..017ee7559 100644 --- a/ext/lib/Geomatics/DiscCorr.hpp +++ b/ext/lib/Geomatics/DiscCorr.hpp @@ -162,7 +162,7 @@ namespace gpstk { } ptsdeleted = ptsgood = 0; - for(int i=0; i ttag) ttag = SPList[i].getLastGoodTime(); return ttag; diff --git a/ext/lib/Procframe/EquationSystem.cpp b/ext/lib/Procframe/EquationSystem.cpp index e86c8c6e4..b59e0913d 100644 --- a/ext/lib/Procframe/EquationSystem.cpp +++ b/ext/lib/Procframe/EquationSystem.cpp @@ -474,8 +474,8 @@ namespace gpstk // Now we will take care of satellite-indexed variables inside each // specific "Equation" in "currentEquationsList" - size_t eqListSize( currentEquationsList.size() ); - for( int i = 0; i < eqListSize; ++i ) + const size_t eqListSize( currentEquationsList.size() ); + for( size_t i = 0; i < eqListSize; ++i ) { // Get a copy of first equation on 'currentEquationsList' diff --git a/ext/lib/Procframe/SolverPPP.cpp b/ext/lib/Procframe/SolverPPP.cpp index 3a6a60278..f88beabd3 100644 --- a/ext/lib/Procframe/SolverPPP.cpp +++ b/ext/lib/Procframe/SolverPPP.cpp @@ -383,7 +383,7 @@ covariance matrix."); Vector prefitC(gData.getVectorOfTypeID(defaultEqDef.header)); Vector prefitL(gData.getVectorOfTypeID(TypeID::prefitL)); - for( int i=0; i weightsVector(gData.getVectorOfTypeID(TypeID::weight)); - for( int i=0; i dMatrix(gData.body.getMatrixOfTypes(defaultEqDef.body)); // Let's fill 'hMatrix' - for( int i=0; i postfitCode(numCurrentSV,0.0); Vector postfitPhase(numCurrentSV,0.0); - for( int i=0; i Date: Mon, 5 Sep 2016 19:44:18 +0100 Subject: [PATCH 08/12] Removed various redundant code. Removed various redundant empty return statements. Removed unused (duplicated) time-printing shortcut() function. Patched various uninitialized variables and signed/unsigned mismatches. --- core/lib/AppFrame/BasicFramework.cpp | 4 +-- core/lib/GNSSEph/BrcClockCorrection.cpp | 36 --------------------- core/lib/GNSSEph/BrcKeplerOrbit.cpp | 36 --------------------- core/lib/TimeHandling/TimeString.cpp | 7 ++-- core/tests/Utilities/Exception_T.cpp | 1 - examples/example14.cpp | 2 -- examples/example17.cpp | 3 -- examples/example5.cpp | 3 -- examples/example9.cpp | 8 ----- ext/lib/CodeGen/GenXSequence.cpp | 1 - ext/lib/FileHandling/BLQDataReader.cpp | 2 -- ext/lib/FileHandling/ConfDataReader.cpp | 3 -- ext/lib/FileHandling/DCBDataReader.cpp | 5 --- ext/lib/FileHandling/Ionex/IonexData.cpp | 6 ---- ext/lib/FileHandling/Ionex/IonexHeader.cpp | 6 ---- ext/lib/FileHandling/Ionex/IonexStore.cpp | 7 ---- ext/lib/FileHandling/SatDataReader.cpp | 19 ++--------- ext/lib/Geodyn/ReferenceFrames.cpp | 3 -- ext/lib/Math/Expression.cpp | 2 -- ext/lib/Math/FIRDifferentiator5thOrder.cpp | 8 +---- ext/lib/Math/GaussianDistribution.cpp | 3 -- ext/lib/Procframe/AntexReader.cpp | 4 --- ext/lib/Procframe/CodeKalmanSolver.cpp | 2 +- ext/lib/Procframe/CodeKalmanSolver.hpp | 2 +- ext/lib/Procframe/DataStructures.cpp | 8 ----- ext/lib/Procframe/Dumper.cpp | 2 -- ext/lib/Procframe/EquationSystem.cpp | 13 -------- ext/lib/Procframe/GDSUtils.hpp | 2 -- ext/lib/Procframe/MOPSWeight.cpp | 5 +-- ext/lib/Procframe/SolverPPPFB.cpp | 2 -- ext/lib/Procframe/StochasticModel.cpp | 15 --------- ext/lib/Procframe/Variable.cpp | 3 -- ext/lib/Vdraw/Color.cpp | 2 -- ext/lib/Vdraw/EPSImage.cpp | 2 -- ext/lib/Vdraw/PSImage.cpp | 2 -- ext/lib/Vdraw/PSImageBase.cpp | 4 --- ext/lib/Vdraw/Path.cpp | 3 -- ext/lib/Vdraw/Path.hpp | 2 -- ext/lib/deprecate/CNAVClock.cpp | 37 ---------------------- ext/lib/deprecate/CNAVEphemeris.cpp | 36 --------------------- 40 files changed, 12 insertions(+), 299 deletions(-) diff --git a/core/lib/AppFrame/BasicFramework.cpp b/core/lib/AppFrame/BasicFramework.cpp index d08d7c2fa..d306c02f0 100644 --- a/core/lib/AppFrame/BasicFramework.cpp +++ b/core/lib/AppFrame/BasicFramework.cpp @@ -54,9 +54,9 @@ namespace gpstk BasicFramework :: BasicFramework( const string& applName, const string& applDesc ) throw() - : debugLevel(0), + : exitCode(0), + debugLevel(0), verboseLevel(0), - exitCode(0), argv0(applName), appDesc(applDesc), debugOption('d', "debug", "Increase debug level"), diff --git a/core/lib/GNSSEph/BrcClockCorrection.cpp b/core/lib/GNSSEph/BrcClockCorrection.cpp index 6e3a22197..051541bff 100644 --- a/core/lib/GNSSEph/BrcClockCorrection.cpp +++ b/core/lib/GNSSEph/BrcClockCorrection.cpp @@ -334,42 +334,6 @@ namespace gpstk os << " " << (static_cast(t)).printf("%3j %5.0s ") << (static_cast(t)).printf("%02m/%02d/%04Y %02H:%02M:%02S"); } -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-function" - static void shortcut(ostream & os, const long HOW ) - { - short DOW, hour, min, sec; - long SOD, SOW; - short SOH; - - SOW = static_cast( HOW ); - DOW = static_cast( SOW / SEC_PER_DAY ); - SOD = SOW - static_cast( DOW * SEC_PER_DAY ); - hour = static_cast( SOD/3600 ); - - SOH = static_cast( SOD - (hour*3600) ); - min = SOH/60; - - sec = SOH - min * 60; - switch (DOW) - { - case 0: os << "Sun-0"; break; - case 1: os << "Mon-1"; break; - case 2: os << "Tue-2"; break; - case 3: os << "Wed-3"; break; - case 4: os << "Thu-4"; break; - case 5: os << "Fri-5"; break; - case 6: os << "Sat-6"; break; - default: break; - } - - os << ":" << setfill('0') - << setw(2) << hour - << ":" << setw(2) << min - << ":" << setw(2) << sec - << setfill(' '); - } -#pragma clang diagnostic pop void BrcClockCorrection::dump(ostream& s) const { const ios::fmtflags oldFlags = s.flags(); diff --git a/core/lib/GNSSEph/BrcKeplerOrbit.cpp b/core/lib/GNSSEph/BrcKeplerOrbit.cpp index 986c6fc1f..ef9a1cc11 100644 --- a/core/lib/GNSSEph/BrcKeplerOrbit.cpp +++ b/core/lib/GNSSEph/BrcKeplerOrbit.cpp @@ -762,42 +762,6 @@ namespace gpstk os << " " << (static_cast(t)).printf("%3j %5.0s ") << (static_cast(t)).printf("%02m/%02d/%04Y %02H:%02M:%02S"); } -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-function" - static void shortcut(ostream & os, const long HOW ) - { - short DOW, hour, min, sec; - long SOD, SOW; - short SOH; - - SOW = static_cast( HOW ); - DOW = static_cast( SOW / SEC_PER_DAY ); - SOD = SOW - static_cast( DOW * SEC_PER_DAY ); - hour = static_cast( SOD/3600 ); - - SOH = static_cast( SOD - (hour*3600) ); - min = SOH/60; - - sec = SOH - min * 60; - switch (DOW) - { - case 0: os << "Sun-0"; break; - case 1: os << "Mon-1"; break; - case 2: os << "Tue-2"; break; - case 3: os << "Wed-3"; break; - case 4: os << "Thu-4"; break; - case 5: os << "Fri-5"; break; - case 6: os << "Sat-6"; break; - default: break; - } - - os << ":" << setfill('0') - << setw(2) << hour - << ":" << setw(2) << min - << ":" << setw(2) << sec - << setfill(' '); - } -#pragma clang diagnostic pop void BrcKeplerOrbit::dump(ostream& s) const throw() { diff --git a/core/lib/TimeHandling/TimeString.cpp b/core/lib/TimeHandling/TimeString.cpp index f511ac206..e7e2ebfe4 100644 --- a/core/lib/TimeHandling/TimeString.cpp +++ b/core/lib/TimeHandling/TimeString.cpp @@ -428,9 +428,10 @@ namespace gpstk // if detected. // These variables will hold the values for use later. - double isow, isod, isec; - int iweek, ifullweek, idow, iyear, imonth, iday, izcount, idoy, - izcount29, ihour, imin, iepoch; + double isow = 0, isod = 0, isec = 0; + int iweek = 0, ifullweek = 0, idow = 0, iyear = 0, imonth = 0, + iday = 0, izcount = 0, idoy = 0, + izcount29 = 0, ihour = 0, imin = 0, iepoch = 0; TimeSystem ts; for( TimeTag::IdToValue::iterator itr = info.begin(); diff --git a/core/tests/Utilities/Exception_T.cpp b/core/tests/Utilities/Exception_T.cpp index 974b4e14e..d744bb8b1 100644 --- a/core/tests/Utilities/Exception_T.cpp +++ b/core/tests/Utilities/Exception_T.cpp @@ -120,7 +120,6 @@ testErrorSeverity() { TUDEF("Exception", "getErrorId()"); unsigned loc1Line = 0, loc2Line = 0; - int locFails = 0; std::string fn("testErrorSeverity"); try { diff --git a/examples/example14.cpp b/examples/example14.cpp index 7b5bae460..10696cdba 100644 --- a/examples/example14.cpp +++ b/examples/example14.cpp @@ -945,8 +945,6 @@ void example14::process() // The rest of the processing will be in method 'example14::shutDown()' - return; - } // End of 'example14::process()' diff --git a/examples/example17.cpp b/examples/example17.cpp index 6b85b92ec..4962258f8 100644 --- a/examples/example17.cpp +++ b/examples/example17.cpp @@ -1059,9 +1059,6 @@ void example17::process() // The rest of the processing will be in method 'example17::shutDown()' cerr << "End of Preprocessing" << endl; - - return; - } // End of 'example17::process()' diff --git a/examples/example5.cpp b/examples/example5.cpp index 01e41d863..483196589 100644 --- a/examples/example5.cpp +++ b/examples/example5.cpp @@ -410,9 +410,6 @@ void example5::process() } } // End of 'while( rObsFile >> rData )' - - return; - } // End of 'example5::process()' diff --git a/examples/example9.cpp b/examples/example9.cpp index 26115343d..c58fb8f20 100644 --- a/examples/example9.cpp +++ b/examples/example9.cpp @@ -322,11 +322,6 @@ void example9::printSolution( ofstream& outfile, // Add end-of-line outfile << endl; - - - return; - - } // End of method 'example9::printSolution()' @@ -1126,9 +1121,6 @@ void example9::process() } // end of 'while ( (station = confReader.getEachSection()) != "" )' - - return; - } // End of 'example9::process()' diff --git a/ext/lib/CodeGen/GenXSequence.cpp b/ext/lib/CodeGen/GenXSequence.cpp index 1e1aa6a64..4fbcd5241 100644 --- a/ext/lib/CodeGen/GenXSequence.cpp +++ b/ext/lib/CodeGen/GenXSequence.cpp @@ -204,6 +204,5 @@ namespace gpstk void GenXSequence::setLengthOfSequence( int los ) { lengthOfSequence = los; - return; } } // end of namespace diff --git a/ext/lib/FileHandling/BLQDataReader.cpp b/ext/lib/FileHandling/BLQDataReader.cpp index a9467c6cd..189542a1d 100644 --- a/ext/lib/FileHandling/BLQDataReader.cpp +++ b/ext/lib/FileHandling/BLQDataReader.cpp @@ -178,8 +178,6 @@ namespace gpstk // Open data stream FFTextStream::open(fn, std::ios::in); loadData(); - - return; } // End of method 'BLQDataReader::open()' diff --git a/ext/lib/FileHandling/ConfDataReader.cpp b/ext/lib/FileHandling/ConfDataReader.cpp index 245f761d4..ff4176cad 100644 --- a/ext/lib/FileHandling/ConfDataReader.cpp +++ b/ext/lib/FileHandling/ConfDataReader.cpp @@ -831,9 +831,6 @@ namespace gpstk FFTextStream::open(fn, std::ios::in); loadData(); - - return; - } // End of method 'ConfDataReader::open()' diff --git a/ext/lib/FileHandling/DCBDataReader.cpp b/ext/lib/FileHandling/DCBDataReader.cpp index 77286ba42..1d401160d 100644 --- a/ext/lib/FileHandling/DCBDataReader.cpp +++ b/ext/lib/FileHandling/DCBDataReader.cpp @@ -159,9 +159,6 @@ namespace gpstk // Open data stream FFTextStream::open(fn, std::ios::in); loadData(); - - return; - } // End of method 'DCBDataReader::open()' @@ -177,8 +174,6 @@ namespace gpstk // Open data stream FFTextStream::open(fn.c_str(), std::ios::in); loadData(); - - return; } // End of method 'DCBDataReader::open()' // return P1-P2 or P1-C1 depend what you have loaded diff --git a/ext/lib/FileHandling/Ionex/IonexData.cpp b/ext/lib/FileHandling/Ionex/IonexData.cpp index 53c782804..092cd8dd9 100644 --- a/ext/lib/FileHandling/Ionex/IonexData.cpp +++ b/ext/lib/FileHandling/Ionex/IonexData.cpp @@ -418,9 +418,6 @@ namespace gpstk } } // end of 'while (ityp != 0)' loop - - return; - } // End of method 'IonexData::reallyGetRecord()' @@ -441,9 +438,6 @@ namespace gpstk os << "Number of values : " << data.size() << " values." << std::endl; os << "Valid object? : " << isValid() << endl; - - return; - } // End of method 'IonexData::dump()' diff --git a/ext/lib/FileHandling/Ionex/IonexHeader.cpp b/ext/lib/FileHandling/Ionex/IonexHeader.cpp index e88bf07e2..63dbcd9ee 100644 --- a/ext/lib/FileHandling/Ionex/IonexHeader.cpp +++ b/ext/lib/FileHandling/Ionex/IonexHeader.cpp @@ -98,9 +98,6 @@ namespace gpstk exponent = -1; // that's the default value svsmap.clear(); valid = auxDataFlag = false; - - return; - } // End of method 'IonexHeader::clear()' @@ -220,9 +217,6 @@ namespace gpstk GPSTK_THROW(e); } // End of 'if (label == endAuxDataString)'... - - return; - } // End of method 'IonexHeader::ParseDcbRecord()' diff --git a/ext/lib/FileHandling/Ionex/IonexStore.cpp b/ext/lib/FileHandling/Ionex/IonexStore.cpp index 943018a40..2a6fd5abf 100644 --- a/ext/lib/FileHandling/Ionex/IonexStore.cpp +++ b/ext/lib/FileHandling/Ionex/IonexStore.cpp @@ -229,10 +229,6 @@ namespace gpstk } // End of 'if (detail >= 0)...' - - return; - - } // End of method 'IonexStore::dump()' @@ -246,9 +242,6 @@ namespace gpstk initialTime = CommonTime::END_OF_TIME; finalTime = CommonTime::BEGINNING_OF_TIME; - - return; - } // End of method 'IonexStore::clear()' diff --git a/ext/lib/FileHandling/SatDataReader.cpp b/ext/lib/FileHandling/SatDataReader.cpp index 95ddf8274..930e759ee 100644 --- a/ext/lib/FileHandling/SatDataReader.cpp +++ b/ext/lib/FileHandling/SatDataReader.cpp @@ -185,29 +185,14 @@ namespace gpstk // Load data loadData(); - - return; - } // End of method 'SatDataReader::open()' // Method to open AND load satellite data file. void SatDataReader::open(const string& fn) { - - // We need to be sure current data stream is closed - (*this).close(); - - // Open data stream - FFTextStream::open(fn.c_str(), std::ios::in); - - // Load data - loadData(); - - return; - - } // End of method 'SatDataReader::open()' - + SatDataReader::open(fn.c_str()); + } /* Method to get the block type of a given SV at a given epoch. diff --git a/ext/lib/Geodyn/ReferenceFrames.cpp b/ext/lib/Geodyn/ReferenceFrames.cpp index 1fd8b4b5b..6ea95e958 100644 --- a/ext/lib/Geodyn/ReferenceFrames.cpp +++ b/ext/lib/Geodyn/ReferenceFrames.cpp @@ -300,9 +300,6 @@ namespace gpstk POM = Ry(-xp) * Rx(-yp); // All Matrix are ready now - - return; - } // End of method 'ReferenceFrames::J2kToECEFMatrix()' diff --git a/ext/lib/Math/Expression.cpp b/ext/lib/Math/Expression.cpp index eb7b52349..dca44eab9 100644 --- a/ext/lib/Math/Expression.cpp +++ b/ext/lib/Math/Expression.cpp @@ -151,8 +151,6 @@ namespace gpstk if (resolved) ostr << "resolved"; else ostr << "not resolved "; - - return; } bool Expression::operatorsDefined = false; diff --git a/ext/lib/Math/FIRDifferentiator5thOrder.cpp b/ext/lib/Math/FIRDifferentiator5thOrder.cpp index 2d430d89f..d3c869870 100644 --- a/ext/lib/Math/FIRDifferentiator5thOrder.cpp +++ b/ext/lib/Math/FIRDifferentiator5thOrder.cpp @@ -99,10 +99,6 @@ namespace gpstk // Filter state is invalid valid = false; - - // Return - return; - } // End of constructor 'FIRDifferentiator5thOrder::Reset()' @@ -143,9 +139,7 @@ namespace gpstk k4 = k1*(300.0); k5 = k1*(1050.0); - // Filter parameters are set. Let's return - return; - + // Filter parameters are set. } // End of method 'FIRDifferentiator5thOrder::Init()' diff --git a/ext/lib/Math/GaussianDistribution.cpp b/ext/lib/Math/GaussianDistribution.cpp index 4dfdb90bb..38442fb0d 100644 --- a/ext/lib/Math/GaussianDistribution.cpp +++ b/ext/lib/Math/GaussianDistribution.cpp @@ -197,9 +197,6 @@ namespace gpstk a = 0.3989422804014327 / sigma; b = -0.5 / (sigma*sigma); - - return; - } // End of method 'GaussianDistribution::recompute()' diff --git a/ext/lib/Procframe/AntexReader.cpp b/ext/lib/Procframe/AntexReader.cpp index b5465fc7f..bae0c5bd5 100644 --- a/ext/lib/Procframe/AntexReader.cpp +++ b/ext/lib/Procframe/AntexReader.cpp @@ -1440,8 +1440,6 @@ namespace gpstk // Load header of Antex File loadHeader(); - return; - } // End of method 'AntexReader::open()' @@ -1469,8 +1467,6 @@ namespace gpstk // Load header of Antex File loadHeader(); - return; - } // End of method 'AntexReader::open()' diff --git a/ext/lib/Procframe/CodeKalmanSolver.cpp b/ext/lib/Procframe/CodeKalmanSolver.cpp index 0c5c0ef71..a1d4a85a8 100644 --- a/ext/lib/Procframe/CodeKalmanSolver.cpp +++ b/ext/lib/Procframe/CodeKalmanSolver.cpp @@ -392,7 +392,7 @@ covariance matrix."); // Count the number of satellites with weights size_t nW(dummy.numSats()); - for (int i=0; i::const_iterator itRow = ...' - - return; - } // End of method 'EquationSystem::getGeometryWeights()' diff --git a/ext/lib/Procframe/GDSUtils.hpp b/ext/lib/Procframe/GDSUtils.hpp index 16a0adcef..66f7a99ff 100644 --- a/ext/lib/Procframe/GDSUtils.hpp +++ b/ext/lib/Procframe/GDSUtils.hpp @@ -389,8 +389,6 @@ namespace gpstk ofstream ofs(file.c_str(),ios::binary); gnssDataMapBin gdsMapBin(gdsMap,ofs); - - return; } /// Load the data of gnssDataMap object from a binary file diff --git a/ext/lib/Procframe/MOPSWeight.cpp b/ext/lib/Procframe/MOPSWeight.cpp index 45d614e4d..434ff1e18 100644 --- a/ext/lib/Procframe/MOPSWeight.cpp +++ b/ext/lib/Procframe/MOPSWeight.cpp @@ -220,7 +220,7 @@ compute weights."); throw(InvalidWeights) { - size_t N( Satellites.size() ); + int N( Satellites.size() ); double sigma2rx; // Receiver noise sigma^2 in meters^2 @@ -308,9 +308,6 @@ compute weights."); // satellites or not availableSV = sIura.availableSV; rejectedSV = sIura.rejectedSV; - - return; - } // End of method 'MOPSWeight::Compute()' diff --git a/ext/lib/Procframe/SolverPPPFB.cpp b/ext/lib/Procframe/SolverPPPFB.cpp index 91bba9fa2..90857fc21 100644 --- a/ext/lib/Procframe/SolverPPPFB.cpp +++ b/ext/lib/Procframe/SolverPPPFB.cpp @@ -504,8 +504,6 @@ namespace gpstk // Remove satellites with missing data gData.removeSatID(satRejectedSet); - return; - } // End of method 'SolverPPPFB::checkLimits()' diff --git a/ext/lib/Procframe/StochasticModel.cpp b/ext/lib/Procframe/StochasticModel.cpp index 46c9fd215..2ac1ccf5d 100644 --- a/ext/lib/Procframe/StochasticModel.cpp +++ b/ext/lib/Procframe/StochasticModel.cpp @@ -77,9 +77,6 @@ namespace gpstk setPreviousTime(currentTime); setCurrentTime(gData.header.epoch); - - return; - } // End of method 'RandomWalkModel::Prepare()' @@ -99,9 +96,6 @@ namespace gpstk setPreviousTime(currentTime); setCurrentTime(gData.header.epoch); - - return; - } // End of method 'RandomWalkModel::Prepare()' @@ -205,8 +199,6 @@ namespace gpstk setCS(true); } - return; - } // End of method 'PhaseAmbiguityModel::checkCS()' @@ -266,9 +258,6 @@ namespace gpstk // Fourth, prepare for next iteration updating previous epoch setPreviousTime(source, tmData[source].currentTime); - - return; - } // End of method 'TropoRandomWalkModel::Prepare()' @@ -296,8 +285,6 @@ namespace gpstk // Fourth, prepare for next iteration updating previous epoch setPreviousTime(source, tmData[source].currentTime); - return; - } // End of method 'TropoRandomWalkModel::Prepare()' @@ -320,8 +307,6 @@ namespace gpstk * std::abs( tmData[ source ].currentTime - tmData[ source ].previousTime ); - return; - } // End of method 'TropoRandomWalkModel::computeQ()' diff --git a/ext/lib/Procframe/Variable.cpp b/ext/lib/Procframe/Variable.cpp index bcc4c5b28..9174f1f2d 100644 --- a/ext/lib/Procframe/Variable.cpp +++ b/ext/lib/Procframe/Variable.cpp @@ -183,9 +183,6 @@ namespace gpstk isTypeIndexed = typeIndex; // default is true, this is important YAN Wei added - - return; - } // End of method 'Variable::Init()' diff --git a/ext/lib/Vdraw/Color.cpp b/ext/lib/Vdraw/Color.cpp index b120984ba..241b9a9b7 100644 --- a/ext/lib/Vdraw/Color.cpp +++ b/ext/lib/Vdraw/Color.cpp @@ -151,7 +151,5 @@ namespace vdraw else if (ls=="navy") rgb=NAVY; else if (ls=="darkpurple") rgb=DARK_PURPLE; else if (ls=="clear") rgb=CLEAR; - - return; } } // namespace vdraw diff --git a/ext/lib/Vdraw/EPSImage.cpp b/ext/lib/Vdraw/EPSImage.cpp index 454969708..ca283d75b 100644 --- a/ext/lib/Vdraw/EPSImage.cpp +++ b/ext/lib/Vdraw/EPSImage.cpp @@ -112,8 +112,6 @@ namespace vdraw // Use the viewerManager viewerManager.view(filename); - - return; } diff --git a/ext/lib/Vdraw/PSImage.cpp b/ext/lib/Vdraw/PSImage.cpp index b71197f43..5bc63b9c3 100644 --- a/ext/lib/Vdraw/PSImage.cpp +++ b/ext/lib/Vdraw/PSImage.cpp @@ -111,8 +111,6 @@ namespace vdraw // Use the viewerManager viewerManager.view(filename); - - return; } } // namespace vdraw diff --git a/ext/lib/Vdraw/PSImageBase.cpp b/ext/lib/Vdraw/PSImageBase.cpp index e9309a428..6f311b0cb 100644 --- a/ext/lib/Vdraw/PSImageBase.cpp +++ b/ext/lib/Vdraw/PSImageBase.cpp @@ -147,8 +147,6 @@ namespace vdraw else ostr << i->first << " " << ((ll)?i->second:(canvasHeight-i->second)) << " lineto" << endl; } // Step through points in the path - - return; } void PSImageBase::markPath(const Path& path, const char * name) @@ -161,8 +159,6 @@ namespace vdraw // Step through each point for (i=abspath->begin(); i!=abspath->end(); i++) ostr << i->first << " " << ((ll)?i->second:(canvasHeight-i->second)) << " " << name << endl; - - return; } diff --git a/ext/lib/Vdraw/Path.cpp b/ext/lib/Vdraw/Path.cpp index 7aeab90fb..243c01cc8 100644 --- a/ext/lib/Vdraw/Path.cpp +++ b/ext/lib/Vdraw/Path.cpp @@ -45,13 +45,11 @@ namespace vdraw { Point p(X,Y); this->push_back(p); - return; } void Path::addPointAbsolute(double X, double Y) { addPointRelative(X - originX, Y-originY); - return; } void Path::addPointDelta(double DX, double DY) throw(VDrawException) @@ -65,7 +63,6 @@ namespace vdraw lastPair--; Point p(lastPair->first-DX,lastPair->second-DY); this->push_back(p); - return; } void Path::rotate(double angleDegrees, double rx, double ry) diff --git a/ext/lib/Vdraw/Path.hpp b/ext/lib/Vdraw/Path.hpp index f86f128be..85abf1fe4 100644 --- a/ext/lib/Vdraw/Path.hpp +++ b/ext/lib/Vdraw/Path.hpp @@ -184,7 +184,6 @@ namespace vdraw { originX = X; originY = Y; - return; } /** @@ -196,7 +195,6 @@ namespace vdraw { X = originX; Y = originY; - return; } /** diff --git a/ext/lib/deprecate/CNAVClock.cpp b/ext/lib/deprecate/CNAVClock.cpp index 590dd6b7d..3a7b89990 100644 --- a/ext/lib/deprecate/CNAVClock.cpp +++ b/ext/lib/deprecate/CNAVClock.cpp @@ -316,43 +316,6 @@ namespace gpstk << (static_cast(t)).printf("%02m/%02d/%04Y %02H:%02M:%02S"); } -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-function" - static void shortcut(ostream & os, const long HOW ) - { - short DOW, hour, min, sec; - long SOD, SOW; - short SOH; - - SOW = static_cast( HOW ); - DOW = static_cast( SOW / SEC_PER_DAY ); - SOD = SOW - static_cast( DOW * SEC_PER_DAY ); - hour = static_cast( SOD/3600 ); - - SOH = static_cast( SOD - (hour*3600) ); - min = SOH/60; - - sec = SOH - min * 60; - switch (DOW) - { - case 0: os << "Sun-0"; break; - case 1: os << "Mon-1"; break; - case 2: os << "Tue-2"; break; - case 3: os << "Wed-3"; break; - case 4: os << "Thu-4"; break; - case 5: os << "Fri-5"; break; - case 6: os << "Sat-6"; break; - default: break; - } - - os << ":" << setfill('0') - << setw(2) << hour - << ":" << setw(2) << min - << ":" << setw(2) << sec - << setfill(' '); - } -#pragma clang diagnostic pop - void CNAVClock :: dump(ostream& s) const throw() { diff --git a/ext/lib/deprecate/CNAVEphemeris.cpp b/ext/lib/deprecate/CNAVEphemeris.cpp index ae92f01d2..a213c97d5 100644 --- a/ext/lib/deprecate/CNAVEphemeris.cpp +++ b/ext/lib/deprecate/CNAVEphemeris.cpp @@ -400,42 +400,6 @@ namespace gpstk << (static_cast(t)).printf("%02m/%02d/%04Y %02H:%02M:%02S"); } -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-function" - static void shortcut(ostream & os, const long HOW ) - { - short DOW, hour, min, sec; - long SOD, SOW; - short SOH; - - SOW = static_cast( HOW ); - DOW = static_cast( SOW / SEC_PER_DAY ); - SOD = SOW - static_cast( DOW * SEC_PER_DAY ); - hour = static_cast( SOD/3600 ); - - SOH = static_cast( SOD - (hour*3600) ); - min = SOH/60; - - sec = SOH - min * 60; - switch (DOW) - { - case 0: os << "Sun-0"; break; - case 1: os << "Mon-1"; break; - case 2: os << "Tue-2"; break; - case 3: os << "Wed-3"; break; - case 4: os << "Thu-4"; break; - case 5: os << "Fri-5"; break; - case 6: os << "Sat-6"; break; - default: break; - } - - os << ":" << setfill('0') - << setw(2) << hour - << ":" << setw(2) << min - << ":" << setw(2) << sec - << setfill(' '); - } -#pragma clang diagnostic pop void CNAVEphemeris :: dump(ostream& s) const throw() { From c555bd9b84747cf341e72b9f339d327e5d7320dd Mon Sep 17 00:00:00 2001 From: Richard Penney Date: Thu, 27 Sep 2018 17:37:52 +0100 Subject: [PATCH 09/12] Patched to reinstate previously unused crcLen variable. --- core/lib/FileHandling/Binex/BinexData.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/lib/FileHandling/Binex/BinexData.cpp b/core/lib/FileHandling/Binex/BinexData.cpp index bb396e56b..0d709c144 100644 --- a/core/lib/FileHandling/Binex/BinexData.cpp +++ b/core/lib/FileHandling/Binex/BinexData.cpp @@ -1448,13 +1448,13 @@ namespace gpstk std::string& crc) const { size_t crcDataLen = head.size() + message.size(); - //size_t crcLen = 0; + size_t crcLen = 0; unsigned long crcTmp = 0; if (crcDataLen >= 1048576) { // @todo - Use 16-byte CRC (128-bit MD5 checksum) - //crcLen = 16; + crcLen = 16; } else // (crcLen < 1048576) { @@ -1471,7 +1471,7 @@ namespace gpstk crcTmp = BinUtils::computeCRC((const unsigned char*)message.data(), message.size(), params); - //crcLen = 2; + crcLen = 2; } else { @@ -1484,7 +1484,7 @@ namespace gpstk crcTmp = BinUtils::computeCRC((const unsigned char*)message.data(), message.size(), params); - //crcLen = 4; + crcLen = 4; } } else // Regular CRC @@ -1504,7 +1504,7 @@ namespace gpstk { crcTmp ^= *ptr; } - //crcLen = 1; + crcLen = 1; } else if (crcDataLen < 4096) { @@ -1517,7 +1517,7 @@ namespace gpstk crcTmp = BinUtils::computeCRC((const unsigned char*)message.data(), message.size(), params); - //crcLen = 2; + crcLen = 2; } else { @@ -1530,7 +1530,7 @@ namespace gpstk crcTmp = BinUtils::computeCRC((const unsigned char*)message.data(), message.size(), params); - //crcLen = 4; + crcLen = 4; } } // Regular CRC From f5e4394713e0c16af9b9b77ae92e3dddf1111c61 Mon Sep 17 00:00:00 2001 From: Richard Penney Date: Sat, 29 Sep 2018 17:25:11 +0100 Subject: [PATCH 10/12] Minor patches to reduce compiler warnings. Removed unused varible in StringUtils.hpp Removed one reference to temporary within NavFramer::Subframe::checkWords(). --- core/lib/Utilities/StringUtils.hpp | 3 +-- ext/apps/swrx/NavFramer.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/lib/Utilities/StringUtils.hpp b/core/lib/Utilities/StringUtils.hpp index 5111ba363..141755dfb 100644 --- a/core/lib/Utilities/StringUtils.hpp +++ b/core/lib/Utilities/StringUtils.hpp @@ -2753,7 +2753,7 @@ namespace gpstk // positions of word and line delimiters in aStr std::string::size_type wordPos = 0, linePos = 0, curPos = 0, curLineLen = newStr.length(), minPos = 0, wordLen = 0; - bool wordDelimited = false; + while (curPos != std::string::npos) { wordPos = aStr.find(wordDelim, curPos); @@ -2764,7 +2764,6 @@ namespace gpstk continue; } // no longer processing a word delimiter - wordDelimited = false; linePos = aStr.find(lineDelim, curPos); if (linePos == curPos) { diff --git a/ext/apps/swrx/NavFramer.cpp b/ext/apps/swrx/NavFramer.cpp index 98380aa5d..707d8099f 100644 --- a/ext/apps/swrx/NavFramer.cpp +++ b/ext/apps/swrx/NavFramer.cpp @@ -104,9 +104,10 @@ void NavFramer::Subframe::load(const std::bitset<5 * 300>& bs) const char* NavFramer::Subframe::checkWords() const -{ +{ static const std::string unknown("??????????"); + if (!complete) - return string("??????????").c_str(); + return unknown.c_str(); string good; for (int w=0; w<10; w++) @@ -120,7 +121,7 @@ const char* NavFramer::Subframe::checkWords() const else good.append("0"); } - return good.c_str(); + return good.c_str(); // FIXME - this returns pointer to temporary variable! } NavFramer::NavFramer() From 4149adc52a27a75a404220c1772bbb82a991deca Mon Sep 17 00:00:00 2001 From: Richard Penney Date: Sat, 6 Oct 2018 14:43:57 +0100 Subject: [PATCH 11/12] Minor patches to ease compilation of test suite. --- core/tests/FileHandling/FFBinaryStream_T.cpp | 2 +- ext/lib/Geomatics/StatsFilter.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/tests/FileHandling/FFBinaryStream_T.cpp b/core/tests/FileHandling/FFBinaryStream_T.cpp index e562fdf58..c7ca00ede 100644 --- a/core/tests/FileHandling/FFBinaryStream_T.cpp +++ b/core/tests/FileHandling/FFBinaryStream_T.cpp @@ -267,7 +267,7 @@ testStream(const std::string& outfn, const std::string& reffn, #ifdef WIN32 testFramework.assert(bool(testStrmIn), "Couldn't open " + outfn + " for input", __LINE__); #else - testFramework.assert(testStrmIn, "Couldn't open " + outfn + " for input", __LINE__); + testFramework.assert(testStrmIn.good(), "Couldn't open " + outfn + " for input", __LINE__); #endif // check file size diff --git a/ext/lib/Geomatics/StatsFilter.hpp b/ext/lib/Geomatics/StatsFilter.hpp index 6852d855b..ae8ed34b6 100644 --- a/ext/lib/Geomatics/StatsFilter.hpp +++ b/ext/lib/Geomatics/StatsFilter.hpp @@ -772,7 +772,7 @@ template class WindowFilter inline bool willDumpNoAnal(void) { return dumpNA; } /// debug prints in analysis() inline void setDebug(bool b) { debug = b; } - inline void getDebug(void) { return debug; } + inline bool getDebug(void) { return debug; } inline void setw(int w) { osw=w; } inline void setprecision(int p) { osp=p; } From 6b758d7d3f03376c0ed46d39a46a8541fa52794a Mon Sep 17 00:00:00 2001 From: Richard Penney Date: Sat, 6 Oct 2018 15:24:04 +0100 Subject: [PATCH 12/12] Added trap for counting-error in PRSolution --- core/lib/PosSol/PRSolution.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/lib/PosSol/PRSolution.cpp b/core/lib/PosSol/PRSolution.cpp index 261bca159..e333a1ce4 100644 --- a/core/lib/PosSol/PRSolution.cpp +++ b/core/lib/PosSol/PRSolution.cpp @@ -335,6 +335,10 @@ namespace gpstk // ------------ data // corrected pseudorange (m) minus geometric range + if (n >= Nsvs) { + Exception e("Counting error within satellite loop"); + GPSTK_THROW(e); + } CRange(n) = SVP(i,3) - rho; // correct for troposphere and PCOs (but not on the first iteration)