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



local NeptuneBarycenter = {
  Identifier = "NeptuneBarycenter",
  Parent = transforms.SolarSystemBarycenter.Identifier,
  Transform = {
    Translation = {
      Type = "SpiceTranslation",
      Target = "NEPTUNE BARYCENTER",
      Observer = "SSB"
    }
  },
  GUI = {
    Name = "Neptune Barycenter",
    Path = "/Solar System/Planets/Neptune",
    Hidden = true,
    Description = "Neptune Barycenter position"
  }
}


asset.onInitialize(function()
  openspace.spice.loadKernel(kernel.nep097)

  openspace.addSceneGraphNode(NeptuneBarycenter)
end)

asset.onDeinitialize(function()
  openspace.removeSceneGraphNode(NeptuneBarycenter)

  openspace.spice.unloadKernel(kernel.nep097)
end)

asset.export(NeptuneBarycenter)



asset.meta = {
  Name = "Neptune Transforms",
  Version = "1.1",
  Description = "Neptune Barycenter transform",
  Author = "OpenSpace Team",
  URL = "http://openspaceproject.com",
  License = "MIT license"
}
