local globeIdentifier = asset.require("scene/solarsystem//planets/mars/mars").Mars.Identifier

local layer = {
  Identifier = "tes_ruffdust",
  Name = [[MGS TES, Global Dust Index]],
  FilePath = asset.localResource("tes_ruffdust.vrt"),
  Description = [[The Thermal Emission Spectrometer (TES) is one of the instruments aboard the Mars Global Surveyor spacecraft. TES is designed to measure the thermal infrared energy (heat) emitted from Mars. This technique, called thermal emission spectroscopy, can tell us much about the geology and atmosphere of Mars. Dust is widespread and abundant across the surface of Mars. However, in the wind-blown environment of Mars, dust accumulates tickly in some areas and is blown clear of other areas. Thick accumulations of dust mask the underlying surface, making measurements of surface composition from orbit difficult or even impossible. Preferred landing site candidates will ideally be relatively dust free. An index of the relative abundance of spectrally obscuring dust across the Martian surface was developed using data from TES. While closely correlated with albedo, the TES dust cover index (DCI) is a more direct metric for the presence or absence of dust on a particular surface and is independent of albedo. This becomes important for the types of light-toned layered deposits and surfaces that likely will be among the candidates for future landing sites. Map resolution/scale: 16ppd/3.5km. Ruff and Christensen, 2002, JGR, VOL. 107, NO. E12, 5127]]
}
  
asset.onInitialize(function()
  openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer)
end)
  
asset.onDeinitialize(function()
  openspace.globebrowsing.deleteLayer(globeIdentifier, "ColorLayers", layer.Identifier)
end)
  
asset.export("layer", layer)


asset.meta = {
  Name = [[MGS TES, Global Dust Index]],
  Version = "1.0",
  Author = "NASA/Treks",
  URL = "https://trek.nasa.gov/mars/#v=0.1&x=0&y=0&z=1&p=urn:ogc:def:crs:EPSG::104905&d=&l=tes_ruffdust%2Ctrue%2C1&b=mars&e=-180.0%2C-90.0%2C180.0%2C90.0&sfv=&w=",
  License = "NASA/Treks",
  Description = [[MGS TES, Global Dust Index layer from NASA/Treks for Mars]]
}
