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



local MercuryTrailEarth = {
  Identifier = "MercuryTrailEarth",
  Parent = earthTransforms.EarthBarycenter.Identifier,
  Renderable = {
    Type = "RenderableTrailOrbit",
    Translation = {
      Type = "SpiceTranslation",
      Target = "MERCURY",
      Observer = "EARTH"
    },
    Color = { 1.0, 0.5, 0.2 },
    Period = 224.695,
    Resolution = 1000,
    Enabled = false
  },
  Tag = { "planetTrail_solarSystem_alt", "planetTrail_terrestrial_alt" },
  GUI = {
    Name = "Mercury trail from Earth",
    Path = "/Solar System/Planets/Mercury",
    Description = "Trail of Mercury as observed by the Earth"
  }
}


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

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

asset.export(MercuryTrailEarth)



asset.meta = {
  Name = "Mercury Trail from Earth",
  Version = "1.1",
  Description = [[Alternate trail of Mercury, as observed by the Earth rather then the
    Sun]],
  Author = "OpenSpace Team",
  URL = "http://openspaceproject.com",
  License = "MIT license"
}
