local globe = asset.require("../../earth")



local Name = "Polar Orbiting: NOAA Satellite Tracks"
local Identifier = "noaa-sos-atmosphere-noaa_sat-tracks"
local Description = [[NOAA has four POES, Polar Operational Environmental Satellites,
currently in orbit. The satellites are named chronologically, based on launch date. NOAA
15 was launched in 1998, NOAA 16 was launched in 2000, NOAA 17 was launched in 2002 and
NOAA 18 was launched in 2005. In May and August of 2007 two older satellites, NOAA 14 and
NOAA 12 respectively, were decommissioned. These satellites orbit the Earth in such a way
that they pass over the poles. Each orbit takes approximately 102.1 minutes, allowing the
satellites to circle the Earth about 14.1 times each day. The polar orbit enables the
satellites to collect daily global data for land, ocean, and atmospheric applications.
This data is used a large variety of environmental monitoring applications such as
weather analysis and forecasting, climate research and prediction, global sea surface
temperature measurements, ocean dynamics research, global vegetation analysis and many
other applications]]
local URL = "https://sos.noaa.gov/catalog/datasets/polar-orbiting-noaa-satellite-tracks/"


local syncedDirectory = asset.syncedResource({
  Name = Name,
  Type = "HttpSynchronization",
  Identifier = Identifier,
  Version = 1
})


local Layer = {
  Identifier = Identifier,
  Name = Name,
  Enabled = asset.enabled,
  FilePath = syncedDirectory .. "4096.jpg",
  Description = Description
}


asset.onInitialize(function()
  openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", Layer)
end)

asset.onDeinitialize(function()
  openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", Layer)
end)

asset.export(Layer)



asset.meta = {
  Name = Name,
  Version = "1.0",
  Description = Description .. "Data provided by the National Oceanic and Atmospheric Administration",
  Author = "National Oceanic and Atmospheric Administration",
  URL = URL,
  License = "https://sos.noaa.gov/copyright/"
}
