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

Commit

Permalink
Merge branch 'issue_365_XvtStoreSatID' into 'master'
Browse files Browse the repository at this point in the history
Issue 365 xvt store sat

See merge request sgl/gpstk!283
  • Loading branch information
Bryan Parsons committed Dec 21, 2018
2 parents 597d872 + 77edc9d commit b60965c
Show file tree
Hide file tree
Showing 18 changed files with 746 additions and 148 deletions.
13 changes: 12 additions & 1 deletion core/lib/GNSSEph/GloEphemerisStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ using namespace std;
namespace gpstk
{


// Add ephemeris information from a Rinex3NavData object.
bool GloEphemerisStore::addEphemeris(const Rinex3NavData& data)
{
Expand Down Expand Up @@ -375,6 +374,18 @@ namespace gpstk
return ret;
}

set<SatID> GloEphemerisStore::getIndexSet() const
{
set<SatID> retSet;
GloEphMap::const_iterator cit;
for (cit=pe.begin();cit!=pe.end();cit++)
{
const SatID& sidr = cit->first;
retSet.insert(sidr);
}
return retSet;
}

/* Find the corresponding GLONASS ephemeris for the given epoch.
*
* @param sat SatID of satellite of interest.
Expand Down
4 changes: 4 additions & 0 deletions core/lib/GNSSEph/GloEphemerisStore.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
#define GPSTK_GLOEPHEMERISSTORE_HPP

#include <iostream>
#include <set>

#include "XvtStore.hpp"
#include "GloEphemeris.hpp"
#include "Rinex3NavData.hpp"
Expand Down Expand Up @@ -253,6 +255,8 @@ namespace gpstk
/// @return the number of ephemerides added.
int addToList( std::list<GloEphemeris>& v ) const;

virtual std::set<gpstk::SatID> getIndexSet() const;

private:

/// The map of SVs and Xvt's
Expand Down
61 changes: 35 additions & 26 deletions core/lib/GNSSEph/OrbElem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ namespace gpstk
GPSTK_THROW(exc);
}
const ios::fmtflags oldFlags = s.flags();
size_t precision = 8;

s.setf(ios::fixed, ios::floatfield);
s.setf(ios::right, ios::adjustfield);
Expand All @@ -501,44 +502,45 @@ namespace gpstk
timeDisplay(s, endValid);

s.setf(ios::scientific, ios::floatfield);
s.precision(8);
s.precision(precision);
s.fill(' ');
unsigned fw = precision + 8;

s << endl
<< endl
<< " CLOCK PARAMETERS"
<< endl
<< endl
<< "Bias T0: " << setw(16) << af0 << " sec" << endl
<< "Drift: " << setw(16) << af1 << " sec/sec" << endl
<< "Drift rate: " << setw(16) << af2 << " sec/(sec**2)" << endl;
<< "Bias T0: " << setw(fw) << af0 << " sec" << endl
<< "Drift: " << setw(fw) << af1 << " sec/sec" << endl
<< "Drift rate: " << setw(fw) << af2 << " sec/(sec**2)" << endl;

s << endl
<< " ORBIT PARAMETERS"
<< endl
<< endl
<< "Semi-major axis: " << setw(16) << A << " m "
<< setw(16) << Adot << " m/sec" << endl
<< "Motion correction: " << setw(16) << dn << " rad/sec "
<< setw(16) << dndot << " rad/(sec**2)" << endl
<< "Eccentricity: " << setw(16) << ecc << endl
<< "Arg of perigee: " << setw(16) << w << " rad" << endl
<< "Mean anomaly at epoch: " << setw(16) << M0 << " rad" << endl
<< "Right ascension: " << setw(16) << OMEGA0 << " rad "
<< setw(16) << OMEGAdot << " rad/sec" << endl
<< "Inclination: " << setw(16) << i0 << " rad "
<< setw(16) << idot << " rad/sec" << endl;
<< "Semi-major axis: " << setw(fw) << A << " m "
<< setw(fw) << Adot << " m/sec" << endl
<< "Motion correction: " << setw(fw) << dn << " rad/sec "
<< setw(fw) << dndot << " rad/(sec**2)" << endl
<< "Eccentricity: " << setw(fw) << ecc << endl
<< "Arg of perigee: " << setw(fw) << w << " rad" << endl
<< "Mean anomaly at epoch: " << setw(fw) << M0 << " rad" << endl
<< "Right ascension: " << setw(fw) << OMEGA0 << " rad "
<< setw(fw) << OMEGAdot << " rad/sec" << endl
<< "Inclination: " << setw(fw) << i0 << " rad "
<< setw(fw) << idot << " rad/sec" << endl;

s << endl
<< " HARMONIC CORRECTIONS"
<< endl
<< endl
<< "Radial Sine: " << setw(16) << Crs << " m Cosine: "
<< setw(16) << Crc << " m" << endl
<< "Inclination Sine: " << setw(16) << Cis << " rad Cosine: "
<< setw(16) << Cic << " rad" << endl
<< "In-track Sine: " << setw(16) << Cus << " rad Cosine: "
<< setw(16) << Cuc << " rad" << endl;
<< "Radial Sine: " << setw(fw) << Crs << " m Cosine: "
<< setw(fw) << Crc << " m" << endl
<< "Inclination Sine: " << setw(fw) << Cis << " rad Cosine: "
<< setw(fw) << Cic << " rad" << endl
<< "In-track Sine: " << setw(fw) << Cus << " rad Cosine: "
<< setw(fw) << Cuc << " rad" << endl;

s.flags(oldFlags);
} // end of dumpBody()
Expand All @@ -557,14 +559,21 @@ namespace gpstk
s << endl;
s << "PRN : " << setw(2) << satID.id << " / "
<< "SVN : " << setw(2);
try
if (satID.system==SatID::systemGPS)
{
NAVSTARNum = svNumXRef.getNAVSTAR(satID.id, ctToe );
s << NAVSTARNum << " ";
try
{
NAVSTARNum = svNumXRef.getNAVSTAR(satID.id, ctToe );
s << NAVSTARNum << " ";
}
catch(NoNAVSTARNumberFound)
{
s << "XX";
}
}
catch(NoNAVSTARNumberFound)
else
{
s << "XX";
s << " ";
}
s << endl
<< endl;
Expand Down
Loading

0 comments on commit b60965c

Please sign in to comment.