Fixed documentation errors to finish consolidating satellite/sbdb code

This commit is contained in:
GPayne
2020-03-11 10:09:23 -06:00
parent e7185ebcb6
commit d347733234
6 changed files with 154 additions and 54 deletions

View File

@@ -81,7 +81,7 @@ namespace {
"Upper limit on the number of objects for this renderable, regardless of "
"how many objects are contained in the data file"
};
constexpr const char* KeyFile = "Path";
constexpr const char* KeyLineNum = "LineNumber";
}
@@ -346,53 +346,7 @@ int RenderableOrbitalKepler::daysIntoGivenYear(int month, int dayOfMonth) {
}
return dayCount;
}
documentation::Documentation RenderableOrbitalKepler::Documentation() {
using namespace documentation;
return {
"RenderableOrbitalKepler",
"space_renderable_keplerian_orbitals",
{
{
SegmentsInfo.identifier,
new DoubleVerifier,
Optional::No,
SegmentsInfo.description
},
{
UpperLimitInfo.identifier,
new IntVerifier,
Optional::Yes,
UpperLimitInfo.description
},
{
PathInfo.identifier,
new StringVerifier,
Optional::No,
PathInfo.description
},
{
LineWidthInfo.identifier,
new DoubleVerifier,
Optional::Yes,
LineWidthInfo.description
},
{
LineColorInfo.identifier,
new DoubleVector3Verifier,
Optional::No,
LineColorInfo.description
},
{
TrailFadeInfo.identifier,
new DoubleVerifier,
Optional::Yes,
TrailFadeInfo.description
}
}
};
}
RenderableOrbitalKepler::RenderableOrbitalKepler(const ghoul::Dictionary& dictionary)
: Renderable(dictionary)
, _path(PathInfo)

View File

@@ -47,7 +47,6 @@ public:
bool isReady() const override;
void render(const RenderData& data, RendererTasks& rendererTask) override;
static documentation::Documentation Documentation();
/**
* Reads the provided data file and calls the KeplerTranslation::setKeplerElments
* method with the correct values. If \p filename is a valid data file but contains

View File

@@ -53,10 +53,84 @@ namespace {
"Path",
"The file path to the TLE file to read"
};
static const openspace::properties::Property::PropertyInfo SegmentsInfo = {
"Segments",
"Segments",
"The number of segments to use for each orbit ellipse"
};
constexpr openspace::properties::Property::PropertyInfo LineWidthInfo = {
"LineWidth",
"Line Width",
"This value specifies the line width of the trail if the selected rendering "
"method includes lines. If the rendering mode is set to Points, this value is "
"ignored."
};
constexpr openspace::properties::Property::PropertyInfo LineColorInfo = {
"Color",
"Color",
"This value determines the RGB main color for the lines and points of the trail."
};
constexpr openspace::properties::Property::PropertyInfo TrailFadeInfo = {
"TrailFade",
"Trail Fade",
"This value determines how fast the trail fades and is an appearance property. "
};
static const openspace::properties::Property::PropertyInfo UpperLimitInfo = {
"UpperLimit",
"Upper Limit",
"Upper limit on the number of objects for this renderable, regardless of "
"how many objects are contained in the data file"
};
}
namespace openspace {
documentation::Documentation RenderableSatellites::Documentation() {
using namespace documentation;
return {
"RenderableSatellites",
"space_renderable_satellites",
{
{
SegmentsInfo.identifier,
new DoubleVerifier,
Optional::No,
SegmentsInfo.description
},
{
UpperLimitInfo.identifier,
new IntVerifier,
Optional::Yes,
UpperLimitInfo.description
},
{
PathInfo.identifier,
new StringVerifier,
Optional::No,
PathInfo.description
},
{
LineWidthInfo.identifier,
new DoubleVerifier,
Optional::Yes,
LineWidthInfo.description
},
{
LineColorInfo.identifier,
new DoubleVector3Verifier,
Optional::No,
LineColorInfo.description
},
{
TrailFadeInfo.identifier,
new DoubleVerifier,
Optional::Yes,
TrailFadeInfo.description
}
}
};
}
RenderableSatellites::RenderableSatellites(const ghoul::Dictionary& dictionary)
: RenderableOrbitalKepler(dictionary)
{

View File

@@ -42,7 +42,7 @@ class RenderableSatellites : public RenderableOrbitalKepler {
public:
RenderableSatellites(const ghoul::Dictionary& dictionary);
void readDataFile(const std::string& filename);
//static documentation::Documentation Documentation();
static documentation::Documentation Documentation();
};
} // namespace openspace

View File

@@ -52,13 +52,86 @@ namespace {
static const openspace::properties::Property::PropertyInfo PathInfo = {
"Path",
"Path",
"The file path to the SBDB file to read"
"The file path to the SBDB .csv file to read"
};
static const openspace::properties::Property::PropertyInfo SegmentsInfo = {
"Segments",
"Segments",
"The number of segments to use for each orbit ellipse"
};
constexpr openspace::properties::Property::PropertyInfo LineWidthInfo = {
"LineWidth",
"Line Width",
"This value specifies the line width of the trail if the selected rendering "
"method includes lines. If the rendering mode is set to Points, this value is "
"ignored."
};
constexpr openspace::properties::Property::PropertyInfo LineColorInfo = {
"Color",
"Color",
"This value determines the RGB main color for the lines and points of the trail."
};
constexpr openspace::properties::Property::PropertyInfo TrailFadeInfo = {
"TrailFade",
"Trail Fade",
"This value determines how fast the trail fades and is an appearance property. "
};
static const openspace::properties::Property::PropertyInfo UpperLimitInfo = {
"UpperLimit",
"Upper Limit",
"Upper limit on the number of objects for this renderable, regardless of "
"how many objects are contained in the data file"
};
}
namespace openspace {
documentation::Documentation RenderableSmallBody::Documentation() {
using namespace documentation;
return {
"RenderableSmallBody",
"space_renderable_small_body",
{
{
SegmentsInfo.identifier,
new DoubleVerifier,
Optional::No,
SegmentsInfo.description
},
{
UpperLimitInfo.identifier,
new IntVerifier,
Optional::Yes,
UpperLimitInfo.description
},
{
PathInfo.identifier,
new StringVerifier,
Optional::No,
PathInfo.description
},
{
LineWidthInfo.identifier,
new DoubleVerifier,
Optional::Yes,
LineWidthInfo.description
},
{
LineColorInfo.identifier,
new DoubleVector3Verifier,
Optional::No,
LineColorInfo.description
},
{
TrailFadeInfo.identifier,
new DoubleVerifier,
Optional::Yes,
TrailFadeInfo.description
}
}
};
}
RenderableSmallBody::RenderableSmallBody(const ghoul::Dictionary& dictionary)
: RenderableOrbitalKepler(dictionary)
{

View File

@@ -43,7 +43,7 @@ static double importAngleValue(const std::string& angle);
class RenderableSmallBody : public RenderableOrbitalKepler {
public:
RenderableSmallBody(const ghoul::Dictionary& dictionary);
//static documentation::Documentation Documentation();
static documentation::Documentation Documentation();
private:
void readOrbitalParamsFromThisLine(int& fieldCount, std::streamoff& csvLine,