diff --git a/data/scene/osirisrex.scene b/data/scene/osirisrex.scene index ba42cfe1e8..65d1e13774 100644 --- a/data/scene/osirisrex.scene +++ b/data/scene/osirisrex.scene @@ -10,8 +10,6 @@ function preInitialization() critical objects. ]]-- - dofile(openspace.absPath('${SCRIPTS}/bind_keys.lua')) - -- Load Spice Kernels openspace.spice.loadKernel("${OPENSPACE_DATA}/spice/de430_1850-2150.bsp") @@ -142,6 +140,9 @@ function preInitialization() -- Load planetary constants openspace.spice.loadKernel("${SPICE}/pck00010.tpc") + dofile(openspace.absPath('${SCRIPTS}/bind_keys.lua')) + dofile(openspace.absPath('${SCRIPTS}/bind_keys_osirisrex.lua')) + -- openspace.time.setTime("2018-12-20T22:47:00.00") --openspace.time.setTime("2019-05-25T03:57:55.00") --openspace.time.setTime("2016 SEP 8 23:05:00.50") diff --git a/scripts/bind_keys_osirisrex.lua b/scripts/bind_keys_osirisrex.lua new file mode 100644 index 0000000000..14dce2872a --- /dev/null +++ b/scripts/bind_keys_osirisrex.lua @@ -0,0 +1,31 @@ +--[[ OpenSpace keybinding script ]]-- + +-- Load the common helper functions +dofile(openspace.absPath('${SCRIPTS}/common.lua')) + +--openspace.clearKeys() +helper.setCommonKeys() + +-- Set focuses +openspace.bindKey("o", "openspace.setPropertyValue('Interaction.origin', 'OsirisRex')") +openspace.bindKey("b", "openspace.setPropertyValue('Interaction.origin', 'Bennu2')") + + +-- Quickfix backjumps in Osiris rex +openspace.bindKey("F6" , "openspace.printInfo('Set time: Launch'); openspace.time.setTime('2016 SEP 08 23:05:00');") +openspace.bindKey("F7" , "openspace.printInfo('Set time: Gravity Assist'); openspace.time.setTime('2017 SEP 22 15:00:00');") +openspace.bindKey("F8" , "openspace.printInfo('Set time: Approach'); openspace.time.setTime('2018-SEP-11 21:31:01.183');") +openspace.bindKey("F9" , "openspace.printInfo('Set time: Preliminary Survey'); openspace.time.setTime('2018-NOV-20 01:13:12.183');") +openspace.bindKey("F10", "openspace.printInfo('Set time: Orbital B'); openspace.time.setTime('2019-APR-08 10:35:27.186');") +openspace.bindKey("F11", "openspace.printInfo('Set time: Recon'); openspace.time.setTime('2019-MAY-25 03:50:31.195');") +-- OBS!! Avoid key F12 +-- Pressing F12 triggers a breakpoint on AMNH Windows machine, with with the following stack trace: +-- ntdll.dll!DbgBreakPoint() +-- ntdll.dll!DbgUiRemoteBreakin() +-- kernel32.dll!BaseThreadInitThunk() +-- ntdll.dll!RtUserThreadStart() + +openspace.bindKey("q", helper.property.invert('SunMarker.renderable.enabled')) +openspace.bindKey("e", helper.property.invert('EarthMarker.renderable.enabled')) + +openspace.bindKey("c", "openspace.parallel.setAddress('130.236.142.51');openspace.parallel.setPassword('osiris2016');openspace.parallel.connect();")