mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-25 21:48:57 -05:00
Merge branch 'develop' into trailmods
This commit is contained in:
@@ -33,54 +33,44 @@
|
||||
#include <vector>
|
||||
|
||||
namespace openspace {
|
||||
class HongKangParser : public SequenceParser{
|
||||
public:
|
||||
HongKangParser();
|
||||
HongKangParser(const std::string& fileName,
|
||||
std::string spacecraft,
|
||||
ghoul::Dictionary dictionary,
|
||||
std::vector<std::string> potentialTargets);
|
||||
virtual void create();
|
||||
virtual std::map<std::string, ImageSubset> getSubsetMap();
|
||||
virtual std::vector<std::pair<std::string, TimeRange>> getIstrumentTimes();
|
||||
virtual std::vector<std::pair<double, std::string>> getTargetTimes();
|
||||
|
||||
// temporary need to figure this out
|
||||
virtual std::map<std::string, Decoder*> getTranslation(){ return _fileTranslation; };
|
||||
virtual std::vector<double> getCaptureProgression();
|
||||
class HongKangParser : public SequenceParser {
|
||||
public:
|
||||
HongKangParser();
|
||||
HongKangParser(const std::string& fileName,
|
||||
std::string spacecraft,
|
||||
ghoul::Dictionary dictionary,
|
||||
std::vector<std::string> potentialTargets);
|
||||
virtual void create();
|
||||
|
||||
private:
|
||||
double getMetFromET(double et);
|
||||
double getETfromMet(std::string timestr);
|
||||
double getETfromMet(double met);
|
||||
// temporary need to figure this out
|
||||
virtual std::map<std::string, Decoder*> getTranslation(){ return _fileTranslation; };
|
||||
|
||||
void createImage(Image& image,
|
||||
double startTime,
|
||||
double stopTime,
|
||||
std::vector<std::string> instr,
|
||||
std::string targ,
|
||||
std::string pot);
|
||||
private:
|
||||
double getMetFromET(double et);
|
||||
double getETfromMet(std::string timestr);
|
||||
double getETfromMet(double met);
|
||||
|
||||
bool augmentWithSpice(Image& image,
|
||||
std::string spacecraft,
|
||||
std::vector<std::string> payload,
|
||||
std::vector<std::string> potentialTargets);
|
||||
void sendPlaybookInformation();
|
||||
void createImage(Image& image,
|
||||
double startTime,
|
||||
double stopTime,
|
||||
std::vector<std::string> instr,
|
||||
std::string targ,
|
||||
std::string pot);
|
||||
|
||||
std::string _defaultCaptureImage;
|
||||
double _metRef = 299180517;
|
||||
bool augmentWithSpice(Image& image,
|
||||
std::string spacecraft,
|
||||
std::vector<std::string> payload,
|
||||
std::vector<std::string> potentialTargets);
|
||||
|
||||
std::string _fileName;
|
||||
std::string _spacecraft;
|
||||
std::map<std::string, Decoder*> _fileTranslation;
|
||||
std::vector<std::string> _potentialTargets;
|
||||
std::string _defaultCaptureImage;
|
||||
double _metRef = 299180517;
|
||||
|
||||
//returnable
|
||||
std::map<std::string, ImageSubset> _subsetMap;
|
||||
std::vector<std::pair<std::string, TimeRange>> _instrumentTimes;
|
||||
std::vector<std::pair<double, std::string>> _targetTimes;
|
||||
std::vector<double> _captureProgression;
|
||||
};
|
||||
std::string _fileName;
|
||||
std::string _spacecraft;
|
||||
std::map<std::string, Decoder*> _fileTranslation;
|
||||
std::vector<std::string> _potentialTargets;
|
||||
};
|
||||
|
||||
}
|
||||
#endif //__HONGKANGPARSER_H__
|
||||
@@ -38,13 +38,9 @@ public:
|
||||
LabelParser(const std::string& fileName,
|
||||
ghoul::Dictionary translationDictionary);
|
||||
virtual void create();
|
||||
virtual std::map<std::string, ImageSubset> getSubsetMap();
|
||||
virtual std::vector<std::pair<std::string, TimeRange>> getIstrumentTimes();
|
||||
virtual std::vector<std::pair<double, std::string>> getTargetTimes();
|
||||
|
||||
// temporary need to figure this out
|
||||
std::map<std::string, Decoder*> getTranslation(){ return _fileTranslation; };
|
||||
virtual std::vector<double> getCaptureProgression(){ return _captureProgression; };
|
||||
|
||||
private:
|
||||
void createImage(Image& image,
|
||||
@@ -67,13 +63,6 @@ private:
|
||||
std::map<std::string, Decoder*> _fileTranslation;
|
||||
std::vector<std::string> _specsOfInterest;
|
||||
|
||||
//returnable
|
||||
std::map<std::string, ImageSubset> _subsetMap;
|
||||
std::vector<std::pair<std::string, TimeRange>> _instrumentTimes;
|
||||
std::vector<std::pair<double, std::string>> _targetTimes;
|
||||
std::vector<double> _captureProgression;
|
||||
|
||||
|
||||
std::string _target;
|
||||
std::string _instrumentID;
|
||||
std::string _instrumentHostID;
|
||||
|
||||
@@ -22,53 +22,69 @@
|
||||
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
||||
****************************************************************************************/
|
||||
|
||||
|
||||
#ifndef __SEQUENCEPARSER_H__
|
||||
#define __SEQUENCEPARSER_H__
|
||||
#include <openspace/util/decoder.h>
|
||||
|
||||
#include <openspace/network/networkengine.h>
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace openspace {
|
||||
struct Image{
|
||||
double startTime;
|
||||
double stopTime;
|
||||
std::string path;
|
||||
std::vector<std::string> activeInstruments;
|
||||
std::string target;
|
||||
bool projected;
|
||||
};
|
||||
struct TimeRange{
|
||||
TimeRange() : _min(-1), _max(-1){};
|
||||
void setRange(double val){
|
||||
if (_min > val) _min = val;
|
||||
if (_max < val) _max = val;
|
||||
};
|
||||
bool inRange(double min, double max){
|
||||
return (min >= _min && max <= _max);
|
||||
}
|
||||
bool inRange(double val){
|
||||
return (val >= _min && val <= _max);
|
||||
}
|
||||
double _min;
|
||||
double _max;
|
||||
};
|
||||
struct ImageSubset{
|
||||
TimeRange _range;
|
||||
std::vector < Image > _subset;
|
||||
};
|
||||
|
||||
class SequenceParser{
|
||||
public:
|
||||
virtual void create() = 0;
|
||||
virtual std::map<std::string, ImageSubset> getSubsetMap() = 0;
|
||||
virtual std::vector<std::pair<std::string, TimeRange>> getIstrumentTimes() = 0;
|
||||
virtual std::vector<std::pair<double, std::string>> getTargetTimes() = 0;
|
||||
virtual std::map<std::string, Decoder*> getTranslation() = 0;
|
||||
virtual std::vector<double> getCaptureProgression() = 0;
|
||||
class Decoder;
|
||||
|
||||
struct Image {
|
||||
double startTime;
|
||||
double stopTime;
|
||||
std::string path;
|
||||
std::vector<std::string> activeInstruments;
|
||||
std::string target;
|
||||
bool projected;
|
||||
};
|
||||
}
|
||||
#endif //__SEQUENCEPARSER_H__
|
||||
|
||||
struct TimeRange {
|
||||
TimeRange() : _min(-1), _max(-1){};
|
||||
void setRange(double val){
|
||||
if (_min > val) _min = val;
|
||||
if (_max < val) _max = val;
|
||||
};
|
||||
bool inRange(double min, double max){
|
||||
return (min >= _min && max <= _max);
|
||||
}
|
||||
bool inRange(double val){
|
||||
return (val >= _min && val <= _max);
|
||||
}
|
||||
double _min;
|
||||
double _max;
|
||||
};
|
||||
|
||||
struct ImageSubset {
|
||||
TimeRange _range;
|
||||
std::vector<Image> _subset;
|
||||
};
|
||||
|
||||
class SequenceParser {
|
||||
public:
|
||||
virtual void create() = 0;
|
||||
virtual std::map<std::string, ImageSubset> getSubsetMap() final;
|
||||
virtual std::vector<std::pair<std::string, TimeRange>> getIstrumentTimes() final;
|
||||
virtual std::vector<std::pair<double, std::string>> getTargetTimes() final;
|
||||
virtual std::map<std::string, Decoder*> getTranslation() = 0;
|
||||
virtual std::vector<double> getCaptureProgression() final;
|
||||
|
||||
protected:
|
||||
void sendPlaybookInformation(const std::string& name);
|
||||
|
||||
std::map<std::string, ImageSubset> _subsetMap;
|
||||
std::vector<std::pair<std::string, TimeRange>> _instrumentTimes;
|
||||
std::vector<std::pair<double, std::string>> _targetTimes;
|
||||
std::vector<double> _captureProgression;
|
||||
|
||||
NetworkEngine::MessageIdentifier _messageIdentifier;
|
||||
};
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
#endif //__SEQUENCEPARSER_H__
|
||||
|
||||
@@ -25,4 +25,4 @@
|
||||
#define OPENSPACE_VERSION_MAJOR 0
|
||||
#define OPENSPACE_VERSION_MINOR 1
|
||||
#define OPENSPACE_VERSION_REVISION 0
|
||||
#define OPENSPACE_VERSION_STRING "prerelease-4"
|
||||
#define OPENSPACE_VERSION_STRING "prerelease-5"
|
||||
|
||||
Reference in New Issue
Block a user