mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-29 07:30:07 -06:00
Make L2 co-rot trail turn on/off together with the other JWST trails
This commit is contained in:
@@ -17,6 +17,7 @@ local toggle_trail = {
|
||||
local launchTrail = "JWSTTrailLaunch"
|
||||
local cruiseTrail = "JWSTTrailCruise"
|
||||
local orbitTrail = "JWSTTrailOrbit"
|
||||
local coOrbitTrail = "JWSTTrailCoRotOrbit"
|
||||
|
||||
local visibility
|
||||
if is_declared("args") then
|
||||
@@ -31,7 +32,8 @@ local toggle_trail = {
|
||||
visibility = not (
|
||||
openspace.getPropertyValue("Scene." .. launchTrail .. ".Renderable.Enabled") or
|
||||
openspace.getPropertyValue("Scene." .. cruiseTrail .. ".Renderable.Enabled") or
|
||||
openspace.getPropertyValue("Scene." .. orbitTrail .. ".Renderable.Enabled")
|
||||
openspace.getPropertyValue("Scene." .. orbitTrail .. ".Renderable.Enabled") or
|
||||
openspace.getPropertyValue("Scene." .. coOrbitTrail .. ".Renderable.Enabled")
|
||||
)
|
||||
end
|
||||
|
||||
@@ -47,6 +49,10 @@ local toggle_trail = {
|
||||
"Scene." .. orbitTrail .. ".Renderable.Enabled",
|
||||
visibility
|
||||
)
|
||||
openspace.setPropertyValueSingle(
|
||||
"Scene." .. coOrbitTrail .. ".Renderable.Enabled",
|
||||
visibility
|
||||
)
|
||||
]],
|
||||
Documentation = [[Toggles the visibility of the JWST trail with an
|
||||
approaching/exiting event. This action takes optional arguments to 1) determine which
|
||||
|
||||
@@ -83,6 +83,7 @@ local JWSTTrailCruise = {
|
||||
|
||||
-- Trail of JWST relative to L2 after first month to reach L2
|
||||
-- Gives a better trail history of the orbit around L2 than if it was relative to Earth
|
||||
-- This does NOT co-rotate withe L2 and gives a saddle look of the trail
|
||||
local JWSTTrailOrbit = {
|
||||
Identifier = "JWSTTrailOrbit",
|
||||
Parent = transforms.L2Position.Identifier,
|
||||
@@ -113,6 +114,8 @@ local JWSTTrailOrbit = {
|
||||
}
|
||||
}
|
||||
|
||||
-- Trail of JWST in orbit around L2 that co-rotates with L2 around the Sun
|
||||
-- This gives the trail a look of a wheel going along L2 around the Sun
|
||||
local JWSTTrailCoRotOrbit = {
|
||||
Identifier = "JWSTTrailCoRotOrbit",
|
||||
Parent = transforms.L2CoRotFrame.Identifier,
|
||||
@@ -130,7 +133,7 @@ local JWSTTrailCoRotOrbit = {
|
||||
Frame = 'L2_COROT',
|
||||
Kernels = { kernels .. "webb.bsp" }
|
||||
},
|
||||
Color = { 0.0, 0.9, 0.9 },
|
||||
Color = { 0.9, 0.0, 0.9 },
|
||||
Period = 182.621099, -- About 6 months
|
||||
Resolution = 183 -- About a sample rate of once per day
|
||||
},
|
||||
|
||||
@@ -34,16 +34,12 @@ local L2Position = {
|
||||
}
|
||||
}
|
||||
|
||||
-- This ref. frame co-rotates with L2 and is needed for a more intuitive trail of JWST in
|
||||
-- relation to L2
|
||||
local L2CoRotFrame = {
|
||||
Identifier = "L2CoRotFrame",
|
||||
Parent = transforms.SolarSystemBarycenter.Identifier,
|
||||
Parent = L2Position.Identifier,
|
||||
Transform = {
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = 392, -- L2
|
||||
Observer = "SSB",
|
||||
Kernels = kernels .. "L2_de431.bsp"
|
||||
},
|
||||
Rotation = {
|
||||
Type = "SpiceRotation",
|
||||
SourceFrame = "L2_COROT",
|
||||
|
||||
Reference in New Issue
Block a user