--insight/shortcuts.asset

local InsightEntryTime = "2018 NOV 26 19:39:03.68"

local insightNavigationState = [[
{
  Anchor = "Insight",
  Pitch = 0.0000567457,
  Position = { 12.40506, -13.69270, -2.423553 },
  ReferenceFrame = "Root",
  Up = { 0.441211, 0.247019, 0.862737 },
  Yaw = -0.0000446853
}
]]

local Shortcuts = {
  {
    Command = [[
      openspace.setPropertyValueSingle("Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset", -469.300000)
      openspace.setPropertyValueSingle("Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Settings.Offset", -470.800006)
    ]],
    Documentation = "Enable Insight landing height layer offset",
    Name = "Insight Height Offset",
    GuiPath = "/Missions/Insight",
    Local = false
  },
  {
    Command = [[
      openspace.setPropertyValueSingle("Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset", 0)
      openspace.setPropertyValueSingle("Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Settings.Offset", 0)
    ]],
    Documentation = "Disable Insight landing height layer offset",
    Name = "Default Height Offset",
    GuiPath = "/Missions/Insight",
    Local = false
  },
  {
    Command = [[
      openspace.setPropertyValueSingle("Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Enabled", true)
      openspace.setPropertyValueSingle("Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISELS.Enabled", true)
    ]],
    Documentation = "Enables HiRISE layer for insight landing",
    Name = "Enable HiRISE",
    GuiPath = "/Missions/Insight",
    Local = false
  },
  {
    Command = [[
      openspace.setPropertyValueSingle("Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Enabled", false)
      openspace.setPropertyValueSingle("Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISELS.Enabled", false)
    ]],
    Documentation = "Disables HiRISE layer used for insight landing",
    Name = "Disable HiRISE",
    GuiPath = "/Missions/Insight",
    Local = false
  },
  {
    Command = "openspace.navigation.setNavigationState(" .. insightNavigationState .. ")",
    Documentation = "Change the camera state for the start of Insight EDL",
    Name = "Insight EDL NavigationState",
    GuiPath = "/Missions/Insight",
    Local = false
  },
  {
    Command = [[
      openspace.time.setPause(true)
      openspace.time.setTime("]] .. InsightEntryTime .. [[")
    ]],
    Documentation = "Change the time for the start of Insight EDL",
    Name = "Insight EDL Time",
    GuiPath = "/Missions/Insight",
    Local = false
  }
}

asset.export("Shortcuts", Shortcuts)
