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



local sssb = asset.syncedResource({
  Name = "Small SolarSystem Body Data (Trans-Neptunian Object Asteroid)",
  Type = "HttpSynchronization",
  Identifier = "sssb_data_transneptunian_object_asteroid",
  Version = 3
})


local Object = {
  Identifier = "sssb_transneptunian_object_asteroid",
  Parent = transforms.SunECLIPJ2000.Identifier,
  Renderable = {
    Type = "RenderableOrbitalKepler",
    Path = sssb .. "sssb_data_transneptunian_object_asteroid.csv",
    Format = "SBDB",
    Segments = 200,
    SegmentQuality = 8,
    Color = { 0.56, 0.64, 0.95 },
    TrailFade = 10
  },
  GUI = {
    Name = "Transneptunian Object Asteroids",
    Path = "/Solar System/Small Bodies",
    Description = [[Any minor or dwarf planets in the solar system that orbit the Sun at a
      greater average distance than Neptune (semi-major axis of 30.1 AU).]]
  }
}


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

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

asset.export(Object)



asset.meta = {
  Name = "Trans-Neptunian Asteroids",
  Version = "1.1",
  Description = [[RenderableSmallBody asset with data from from JPL Horizons containing
    the Trans-Neptunian group]],
  Author = [[JPL Small-Body Database hosted by California Institute of
    Technology]],
  URL = "https://ssd.jpl.nasa.gov/sbdb_query.cgi",
  License = [[JPL-authored documents are sponsored by NASA under Contract NAS7-030010. All
    documents available from this server may be protected under the U.S. and Foreign
    Copyright Laws]]
}
