Merge branch 'thesis/2018/dsn' of github.com:OpenSpace/OpenSpace into thesis/2018/dsn

This commit is contained in:
Agnes Heppich
2018-12-19 19:13:38 -05:00
12 changed files with 117 additions and 42 deletions

View File

@@ -1,7 +1,8 @@
local assetHelper = asset.require('util/asset_helper')
local stationsAsset = asset.require('scene/solarsystem/dsn/stations')
local maps = asset.require('scene/solarsystem/dsn/spacecraftsmaps')
--Signals data
--Signals data path
local dataFolder = openspace.absPath("../../../sync/http/dsn_data/1/json")
local Signals = {
@@ -12,7 +13,8 @@ local Signals = {
DataFileType = "json",
BaseOpacity = 0.1,
SiteColors = stationsAsset.siteColorMap,
StationSites = stationsAsset.stationSiteMap
StationSites = stationsAsset.stationSiteMap,
SpacecraftIdMap = maps.signalDataIdMap
},
GUI = {
Name = "Signals",

View File

@@ -1,22 +1,5 @@
local assetHelper = asset.require('util/asset_helper')
--local spacecrafts = asset.require('scene/solarsystem/missions/dsn/spacecrafts')
-- label id maps
local labelMapMarsMissions = {
MarsRecOrbiter = "Mars Recon Orbiter",
MarsOdyssey = "MarsOdyssey",
}
local labelMapVoyagers = {
VGR1 = "Voyager 1",
VGR2 = "Voyager 2",
}
local labelMapClusters = {
Mars = "MarsOdyssey, \n Mars Recon Orbiter "
}
local maps = asset.require('scene/solarsystem/dsn/spacecraftsmaps')
local OuterSpaceLabels = {
Identifier = "OuterSpaceLabels",
@@ -24,7 +7,7 @@ local OuterSpaceLabels = {
Type = "RenderableLabel",
Enabled = true,
ScaleFactor = 9.0,
LabelIdentifierMap = labelMapVoyagers,
LabelIdentifierMap = maps.labelMapVoyagers,
TextColor = { 1.0, 0.6, 0.2, 1.0 },
DrawLabels = true,
LabelSizeRange = {5.5, 6.0},
@@ -47,7 +30,7 @@ local MarsMissionsLabels = {
Type = "RenderableLabel",
Enabled = true,
ScaleFactor = 7.5,
LabelIdentifierMap = labelMapMarsMissions,
LabelIdentifierMap = maps.labelMapMarsMissions,
TextColor = { 0.96, 0.4, 0.4, 1.0 },
DrawLabels = true,
LabelSizeRange = {4.0, 4.5},
@@ -70,7 +53,7 @@ local ClusteredLabels = {
Type = "RenderableLabel",
Enabled = true,
ScaleFactor = 9.0,
LabelIdentifierMap = labelMapClusters,
LabelIdentifierMap = maps.labelMapClusters,
TextColor = { 0.96, 0.4, 0.4, 1.0 },
DrawLabels = true,
LabelSizeRange = {5.5, 5.8},
@@ -87,6 +70,4 @@ local ClusteredLabels = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { OuterSpaceLabels, MarsMissionsLabels, ClusteredLabels })

View File

@@ -0,0 +1,44 @@
---------------------------------------------------------------------------------------------------
----- The maps in this file are used to keep the SceneGraphNode identifiers for each spacecraft ---
----- up to date with labels and dsn signal data among other things ---
---------------------------------------------------------------------------------------------------
local Voyager1Asset = asset.require('scene/solarsystem/missions/voyager1/voyager1')
local Voyager2Asset = asset.require('scene/solarsystem/missions/voyager2/voyager2')
-- added specifically for dsn visualization
local MarsRecOrbAsset = asset.require('scene/solarsystem/missions/dsn/mro/mro')
local MarsOdysseyAsset = asset.require('scene/solarsystem/missions/dsn/marsodyssey/marsodyssey')
local StereoAAsset = asset.require('scene/solarsystem/missions/dsn/stereoa/stereoa')
-------------------- dsn signal data map --------------------
local signalDataIdMap = {
VGR1 = Voyager1Asset.spacecraftID,
VGR2 = Voyager2Asset.spacecraftID,
STA = StereoAAsset.spacecraftID,
MRO = MarsRecOrbAsset.spacecraftID,
M010 = MarsOdysseyAsset.spacecraftID
}
-------------------- label id maps --------------------
local labelMapMarsMissions = {
MarsRecOrbiter = "Mars Recon Orbiter",
MarsOdyssey = "MarsOdyssey",
}
local labelMapVoyagers = {
Voyager1 = "Voyager 1",
Voyager2 = "Voyager 2",
}
local labelMapClusters = {
Mars = "MarsOdyssey, \n Mars Recon Orbiter "
}
------------------------ export -------------------------
asset.export("signalDataIdMap", signalDataIdMap)
asset.export("labelMapMarsMissions", labelMapMarsMissions)
asset.export("labelMapVoyagers", labelMapVoyagers)
asset.export("labelMapClusters", labelMapClusters)

View File

@@ -101,7 +101,7 @@ local DSS14 = {
}
}
-- Retired?
-- DSS15 is a 34m dish of the HEF net that is being decomissioned as of 2017
local DSS15 = {
Identifier = "DSS15",
Parent = earthAsset.Earth.Identifier,
@@ -113,16 +113,16 @@ local DSS15 = {
Latitude = 35.42590143888,
}
},
Renderable = {
Type = "RenderableModel",
Geometry = {
Type = "MultiModelGeometry",
GeometryFile = models .. "/34m_dish/34m_dish.obj"
},
ColorTexture = models .. "/34m_dish/base_AO.png" ,
ModelTransform = RotationMatrixGoldstone
-- Renderable = {
-- Type = "RenderableModel",
-- Geometry = {
-- Type = "MultiModelGeometry",
-- GeometryFile = models .. "/34m_dish/34m_dish.obj"
-- },
-- ColorTexture = models .. "/34m_dish/base_AO.png" ,
-- ModelTransform = RotationMatrixGoldstone
},
-- },
GUI = {
Name = "DSS15",
Path = "/Solar System/Stations/Goldstone"

View File

@@ -11,8 +11,10 @@ local models = asset.syncedResource({
Version = 1
})
local spacecraftID = "MarsOdyssey"
local MarsOdyssey = {
Identifier = "MarsOdyssey",
Identifier = spacecraftID,
Parent = marsTransforms.MarsBarycenter.Identifier,
Transform = {
Translation = {
@@ -46,6 +48,8 @@ local MarsOdysseyModel = {
}
}
asset.export("spacecraftID", spacecraftID)
assetHelper.registerSceneGraphNodesAndExport(asset, {
MarsOdyssey,
MarsOdysseyModel

View File

@@ -11,8 +11,10 @@ local models = asset.syncedResource({
Version = 1
})
local spacecraftID = "MarsRecOrbiter"
local MarsRecOrbiter = {
Identifier = "MarsRecOrbiter",
Identifier = spacecraftID,
Parent = marsTransforms.MarsBarycenter.Identifier,
Transform = {
Translation = {
@@ -46,6 +48,8 @@ local MarsRecOrbiterModel = {
}
}
asset.export("spacecraftID", spacecraftID)
assetHelper.registerSceneGraphNodesAndExport(asset, {
MarsRecOrbiter,
MarsRecOrbiterModel

View File

@@ -8,4 +8,6 @@ asset.require('scene/solarsystem/missions/voyager2/voyager2')
-- added specifically for dsn visualization
asset.require('scene/solarsystem/missions/dsn/mro/mro')
asset.require('scene/solarsystem/missions/dsn/marsodyssey/marsodyssey')
asset.require('scene/solarsystem/missions/dsn/stereoa/stereoa')
asset.require('scene/solarsystem/missions/dsn/stereoa/stereoa')

View File

@@ -10,8 +10,10 @@ local models = asset.syncedResource({
Version = 1
})
local spacecraftID = "StereoA"
local StereoA = {
Identifier = "StereoA",
Identifier = spacecraftID,
Parent = sunTransforms.SolarSystemBarycenter.Identifier,
Transform = {
Translation = {
@@ -45,6 +47,8 @@ local StereoAModel = {
}
}
asset.export("spacecraftID", spacecraftID)
assetHelper.registerSceneGraphNodesAndExport(asset, {
StereoA,
StereoAModel

View File

@@ -16,8 +16,10 @@ local RotationMatrix = {
0, -1, 0
}
local spacecraftID = "Voyager1"
local Voyager1 = {
Identifier = "VGR1",
Identifier = spacecraftID,
Parent = sunTransforms.SolarSystemBarycenter.Identifier,
Transform = {
Translation = {
@@ -76,6 +78,7 @@ local Voyager1Antenna = {
}
}
asset.export("spacecraftID", spacecraftID)
assetHelper.registerSceneGraphNodesAndExport(asset, {
Voyager1,

View File

@@ -16,8 +16,10 @@ local RotationMatrix = {
0, -1, 0
}
local spacecraftID = "Voyager2"
local Voyager2 = {
Identifier = "VGR2",
Identifier = spacecraftID,
Parent = sunTransforms.SolarSystemBarycenter.Identifier,
Transform = {
Translation = {
@@ -76,6 +78,8 @@ local Voyager2Antenna = {
}
}
asset.export("spacecraftID", spacecraftID)
assetHelper.registerSceneGraphNodesAndExport(asset, {
Voyager2,
Voyager2Main,

View File

@@ -27,6 +27,9 @@
#include <openspace/util/spicemanager.h>
namespace openspace {
constexpr const char* _loggerCat = "SignalManager";
constexpr const char* KeySpacecraftIdMap = "SpacecraftIdMap";
//The abbreviation in the data(NAIF ID) to the SceneGraphNode identifier of the spacecrafts
std::map<std::string, std::string> spacecraftDataToId;
struct SignalManager::SignalData SignalManager::signalData;
std::vector<double> SignalManager::fileStartTimes;
@@ -37,6 +40,22 @@ namespace openspace {
bool dataFilesSuccess = DataFileHelper::checkFileNames(identifier, dictionary, _dataFiles);
fileStartTimes = DataFileHelper::getDaysFromFileNames(_dataFiles);
ghoul::Dictionary spacecraftDictionary;
if (dictionary->getValue(KeySpacecraftIdMap, spacecraftDictionary)) {
std::vector<std::string> keys = spacecraftDictionary.keys();
for (int i = 0; i < keys.size(); i++)
{
std::string dataAbbr = keys.at(i);
std::string nodeId = spacecraftDictionary.value<std::string>(keys.at(i));
spacecraftDataToId[dataAbbr] = nodeId;
}
}
else {
LERROR("No {} set for {}!", KeySpacecraftIdMap, _loggerCat);
}
return dataFilesSuccess;
}
@@ -53,7 +72,7 @@ namespace openspace {
objectCounter++;
try {
structSignal.dishName = signalsInJson["facility"].get<std::string>();
structSignal.spacecraft = signalsInJson["projuser"].get<std::string>();
structSignal.spacecraft = spacecraftDataToId.at(signalsInJson["projuser"].get<std::string>());
structSignal.endTime = signalsInJson["eot"].get<std::string>();
structSignal.startTime = signalsInJson["bot"].get<std::string>();
structSignal.direction = signalsInJson["direction"].get<std::string>();

View File

@@ -37,6 +37,7 @@ namespace {
constexpr const char* ProgramName = "SignalsProgram";
constexpr const char* _loggerCat = "RenderableSignals";
constexpr const char* KeyStationSites = "StationSites";
constexpr const char* KeySpacecraftIdMap = "SpacecraftIdMap";
constexpr const std::array <const char*, openspace::RenderableSignals::uniformCacheSize> UniformNames = {
"modelViewStation","modelViewSpacecraft", "projectionTransform", "baseOpacity",
@@ -108,6 +109,13 @@ documentation::Documentation RenderableSignals::Documentation() {
"This is a map of the individual stations to their "
"respective site location on Earth."
},
{
KeySpacecraftIdMap,
new TableVerifier,
Optional::No,
"This is a map of the signal data abbreviations "
"to the respective spacecraft asset file identifier. "
},
{
LineWidthInfo.identifier,
new DoubleVerifier,