mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-22 12:59:07 -06:00
ASAT working
This commit is contained in:
@@ -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,6 +68,7 @@ local addSatelliteGroupObjects = function(group, tleFolder, shouldAddDuplicates)
|
||||
ArgumentOfPeriapsisColumn = "-",
|
||||
MeanAnomalyAtEpochColumn = "-",
|
||||
EpochColumn = "-",
|
||||
Color = color
|
||||
|
||||
},
|
||||
GUI = {
|
||||
@@ -76,7 +77,7 @@ local addSatelliteGroupObjects = function(group, tleFolder, shouldAddDuplicates)
|
||||
}
|
||||
end
|
||||
|
||||
local Debris = debris(filenameSansExt, path)
|
||||
local Debris = debris(filenameSansExt, path, group.TrailColor)
|
||||
assetHelper.registerSceneGraphNodesAndExport(asset, { Debris })
|
||||
|
||||
-- asset.export("satImageFolder", satImageFolder)
|
||||
|
||||
@@ -16,8 +16,8 @@ asset.require('util/webgui')
|
||||
|
||||
--asset.request('customization/globebrowsing')
|
||||
|
||||
asset.request('scene/solarsystem/planets/earth/satellites/satellites_all')
|
||||
-- asset.request('scene/solarsystem/planets/earth/satellites/satellites_debris')
|
||||
-- asset.request('scene/solarsystem/planets/earth/satellites/satellites_all')
|
||||
asset.request('scene/solarsystem/planets/earth/satellites/satellites_debris')
|
||||
|
||||
-- Keybindings that are specific for this scene
|
||||
local Keybindings = {
|
||||
|
||||
@@ -157,7 +157,7 @@ namespace openspace {
|
||||
double maxApogee = 0;
|
||||
double minPerigee = 5000;
|
||||
int intervalDistribution[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
double intervalSegment = 4575.32/10;
|
||||
double intervalSegment = (4575.32 - 171.013)/10; // max - min of total interval span where there is debris
|
||||
for (const auto& dataElement : fileVector){ //(int i=0 ; i < n ; ++i ) {
|
||||
double ph = dataElement.semiMajorAxis * (1 - dataElement.eccentricity)- 6371;
|
||||
double ah = dataElement.semiMajorAxis * (1 + dataElement.eccentricity)- 6371;
|
||||
@@ -168,6 +168,7 @@ namespace openspace {
|
||||
if (ah > maxApogee)
|
||||
maxApogee = ah;
|
||||
|
||||
//Perigee
|
||||
if(ph < (intervalSegment))
|
||||
intervalDistribution[0]++;
|
||||
else if(ph < (intervalSegment*2))
|
||||
@@ -189,6 +190,32 @@ namespace openspace {
|
||||
else if(ph < (intervalSegment*10))
|
||||
intervalDistribution[9]++;
|
||||
|
||||
// Position
|
||||
// currentAltitud = sqrt( dataelement position.x ^ 2 + dataelement position.y ^ 2 + dataelement position.z ^ 2 );
|
||||
// if (currentAltitud <= (171.013 + intervalSegment))
|
||||
// intervalDistribution[0]++;
|
||||
// else if (currentAltitud <= (171.013 + 2*intervalSegment))
|
||||
// intervalDistribution[1]++;
|
||||
// else if (currentAltitud <= (171.013 + 3*intervalSegment))
|
||||
// intervalDistribution[2]++;
|
||||
// else if (currentAltitud <= (171.013 + 4*intervalSegment))
|
||||
// intervalDistribution[3]++;
|
||||
// else if (currentAltitud <= (171.013 + 5*intervalSegment))
|
||||
// intervalDistribution[4]++;
|
||||
// else if (currentAltitud <= (171.013 + 6*intervalSegment))
|
||||
// intervalDistribution[5]++;
|
||||
// else if (currentAltitud <= (171.013 + 7*intervalSegment))
|
||||
// intervalDistribution[6]++;
|
||||
// else if (currentAltitud <= (171.013 + 8*intervalSegment))
|
||||
// intervalDistribution[7]++;
|
||||
// else if (currentAltitud <= (171.013 + 9*intervalSegment))
|
||||
// intervalDistribution[8]++;
|
||||
// else if (currentAltitud <= (171.013 + 10*intervalSegment))
|
||||
// intervalDistribution[9]++;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
LINFO(fmt::format("fileVector.size: {} ", fileVector.size()));
|
||||
LINFO(fmt::format("Interval Distrubution 10% of max apogee: {} ", (intervalDistribution[0])));
|
||||
|
||||
Reference in New Issue
Block a user