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

local PARSEC_CONSTANT = 3.0856776E16;

local NebulaPosition = {
  Identifier = "NebulaPosition",
  Parent = sunTransforms.SolarSystemBarycenter.Identifier,
  Transform = {
    Translation = {
      Type = "StaticTranslation",
      Position = {
        -329.915 * PARSEC_CONSTANT,
        -183.153 * PARSEC_CONSTANT,
        -132.706 * PARSEC_CONSTANT
      }
    },
  },
  GUI = {
    Name = "Orion Nebula Position",
    Path = "/Milky Way/Orion",
    Hidden = true,
    Description = "Static position for Orion Nebula"
  }
}

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



asset.meta = {
  Name = "Orion Nebula Transforms",
  Version = "1.0",
  Description = [[This asset contains the position of the Orion Nebula. Generally you
    would not include this asset as other assets would include it]],
  Author = "Brian Abbott (AMNH)",
  URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
  License = "AMNH Digital Universe"
}
