local jupiterTransforms = asset.require('scene/solarsystem/planets/jupiter/transforms')
local kernels = asset.require('../kernels')


local JuiceTrailJupiter = {
  Identifier = "JuiceTrailJupiter",
  Parent = jupiterTransforms.JupiterBarycenter.Identifier,
  Renderable = {
    Type = "RenderableTrailTrajectory",
    Translation = {
      Type = "SpiceTranslation",
      Target = "JUICE",
      Observer = "JUPITER BARYCENTER",
      Kernels = kernels.Kernels
    },
    Color = { 0.70, 0.370, 0.45 },
    StartTime = "2031 JUL 02 00:00:00.000",
    EndTime = "2035 OCT 05 00:00:00.000",
    SampleInterval = 3600
  },
  GUI = {
    Name = "Juice Trail (Jupiter)",
    Path = "/Solar System/Missions/Juice",
    Description = "Juice's trajectory relative to Jupiter"
  }
}


asset.onInitialize(function()
  openspace.addSceneGraphNode(JuiceTrailJupiter)
end)

asset.onDeinitialize(function()
  openspace.removeSceneGraphNode(JuiceTrailJupiter)
end)

asset.export(JuiceTrailJupiter)


asset.meta = {
  Name = "Juice trajectory relative to Jupiter",
  Version = "1.0",
  Description = [[
    The trajectory of the Juice spacecraft relative to Jupiter
  ]],
  Author = "OpenSpace Team",
  URL = "http://openspaceproject.com",
  License = "MIT license"
}
