mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-09 21:21:19 -06:00
New debris data
This commit is contained in:
committed by
ElonOlsson
parent
1ed3bdadbe
commit
2895df2144
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";
|
||||
@@ -421,6 +426,12 @@ documentation::Documentation RenderableSatellites::Documentation() {
|
||||
new DoubleVerifier,
|
||||
Optional::Yes,
|
||||
LineWidthInfo.description
|
||||
},
|
||||
{
|
||||
ColorInfo.identifier,
|
||||
new DoubleVector3Verifier,
|
||||
Optional::Yes,
|
||||
ColorInfo.description
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -438,6 +449,7 @@ RenderableSatellites::RenderableSatellites(const ghoul::Dictionary& dictionary)
|
||||
, _argumentOfPeriapsisColumnName(ArgumentOfPeriapsisColumnInfo)
|
||||
, _meanAnomalyAtEpochColumnName(MeanAnomalyAtEpochColumnInfo)
|
||||
, _epochColumnName(EpochColumnInfo)
|
||||
, _color(ColorInfo)
|
||||
{
|
||||
documentation::testSpecificationAndThrow(
|
||||
Documentation(),
|
||||
@@ -465,17 +477,23 @@ RenderableSatellites::RenderableSatellites(const ghoul::Dictionary& dictionary)
|
||||
dictionary.value<std::string>(MeanAnomalyAtEpochColumnInfo.identifier);
|
||||
_epochColumnName =
|
||||
dictionary.value<std::string>(EpochColumnInfo.identifier);
|
||||
<<<<<<< HEAD
|
||||
|
||||
// fungerar inte
|
||||
//_appearance.lineColor = glm::vec3(1.f), glm::vec3(0.f), glm::vec3(0.f);
|
||||
|
||||
=======
|
||||
_color =
|
||||
dictionary.value<glm::vec3>(ColorInfo.identifier);
|
||||
|
||||
|
||||
//_appearance.lineColor = _color;
|
||||
>>>>>>> New debris data
|
||||
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));
|
||||
|
||||
@@ -714,6 +732,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;
|
||||
|
||||
|
||||
@@ -29,20 +29,20 @@ uniform vec3 color;
|
||||
uniform float opacity = 1.0;
|
||||
|
||||
in vec4 viewSpacePosition;
|
||||
|
||||
in vec4 vs_position;
|
||||
//in vec3 vs_color;
|
||||
//in vec2 vs_texcoord;
|
||||
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(1, 1, 1 , 0);
|
||||
frag.gNormal = vec4(-viewSpacePosition.xyz, 0);
|
||||
return frag;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -24,9 +24,11 @@
|
||||
|
||||
#version __CONTEXT__
|
||||
|
||||
#include "D:\OpenSpace\shaders\PowerScaling\powerScalingMath.hglsl"
|
||||
//#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;
|
||||
|
||||
layout(location = 0) in vec4 vertex_data;
|
||||
|
||||
uniform dmat4 modelViewTransform;
|
||||
uniform mat4 projectionTransform;
|
||||
@@ -34,17 +36,17 @@ uniform mat4 projectionTransform;
|
||||
out vec4 viewSpacePosition;
|
||||
out vec4 vs_position;
|
||||
|
||||
void main() {
|
||||
|
||||
viewSpacePosition = vec4(modelViewTransform * dvec4(vertex_data.xyz, 1));
|
||||
vs_position = z_normalization( projectionTransform * viewSpacePosition);
|
||||
gl_Position = vs_position;
|
||||
|
||||
void main() {
|
||||
vec4 position = vec4(vertex_data.xyz, 1.0);
|
||||
viewSpacePosition = vec4(modelViewTransform * position);
|
||||
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