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

local layer = {
  Identifier = "Mars_MGS_MOLA_ClrShade_merge_global_463m",
  Name = [[MGS MOLA, Global Color Hillshade]],
  FilePath = asset.localResource("Mars_MGS_MOLA_ClrShade_merge_global_463m.vrt"),
  Description = [[This data was acquired using the Mars Orbiter Laser Altimeter instrument aboard NASA's Mars Global Surveyor spacecraft (MGS). MGS was launched on November 7, 1996 and arrived at Mars on September 11, 1997. It maintained a circular polar orbit, completing an orbital revolution every 117.65 minutes at an average altitude of 378 km (235 mi). Until November 2, 2006, MGS characterized and mapped Mars' surface features, properties, topography, composition, and processes, as well as studied Mars' weather and atmospheric structure.

The Mars Orbiter Laser Altimeter (MOLA) made precise measurements of the heights and depths of surface features on Mars. MOLA fired infrared laser pulses downward 10 times per second, and measured the time it took for the reflected pulses to return from the surface. Converting this data to a colorized hillshade makes it particularly easy to visualize surface topography. The image used for the base of this map represents more than 600 million measurements gathered between 1999 and 2001. The average accuracy of each point is originally ~100 meters in horizontal position and the total elevation uncertainty is at least Â±3 m.]]
}
  
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 Color Hillshade]],
  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=Mars_MGS_MOLA_ClrShade_merge_global_463m%2Ctrue%2C1&b=mars&e=-180.0%2C-90.0%2C180.0%2C90.0&sfv=&w=",
  License = "NASA/Treks",
  Description = [[MGS MOLA, Global Color Hillshade layer from NASA/Treks for Mars]]
}
