asset.require("spice/base")
local transforms = asset.require("scene/solarsystem/sun/transforms")



local MarsTrail = {
  Identifier = "MarsTrail",
  Parent = transforms.SolarSystemBarycenter.Identifier,
  Renderable = {
    Type = "RenderableTrailOrbit",
    Translation = {
      Type = "SpiceTranslation",
      Target = "MARS",
      Observer = "SSB"
    },
    Color = { 0.814, 0.305, 0.220 },
    Period = 686.973,
    Resolution = 1000
  },
  Tag = { "planetTrail_solarSystem", "planetTrail_terrestrial" },
  GUI = {
    Name = "Mars Trail",
    Path = "/Solar System/Planets/Mars",
    Description = [[Trail of Mars as observed by the Sun. Data from NASA Spice (see
      base spice asset)]]
  }
}


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

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

asset.export(MarsTrail)



asset.meta = {
  Name = "Mars Trail",
  Version = "1.1",
  Description = "Main Mars trail from SPICE",
  Author = "OpenSpace Team",
  URL = "http://openspaceproject.com",
  License = "MIT license"
}
