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

local layer = {
  Identifier = "mola_roughness",
  Name = [[MGS MOLA, Global Surface Roughness]],
  FilePath = asset.localResource("mola_roughness.vrt"),
  Description = [[The Mars Orbiter Laser Altimeter (MOLA) aboard the Mars Global Surveyor (MGS) spacecraft, made precise altimetry measurements from orbit around Mars from September 1997 to June, 2001. The MOLA instrument transmitted infrared laser pulses towards Mars at a rate of 10 times per second, and measured the time of flight to determine the range (distance) of the MGS spacecraft to the Martian surface. The range measurements resulted in precise topographic maps of Mars. This kilometer-scale global roughness map is presented as an RGB composite image. The Blue, Green and Red channels contain roughness at 0.6 km, 2.4 km, and 9.2 km baselines. Brighter shades denote rougher surface. Thus, general brightness denotes general roughness, and color hue denotes the nature of the scale dependence of roughness. Map resolution/scale: 8 ppd/7.5km. Kreslavsky and Head, 2000, JGR, VOL. 105, NO. Ell, PAGES 26,695-26,711]]
}
  
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 MOLA, Global Surface Roughness]],
  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=mola_roughness%2Ctrue%2C1&b=mars&e=-180.0%2C-90.0%2C180.0%2C90.0&sfv=&w=",
  License = "NASA/Treks",
  Description = [[MGS MOLA, Global Surface Roughness layer from NASA/Treks for Mars]]
}
