mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-22 12:59:07 -06:00
New model hierarchy for osiris rex and add try catch in determineTarget in renderablefov
This commit is contained in:
@@ -141,13 +141,8 @@ function preInitialization()
|
||||
-- Load planetary constants
|
||||
openspace.spice.loadKernel("${SPICE}/pck00010.tpc")
|
||||
|
||||
-- openspace.time.setTime("2015-07-08T15:57:45.00")
|
||||
-- openspace.time.setTime("2015-07-12T07:41:00.00")
|
||||
-- openspace.time.setTime("2015-07-12T15:43:00.00")
|
||||
-- openspace.time.setTime("2015-07-12T22:19:20.00")
|
||||
-- openspace.time.setTime("2015-07-13T20:59:00.00")
|
||||
-- openspace.time.setTime("2015-07-14T02:41:55.00")
|
||||
openspace.time.setTime("2018-12-20T22:47:00.00")
|
||||
-- openspace.time.setTime("2018-12-20T22:47:00.00")
|
||||
openspace.time.setTime("2019-05-25T03:57:55.00")
|
||||
openspace.time.setDeltaTime(0)
|
||||
end
|
||||
|
||||
@@ -181,7 +176,7 @@ return {
|
||||
CommonFolder = "common",
|
||||
Camera = {
|
||||
Focus = "OsirisRex",
|
||||
Position = {690952831942.419800, 665640329630.609375, 131488636639.521881},
|
||||
Position = {100, 0, 0},
|
||||
Rotation = {0.668258, -0.089482, 0.589040, 0.445484},
|
||||
},
|
||||
Modules = {
|
||||
|
||||
@@ -12,7 +12,7 @@ return {
|
||||
Body = "OSIRIS-REX",
|
||||
Geometry = {
|
||||
Type = "MultiModelGeometry",
|
||||
GeometryFile = "models/Osiris.obj",
|
||||
GeometryFile = "models/osiris_BASE.obj",
|
||||
Magnification = 0,
|
||||
},
|
||||
Textures = {
|
||||
@@ -53,7 +53,7 @@ return {
|
||||
Body = "OSIRIS-REX",
|
||||
Geometry = {
|
||||
Type = "MultiModelGeometry",
|
||||
GeometryFile = "models/Osiris.obj",
|
||||
GeometryFile = "models/osiris_POLYCAM.obj",
|
||||
Magnification = 0,
|
||||
},
|
||||
Textures = {
|
||||
@@ -70,7 +70,7 @@ return {
|
||||
Transform = {
|
||||
Translation = {
|
||||
Type = "StaticEphemeris",
|
||||
Position = {1, 0, 0},
|
||||
Position = {-2.476, 2.710, 3.364},
|
||||
},
|
||||
Rotation = {
|
||||
Type = "SpiceRotation",
|
||||
@@ -93,7 +93,7 @@ return {
|
||||
Body = "OSIRIS-REX",
|
||||
Geometry = {
|
||||
Type = "MultiModelGeometry",
|
||||
GeometryFile = "models/Osiris.obj",
|
||||
GeometryFile = "models/osiris_REXIS.obj",
|
||||
Magnification = 0,
|
||||
},
|
||||
Textures = {
|
||||
@@ -109,7 +109,7 @@ return {
|
||||
Transform = {
|
||||
Translation = {
|
||||
Type = "StaticEphemeris",
|
||||
Position = {-1, 0, 0},
|
||||
Position = {0, 3.371, 2.712},
|
||||
},
|
||||
Rotation = {
|
||||
Type = "SpiceRotation",
|
||||
@@ -259,4 +259,27 @@ return {
|
||||
},
|
||||
GuiName = "/Solar/OsirisRexPathLocal"
|
||||
},
|
||||
|
||||
-- Comet Dance trail
|
||||
{
|
||||
Name = "OsirisRexAsteroidTrail",
|
||||
Parent = "Bennu2",
|
||||
Renderable = {
|
||||
Type = "RenderableTrail",
|
||||
Body = "OSIRIS-REX",
|
||||
Frame = "GALACTIC",
|
||||
Observer = BENNU_BODY,
|
||||
TropicalOrbitPeriod = 20000.0,
|
||||
EarthOrbitRatio = 2,
|
||||
DayLength = 25,
|
||||
RGB = { 0.9, 0.2, 0.9 },
|
||||
Textures = {
|
||||
Type = "simple",
|
||||
Color = "textures/glare_blue.png"
|
||||
},
|
||||
StartTime = "2016 SEP 8 12:00:00",
|
||||
EndTime = "2023 SEP 24 12:00:00"
|
||||
},
|
||||
GuiName = "OsirisRexAsteroidTrail"
|
||||
},
|
||||
}
|
||||
|
||||
@@ -448,14 +448,22 @@ void RenderableFov::determineTarget() {
|
||||
PerfMeasure("determineTarget");
|
||||
_fovTarget = _potentialTargets[0]; //default;
|
||||
for (int i = 0; i < _potentialTargets.size(); ++i) {
|
||||
_withinFOV = openspace::SpiceManager::ref().isTargetInFieldOfView(
|
||||
_potentialTargets[i],
|
||||
_spacecraft,
|
||||
_instrumentID,
|
||||
SpiceManager::FieldOfViewMethod::Ellipsoid,
|
||||
_aberrationCorrection,
|
||||
_time
|
||||
);
|
||||
try
|
||||
{
|
||||
_withinFOV = openspace::SpiceManager::ref().isTargetInFieldOfView(
|
||||
_potentialTargets[i],
|
||||
_spacecraft,
|
||||
_instrumentID,
|
||||
SpiceManager::FieldOfViewMethod::Ellipsoid,
|
||||
_aberrationCorrection,
|
||||
_time
|
||||
);
|
||||
}
|
||||
catch (const openspace::SpiceManager::SpiceException e)
|
||||
{
|
||||
_withinFOV = false;
|
||||
}
|
||||
|
||||
if (_withinFOV) {
|
||||
_fovTarget = _potentialTargets[i];
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user