Isis 3 Programmer Reference
KernelDb.h
Go to the documentation of this file.
1 #ifndef KernelDb_h
2 #define KernelDb_h
3 
26 #include <iostream>
27 #include <queue>
28 
29 #include <QList>
30 #include <QString>
31 #include <QStringList>
32 
33 #include "iTime.h"//???
34 #include "Kernel.h"
35 #include "Pvl.h"
36 
37 namespace Isis {
38  class FileName;
39  class iTime;
113  class KernelDb {
114 
115  public:
116  // constructor
117  KernelDb(const unsigned int allowedKernelTypes);
118  KernelDb(const QString &dbName, const unsigned int allowedKernelTypes);
119  KernelDb(std::istream &dbStream, const unsigned int allowedKernelTypes);
120 
121  // destructor
122  ~KernelDb();
123 
124  // Members for getting kernels
125  Kernel leapSecond(Pvl &lab);
127  Kernel targetPosition(Pvl &lab);
129  Kernel spacecraftClock(Pvl &lab);
131  Kernel instrument(Pvl &lab);
132  Kernel frame(Pvl &lab);
134  Kernel dem(Pvl &lab);
135 
136  Kernel findLast(const QString &entry, Pvl &lab);
137  QList< std::priority_queue<Kernel> > findAll(const QString &entry,
138  Pvl &lab);
139 
140  void loadSystemDb(const QString &mission, const Pvl &lab);
142 
143  static bool matches(const Pvl &lab, PvlGroup &kernelDbGrp,
144  iTime timeToMatch, int cameraVersion);
145  private:
146  void loadKernelDbFiles(PvlGroup &dataDir,
147  QString directory,
148  const Pvl &lab);
149  void readKernelDbFiles();
150 
151  QStringList files(PvlGroup &grp);
152  QString m_filename;
157  unsigned int m_allowedKernelTypes;
168  };
169 };
170 
171 #endif
Kernel dem(Pvl &lab)
This method finds the highest version of all Digital Terrain Models (DEMs) found that match the crite...
Definition: KernelDb.cpp:334
Kernel targetPosition(Pvl &lab)
This method finds the highest version of all Target Position kernels (tspk) identified by the databas...
Definition: KernelDb.cpp:189
KernelDb class.
Definition: KernelDb.h:113
Kernel findLast(const QString &entry, Pvl &lab)
Finds the highest priority Kernel object for the given entry based on the allowed Kernel types...
Definition: KernelDb.cpp:351
Parse and return pieces of a time string.
Definition: iTime.h:78
QList< std::priority_queue< Kernel > > spacecraftPointing(Pvl &lab)
This method finds a list of the highest versions of all Spacecraft Pointing kernels (ck) identified b...
Definition: KernelDb.cpp:210
KernelDb(const unsigned int allowedKernelTypes)
Constructs a new KernelDb object with a given integer value representing the Kernel::Type enumeration...
Definition: KernelDb.cpp:61
~KernelDb()
Destructs KernelDb object.
Definition: KernelDb.cpp:128
static bool matches(const Pvl &lab, PvlGroup &kernelDbGrp, iTime timeToMatch, int cameraVersion)
This static method determines whether the given cube label matches the given criteria.
Definition: KernelDb.cpp:583
QList< FileName > m_kernelDbFiles
List of the kernel database file names that were read in when the loadSystemDb() method is called...
Definition: KernelDb.h:154
Pvl m_kernelData
Pvl containing the information in the kernel database(s) that is read in from the constructor and whe...
Definition: KernelDb.h:165
Kernel spacecraftPosition(Pvl &lab)
This method finds the highest version of all Spacecraft Position kernels (spk) identified by the data...
Definition: KernelDb.cpp:251
QString m_filename
The name of the kernel database file.
Definition: KernelDb.h:152
This class stores Kernel information, including Type and kernel file names.
Definition: Kernel.h:49
void loadSystemDb(const QString &mission, const Pvl &lab)
Loads the appropriate kernel database files with the defined BASE and MISSION info for each type of k...
Definition: KernelDb.cpp:719
QStringList files(PvlGroup &grp)
This method retrieves the values of all of the "File" keywords in the given PvlGroup.
Definition: KernelDb.cpp:887
Kernel spacecraftClock(Pvl &lab)
This method finds the highest version of all Spacecraft Clock kernels (sclk) identified by the databa...
Definition: KernelDb.cpp:230
Contains multiple PvlContainers.
Definition: PvlGroup.h:57
Kernel frame(Pvl &lab)
This method finds the highest version of all Frame kernels (fk) identified by the database and the al...
Definition: KernelDb.cpp:293
void loadKernelDbFiles(PvlGroup &dataDir, QString directory, const Pvl &lab)
This method is called by loadSystemDb() to create a list of all appropriate kernel database files to ...
Definition: KernelDb.cpp:791
Container for cube-like labels.
Definition: Pvl.h:135
Kernel leapSecond(Pvl &lab)
This method finds the top priority of all Leap Second kernels (lsk) identified by the database and th...
Definition: KernelDb.cpp:147
QList< FileName > kernelDbFiles()
Accessor method to retrieve the list of kernel database files that were read in when loadSystemDb() i...
Definition: KernelDb.cpp:873
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
unsigned int m_allowedKernelTypes
This integer value represents which Kernel::Types are allowed.
Definition: KernelDb.h:157
void readKernelDbFiles()
This method is called by loadSystemDb() to read kernel database file list compiled by loadKernelDbFil...
Definition: KernelDb.cpp:852
QList< std::priority_queue< Kernel > > findAll(const QString &entry, Pvl &lab)
Finds all of the Kernel objects for the given entry value based on the allowed Kernel types...
Definition: KernelDb.cpp:378
Kernel instrument(Pvl &lab)
This method finds the last Instrument kernel found that matches the (ik) criteria in the database and...
Definition: KernelDb.cpp:272
Kernel targetAttitudeShape(Pvl &lab)
This method finds the highest version of all Target Attitude Shape kernels (pck) identified by the da...
Definition: KernelDb.cpp:168
Kernel instrumentAddendum(Pvl &lab)
This method finds the highest version of all Instrument Addendum kernels (iak) identified by the data...
Definition: KernelDb.cpp:313