-- Source:  https://solarsystem.nasa.gov/missions/rosetta-philae/in-depth/

local Mission = {
  Name = "Artemis",
  TimeRange = { Start = "2022 NOV 16 06:47:00", End = "2022 DEC 11 17:40:30" },
  Image = "https://www.nasa.gov/sites/default/files/thumbnails/image/em1_patch_final.png",
  Description = "With Artemis missions, NASA will land the first woman and first person of color on the Moon, using innovative technologies to explore more of the lunar surface than ever before. We will collaborate with commercial and international partners and establish the first long-term presence on the Moon. Then, we will use what we learn on and around the Moon to take the next giant leap: sending the first astronauts to Mars.",
  Milestones = {
    {
      Name = "Mission launch",
      Date = "2022 NOV 16 06:47:44",
      Image = "https://www.nasa.gov/sites/default/files/thumbnails/image/sls_rocket.jpg",
      Description = "Following a successful launch of NASA's Space Launch System (SLS), the most powerful rocket in the world, the agency's Orion spacecraft is on its way to the Moon as part of the Artemis program. Carrying an uncrewed Orion, SLS lifted off for its flight test debut at 1:47 a.m. EST Wednesday from Launch Pad 39B at NASA's Kennedy Space Center in Florida. The launch is the first leg of a mission in which Orion is planned to travel approximately 40,000 miles beyond the Moon and return to Earth over the course of 25.5 days. Known as Artemis I, the mission is a critical part of NASA's Moon to Mars exploration approach, in which the agency explores for the benefit of humanity. It's an important test for the agency before flying astronauts on the Artemis II mission.",
      Link = "https://www.nasa.gov/press-release/liftoff-nasa-s-artemis-i-mega-rocket-launches-orion-to-moon"
    },
    {
      Name = "Closest approach to the Moon",
      Date = "2022 NOV 21 12:57:00",
      Description = "A portion of the far side of the Moon looms large just beyond the Orion spacecraft in this image taken on the sixth day of the Artemis I mission by a camera on the tip of one of Orion's solar arrays. The spacecraft entered the lunar sphere of influence Sunday, Nov. 20, making the Moon, instead of Earth, the main gravitational force acting on the spacecraft. On Monday, Nov. 21, it came within 80 miles of the lunar surface, the closest approach of the uncrewed Artemis I mission, before moving into a distant retrograde orbit around the Moon. The darkest spot visible near the middle of the image is Mare Orientale.",
      Image = "https://blogs.nasa.gov/artemis/wp-content/uploads/sites/303/2022/11/art001e000269-1200x900.jpg",
      Link = "https://blogs.nasa.gov/artemis/2022/11/21/artemis-i-flight-day-six-orion-performs-lunar-flyby-closest-outbound-approach/"
    },
    {
      Name = "Maximum distance from Earth",
      Date = "2022 NOV 28 00:00:00",
      Description = "NASA's uncrewed Orion spacecraft reached a maximum distance of nearly 270,000 miles from Earth during the Artemis I flight test before beginning its journey back toward Earth. Orion captured imagery of the Earth and Moon together from its distant lunar orbit, including this image taken from camera on one of the spacecraft's solar array wings.",
      Image = "https://www.nasa.gov/sites/default/files/thumbnails/image/orion_day_13_advisory.jpg"
    },
    {
      Name = "Orion landing",
      Description = "NASA's Orion spacecraft for the Artemis I mission splashed down in the Pacific Ocean after a 25.5 day mission to the Moon.",
      Image = "https://www.nasa.gov/sites/default/files/thumbnails/image/orion_splashdown_image.jpg",
      Date = "2022 DEC 11 17:40:30"
    }
  },
  Phases = {
    {
      Name = "Launch",
      TimeRange = { Start = "2022 NOV 16 06:47:44", End = "2022 NOV 16 10:09:20" },
    },
    {
      Name = "Outbound coasting phase",
      TimeRange = { Start = "2022 NOV 17 00:00:00", End = "2022 NOV 20 00:00:00" },
      Description = "As Orion continues on its path from Earth orbit to the Moon, it will be propelled by a service module provided by the European Space Agency, which will supply the spacecraft's main propulsion system and power (as well as house air and water for astronauts on future missions). Orion will pass through the Van Allen radiation belts, fly past the Global Positioning System (GPS) satellite constellation and above communication satellites in Earth orbit. To talk with mission control in Houston, Orion will switch from NASA's Tracking and Data Relay Satellites system  and communicate through the Deep Space Network. From here, Orion will continue to demonstrate its unique design to navigate, communicate, and operate in a deep space environment."
    },
    {
      Name = "Lunar orbit",
      TimeRange = { Start = "2022 NOV 21 00:00:00", End = "2022 DEC 04 00:00:00" },
      Phases = {
        {
          Name = "Transit to distant retrograde orbit",
          TimeRange = { Start = "2022 NOV 21 00:00:00", End = "2022 NOV 24 00:00:00" },
        },
        {
          Name = "Distant retrograde orbit",
          TimeRange = { Start = "2022 NOV 25 00:00:00", End = "2022 NOV 30 00:00:00" },
        },
        {
          Name = "Exiting distant retrograde orbit",
          TimeRange = { Start = "2022 DEC 01 00:00:00", End = "2022 DEC 04 00:00:00" },
        }
      }
    },
    {
      Name = "Return transit",
      TimeRange = { Start = "2022 DEC 06 07:29:00", End = "2022 DEC 11 17:40:30" },
    }
  }
}


asset.onInitialize(function()
  openspace.loadMission(Mission)
end)

asset.onDeinitialize(function()
  openspace.unloadMission(Mission.Name)
end)
