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

local sssb = asset.syncedResource({
  Name = "Small SolarSystem Body Data (Chiron-type Comet)",
  Type = "HttpSynchronization",
  Identifier = "sssb_data_chiron-type_comet",
  Version = 1
})

local object = {
  Identifier = "sssb_chiron-type_comet",
  Parent = transforms.SunECLIPJ2000.Identifier,
  Renderable = {
    Type = "RenderableOrbitalKepler",
    Path = sssb .. "sssb_data_chiron-type_comet.csv",
    Format = "SBDB",
    Segments = 200,
    SegmentQuality = 10,
    Color = { 0.15, 0.1, 1.0 },
    TrailFade = 25
  },
  GUI = {
    Name = "Chiron-type Comets",
    Path = "/Solar System/Small Bodies",
    Description = [[Comets with a Tisserand's parameter with respect to Jupiter of
      greater than 3 and a semi-major axis greater than that of Jupiter.]]
  }
}

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



asset.meta = {
  Name = "Chiron-Type Comets",
  Version = "1.1",
  Description = [[RenderableSmallBody asset with data from from JPL Horizons containing
    the Chiron-Type 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]]
}
