mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -06:00
New debris data
This commit is contained in:
1280
PM-2012-044.log
1280
PM-2012-044.log
File diff suppressed because it is too large
Load Diff
1280
PM-Earth.log
1280
PM-Earth.log
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1280
PM-EarthIAU.log
1280
PM-EarthIAU.log
File diff suppressed because it is too large
Load Diff
1280
PM-EarthInertial.log
1280
PM-EarthInertial.log
File diff suppressed because it is too large
Load Diff
1280
PM-EarthTrail.log
1280
PM-EarthTrail.log
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1280
PM-Root.log
1280
PM-Root.log
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1280
PM-SunIAU.log
1280
PM-SunIAU.log
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,23 @@
|
||||
local assetHelper = asset.require('util/asset_helper')
|
||||
local shared = asset.require('../satellites_shared')
|
||||
|
||||
local group = {
|
||||
Title = "Indian ASAT test Debris",
|
||||
Url = "http://www.celestrak.com/NORAD/elements/2019-006.txt",
|
||||
TrailColor = { 0.0, 0.0, 1.0 }
|
||||
}
|
||||
|
||||
local tle = shared.downloadTLEFile(asset, group.Url, group.Title)
|
||||
|
||||
|
||||
local objectNames = {}
|
||||
|
||||
asset.onInitialize(function ()
|
||||
objectNames = shared.addSatelliteGroupObjects(group, tle, true)
|
||||
end)
|
||||
|
||||
--asset.onDeinitialize(function ()
|
||||
-- for _, n in ipairs(objectNames) do
|
||||
-- openspace.removeSceneGraphNode(n)
|
||||
-- end
|
||||
--end)
|
||||
@@ -4,7 +4,7 @@ local shared = asset.require('../satellites_shared')
|
||||
local group = {
|
||||
Title = "Breeze-M Breakup",
|
||||
Url = "http://www.celestrak.com/NORAD/elements/2012-044.txt",
|
||||
TrailColor = { 1.0, 0.98, 0.984 }
|
||||
TrailColor = { 0.0, 0.0, 1.0 }
|
||||
}
|
||||
|
||||
local tle = shared.downloadTLEFile(asset, group.Url, group.Title)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
asset.request('./debris/debris_breezem')
|
||||
asset.request('./debris/debris_asat')
|
||||
--asset.request('./debris/debris_breezem')
|
||||
--asset.request('./debris/debris_fengyun')
|
||||
--asset.request('./debris/debris_iridium33')
|
||||
--asset.request('./debris/debris_kosmos2251')
|
||||
|
||||
@@ -49,7 +49,7 @@ local addSatelliteGroupObjects = function(group, tleFolder, shouldAddDuplicates)
|
||||
return true
|
||||
end
|
||||
|
||||
function debris(title, file)
|
||||
function debris(title, file, color)
|
||||
return {
|
||||
Identifier = title,
|
||||
Parent = transforms.EarthInertial.Identifier,
|
||||
@@ -68,15 +68,16 @@ local addSatelliteGroupObjects = function(group, tleFolder, shouldAddDuplicates)
|
||||
ArgumentOfPeriapsisColumn = "-",
|
||||
MeanAnomalyAtEpochColumn = "-",
|
||||
EpochColumn = "-",
|
||||
|
||||
Color = color
|
||||
},
|
||||
|
||||
GUI = {
|
||||
Path = "/Solar System/Planets/Earth/Satellites"
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
local Debris = debris(filenameSansExt, path)
|
||||
local Debris = debris(filenameSansExt, path, group.TrailColor)
|
||||
assetHelper.registerSceneGraphNodesAndExport(asset, { Debris })
|
||||
|
||||
-- asset.export("satImageFolder", satImageFolder)
|
||||
|
||||
@@ -130,6 +130,11 @@
|
||||
"method includes lines. If the rendering mode is set to Points, this value is "
|
||||
"ignored."
|
||||
};
|
||||
constexpr openspace::properties::Property::PropertyInfo ColorInfo = {
|
||||
"Color",
|
||||
"Color",
|
||||
"Färg."
|
||||
};
|
||||
|
||||
constexpr const char* KeyFile = "Path";
|
||||
constexpr const char* KeyLineNum = "LineNumber";
|
||||
@@ -402,6 +407,12 @@ documentation::Documentation RenderableSatellites::Documentation() {
|
||||
new DoubleVerifier,
|
||||
Optional::Yes,
|
||||
LineWidthInfo.description
|
||||
},
|
||||
{
|
||||
ColorInfo.identifier,
|
||||
new DoubleVector3Verifier,
|
||||
Optional::Yes,
|
||||
ColorInfo.description
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -419,6 +430,7 @@ RenderableSatellites::RenderableSatellites(const ghoul::Dictionary& dictionary)
|
||||
, _argumentOfPeriapsisColumnName(ArgumentOfPeriapsisColumnInfo)
|
||||
, _meanAnomalyAtEpochColumnName(MeanAnomalyAtEpochColumnInfo)
|
||||
, _epochColumnName(EpochColumnInfo)
|
||||
, _color(ColorInfo)
|
||||
{
|
||||
documentation::testSpecificationAndThrow(
|
||||
Documentation(),
|
||||
@@ -446,14 +458,16 @@ RenderableSatellites::RenderableSatellites(const ghoul::Dictionary& dictionary)
|
||||
dictionary.value<std::string>(MeanAnomalyAtEpochColumnInfo.identifier);
|
||||
_epochColumnName =
|
||||
dictionary.value<std::string>(EpochColumnInfo.identifier);
|
||||
|
||||
_color =
|
||||
dictionary.value<glm::vec3>(ColorInfo.identifier);
|
||||
|
||||
|
||||
//_appearance.lineColor = _color;
|
||||
addPropertySubOwner(_appearance);
|
||||
addProperty(_path);
|
||||
addProperty(_nSegments);
|
||||
// addProperty(_semiMajorAxisUnit);
|
||||
|
||||
|
||||
LINFO(fmt::format("KeyFile: {} ", KeyFile));
|
||||
const std::string& file = dictionary.value<std::string>(KeyFile);
|
||||
LINFO(fmt::format("file: {} ", file));
|
||||
|
||||
@@ -689,6 +703,8 @@ void RenderableSatellites::render(const RenderData& data, RendererTasks&) {
|
||||
const size_t orbits = static_cast<GLsizei>(_vertexBufferData.size()) / _nSegments;
|
||||
size_t vertices = 0;
|
||||
|
||||
//glDepthMask(false);
|
||||
//glBlendFunc(GL_SRC_ALPHA, GL_ONE);
|
||||
|
||||
glBindVertexArray(_vertexArray);
|
||||
for (size_t i = 0; i <= orbits; ++i) {
|
||||
|
||||
@@ -116,6 +116,7 @@ namespace openspace {
|
||||
properties::StringProperty _argumentOfPeriapsisColumnName;
|
||||
properties::StringProperty _meanAnomalyAtEpochColumnName;
|
||||
properties::StringProperty _epochColumnName;
|
||||
properties::Vec3Property _color;
|
||||
|
||||
RenderableTrail::Appearance _appearance;
|
||||
|
||||
|
||||
@@ -30,18 +30,19 @@ uniform float opacity = 1.0;
|
||||
|
||||
in vec4 viewSpacePosition;
|
||||
|
||||
in vec3 vs_position;
|
||||
in vec4 vs_position;
|
||||
in vec3 vs_color;
|
||||
in vec2 vs_texcoord;
|
||||
|
||||
Fragment getFragment() {
|
||||
Fragment frag;
|
||||
frag.color = vec4(color, opacity);
|
||||
frag.depth = vs_position.w;
|
||||
frag.gPosition = viewSpacePosition;
|
||||
frag.gNormal = vec4(-viewSpacePosition.xyz, 0);
|
||||
return frag;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -24,24 +24,29 @@
|
||||
|
||||
#version __CONTEXT__
|
||||
|
||||
layout (location = 0) in vec4 vertex_data;
|
||||
//#include "D:\OpenSpace\shaders\PowerScaling\powerScalingMath.hglsl"
|
||||
#include "C:\Users\Jonathan\Documents\exjobb\OpenSpace\shaders\PowerScaling\powerScalingMath.hglsl"
|
||||
|
||||
|
||||
layout(location = 0) in vec4 vertex_data;
|
||||
|
||||
uniform dmat4 modelViewTransform;
|
||||
uniform mat4 projectionTransform;
|
||||
|
||||
out vec4 viewSpacePosition;
|
||||
out vec4 vs_position;
|
||||
|
||||
void main() {
|
||||
dvec4 position = dvec4(vertex_data.xyz, 1.0);
|
||||
float timeOffset = vertex_data.w;
|
||||
|
||||
vec4 position = vec4(vertex_data.xyz, 1.0);
|
||||
viewSpacePosition = vec4(modelViewTransform * position);
|
||||
gl_Position = projectionTransform * viewSpacePosition;
|
||||
vs_position = z_normalization(projectionTransform * viewSpacePosition);
|
||||
//vec4 vs_position = z_normalization(position);
|
||||
gl_Position = vs_position;
|
||||
// float timeOffset = vertex_data.w;
|
||||
//gl_Position = projectionTransform * viewSpacePosition;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user