Reworked how SPICE kernels are loaded

- SpiceEphemeris can provide a list of kernels that are loaded when created
- Time and Leapsecond kernels are provided in the openspace.cfg file
This commit is contained in:
Alexander Bock
2014-09-28 00:06:53 +02:00
parent e0d100c13a
commit b667a4910c
10 changed files with 74 additions and 61 deletions
+3 -1
View File
@@ -35,7 +35,8 @@ namespace configurationmanager {
const std::string keyConfigSgct = "SGCTConfig";
const std::string keyConfigScene = "Scene";
const std::string keyStartupScript = "StartupScripts";
const std::string keyConfigTimekernel = "SpiceTimeKernel";
const std::string keySpiceTimeKernel = "SpiceKernel.Time";
const std::string keySpiceLeapsecondKernel = "SpiceKernel.LeapSecond";
} // namespace configurationmanager
namespace scenegraph {
@@ -100,6 +101,7 @@ namespace staticephemeris {
namespace spiceephemeris {
const std::string keyBody = "Body";
const std::string keyOrigin = "Observer";
const std::string keyKernels = "Kernels";
} // namespace spiceephemeris
} // namespace constants
+1 -1
View File
@@ -57,7 +57,7 @@ public:
* \param kernelId unique integer ID for the loaded kernel
* \return loaded kernels/metakernels unique integer id
*/
int loadKernel(const std::string& fullPath,
int loadKernel(std::string fullPath,
const std::string& shorthand);
/**
+2 -5
View File
@@ -52,14 +52,11 @@ namespace openspace {
class Time {
public:
/**
* Initializes the Time singleton and loads an LSK spice kernel with the provided
* name.
* \param lskKernel The name of the kernel that should be loaded during the
* initialization. If the parameter is empty, no kernel will be loaded
* Initializes the Time singleton.
* \return <code>true</code> if the initialization succeeded, <code>false</code>
* otherwise
*/
static bool initialize(const std::string& lskKernel = "");
static bool initialize();
/**
* Deinitializes the Time singleton. This method will not unload the kernel that was