local transforms = asset.require("../transforms")
local kernel = asset.require("../kernels").sat375



local TitanTrail = {
  Identifier = "TitanTrail",
  Parent = transforms.SaturnBarycenter.Identifier,
  Renderable = {
    Type = "RenderableTrailOrbit",
    Translation = {
      Type = "SpiceTranslation",
      Target = "TITAN",
      Observer = "SATURN BARYCENTER",
      Kernels = kernel
    },
    Color = { 0.5, 0.3, 0.3 },
    Period = 16.0,
    Resolution = 1000
  },
  Tag = { "moonTrail_solarSystem", "moonTrail_giants", "moonTrail_saturn" },
  GUI = {
    Name = "Titan Trail",
    Path = "/Solar System/Planets/Saturn/Moons/Titan",
    Description = "Trail of Saturn's moon Titan as observed by Saturn",
  }
}

asset.onInitialize(function()
  openspace.addSceneGraphNode(TitanTrail)
end)
  
asset.onDeinitialize(function()
  openspace.removeSceneGraphNode(TitanTrail)
end)
  
asset.export(TitanTrail)



asset.meta = {
  Name = "Titan Trail",
  Version = "1.2",
  Description = "Main trail for Titan. Data from NASA Spice (see base spice asset)",
  Author = "OpenSpace Team",
  URL = "http://openspaceproject.com",
  License = "MIT license"
}
