Skip to content
This repository has been archived by the owner on May 29, 2022. It is now read-only.

Allow client-code to treat SatPass as constant #15

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,16 @@ build*/
# Sublime Test temp files
._*

# Build-system artefacts
CMakeCache.txt
CMakeFiles/
cmake_install.cmake
CPackConfig.cmake
CPackSourceConfig.cmake
generated/
GPSTKConfig.cmake
GPSTKConfigVersion.cmake
Makefile

# Coverage file results
gcovr
2 changes: 1 addition & 1 deletion core/apps/positioning/PRSplot.pl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/perl
# $Id: PRSplot.pl 89 2012-02-09 21:14:16Z btolman $

use strict;
use warnings;

Expand Down
4 changes: 2 additions & 2 deletions core/lib/AppFrame/BasicFramework.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
1 change: 0 additions & 1 deletion core/lib/CommandLine/CommandOption.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,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++)
Expand Down
1 change: 0 additions & 1 deletion core/lib/CommandLine/getopt.c
Original file line number Diff line number Diff line change
@@ -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 [email protected]
Expand Down
1 change: 0 additions & 1 deletion core/lib/CommandLine/getopt1.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions core/lib/FileDirProc/FileSpec.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/lib/FileHandling/RINEX/RinexClockHeader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ namespace gpstk
std::list<RefClkRecord>::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));
Expand Down
2 changes: 1 addition & 1 deletion core/lib/FileHandling/RINEX/RinexClockHeader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ namespace gpstk

public:
/// A Simple Constructor.
RinexClockHeader() : valid(0), version(2.00)
RinexClockHeader() : version(2.00), valid(0)
{}

/// Destructor
Expand Down
3 changes: 0 additions & 3 deletions core/lib/FileHandling/RINEX3/Rinex3ClockHeader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
7 changes: 3 additions & 4 deletions core/lib/FileHandling/RINEX3/Rinex3ObsData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -476,11 +476,10 @@ 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;
string satsys;
RinexSatID sat;
vector<RinexSatID> satIndex(rod.numSVs);
for(isv=1, ndx=0; ndx<rod.numSVs; isv++, ndx++)
for(int isv=1, ndx=0; ndx<rod.numSVs; isv++, ndx++)
{
if(!(isv % 13))
{ // get a new continuation line
Expand Down Expand Up @@ -512,13 +511,13 @@ namespace gpstk
unsigned numObs(strm.header.R2ObsTypes.size());
rod.obs.clear();
// loop over all sats, reading obs data
for(isv=0; isv < rod.numSVs; isv++)
for(int isv=0; isv < rod.numSVs; isv++)
{
sat = satIndex[isv]; // sat for this data
satsys = asString(sat.systemChar()); // system for this sat
vector<RinexDatum> 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
Expand Down
6 changes: 3 additions & 3 deletions core/lib/FileHandling/RINEX3/Rinex3ObsHeader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1795,7 +1795,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
Expand Down Expand Up @@ -1865,11 +1865,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");
Expand Down
5 changes: 3 additions & 2 deletions core/lib/FileHandling/RINEX3/RinexDatum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 1 addition & 3 deletions core/lib/FileHandling/SINEX/SinexBase.cpp
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -117,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) )
Expand Down
2 changes: 0 additions & 2 deletions core/lib/FileHandling/SINEX/SinexData.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#pragma ident "$Id: //depot/msn/main/code/shared/gpstk/SinexData.cpp#5 $"

//lgpl-license START
//lgpl-license END

Expand Down
2 changes: 0 additions & 2 deletions core/lib/FileHandling/SINEX/SinexHeader.cpp
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions core/lib/FileHandling/SINEX/SinexTypes.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#pragma ident "$Id: //depot/msn/main/code/shared/gpstk/SinexTypes.cpp#7 $"

//lgpl-license START
//lgpl-license END

Expand Down
3 changes: 0 additions & 3 deletions core/lib/FileHandling/SP3/SP3Data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions core/lib/FileHandling/SP3/SP3Header.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,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
Expand Down
3 changes: 0 additions & 3 deletions core/lib/GNSSCore/SVNumXRef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,6 @@ void SVNumXRef::dump(std::ostream& out) const
{
//iterate through the data
multimap<int,XRefNode>::const_iterator it;
bool pastCurrent = false;
//header
std::string start_end_h = " START"
" END\n";
Expand All @@ -642,8 +641,6 @@ void SVNumXRef::dump(std::ostream& out) const
out << "\n\n\n";
//iterate through the data
multimap<int,XRefNode>::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";
Expand Down
36 changes: 0 additions & 36 deletions core/lib/GNSSEph/BrcClockCorrection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,42 +384,6 @@ namespace gpstk
os << " " << (static_cast<YDSTime>(t)).printf("%3j %5.0s ")
<< (static_cast<CivilTime>(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<long>( HOW );
DOW = static_cast<short>( SOW / SEC_PER_DAY );
SOD = SOW - static_cast<long>( DOW * SEC_PER_DAY );
hour = static_cast<short>( SOD/3600 );

SOH = static_cast<short>( 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();
Expand Down
36 changes: 0 additions & 36 deletions core/lib/GNSSEph/BrcKeplerOrbit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -800,42 +800,6 @@ namespace gpstk
os << " " << (static_cast<YDSTime>(t)).printf("%3j %5.0s ")
<< (static_cast<CivilTime>(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<long>( HOW );
DOW = static_cast<short>( SOW / SEC_PER_DAY );
SOD = SOW - static_cast<long>( DOW * SEC_PER_DAY );
hour = static_cast<short>( SOD/3600 );

SOH = static_cast<short>( 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()
{
Expand Down
4 changes: 2 additions & 2 deletions core/lib/GNSSEph/ClockSatStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion core/lib/GNSSEph/NavID.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ namespace gpstk
case ntGalFNAV: {retVal = NavTypeStrings[ 8]; break;}
case ntGalINAV: {retVal = NavTypeStrings[ 9]; break;}
case ntIRNSS_SPS: {retVal = NavTypeStrings[10]; break;}
case ntUnknown:
case ntUnknown: // fall through...
default: {retVal = NavTypeStrings[11]; break;}
};
//return retVal in case switch isn't reached
Expand Down
Loading