Solve conflict in scripts/common.lua

This commit is contained in:
kalbl
2016-10-11 17:51:57 +02:00
152 changed files with 9806 additions and 3214 deletions

View File

@@ -30,6 +30,8 @@
#include <ghoul/misc/assert.h>
#include <ghoul/opengl/ghoul_gl.h>
#include <thread>
#include <sgct.h>
#include <chrono>

View File

@@ -4,12 +4,14 @@ return {
Name = "EarthBarycenter",
Parent = "SolarSystemBarycenter",
Static = true,
Ephemeris = {
Type = "Spice",
Body = "EARTH BARYCENTER",
Observer = "SUN",
Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp"
},
Transform = {
Translation = {
Type = "Spice",
Body = "EARTH BARYCENTER",
Observer = "SUN",
Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp"
},
}
},
-- Earth module
{

View File

@@ -31,7 +31,7 @@ return {
},
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "EARTH",
Observer = "SUN",
Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp"

View File

@@ -24,7 +24,7 @@ return {
},
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "CALLISTO",
Observer = "JUPITER BARYCENTER",
Kernels = "${OPENSPACE_DATA}/spice/jup260.bsp"

View File

@@ -24,7 +24,7 @@ return {
},
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "EUROPA",
Observer = "JUPITER BARYCENTER",
Kernels = "${OPENSPACE_DATA}/spice/jup260.bsp"

View File

@@ -24,7 +24,7 @@ return {
},
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "GANYMEDE",
Observer = "JUPITER BARYCENTER",
Kernels = "${OPENSPACE_DATA}/spice/jup260.bsp"

View File

@@ -24,7 +24,7 @@ return {
},
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "IO",
Observer = "JUPITER BARYCENTER",
Kernels = "${OPENSPACE_DATA}/spice/jup260.bsp"

View File

@@ -5,7 +5,7 @@ return {
Parent = "SolarSystemBarycenter",
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "JUPITER BARYCENTER",
Observer = "SUN",
Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp"
@@ -37,7 +37,7 @@ return {
},
Transform = {
Translation = {
Type = "StaticEphemeris",
Type = "StaticTranslation",
Position = {0, 0, 0}, -- jupiter is at its barycenter
},
Rotation = {

View File

@@ -6,7 +6,7 @@ return {
Parent = "SolarSystemBarycenter",
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "EARTH",
Observer = "SUN",
Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp"

View File

@@ -6,7 +6,7 @@ return {
Parent = "SolarSystemBarycenter",
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "MARS BARYCENTER",
Observer = "SUN",
Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp"

View File

@@ -5,7 +5,7 @@ return {
Parent = "SolarSystemBarycenter",
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "MERCURY",
Observer = "SUN",
Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp"

View File

@@ -5,7 +5,7 @@ return {
Parent = "EarthBarycenter",
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "MOON",
Observer = "EARTH BARYCENTER",
Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp"

View File

@@ -29,7 +29,7 @@ return {
},
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "MARS BARYCENTER",
Observer = "SUN",
Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp"

View File

@@ -29,7 +29,7 @@ return {
},
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "MERCURY",
Observer = "SUN",
Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp"

View File

@@ -30,7 +30,7 @@ return {
},
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "MOON",
Observer = "EARTH BARYCENTER",
Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp"

View File

@@ -39,7 +39,7 @@ return {
},
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "CALLISTO",
Observer = "JUPITER BARYCENTER",
Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp"
@@ -70,7 +70,7 @@ return {
]]
Transform = {
Translation = {
Type = "StaticEphemeris",
Type = "StaticTranslation",
Position = {0, -10000000, 0}
},
},

View File

@@ -39,7 +39,7 @@ return {
},
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "EUROPA",
Observer = "JUPITER BARYCENTER",
Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp"
@@ -70,7 +70,7 @@ return {
]]
Transform = {
Translation = {
Type = "StaticEphemeris",
Type = "StaticTranslation",
Position = {0, -10000000, 0}
},
},

View File

@@ -39,7 +39,7 @@ return {
},
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "GANYMEDE",
Observer = "JUPITER BARYCENTER",
Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp"
@@ -64,7 +64,7 @@ return {
},
Transform = {
Translation = {
Type = "StaticEphemeris",
Type = "StaticTranslation",
Position = {0, -10000000, 0}
},
},

View File

@@ -39,7 +39,7 @@ return {
},
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "IO",
Observer = "JUPITER BARYCENTER",
Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp"
@@ -80,7 +80,7 @@ return {
},
Transform = {
Translation = {
Type = "StaticEphemeris",
Type = "StaticTranslation",
Position = {0, -10000000, 0}
},
},

View File

@@ -5,7 +5,7 @@ return {
Parent = "SolarSystemBarycenter",
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "JUPITER BARYCENTER",
Observer = "SUN",
Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp"
@@ -108,7 +108,7 @@ return {
},
Transform = {
Translation = {
Type = "StaticEphemeris",
Type = "StaticTranslation",
Position = {0, -100000000, 0}
},
},

View File

@@ -104,7 +104,7 @@ return {
},
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "NEW HORIZONS",
Observer = "SUN",
Kernels = NewHorizonsKernels

View File

@@ -58,7 +58,7 @@ return {
},
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "CHARON",
Observer = "PLUTO BARYCENTER",
Kernels = NewHorizonsKernels
@@ -83,7 +83,7 @@ return {
},
Transform = {
Translation = {
Type = "StaticEphemeris",
Type = "StaticTranslation",
Position = {0, -1000000, 0}
},
},

View File

@@ -29,7 +29,7 @@ return {
},
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "HYDRA",
Observer = "PLUTO BARYCENTER",
Kernels = NewHorizonsKernels
@@ -53,7 +53,7 @@ return {
},
Transform = {
Translation = {
Type = "StaticEphemeris",
Type = "StaticTranslation",
Position = {1000000, 0, 1000000},
},
},

View File

@@ -29,7 +29,7 @@ return {
},
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "KERBEROS",
Observer = "PLUTO BARYCENTER",
Kernels = NewHorizonsKernels
@@ -53,7 +53,7 @@ return {
},
Transform = {
Translation = {
Type = "StaticEphemeris",
Type = "StaticTranslation",
Position = {1000000, 0, 1000000},
},
},

View File

@@ -29,7 +29,7 @@ return {
},
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "NIX",
Observer = "PLUTO BARYCENTER",
Kernels = NewHorizonsKernels

View File

@@ -23,7 +23,7 @@ return {
Parent = "SolarSystemBarycenter",
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "PLUTO BARYCENTER",
Observer = "SUN",
Kernels = NewHorizonsKernels
@@ -157,7 +157,7 @@ return {
},
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "PLUTO",
Observer = "PLUTO BARYCENTER",
Kernels = NewHorizonsKernels
@@ -197,7 +197,7 @@ return {
},
Transform = {
Translation = {
Type = "StaticEphemeris",
Type = "StaticTranslation",
Position = {0, -2000000, 0}
},
},
@@ -215,7 +215,7 @@ return {
},
Transform = {
Translation = {
Type = "StaticEphemeris",
Type = "StaticTranslation",
Position = {0, -4000000, 0}
},
},

View File

@@ -29,7 +29,7 @@ return {
},
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "STYX",
Observer = "PLUTO BARYCENTER",
Kernels = NewHorizonsKernels
@@ -54,7 +54,7 @@ return {
},
Transform = {
Translation = {
Type = "StaticEphemeris",
Type = "StaticTranslation",
Position = {1000000, 0, 1000000}
},
},

View File

@@ -0,0 +1,233 @@
-- TextureResolution = "low"
TextureResolution = "med"
-- TextureResolution = "high"
local startTime = "2016 SEP 8 23:05:00.50"
function preInitialization()
--[[
The scripts in this function are executed after the scene is loaded but before the
scene elements have been initialized, thus they should be used to set the time at
which the scene should start and other settings that might determine initialization
critical objects.
]]--
-- Load Spice Kernels
openspace.spice.loadKernel("${OPENSPACE_DATA}/spice/de430_1850-2150.bsp")
-- background
-- SCLK kernels needs to be loaded before CK kernels (and generally first)
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/background/sclk/ORX_SCLKSCET.00000.tsc")
-- This cannot be loaded correctly for some reason!
--openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/background/dsk/RQ36mod.oct12_CCv0001.bds")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/background/fk/orx_v04.tf")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/background/ik/orx_lidar_v00.ti")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/background/ik/orx_ocams_v03.ti")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/background/ik/orx_otes_v00.ti")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/background/ik/orx_rexis_v00.ti")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/background/ik/orx_struct_v00.ti")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/background/ik/orx_navcam_v00.ti")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/background/ik/orx_ola_v00.ti")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/background/ik/orx_ovirs_v00.ti")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/background/ik/orx_stowcam_v00.ti")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/background/lsk/naif0011.tls")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/background/pck/bennu_SPH250m.tpc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/background/pck/bennu_v10.tpc")
-- Low res SPK
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/background/spk/orx_160917_231024_pgaa3_day15m60_v1.bsp")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/background/spk/orx_160914_231024_pgaa3_day12m60_v1.bsp")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/background/spk/orx_160908_231024_pgaa3_day06m60_v1.bsp")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/background/spk/spk_orx_160908_231024_pgaa2_day06m60_v3.bsp")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/background/spk/orx_160908_231024_pgaa2_day06m60.bsp")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/background/spk/OREX_20160908_M60_complete.bsp")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/background/spk/OREX_20160904_M45_complete.bsp")
-- SPK
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/background/spk/de421.bsp")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/background/spk/sb-101955-76.bsp")
-- Nominal_Profile_LowRes
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Profile_LowRes/Approach_600s_20180816T230000_20181119T010000.bsp")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Profile_LowRes/Approach_NominalProfile_600s_20180816T230000_20181119T010000.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Profile_LowRes/DetailedSurvey_600s_20190108T000000_20190317T000000.bsp")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Profile_LowRes/DetailedSurvey_NominalProfile_600s_20190108T000000_20190317T000000.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Profile_LowRes/OrbitalA_600s_20181203T230000_20190109T000000.bsp")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Profile_LowRes/OrbitalA_NominalProfile_600s_20181203T230000_20190109T000000.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Profile_LowRes/OrbitalB_600s_20190316T000000_20190521T000000.bsp")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Profile_LowRes/OrbitalB_NominalProfile600s_20190316T000000_20190521T000000.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Profile_LowRes/PrelimSurvey_600s_20181119T230000_20181204T010000.bsp")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Profile_LowRes/PrelimSurvey_NominalProfile_600s_20181119T230000_20181204T010000.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Profile_LowRes/Recon_600s_20190519T000000_20190830T000000.bsp")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Profile_LowRes/Recon_NominalProfile_600s_20190519T000000_20190830T000000.bc")
-- Nominal_Observations_Science
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/03_Approach/DustSearch_v1/Phase03_AP_DustSearch_1.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/03_Approach/LightCurve_v1/Phase03_AP_LightCurve_1.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/03_Approach/LightCurve_v1/Phase03_AP_LightCurve_2.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/03_Approach/NatSatSearch_v1/Phase03_AP_SatSearch_1.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/03_Approach/NatSatSearch_v1/Phase03_AP_SatSearch_2.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/03_Approach/PhaseFunction_v1/Phase03_AP_PhaseFunction_1.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/03_Approach/ShapeModel_v1/Phase03_AP_ShapeModel_1.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/03_Approach/ShapeModel_v1/Phase03_AP_ShapeModel_2.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/03_Approach/ShapeModel_v1/Phase03_AP_ShapeModel_3.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/03_Approach/ShapeModel_v1/Phase03_AP_ShapeModel_4.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/03_Approach/ShapeModel_v1/Phase03_AP_ShapeModel_5.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/03_Approach/ShapeModel_v1/Phase03_AP_ShapeModel_6.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/03_Approach/ShapeModel_v1/Phase03_AP_ShapeModel_7.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/03_Approach/ShapeModel_v1/Phase03_AP_ShapeModel_8.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/03_Approach/ShapeModel_v1/Phase03_AP_ShapeModel_9_Forced4x4.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/03_Approach/SpectraMap_v1/Phase03_AP_SpectraMap_1.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/04_PrelimSurvey/MapCamOLA_v1/Phase04_PS_MC_1_v1_1a.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/04_PrelimSurvey/MapCamOLA_v1/Phase04_PS_MC_2_v1_1a.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/04_PrelimSurvey/OLA_v1/Phase04_PS_OLA_Nominal_1.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/04_PrelimSurvey/OLA_v1/Phase04_PS_OLA_Nominal_2.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/04_PrelimSurvey/OLA_v1/Phase04_PS_OLA_Nominal_3.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/04_PrelimSurvey/OLA_v1/Phase04_PS_OLA_Nominal_4.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/04_PrelimSurvey/PolyCam_v1/Phase04_PS_PolyCam_1.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/04_PrelimSurvey/PolyCam_v1/Phase04_PS_PolyCam_2.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/04_PrelimSurvey/PolyCam_v1/Phase04_PS_PolyCam_3.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/04_PrelimSurvey/PolyCam_v1/Phase04_PS_PolyCam_4.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/04_PrelimSurvey/PolyCam_v1/Phase04_PS_PolyCam_5.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/04_PrelimSurvey/PolyCam_v1/Phase04_PS_PolyCam_6.bc")
--openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/06_DetailedSurvey/BaseballDiamond_v2/atl_19013_18_BBD1_info.TXT")
--openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/06_DetailedSurvey/BaseballDiamond_v2/atl_19014_16_BBD2_info.TXT")
--openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/06_DetailedSurvey/BaseballDiamond_v2/atl_19020_18_BBD3_info.TXT")
--openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/06_DetailedSurvey/BaseballDiamond_v2/atl_19021_19_BBD4_info.TXT")
--openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/06_DetailedSurvey/BaseballDiamond_v2/README.txt")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/06_DetailedSurvey/BaseballDiamond_v2/atl_19013_18_BBD1_v2.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/06_DetailedSurvey/BaseballDiamond_v2/atl_19014_16_BBD2_v2.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/06_DetailedSurvey/BaseballDiamond_v2/atl_19020_18_BBD3_v2.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/06_DetailedSurvey/BaseballDiamond_v2/atl_19021_19_BBD4_v2.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/06_DetailedSurvey/EquatorialStations_v1/Phase06_DS_Equatorial_Stations_1.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/06_DetailedSurvey/EquatorialStations_v1/Phase06_DS_Equatorial_Stations_2.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/06_DetailedSurvey/EquatorialStations_v1/Phase06_DS_Equatorial_Stations_3.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/06_DetailedSurvey/EquatorialStations_v1/Phase06_DS_Equatorial_Stations_4.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/06_DetailedSurvey/EquatorialStations_v1/Phase06_DS_Equatorial_Stations_5.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/06_DetailedSurvey/EquatorialStations_v1/Phase06_DS_Equatorial_Stations_6.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/06_DetailedSurvey/EquatorialStations_v1/Phase06_DS_Equatorial_Stations_7.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/06_DetailedSurvey/PlumeSearch_v1/Phase06_DS_Plume_Search_1.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/06_DetailedSurvey/PlumeSearch_v1/Phase06_DS_Plume_Search_2.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/07_OrbitalB/CandidateSampleSite_v1/Phase07_OB_CSS_Mapping_1.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/07_OrbitalB/CandidateSampleSite_v1/Phase07_OB_CSS_Mapping_2.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/07_OrbitalB/CandidateSampleSite_v1/Phase07_OB_CSS_Mapping_3.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/07_OrbitalB/CandidateSampleSite_v2/CSS_Mapping_1.a")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/07_OrbitalB/CandidateSampleSite_v2/CSS_Mapping_2.a")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/07_OrbitalB/CandidateSampleSite_v2/CSS_Mapping_3.a")
--openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/08_Recon/225m_Sortie_v2/Case02_0Latitude.wmv")
--openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/08_Recon/225m_Sortie_v2/Case05_20negLatitude.wmv")
--openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/08_Recon/225m_Sortie_v2/Case08_40negLatitude.wmv")
--openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/08_Recon/225m_Sortie_v2/Case11_60negLatitude.wmv")
local case = 2 -- Right now we only have the image times for case 2
if case == 2 then
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/08_Recon/525m_Sortie_v2/ORX_Recon_525mSortie_Case02.bsp")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/08_Recon/525m_Sortie_v2/Recon_525mSortie_Case02_0Latitude.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/08_Recon/525m_Sortie_v2/Recon_525mSortie_Case02_atl_19145_04.atf")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/08_Recon/225m_Sortie_v2/ORX_Recon_225mSortie_Case02.bsp")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/08_Recon/225m_Sortie_v2/Recon_225mSortie_Case02_0Latitude.bc")
elseif case == 5 then
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/08_Recon/525m_Sortie_v2/ORX_Recon_525mSortie_Case05.bsp")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/08_Recon/525m_Sortie_v2/Recon_525mSortie_Case05_20negLatitude.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/08_Recon/525m_Sortie_v2/Recon_525mSortie_Case05_atl_19145_04.atf")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/08_Recon/525m_Sortie_v2/Recon_525mSortie_Case05_NominalProfile.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/08_Recon/225m_Sortie_v2/ORX_Recon_225mSortie_Case05.bsp")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/08_Recon/225m_Sortie_v2/Recon_225mSortie_Case05_20negLatitude.bc")
elseif case == 8 then
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/08_Recon/525m_Sortie_v2/Recon_525mSortie_Case08_NominalProfile.bc")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/08_Recon/225m_Sortie_v2/ORX_Recon_225mSortie_Case08.bsp")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/08_Recon/225m_Sortie_v2/Recon_225mSortie_Case08_40negLatitude.bc")
elseif case == 11 then
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/08_Recon/225m_Sortie_v2/ORX_Recon_225mSortie_Case11.bsp")
openspace.spice.loadKernel("${SPICE}/OsirisRexKernels/Nominal_Observations_Science/08_Recon/225m_Sortie_v2/Recon_225mSortie_Case11_60negLatitude.bc")
end
-- Load planetary constants
openspace.spice.loadKernel("${SPICE}/pck00010.tpc")
dofile(openspace.absPath('${SCRIPTS}/bind_keys.lua'))
dofile(openspace.absPath('${SCRIPTS}/bind_keys_osirisrex.lua'))
--local startTime = "2019 APR 16 12:03:00.00"
openspace.scriptScheduler.load("${OPENSPACE_DATA}/scene/osirisrex/scheduled_scripts.lua")
-- Removing the line below will cause all scripts prior to <startTime> to be executed during initialization
-- openspace.scriptScheduler.skipTo(startTime);
end
function postInitialization()
--[[
The scripts in this function are executed after all objects in the scene have been
created and initialized, but before the first render call. This is the place to set
graphical settings for the renderables.
]]--
openspace.printInfo("Setting default values")
openspace.setPropertyValue("Sun.renderable.enabled", false)
openspace.setPropertyValue("SunMarker.renderable.enabled", false)
openspace.setPropertyValue("EarthMarker.renderable.enabled", false)
--openspace.setPropertyValue("Constellation Bounds.renderable.enabled", false)
openspace.setPropertyValue("PlutoTrail.renderable.enabled", true)
openspace.setPropertyValue("PlutoTexture.renderable.enabled", false)
openspace.setPropertyValue("MilkyWay.renderable.transparency", 0.55)
openspace.setPropertyValue("MilkyWay.renderable.segments", 50)
-- Activate night textures and water masks
openspace.setPropertyValue("Earth.RenderableGlobe.WaterMasks", {0, 1});
openspace.setPropertyValue("Earth.RenderableGlobe.NightTextures", {0, 1});
openspace.setPropertyValue("Earth.RenderableGlobe.Atmosphere", true);
openspace.printInfo("Done setting default values")
openspace.loadMission("${OPENSPACE_DATA}/scene/osirisrex/osirisrex/osirisrex.mission")
openspace.time.setTime(startTime)
openspace.time.setDeltaTime(0)
openspace.resetCameraDirection()
end
return {
ScenePath = ".",
CommonFolder = "common",
Camera = {
Focus = "OsirisRex",
Position = {26974590199.661884, 76314608558.908020, -127086452897.101791},
Rotation = {0.729548, -0.126024, 0.416827, 0.527382},
},
Modules = {
"sun",
"mercury",
-- "lodmercury",
"venus",
"earth",
"mars",
-- "lodearth",
-- "lodmoon",
-- "lodmars",
"jupiter",
"saturn",
"uranus",
"neptune",
"stars",
-- "stars-denver",
"milkyway",
-- "milkyway-eso",
--"imageplane",
"osirisrex",
}
}

View File

@@ -9,7 +9,7 @@ return {
Parent = "SolarSystemBarycenter",
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = BENNU_BODY,
Observer = "SUN",
},

View File

@@ -24,125 +24,363 @@ References:
--]]
return
{ Name = "OSIRIS-REx", Phases = {
-- All 1-level phases based on [1]
{ Name = "Planning and Fabrication", TimeRange = { Start = "2012 JAN 01 00:00:00", End = "2016 SEP 08 23:05:00" } },
{ Name = "Outbound Cruise", TimeRange = { Start = "2016 SEP 03 00:00:00", End = "2018 SEP 01 01:00:00" }, Phases = {
-- Phases from [4]
{ Name = "Pre Launch", TimeRange = { Start = "2016 SEP 03 01:00:00", End = "2016 SEP 08 23:05:05" } },
{ Name = "Launch", TimeRange = { Start = "2016 SEP 08 23:05:05", End = "2016 SEP 08 23:09:00" } },
{ Name = "Earth Orbit", TimeRange = { Start = "2016 SEP 08 23:09:00", End = "2016 SEP 08 23:45:00" } },
{ Name = "Solar Orbit", TimeRange = { Start = "2016 SEP 08 23:45:00", End = "2018 SEP 01 00:00:00" } },
{ Name = "Upcoming Gravity Assist", TimeRange = { Start = "2017 JAN 22 15:00:00", End = "2017 SEP 22 15:00:00" } },
{ Name = "Gravity Assist", TimeRange = { Start = "2017 SEP 22 15:00:00", End = "2017 SEP 22 21:00:00" } },
} },
{ Name = "Asteroid Operations", Phases = {
-- Nested Levels from [3]
{ Name = "03_Approach", Phases = {
{ Name = "DustSearch_v1", Phases = {
{ Name = "Phase03_AP_DustSearch_1.bc", TimeRange = { Start = "2018-SEP-11 21:31:01.183", End = "2018-SEP-12 02:18:41.183" }},
}},
{ Name = "LightCurve_v1", Phases = {
{ Name = "Phase03_AP_LightCurve_1.bc", TimeRange = { Start = "2018-OCT-09 21:50:48.182", End = "2018-OCT-10 02:33:16.183" }},
{ Name = "Phase03_AP_LightCurve_2.bc", TimeRange = { Start = "2018-OCT-10 21:50:48.182", End = "2018-OCT-11 02:33:16.183" }},
}},
{ Name = "NatSatSearch_v1", Phases = {
{ Name = "Phase03_AP_SatSearch_1.bc", TimeRange = { Start = "2018-OCT-26 19:38:30.183", End = "2018-OCT-27 00:22:34.183" }},
{ Name = "Phase03_AP_SatSearch_2.bc", TimeRange = { Start = "2018-NOV-05 17:10:20.183", End = "2018-NOV-05 21:59:48.183" }},
}},
{ Name = "PhaseFunction_v1", Phases = {
{ Name = "Phase03_AP_PhaseFunction_1.bc", TimeRange = { Start = "2018-OCT-12 21:42:26.183", End = "2018-OCT-13 02:24:54.183" }},
}},
{ Name = "ShapeModel_v1", Phases = {
{ Name = "Phase03_AP_ShapeModel_1.bc", TimeRange = { Start = "2018-NOV-09 11:02:59.183", End = "2018-NOV-09 15:52:27.183" }},
{ Name = "Phase03_AP_ShapeModel_2.bc", TimeRange = { Start = "2018-NOV-10 11:02:59.183", End = "2018-NOV-10 15:52:27.183" }},
{ Name = "Phase03_AP_ShapeModel_3.bc", TimeRange = { Start = "2018-NOV-11 11:02:59.183", End = "2018-NOV-11 15:52:27.183" }},
{ Name = "Phase03_AP_ShapeModel_4.bc", TimeRange = { Start = "2018-NOV-12 11:02:59.183", End = "2018-NOV-12 15:52:27.183" }},
{ Name = "Phase03_AP_ShapeModel_5.bc", TimeRange = { Start = "2018-NOV-13 11:02:59.183", End = "2018-NOV-13 15:52:27.183" }},
{ Name = "Phase03_AP_ShapeModel_6.bc", TimeRange = { Start = "2018-NOV-14 11:03:53.183", End = "2018-NOV-14 15:51:33.183" }},
{ Name = "Phase03_AP_ShapeModel_7.bc", TimeRange = { Start = "2018-NOV-15 11:03:53.183", End = "2018-NOV-15 15:51:33.183" }},
{ Name = "Phase03_AP_ShapeModel_8.bc", TimeRange = { Start = "2018-NOV-16 11:03:53.183", End = "2018-NOV-16 15:51:33.183" }},
{ Name = "Phase03_AP_ShapeModel_9_Forced4x4.bc", TimeRange = { Start = "2018-NOV-17 11:03:54.183", End = "2018-NOV-17 15:51:34.183" }},
}},
{ Name = "SpectraMap_v1", Phases = {
{ Name = "Phase03_AP_SpectraMap_1.bc", TimeRange = { Start = "2018-OCT-30 20:44:53.183", End = "2018-OCT-31 01:34:21.183" }},
}},
}},
{ Name = "04_PrelimSurvey", Phases = {
{ Name = "MapCamOLA_v1", Phases = {
{ Name = "Phase04_PS_MC_1_v1_1a.bc", TimeRange = { Start = "2018-NOV-20 01:13:12.183", End = "2018-NOV-20 06:13:04.183" }},
{ Name = "Phase04_PS_MC_2_v1_1a.bc", TimeRange = { Start = "2018-NOV-28 01:13:12.183", End = "2018-NOV-28 06:13:04.183" }},
}},
{ Name = "OLA_v1", Phases = {
{ Name = "Phase04_PS_OLA_Nominal_1.bc", TimeRange = { Start = "2018-NOV-19 22:30:00.184", End = "2018-NOV-19 23:19:28.183" }},
{ Name = "Phase04_PS_OLA_Nominal_2.bc", TimeRange = { Start = "2018-NOV-23 22:19:34.184", End = "2018-NOV-23 23:19:26.183" }},
{ Name = "Phase04_PS_OLA_Nominal_3.bc", TimeRange = { Start = "2018-NOV-24 00:48:38.184", End = "2018-NOV-24 01:38:06.184" }},
{ Name = "Phase04_PS_OLA_Nominal_4.bc", TimeRange = { Start = "2018-NOV-27 22:29:58.184", End = "2018-NOV-27 23:19:26.183" }},
}},
{ Name = "PolyCam_v1", Phases = {
{ Name = "Phase04_PS_PolyCam_1.bc", TimeRange = { Start = "2018-NOV-19 12:00:33.183", End = "2018-NOV-19 16:46:25.183" }},
{ Name = "Phase04_PS_PolyCam_2.bc", TimeRange = { Start = "2018-NOV-20 07:10:26.183", End = "2018-NOV-20 12:10:18.183" }},
{ Name = "Phase04_PS_PolyCam_3.bc", TimeRange = { Start = "2018-NOV-23 11:51:29.184", End = "2018-NOV-23 16:51:21.184" }},
{ Name = "Phase04_PS_PolyCam_4.bc", TimeRange = { Start = "2018-NOV-24 07:17:39.184", End = "2018-NOV-24 12:03:31.184" }},
{ Name = "Phase04_PS_PolyCam_5.bc", TimeRange = { Start = "2018-NOV-27 12:00:20.184", End = "2018-NOV-27 16:46:12.184" }},
{ Name = "Phase04_PS_PolyCam_6.bc", TimeRange = { Start = "2018-NOV-28 07:10:35.183", End = "2018-NOV-28 12:10:27.183" }},
}},
}},
{ Name = "06_DetailedSurvey", Phases = {
{ Name = "BaseballDiamond_v2", Phases = {
{ Name = "atl_19013_18_BBD1_v2.bc", TimeRange = { Start = "2019-JAN-13 18:59:31.195", End = "2019-JAN-13 23:59:29.179" }},
{ Name = "atl_19014_16_BBD2_v2.bc", TimeRange = { Start = "2019-JAN-14 16:56:01.185", End = "2019-JAN-14 21:55:58.219" }},
{ Name = "atl_19020_18_BBD3_v2.bc", TimeRange = { Start = "2019-JAN-20 18:59:15.211", End = "2019-JAN-20 23:59:13.195" }},
{ Name = "atl_19021_19_BBD4_v2.bc", TimeRange = { Start = "2019-JAN-21 19:26:47.179", End = "2019-JAN-22 00:26:44.213" }},
}},
{ Name = "EquatorialStations_v1", Phases = {
{ Name = "Phase06_DS_Equatorial_Stations_1.bc", TimeRange = { Start = "2019-JAN-27 10:36:24.185", End = "2019-JAN-27 15:20:28.185" }},
{ Name = "Phase06_DS_Equatorial_Stations_2.bc", TimeRange = { Start = "2019-FEB-03 10:35:30.185", End = "2019-FEB-03 15:21:22.185" }},
{ Name = "Phase06_DS_Equatorial_Stations_3.bc", TimeRange = { Start = "2019-FEB-10 10:51:50.185", End = "2019-FEB-10 15:51:42.185" }},
{ Name = "Phase06_DS_Equatorial_Stations_4.bc", TimeRange = { Start = "2019-FEB-17 10:29:11.186", End = "2019-FEB-17 15:29:03.186" }},
{ Name = "Phase06_DS_Equatorial_Stations_5.bc", TimeRange = { Start = "2019-FEB-24 10:08:28.186", End = "2019-FEB-24 15:08:20.185" }},
{ Name = "Phase06_DS_Equatorial_Stations_6.bc", TimeRange = { Start = "2019-MAR-03 09:52:58.186", End = "2019-MAR-03 14:42:26.186" }},
{ Name = "Phase06_DS_Equatorial_Stations_7.bc", TimeRange = { Start = "2019-MAR-10 09:57:47.186", End = "2019-MAR-10 14:36:33.186" }},
}},
{ Name = "PlumeSearch_v1", Phases = {
{ Name = "Phase06_DS_Plume_Search_1.bc", TimeRange = { Start = "2019-JAN-28 10:34:36.185", End = "2019-JAN-28 15:22:16.185" }},
{ Name = "Phase06_DS_Plume_Search_2.bc", TimeRange = { Start = "2019-FEB-18 10:29:11.186", End = "2019-FEB-18 15:29:03.186" }},
}},
}},
{ Name = "07_OrbitalB", Phases = {
{ Name = "CandidateSampleSite_v1", Phases = {
{ Name = "Phase07_OB_CSS_Mapping_1.bc", TimeRange = { Start = "2019-APR-08 10:35:27.186", End = "2019-APR-08 15:22:06.186" }},
{ Name = "Phase07_OB_CSS_Mapping_2.bc", TimeRange = { Start = "2019-APR-08 16:16:06.186", End = "2019-APR-11 10:38:58.186" }},
{ Name = "Phase07_OB_CSS_Mapping_3.bc", TimeRange = { Start = "2019-APR-22 17:51:23.186", End = "2019-APR-29 19:41:03.186" }},
}},
}},
{ Name = "08_Recon", Phases = {
{ Name = "225m_Sortie_v2", Phases = {
{ Name = "Recon_225mSortie_Case02_0Latitude.bc", TimeRange = { Start = "2019-MAY-25 03:50:31.195", End = "2019-MAY-25 04:32:17.227" }},
{ Name = "Recon_225mSortie_Case05_20negLatitude.bc", TimeRange = { Start = "2019-MAY-25 03:50:48.216", End = "2019-MAY-25 04:37:10.209" }},
{ Name = "Recon_225mSortie_Case08_40negLatitude.bc", TimeRange = { Start = "2019-MAY-25 04:02:43.176", End = "2019-MAY-25 04:54:41.179" }},
{ Name = "Recon_225mSortie_Case11_60negLatitude.bc", TimeRange = { Start = "2019-MAY-25 04:21:46.161", End = "2019-MAY-25 05:18:44.232" }},
}},
{ Name = "525m_Sortie_v2", Phases = {
{ Name = "Recon_525mSortie_Case02_0Latitude.bc", TimeRange = { Start = "2019-MAY-25 04:06:39.220", End = "2019-MAY-25 04:44:17.198" }},
{ Name = "Recon_525mSortie_Case05_20negLatitude.bc", TimeRange = { Start = "2019-MAY-25 04:11:39.201", End = "2019-MAY-25 04:49:37.224" }},
{ Name = "Recon_525mSortie_Case05_NominalProfile.bc", TimeRange = { Start = "2019-MAY-25 03:01:50.184", End = "2019-MAY-25 06:38:50.232" }},
{ Name = "Recon_525mSortie_Case08_NominalProfile.bc", TimeRange = { Start = "2019-MAY-25 03:01:50.184", End = "2019-MAY-25 06:38:50.232" }},
}},
}},
return {
Name = "OSIRIS-REx",
Phases = {
-- All 1-level phases based on [1]
{
Name = "Planning and Fabrication",
TimeRange = { Start = "2012 JAN 01 00:00:00", End = "2016 SEP 08 23:05:00" }
},
{
Name = "Outbound Cruise",
TimeRange = { Start = "2016 SEP 03 00:00:00", End = "2018 SEP 01 01:00:00" },
Phases = {
-- Phases from [4]
{
Name = "Pre Launch",
TimeRange = { Start = "2016 SEP 03 01:00:00", End = "2016 SEP 08 23:05:05" }
},
{
Name = "Launch", TimeRange = { Start = "2016 SEP 08 23:05:05", End = "2016 SEP 08 23:09:00" }
},
{
Name = "Earth Orbit", TimeRange = { Start = "2016 SEP 08 23:09:00", End = "2016 SEP 08 23:45:00" }
},
{
Name = "Solar Orbit", TimeRange = { Start = "2016 SEP 08 23:45:00", End = "2018 SEP 01 00:00:00" }
},
{
Name = "Upcoming Gravity Assist", TimeRange = { Start = "2017 JAN 22 15:00:00", End = "2017 SEP 22 15:00:00" }
},
{
Name = "Gravity Assist", TimeRange = { Start = "2017 SEP 22 15:00:00", End = "2017 SEP 22 21:00:00" }
}
}
},
{
Name = "Asteroid Operations",
Phases = {
-- Nested Levels from [3]
{
Name = "03_Approach", Phases = {
{
Name = "DustSearch_v1",
Phases = {
{
Name = "Phase03_AP_DustSearch_1.bc",
TimeRange = { Start = "2018-SEP-11 21:31:01.183", End = "2018-SEP-12 02:18:41.183" }
}
}
},
{
Name = "LightCurve_v1",
Phases = {
{
Name = "Phase03_AP_LightCurve_1.bc",
TimeRange = { Start = "2018-OCT-09 21:50:48.182", End = "2018-OCT-10 02:33:16.183" }
},
{
Name = "Phase03_AP_LightCurve_2.bc",
TimeRange = { Start = "2018-OCT-10 21:50:48.182", End = "2018-OCT-11 02:33:16.183" }
}
}
},
{
Name = "NatSatSearch_v1",
Phases = {
{
Name = "Phase03_AP_SatSearch_1.bc",
TimeRange = { Start = "2018-OCT-26 19:38:30.183", End = "2018-OCT-27 00:22:34.183" }
},
{
Name = "Phase03_AP_SatSearch_2.bc",
TimeRange = { Start = "2018-NOV-05 17:10:20.183", End = "2018-NOV-05 21:59:48.183" }
}
}
},
{
Name = "PhaseFunction_v1",
Phases = {
{
Name = "Phase03_AP_PhaseFunction_1.bc",
TimeRange = { Start = "2018-OCT-12 21:42:26.183", End = "2018-OCT-13 02:24:54.183" }
}
}
},
{
Name = "ShapeModel_v1", Phases = {
{
Name = "Phase03_AP_ShapeModel_1.bc",
TimeRange = { Start = "2018-NOV-09 11:02:59.183", End = "2018-NOV-09 15:52:27.183" }
},
{
Name = "Phase03_AP_ShapeModel_2.bc",
TimeRange = { Start = "2018-NOV-10 11:02:59.183", End = "2018-NOV-10 15:52:27.183" }
},
{
Name = "Phase03_AP_ShapeModel_3.bc",
TimeRange = { Start = "2018-NOV-11 11:02:59.183", End = "2018-NOV-11 15:52:27.183" }
},
{
Name = "Phase03_AP_ShapeModel_4.bc",
TimeRange = { Start = "2018-NOV-12 11:02:59.183", End = "2018-NOV-12 15:52:27.183" }
},
{
Name = "Phase03_AP_ShapeModel_5.bc",
TimeRange = { Start = "2018-NOV-13 11:02:59.183", End = "2018-NOV-13 15:52:27.183" }
},
{
Name = "Phase03_AP_ShapeModel_6.bc",
TimeRange = { Start = "2018-NOV-14 11:03:53.183", End = "2018-NOV-14 15:51:33.183" }
},
{
Name = "Phase03_AP_ShapeModel_7.bc",
TimeRange = { Start = "2018-NOV-15 11:03:53.183", End = "2018-NOV-15 15:51:33.183" }
},
{
Name = "Phase03_AP_ShapeModel_8.bc",
TimeRange = { Start = "2018-NOV-16 11:03:53.183", End = "2018-NOV-16 15:51:33.183" }
},
{
Name = "Phase03_AP_ShapeModel_9_Forced4x4.bc",
TimeRange = { Start = "2018-NOV-17 11:03:54.183", End = "2018-NOV-17 15:51:34.183" }
}
}
},
{
Name = "SpectraMap_v1",
Phases = {
{
Name = "Phase03_AP_SpectraMap_1.bc",
TimeRange = { Start = "2018-OCT-30 20:44:53.183", End = "2018-OCT-31 01:34:21.183" }
}
}
}
}
},
{
Name = "04_PrelimSurvey",
Phases = {
{
Name = "MapCamOLA_v1",
Phases = {
{
Name = "Phase04_PS_MC_1_v1_1a.bc",
TimeRange = { Start = "2018-NOV-20 01:13:12.183", End = "2018-NOV-20 06:13:04.183" }
},
{
Name = "Phase04_PS_MC_2_v1_1a.bc",
TimeRange = { Start = "2018-NOV-28 01:13:12.183", End = "2018-NOV-28 06:13:04.183" }
}
}
},
{
Name = "OLA_v1",
Phases = {
{
Name = "Phase04_PS_OLA_Nominal_1.bc",
TimeRange = { Start = "2018-NOV-19 22:30:00.184", End = "2018-NOV-19 23:19:28.183" }
},
{
Name = "Phase04_PS_OLA_Nominal_2.bc",
TimeRange = { Start = "2018-NOV-23 22:19:34.184", End = "2018-NOV-23 23:19:26.183" }
},
{
Name = "Phase04_PS_OLA_Nominal_3.bc",
TimeRange = { Start = "2018-NOV-24 00:48:38.184", End = "2018-NOV-24 01:38:06.184" }
},
{
Name = "Phase04_PS_OLA_Nominal_4.bc",
TimeRange = { Start = "2018-NOV-27 22:29:58.184", End = "2018-NOV-27 23:19:26.183" }
}
}
},
{
Name = "PolyCam_v1",
Phases = {
{
Name = "Phase04_PS_PolyCam_1.bc",
TimeRange = { Start = "2018-NOV-19 12:00:33.183", End = "2018-NOV-19 16:46:25.183" }
},
{
Name = "Phase04_PS_PolyCam_2.bc",
TimeRange = { Start = "2018-NOV-20 07:10:26.183", End = "2018-NOV-20 12:10:18.183" }
},
{
Name = "Phase04_PS_PolyCam_3.bc",
TimeRange = { Start = "2018-NOV-23 11:51:29.184", End = "2018-NOV-23 16:51:21.184" }
},
{
Name = "Phase04_PS_PolyCam_4.bc",
TimeRange = { Start = "2018-NOV-24 07:17:39.184", End = "2018-NOV-24 12:03:31.184" }
},
{
Name = "Phase04_PS_PolyCam_5.bc",
TimeRange = { Start = "2018-NOV-27 12:00:20.184", End = "2018-NOV-27 16:46:12.184" }
},
{
Name = "Phase04_PS_PolyCam_6.bc",
TimeRange = { Start = "2018-NOV-28 07:10:35.183", End = "2018-NOV-28 12:10:27.183" }
}
}
},
}
},
{
Name = "06_DetailedSurvey",
Phases = {
{
Name = "BaseballDiamond_v2",
Phases = {
{
Name = "atl_19013_18_BBD1_v2.bc",
TimeRange = { Start = "2019-JAN-13 18:59:31.195", End = "2019-JAN-13 23:59:29.179" }
},
{
Name = "atl_19014_16_BBD2_v2.bc",
TimeRange = { Start = "2019-JAN-14 16:56:01.185", End = "2019-JAN-14 21:55:58.219" }
},
{
Name = "atl_19020_18_BBD3_v2.bc",
TimeRange = { Start = "2019-JAN-20 18:59:15.211", End = "2019-JAN-20 23:59:13.195" }
},
{
Name = "atl_19021_19_BBD4_v2.bc",
TimeRange = { Start = "2019-JAN-21 19:26:47.179", End = "2019-JAN-22 00:26:44.213" }
}
}
},
{
Name = "EquatorialStations_v1",
Phases = {
{
Name = "Phase06_DS_Equatorial_Stations_1.bc",
TimeRange = { Start = "2019-JAN-27 10:36:24.185", End = "2019-JAN-27 15:20:28.185" }
},
{
Name = "Phase06_DS_Equatorial_Stations_2.bc",
TimeRange = { Start = "2019-FEB-03 10:35:30.185", End = "2019-FEB-03 15:21:22.185" }
},
{
Name = "Phase06_DS_Equatorial_Stations_3.bc",
TimeRange = { Start = "2019-FEB-10 10:51:50.185", End = "2019-FEB-10 15:51:42.185" }
},
{
Name = "Phase06_DS_Equatorial_Stations_4.bc",
TimeRange = { Start = "2019-FEB-17 10:29:11.186", End = "2019-FEB-17 15:29:03.186" }
},
{
Name = "Phase06_DS_Equatorial_Stations_5.bc",
TimeRange = { Start = "2019-FEB-24 10:08:28.186", End = "2019-FEB-24 15:08:20.185" }
},
{
Name = "Phase06_DS_Equatorial_Stations_6.bc",
TimeRange = { Start = "2019-MAR-03 09:52:58.186", End = "2019-MAR-03 14:42:26.186" }
},
{
Name = "Phase06_DS_Equatorial_Stations_7.bc",
TimeRange = { Start = "2019-MAR-10 09:57:47.186", End = "2019-MAR-10 14:36:33.186" }
}
}
},
{
Name = "PlumeSearch_v1",
Phases = {
{
Name = "Phase06_DS_Plume_Search_1.bc",
TimeRange = { Start = "2019-JAN-28 10:34:36.185", End = "2019-JAN-28 15:22:16.185" }
},
{
Name = "Phase06_DS_Plume_Search_2.bc",
TimeRange = { Start = "2019-FEB-18 10:29:11.186", End = "2019-FEB-18 15:29:03.186" }
}
}
}
}
},
{
Name = "07_OrbitalB",
Phases = {
{
Name = "CandidateSampleSite_v1",
Phases = {
{
Name = "Phase07_OB_CSS_Mapping_1.bc",
TimeRange = { Start = "2019-APR-08 10:35:27.186", End = "2019-APR-08 15:22:06.186" }
},
{
Name = "Phase07_OB_CSS_Mapping_2.bc",
TimeRange = { Start = "2019-APR-08 16:16:06.186", End = "2019-APR-11 10:38:58.186" }
},
{
Name = "Phase07_OB_CSS_Mapping_3.bc",
TimeRange = { Start = "2019-APR-22 17:51:23.186", End = "2019-APR-29 19:41:03.186" }
}
}
}
}
},
{
Name = "08_Recon",
Phases = {
{
Name = "225m_Sortie_v2",
Phases = {
{
Name = "Recon_225mSortie_Case02_0Latitude.bc",
TimeRange = { Start = "2019-MAY-25 03:50:31.195", End = "2019-MAY-25 04:32:17.227" }
},
{
Name = "Recon_225mSortie_Case05_20negLatitude.bc",
TimeRange = { Start = "2019-MAY-25 03:50:48.216", End = "2019-MAY-25 04:37:10.209" }
},
{
Name = "Recon_225mSortie_Case08_40negLatitude.bc",
TimeRange = { Start = "2019-MAY-25 04:02:43.176", End = "2019-MAY-25 04:54:41.179" }
},
{
Name = "Recon_225mSortie_Case11_60negLatitude.bc",
TimeRange = { Start = "2019-MAY-25 04:21:46.161", End = "2019-MAY-25 05:18:44.232" }
}
}
},
{
Name = "525m_Sortie_v2",
Phases = {
{
Name = "Recon_525mSortie_Case02_0Latitude.bc",
TimeRange = { Start = "2019-MAY-25 04:06:39.220", End = "2019-MAY-25 04:44:17.198" }
},
{
Name = "Recon_525mSortie_Case05_20negLatitude.bc",
TimeRange = { Start = "2019-MAY-25 04:11:39.201", End = "2019-MAY-25 04:49:37.224" }
},
{
Name = "Recon_525mSortie_Case05_NominalProfile.bc",
TimeRange = { Start = "2019-MAY-25 03:01:50.184", End = "2019-MAY-25 06:38:50.232" }
},
{
Name = "Recon_525mSortie_Case08_NominalProfile.bc",
TimeRange = { Start = "2019-MAY-25 03:01:50.184", End = "2019-MAY-25 06:38:50.232" }
}
}
}
}
}
-- End of [3]
}},
{ Name = "Backup Time", TimeRange = { Start = "2020 JAN 01 00:00:00", End = "2021 JAN 01 00:00:00" } },
{ Name = "Return Cruise", TimeRange = { Start = "2021 JAN 01 00:00:00", End = "2023 SEP 20 00:00:00" } },
}
},
{
Name = "Backup Time",
TimeRange = { Start = "2020 JAN 01 00:00:00", End = "2021 JAN 01 00:00:00" }
},
{
Name = "Return Cruise",
TimeRange = { Start = "2021 JAN 01 00:00:00", End = "2023 SEP 20 00:00:00"}
},
-- Not too interesting in terms of space visualization --> out commented
-- { Name = "Sample Analysis", TimeRange = { Start = "2023 JAN 01 00:00:00", End = "2025 JUN 01 00:00:00" } },
-- End of [1]
}}
}
}

View File

@@ -27,7 +27,7 @@ return {
},
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "OSIRIS-REX",
Observer = "SUN",
},
@@ -61,7 +61,7 @@ return {
},
Transform = {
Translation = {
Type = "StaticEphemeris",
Type = "StaticTranslation",
Position = {-0.2476, 0.2710, 0.3364},
},
Rotation = {
@@ -94,7 +94,7 @@ return {
},
Transform = {
Translation = {
Type = "StaticEphemeris",
Type = "StaticTranslation",
Position = {0, 0.3371, 0.2712},
},
Rotation = {

View File

@@ -1,6 +1,7 @@
return {
FileRequest = {
{ Identifier = "charon_textures", Destination = "textures", Version = 1 },
{ Identifier = "pluto_textures", Destination = "textures", Version = 4 }
{ Identifier = "pluto_textures", Destination = "textures", Version = 4 },
{ Identifier = "pluto_spice", Destination = "${SPICE}", Version = 1 }
}
}

View File

@@ -5,7 +5,7 @@ return {
Parent = "SolarSystemBarycenter",
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "CHURYUMOV-GERASIMENKO",
Observer = "SUN",
},

View File

@@ -62,7 +62,7 @@ return {
Parent = "SolarSystemBarycenter",
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "ROSETTA",
Observer = "SUN",
Kernels = RosettaKernels
@@ -273,7 +273,7 @@ return {
-- translated
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "PHILAE",
Observer = "CHURYUMOV-GERASIMENKO",
Kernels = RosettaKernels

View File

@@ -30,7 +30,7 @@ return {
},
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "SATURN BARYCENTER",
Observer = "SUN",
Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp"

View File

@@ -30,7 +30,7 @@ return {
},
Transform = {
Translation = {
Type = "SpiceEphemeris",
Type = "SpiceTranslation",
Body = "URANUS BARYCENTER",
Observer = "SUN",
Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp"

6
data/web/common/bootstrap.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

185
data/web/common/style.css Normal file
View File

@@ -0,0 +1,185 @@
/* Documentation */
.documentation-name, .documentation-name:hover, .documentation-name:focus {
text-decoration: none;
color: #333;
outline: none;
}
.documentation-item {
background-color: #f4f4f4;
border-left: 2px solid #888;
padding-left: 10px;
padding-top: 5px;
padding-right: 5px;
margin-bottom: 5px;
}
.documentation-item .documentation-item {
border-left: 2px solid #f00;
background-color: #fff;
}
.documentation-item .documentation-item .documentation-item {
border-left: 2px solid #080;
background-color: #f4f4f4;
}
.documentation-item .documentation-item .documentation-item .documentation-item {
border-left: 2px solid #00f;
background-color: #fff;
}
.documentation-type {
color: #888;
font-size: 0.8em;
font-style: italic;
}
.documentation-key {
color: #333;
font-weight: bold;
}
.documentation-description {
font-size: 0.9em;
}
.documentation-container {
font-size: 1.2em;
}
.documentation-small {
font-size: 0.8em;
}
/*!
* Start Bootstrap - Simple Sidebar (http://startbootstrap.com/)
* Copyright 2013-2016 Start Bootstrap
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE)
*/
body {
overflow-x: hidden;
}
/* Toggle Styles */
#wrapper {
padding-left: 0;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
}
#wrapper.toggled {
padding-left: 280px;
}
#sidebar-wrapper {
z-index: 1000;
position: fixed;
left: 280px;
width: 0;
height: 100%;
margin-left: -280px;
overflow-y: auto;
background: #000;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
}
#wrapper.toggled #sidebar-wrapper {
width: 280px;
}
#page-content-wrapper {
width: 100%;
position: absolute;
padding: 15px;
}
#wrapper.toggled #page-content-wrapper {
position: absolute;
margin-right: -280px;
}
/* Sidebar Styles */
.sidebar-nav {
position: absolute;
top: 0;
width: 280px;
margin: 0;
padding: 0;
list-style: none;
}
.sidebar-nav li {
text-indent: 20px;
line-height: 40px;
}
.sidebar-nav li a {
display: block;
text-decoration: none;
color: #999999;
}
.sidebar-nav li a:hover {
text-decoration: none;
color: #fff;
background: rgba(255,255,255,0.2);
}
.sidebar-nav li a:active,
.sidebar-nav li a:focus {
text-decoration: none;
}
.sidebar-nav > .sidebar-brand {
height: 65px;
font-size: 18px;
line-height: 60px;
}
.sidebar-nav > .sidebar-brand a {
color: #999999;
}
.sidebar-nav > .sidebar-brand a:hover {
color: #fff;
background: none;
}
@media(min-width:768px) {
#wrapper {
padding-left: 280px;
}
#wrapper.toggled {
padding-left: 0;
}
#sidebar-wrapper {
width: 280px;
}
#wrapper.toggled #sidebar-wrapper {
width: 0;
}
#page-content-wrapper {
padding: 20px;
position: relative;
}
#wrapper.toggled #page-content-wrapper {
position: relative;
margin-right: 0;
}
}

View File

@@ -0,0 +1,28 @@
{{#each entries}}
<div class="documentation-item">
<div class="row">
<div class="col-lg-12">
<p>
<a href="#{{urlify key}}" name="{{urlify key}}">
<span class="documentation-type">{{type}}</span>
<span class="documentation-key">{{key}}</span>
{{#if optional}}
<span class="documentation-type">(Optional)</span>
{{/if}}
</a>
</p>
<p class="documentation-description">{{description}}</p>
{{#with restrictions}}
{{>documentation}}
{{/with}}
{{#if reference}}
{{#if reference.found}}
<p class="documentation-description">An object of type '<a href="#{{reference.identifier}}">{{reference.name}}</a>'</p>
{{else}}
<p class="documentation-description">Missing reference</p>
{{/if}}
{{/if}}
</div>
</div>
</div>
{{/each}}

View File

@@ -0,0 +1,32 @@
<div id="wrapper">
<div id="sidebar-wrapper">
<ul class="sidebar-nav">
<li class="sidebar-brand">
<a href="#">
OpenSpace Documentation
</a>
</li>
{{#each documentation}}
<li>
<a href="#{{id}}">{{name}}</a>
</li>
{{/each}}
</ul>
</div>
<div id="page-content-wrapper">
<div class="container-fluid documentation-container">
<h1>OpenSpace Documentation</h1>
<p>Version: {{version.[0]}}.{{version.[1]}}.{{version.[2]}}</p>
{{#each documentation}}
<div class="row">
<div class="col-lg-12">
<h2><a class="documentation-name" href="#{{id}}" name="{{id}}">{{name}}</a></h2>
{{> documentation}}
</div>
</div>
{{/each}}
</div>
</div>
</div>

View File

@@ -0,0 +1,28 @@
window.onload = function () {
var mainTemplateElement = document.getElementById('mainTemplate');
var mainTemplate = Handlebars.compile(mainTemplateElement.innerHTML);
var documentationTemplateElement = document.getElementById('documentationTemplate');
Handlebars.registerPartial('documentation', documentationTemplateElement.innerHTML);
Handlebars.registerHelper('urlify', function(options, context) {
var data = context.data;
var identifier = options.replace(" ", "-").toLowerCase();
while (data = data._parent) {
if (data.key !== undefined) {
identifier = data.key + "-" + identifier;
}
}
return identifier;
});
var data = {
documentation: documentation,
version: version
}
var contents = mainTemplate(data);
document.body.innerHTML = contents;
}

View File

@@ -0,0 +1,13 @@
{{#each classes}}
<div class="documentation-item">
<div class="row">
<div class="col-lg-12">
<p>
<a href="#{{urlify this}}" name="{{urlify this}}">
<span class="documentation-key">{{this}}</span>
</a>
</p>
</div>
</div>
</div>
{{/each}}

View File

@@ -0,0 +1,35 @@
<div id="wrapper">
<div id="sidebar-wrapper">
<ul class="sidebar-nav">
<li class="sidebar-brand">
<a href="#">
OpenSpace Factories
</a>
</li>
{{#each factories}}
<li>
<a href="#{{name}}">{{name}}</a>
</li>
{{/each}}
</ul>
</div>
<div id="page-content-wrapper">
<div class="container-fluid documentation-container">
<h1>OpenSpace Factories</h1>
<p>Version: {{version.[0]}}.{{version.[1]}}.{{version.[2]}}</p>
{{#each factories}}
<div class="row">
<div class="col-lg-12">
<h2>
<a class="documentation-name" href="#{{name}}" name="{{name}}">
{{name}}
</a>
</h2>
{{> factory}}
</div>
</div>
{{/each}}
</div>
</div>
</div>

View File

@@ -0,0 +1,28 @@
window.onload = function () {
var mainTemplateElement = document.getElementById('mainTemplate');
var mainTemplate = Handlebars.compile(mainTemplateElement.innerHTML);
var factoryTemplateElement = document.getElementById('factoryTemplate');
Handlebars.registerPartial('factory', factoryTemplateElement.innerHTML);
Handlebars.registerHelper('urlify', function(options, context) {
var data = context.data;
var identifier = options.replace(" ", "-").toLowerCase();
while (data = data._parent) {
if (data.key !== undefined) {
identifier = data.key + "-" + identifier;
}
}
return identifier;
});
var data = {
factories: factories,
version: version
}
var contents = mainTemplate(data);
document.body.innerHTML = contents;
}

View File

@@ -0,0 +1,12 @@
<div class="documentation-item">
<div class="row">
<div class="col-lg-12">
<p>
<a href="#{{urlify key}}" name="{{urlify key}}">
<span class="documentation-key">{{key}}</span>
</a>
<p>{{script}}</p>
</p>
</div>
</div>
</div>

View File

@@ -0,0 +1,10 @@
<div id="page-content-wrapper">
<div class="container-fluid documentation-container">
<h1>OpenSpace Keybindings</h1>
<p>Version: {{version.[0]}}.{{version.[1]}}.{{version.[2]}}</p>
<p>Generated: {{generationTime}}</p>
{{#each keybindings}}
{{> keybinding}}
{{/each}}
</div>
</div>

View File

@@ -0,0 +1,29 @@
window.onload = function () {
var mainTemplateElement = document.getElementById('mainTemplate');
var mainTemplate = Handlebars.compile(mainTemplateElement.innerHTML);
var keybindingTemplateElement = document.getElementById('keybindingTemplate');
Handlebars.registerPartial('keybinding', keybindingTemplateElement.innerHTML);
Handlebars.registerHelper('urlify', function(options, context) {
var data = context.data;
var identifier = options.replace(" ", "-").toLowerCase();
while (data = data._parent) {
if (data.key !== undefined) {
identifier = data.key + "-" + identifier;
}
}
return identifier;
});
var data = {
keybindings: keybindings,
version: version,
generationTime: generationTime
}
var contents = mainTemplate(data);
document.body.innerHTML = contents;
}

128
data/web/log/script.js Normal file
View File

@@ -0,0 +1,128 @@
var levels = ['debug', 'info', 'warning', 'error', 'fatal'];
var filterLevel = 0;
function insertAfter(newNode, referenceNode) {
referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
}
function remove(node) {
node.parentNode.removeChild(node);
}
function scrollTo(selector) {
var element = document.querySelector(selector);
if (element && element.scrollIntoView) {
element.scrollIntoView();
}
}
function getLevel(element) {
return levels.findIndex(function (levelString, level) {
var className = 'log-level-' + levelString;
if (element.classList.contains(className)) {
return true;
}
});
}
function pluralize(nItems, singular, plural) {
if (nItems === 1) {
return [1, singular].join(' ');
}
plural = plural || [singular, 's'].join('');
return [nItems.toString(), plural].join(' ');
}
function scrollLink(content, selector) {
var html = '<a onclick="scrollTo(\'' + selector + '\')">' + content + "</a>";
return html;
}
function getSummary() {
var nFatals = document.getElementsByClassName('log-level-fatal').length;
var nErrors = document.getElementsByClassName('log-level-error').length;
var nWarnings = document.getElementsByClassName('log-level-warning').length;
if (nFatals > 0) {
return '<span class="summary summary-fatal">' + scrollLink(pluralize(nFatals, 'fatal error'), '.log-level-fatal') +
', ' + scrollLink(pluralize(nErrors, 'other error'), '.log-level-error') + ' and ' + scrollLink(pluralize(nWarnings, 'warning'), '.log-level-warning') + '</span>';
} else if (nErrors > 0) {
return '<span class="summary summary-error">' + scrollLink(pluralize(nErrors, 'error'), '.log-level-error') + ' and ' +
scrollLink(pluralize(nWarnings, 'warning'), '.log-level-warning') + '</span>';
} else if (nWarnings > 0) {
return '<span class="summary summary-warning">' + scrollLink(pluralize(nWarnings, 'warning'), '.log-level-warning') + '</span>';
} else {
return '<span class="summary summary-ok">No errors or warnings</span>';
}
}
function updateFilter() {
var table = document.getElementsByTagName('table')[0];
table.classList.remove('hidden');
var noMessages = document.getElementById('no-messages');
if (noMessages) {
remove(noMessages);
}
var rows = document.getElementsByTagName('tr');
var nShown = 0;
[].forEach.call(rows, function (row) {
if (row.classList.length === 0) {
return;
}
var rowLevel = getLevel(row);
if (rowLevel >= filterLevel) {
row.classList.remove('hidden');
nShown++;
} else {
row.classList.add('hidden');
}
});
if (nShown === 0) {
var select = document.getElementsByTagName('select')[0];
var p = document.createElement("p");
p.id = "no-messages";
p.innerHTML = "There are no log messages with the level '" + levels[filterLevel] + "' or higher.";
insertAfter(p, select);
table.classList.add('hidden');
}
}
window.onload = function () {
var header = document.getElementsByTagName('h1')[0];
header.innerHTML = "OpenSpace Log";
var summary = document.createElement('p');
summary.innerHTML = getSummary();
var select = document.createElement('select');
select.id = 'filter-level-selector';
var selectLabel = document.createElement('label');
selectLabel.for = 'filter-level-selector';
selectLabel.innerHTML = "Lowest log level to show: ";
levels.forEach(function (level) {
var option = document.createElement('option');
option.value = level;
option.innerHTML = level;
select.appendChild(option);
});
insertAfter(summary, header);
insertAfter(selectLabel, summary);
insertAfter(select, selectLabel);
var preselectedIndex = levels.indexOf(window.location.hash.slice(1));
if (preselectedIndex >= 0) {
filterLevel = select.selectedIndex = preselectedIndex;
updateFilter();
}
select.onchange = function (evt) {
filterLevel = select.selectedIndex;
updateFilter();
window.location.hash = '#' + select.options[select.selectedIndex].value;
};
}

93
data/web/log/style.css Normal file
View File

@@ -0,0 +1,93 @@
table {
width: 100%;
}
td, th {
padding: 4px 15px 3px;
}
.log-date {
width: 8em;
}
h1 {
padding-left: 15px;
}
.hidden {
display: none;
}
p, label {
margin-left: 15px;
margin-bottom: 15px;
}
label {
margin-right: 0.5em;
}
.log-level-debug {
background-color: #bbdda9;
border-bottom: 1px solid #7bc142;
color: #265127;
}
.log-level-debug td:first-child {
border-left: 10px solid #7bc142;
}
thead, .log-level-info {
color: #333333;
background-color: #ffffff;
border-bottom: 1px solid #eaeaea;
}
.log-level-info td:first-child {
border-left: 10px solid #eaeaea;
}
thead th:first-child {
border-left 10px solid #fff;
}
.log-level-warning {
color: #3e3115;
background-color: #fef8c3;
border-bottom: 1px solid #efcd3f;
}
.log-level-warning td:first-child {
border-left: 10px solid #efcd3f;
}
.log-level-error {
color: #4c1315;
background-color: #fcdcdc;
border-bottom: 1px solid #d66767;
}
.log-level-error td:first-child {
border-left: 10px solid #d66767;
}
.log-level-fatal {
color: #220f21;
background-color: #ff7dc1;
border-bottom: 1px solid #b84398;
}
.log-level-fatal td:first-child {
border-left: 10px solid #b84398;
}
.summary {
padding: 5px;
}
.summary-warning {
background-color: #fef8c3;
}
.summary-error {
background-color: #fcdcdc;
}
.summary-fatal {
background-color: #ff7dc1;
}
.summary-ok {
background-color: #bbdda9;
}

View File

@@ -0,0 +1,35 @@
<div id="wrapper">
<div id="sidebar-wrapper">
<ul class="sidebar-nav">
<li class="sidebar-brand">
<a href="#">
OpenSpace Lua Scripting
</a>
</li>
{{#each scripting}}
<li>
<a href="#openspace{{#if library}}.{{library}}{{/if}}">openspace{{#if library}}.{{library}}{{/if}}</a>
</li>
{{/each}}
</ul>
</div>
<div id="page-content-wrapper">
<div class="container-fluid documentation-container">
<h1>OpenSpace Lua Scripting</h1>
<p>Version: {{version.[0]}}.{{version.[1]}}.{{version.[2]}}</p>
{{#each scripting}}
<div class="row">
<div class="col-lg-12">
<h2>
<a class="documentation-name" href="#openspace{{#if library}}.{{library}}{{/if}}" name="openspace{{#if library}}.{{library}}{{/if}}">
openspace{{#if library}}.{{library}}{{/if}}
</a>
</h2>
{{> scripting}}
</div>
</div>
{{/each}}
</div>
</div>
</div>

View File

@@ -0,0 +1,28 @@
window.onload = function () {
var mainTemplateElement = document.getElementById('mainTemplate');
var mainTemplate = Handlebars.compile(mainTemplateElement.innerHTML);
var scriptingTemplateElement = document.getElementById('scriptingTemplate');
Handlebars.registerPartial('scripting', scriptingTemplateElement.innerHTML);
Handlebars.registerHelper('urlify', function(options, context) {
var data = context.data;
var identifier = options.replace(" ", "-").toLowerCase();
while (data = data._parent) {
if (data.key !== undefined) {
identifier = data.key + "-" + identifier;
}
}
return identifier;
});
var data = {
scripting: scripting,
version: version
}
var contents = mainTemplate(data);
document.body.innerHTML = contents;
}

View File

@@ -0,0 +1,17 @@
{{#each functions}}
<div class="documentation-item">
<div class="row">
<div class="col-lg-12">
<p>
<a href="#{{urlify name}}" name="{{urlify name}}">
<span class="documentation-key">{{name}}(</span>
<span class="documentation-type">{{arguments}}</span>
<span class="documentation-key">)</span>
</a>
</p>
<p class="documentation-description">{{help}}</p>
</div>
</div>
</div>
{{/each}}

View File

@@ -0,0 +1,41 @@
<div id="wrapper">
<div id="sidebar-wrapper">
<ul class="sidebar-nav">
<li class="sidebar-brand">
<a href="#">
OpenSpace Scene Properties
</a>
</li>
{{#each propertyOwners}}
<li>
<a href="#{{name}}">{{name}}</a>
</li>
{{/each}}
</ul>
</div>
<div id="page-content-wrapper">
<div class="container-fluid documentation-container">
<h1>OpenSpace Scene Properties</h1>
<p>Version: {{version.[0]}}.{{version.[1]}}.{{version.[2]}}</p>
<p>Scene name: {{sceneFilename}}</p>
<p>Generated: {{generationTime}}</p>
{{#each propertyOwners}}
<div class="row">
<div class="col-lg-12">
<h2><a class="documentation-name" href="#{{name}}" name="{{name}}">{{name}}</a></h2>
{{#each properties}}
{{> property}}
{{/each}}
{{#each propertyOwners}}
{{> propertyOwner}}
{{else}}
<p>{{name}} has no property owners</p>
{{/each}}
</div>
</div>
{{/each}}
</div>
</div>
</div>

View File

@@ -0,0 +1,15 @@
<div class="documentation-item">
<div class="row">
<div class="col-lg-12" title="{{guiName}}">
<p>
<a href="#{{fullyQualifiedId}}" name="{{fullyQualifiedId}}">
<span class="documentation-type">{{type}}</span>
<span class="documentation-key">{{id}}</span>
</a>
</p>
<p class="documentation-description">{{fullyQualifiedId}}
<a class="documentation-small" onclick="copyTextToClipboard('{{fullyQualifiedId}}')">copy</a>
</p>
</div>
</div>
</div>

View File

@@ -0,0 +1,18 @@
<div class="documentation-item">
<div class="row">
<div class="col-lg-12">
<p>
<a href="#{{urlify name}}" name="{{urlify name}}">
<span class="documentation-key">{{name}}</span>
</a>
</p>
{{#each properties}}
{{> property}}
{{/each}}
{{#each propertyOwners}}
{{> propertyOwner}}
{{/each}}
</div>
</div>
</div>

View File

@@ -0,0 +1,58 @@
function copyTextToClipboard(text) {
var textArea = document.createElement("textarea");
textArea.style.position = 'fixed';
textArea.style.top = 0;
textArea.style.left = 0;
textArea.style.width = '2em';
textArea.style.height = '2em';
textArea.style.padding = 0;
textArea.style.border = 'none';
textArea.style.outline = 'none';
textArea.style.boxShadow = 'none';
textArea.style.background = 'transparent';
textArea.value = text;
document.body.appendChild(textArea);
textArea.select();
document.execCommand('copy');
document.body.removeChild(textArea);
}
window.onload = function () {
var mainTemplateElement = document.getElementById('mainTemplate');
var mainTemplate = Handlebars.compile(mainTemplateElement.innerHTML);
var propertyOwnerTemplateElement = document.getElementById('propertyOwnerTemplate');
Handlebars.registerPartial('propertyOwner', propertyOwnerTemplateElement.innerHTML);
var propertyTemplateElement = document.getElementById('propertyTemplate');
Handlebars.registerPartial('property', propertyTemplateElement.innerHTML);
Handlebars.registerHelper('urlify', function(options, context) {
var data = context.data;
var identifier = options.replace(" ", "-").toLowerCase();
while (data = data._parent) {
if (data.key !== undefined) {
identifier = data.key + "-" + identifier;
}
}
return identifier;
});
var data = {
propertyOwners: propertyOwners,
version: version,
sceneFilename: sceneFilename,
generationTime: generationTime
}
var contents = mainTemplate(data);
document.body.innerHTML = contents;
}

View File

@@ -26,13 +26,13 @@
#define __CORE_REGISTRATION_H__
namespace openspace {
namespace documentation {
class DocumentationEngine;
namespace documentation { class DocumentationEngine; }
namespace scripting { class ScriptEngine; }
void registerCoreClasses(documentation::DocumentationEngine& engine);
void registerCoreClasses(scripting::ScriptEngine& engine);
} // namespace documentation
} // namespace openspace
#endif // __CORE_REGISTRATION_H__

View File

@@ -69,11 +69,36 @@ struct TestResult {
/// The Reason that caused this offense
Reason reason;
};
/**
* A warning is some value that that does not exactly adhere to the specification, but
* that also does not violate so badly to warrant an Offense. This, for example, could
* be that a value is marked deprecated and should not be used anymore as the value
* might be removed in a latter version.
*/
struct Warning {
/**
* The reason for the warning
*/
enum class Reason {
Deprecated ///< The value is marked as deprecated and should not used
};
/// The offending key that caused the Warning. In the case of a nested table,
/// this value will be the fully qualified name of the key
std::string offender;
/// The Reason that caused this Warning
Reason reason;
};
/// Is \c true if the TestResult is positive, \c false otherwise
bool success;
/// Contains a list of offenses that were found in the test. Is empty if
/// TestResult::Success is \c true
std::vector<Offense> offenses;
/// Contains a list of warnings that were found in the test
std::vector<Warning> warnings;
};
/**

View File

@@ -665,6 +665,33 @@ struct AnnotationVerifier : public T {
std::string annotation;
};
/**
* This Verifier is a marker that performs the same testing as the \c T parameter, but
* also adds a warning to the test result informing the user of the deprecation.
* Furthermore, the documentation will contain the word <code>(deprecated)</code> in
* addition to the documentation returned by \c
* \tparam T The Verifier that is to be marked deprecated
*/
template <typename T>
struct DeprecatedVerifier : public T {
/**
* Tests the \p dictionary%s \p key using the Verifier \c T and adds a warning to the
* TestResult informing the caller of the deprecation.
* \param dictionary The ghoul::Dictionary whose \p key should be tested
* \param key The key inside the \p dictionary that is to be tested
* \return A TestResult that contains the results of the testing
*/
TestResult operator()(const ghoul::Dictionary& dictionary,
const std::string& key) const override;
/**
* Returns the documentation as reported by \c T and adds the word
* <code>(deprecated)</code> to it.
* \return The deprecated version of \c T%'s documentation
*/
std::string documentation() const override;
};
/**
* This Verifier can reference and apply other Documentation%s that have been registered
* with a DocumentationEngine. The dependency is only resolved when the operator() is
@@ -884,6 +911,18 @@ using StringAnnotationVerifier = AnnotationVerifier<StringVerifier>;
/// <code>ghoul::Dictionary</code>
using TableAnnotationVerifier = AnnotationVerifier<TableVerifier>;
/// A short-hand definition for a DeprecatedVerifier with a type check for \c bool
using BoolDeprecatedVerifier = DeprecatedVerifier<BoolVerifier>;
/// A short-hand definition for a DeprecatedVerifier with a type check for \c int
using IntDeprecatedVerifier = DeprecatedVerifier<IntVerifier>;
/// A short-hand definition for a DeprecatedVerifier with a type check for \c double
using DoubleDeprecatedVerifier = DeprecatedVerifier<DoubleVerifier>;
/// A short-hand definition for a DeprecatedVerifier with a type check for \c string
using StringDeprecatedVerifier = DeprecatedVerifier<StringVerifier>;
/// A short-hand definition for a DeprecatedVerifier with a type check for
/// <code>ghoul::Dictionary</code>
using TableDeprecatedVerifier = DeprecatedVerifier<TableVerifier>;
// Definitions of external templates that are instantiated in the cpp file
// This cuts down the compilation times as almost all of the possible template types do
// not need to be instantiated multiple times
@@ -933,7 +972,30 @@ extern template struct AnnotationVerifier<IntVerifier>;
extern template struct AnnotationVerifier<DoubleVerifier>;
extern template struct AnnotationVerifier<StringVerifier>;
extern template struct AnnotationVerifier<TableVerifier>;
extern template struct AnnotationVerifier<BoolVector2Verifier>;
extern template struct AnnotationVerifier<IntVector2Verifier>;
extern template struct AnnotationVerifier<DoubleVector2Verifier>;
extern template struct AnnotationVerifier<BoolVector3Verifier>;
extern template struct AnnotationVerifier<IntVector3Verifier>;
extern template struct AnnotationVerifier<DoubleVector3Verifier>;
extern template struct AnnotationVerifier<BoolVector4Verifier>;
extern template struct AnnotationVerifier<IntVector4Verifier>;
extern template struct AnnotationVerifier<DoubleVector4Verifier>;
extern template struct DeprecatedVerifier<BoolVerifier>;
extern template struct DeprecatedVerifier<IntVerifier>;
extern template struct DeprecatedVerifier<DoubleVerifier>;
extern template struct DeprecatedVerifier<StringVerifier>;
extern template struct DeprecatedVerifier<TableVerifier>;
extern template struct DeprecatedVerifier<BoolVector2Verifier>;
extern template struct DeprecatedVerifier<IntVector2Verifier>;
extern template struct DeprecatedVerifier<DoubleVector2Verifier>;
extern template struct DeprecatedVerifier<BoolVector3Verifier>;
extern template struct DeprecatedVerifier<IntVector3Verifier>;
extern template struct DeprecatedVerifier<DoubleVector3Verifier>;
extern template struct DeprecatedVerifier<BoolVector4Verifier>;
extern template struct DeprecatedVerifier<IntVector4Verifier>;
extern template struct DeprecatedVerifier<DoubleVector4Verifier>;
} // namespace documentation
} // namespace openspace

View File

@@ -50,7 +50,7 @@ TestResult TemplateVerifier<T>::operator()(const ghoul::Dictionary& dict,
template <typename T>
std::string TemplateVerifier<T>::documentation() const {
return "Type testing of '" + type() + "'";
return "Value of type '" + type() + "'";
}
template <typename T>
@@ -263,7 +263,7 @@ NotInRangeVerifier<T>::NotInRangeVerifier(typename T::Type lower, typename T::Ty
template <typename T>
TestResult NotInRangeVerifier<T>::operator()(const ghoul::Dictionary& dict,
const std::string& key) const {
const std::string& key) const {
TestResult res = T::operator()(dict, key);
if (res.success) {
typename T::Type val = dict.value<typename T::Type>(key);
@@ -299,5 +299,19 @@ std::string AnnotationVerifier<T>::documentation() const {
return annotation;
}
template <typename T>
TestResult DeprecatedVerifier<T>::operator()(const ghoul::Dictionary& dict,
const std::string& key) const
{
TestResult res = T::operator()(dict, key);
res.warnings.push_back(TestResult::Warning{ key, TestResult::Warning::Reason::Deprecated });
return res;
}
template <typename T>
std::string DeprecatedVerifier<T>::documentation() const {
return T::documentation() + " (deprecated)";
}
} // namespace documentation
} // namespace openspace

View File

@@ -106,6 +106,19 @@ public:
/// The key that stores the switch for enabling/disabling the rendering on a master
/// computer
static const std::string KeyRenderingMethod;
/// The key that stores the http proxy settings for the downloadmanager
static const std::string KeyHttpProxy;
/// The key that stores the address of the http proxy
static const std::string PartHttpProxyAddress;
/// The key that stores the port of the http proxy
static const std::string PartHttpProxyPort;
/// The key that stores the authentication method of the http proxy
static const std::string PartHttpProxyAuthentication;
/// The key that stores the username to use for authentication to access the http proxy
static const std::string PartHttpProxyUser;
/// The key that stores the password to use for authentication to access the http proxy
static const std::string PartHttpProxyPassword;
/**
* Iteratively walks the directory structure starting with \p filename to find the

View File

@@ -28,17 +28,14 @@
#include <openspace/util/keys.h>
#include <openspace/util/mouse.h>
#include <openspace/scripting/scriptengine.h>
#include <openspace/scripting/scriptscheduler.h>
#include <ghoul/glm.h>
#include <ghoul/misc/dictionary.h>
#include <memory>
#include <string>
#include <vector>
namespace ghoul {
class Dictionary;
namespace cmdparser { class CommandlineParser; }
namespace fontrendering { class FontManager; }
}
@@ -54,13 +51,17 @@ class RenderEngine;
class ModuleEngine;
class WindowWrapper;
class SettingsEngine;
class TimeManager;
class SyncEngine;
class ParallelConnection;
namespace interaction { class InteractionHandler; }
namespace gui { class GUI; }
//namespace scripting { class ScriptEngine; }
namespace network { class ParallelConnection; }
namespace properties { class PropertyOwner; }
namespace scripting { struct LuaLibrary; }
namespace scripting { class ScriptScheduler; }
namespace scripting { class ScriptEngine; }
class OpenSpaceEngine {
public:
@@ -85,11 +86,12 @@ public:
NetworkEngine& networkEngine();
LuaConsole& console();
ModuleEngine& moduleEngine();
network::ParallelConnection& parallelConnection();
ParallelConnection& parallelConnection();
properties::PropertyOwner& globalPropertyOwner();
WindowWrapper& windowWrapper();
ghoul::fontrendering::FontManager& fontManager();
DownloadManager& downloadManager();
TimeManager& timeManager();
#ifdef OPENSPACE_MODULE_ONSCREENGUI_ENABLED
gui::GUI& gui();
@@ -114,6 +116,7 @@ public:
void enableBarrier();
void disableBarrier();
void writeDocumentation();
void toggleShutdownMode();
bool useBusyWaitForDecode();
@@ -132,7 +135,7 @@ private:
~OpenSpaceEngine();
void clearAllWindows();
bool gatherCommandlineArguments();
void gatherCommandlineArguments();
void loadFonts();
void runScripts(const ghoul::Dictionary& scripts);
void runPreInitializationScripts(const std::string& sceneDescription);
@@ -150,11 +153,12 @@ private:
std::unique_ptr<LuaConsole> _console;
std::unique_ptr<ModuleEngine> _moduleEngine;
std::unique_ptr<SettingsEngine> _settingsEngine;
std::unique_ptr<TimeManager> _timeManager;
std::unique_ptr<DownloadManager> _downloadManager;
#ifdef OPENSPACE_MODULE_ONSCREENGUI_ENABLED
std::unique_ptr<gui::GUI> _gui;
#endif
std::unique_ptr<network::ParallelConnection> _parallelConnection;
std::unique_ptr<ParallelConnection> _parallelConnection;
std::unique_ptr<WindowWrapper> _windowWrapper;
std::unique_ptr<ghoul::fontrendering::FontManager> _fontManager;
@@ -172,6 +176,10 @@ private:
// The current state of the countdown; if it reaches '0', the application will close
float _shutdownCountdown;
// The first frame might take some more time in the update loop, so we need to know to
// disable the synchronization; otherwise a hardware sync will kill us after 1 sec
bool _isFirstRenderingFirstFrame;
static OpenSpaceEngine* _engine;
};

View File

@@ -38,6 +38,7 @@ class SGCTWindowWrapper : public WindowWrapper {
public:
void terminate() override;
void setBarrier(bool enabled) override;
void setSynchronization(bool enabled) override;
void clearAllWindows(const glm::vec4& clearColor) override;
bool windowHasResized() const override;

View File

@@ -34,6 +34,8 @@
namespace openspace {
namespace scripting { struct LuaLibrary; }
/**
* A WindowWrapper is a class that handles the abstraction between OpenSpace and a
* specific window creation framework.<br>
@@ -42,6 +44,12 @@ namespace openspace {
*/
class WindowWrapper {
public:
/**
* Returns the Lua library that contains all Lua functions available to affect the
* windowing system.
*/
static scripting::LuaLibrary luaLibrary();
/**
* This method closes the application by calling the necessary terminate function of
* the window management system
@@ -55,6 +63,14 @@ public:
* disables it
*/
virtual void setBarrier(bool enabled);
/**
* This method enables or disables a framelock barrier. If the specific windowing
* framework does not provide a framelock, this method defaults to a no-op.
* \param enabled If <code>true</code> the framelock is enabled, <code>false</code>
* disables it
*/
virtual void setSynchronization(bool enabled);
/**
* This method clears all the rendering windows with the specified \p clearColor. In

View File

@@ -47,113 +47,15 @@ class SceneGraphNode;
namespace interaction {
//#define USE_OLD_INTERACTIONHANDLER
#ifdef USE_OLD_INTERACTIONHANDLER
class InteractionHandler : public properties::PropertyOwner {
public:
InteractionHandler();
~InteractionHandler();
// Mutators
void setKeyboardController(KeyboardController* controller);
void setMouseController(MouseController* controller);
void setFocusNode(SceneGraphNode* node);
void setCamera(Camera* camera);
void setInteractionSensitivity(float sensitivity);
void resetKeyBindings();
void setInvertRoll(bool invert);
void setInvertRotation(bool invert);
void addController(Controller* controller);
void addKeyframe(const network::datamessagestructures::PositionKeyframe &kf);
void clearKeyframes();
void bindKey(Key key, KeyModifier modifier, std::string lua);
void lockControls();
void unlockControls();
void update(double deltaTime);
// Accessors
const SceneGraphNode* const focusNode() const;
const Camera* const camera() const;
double deltaTime() const;
float interactionSensitivity() const;
bool invertRoll() const;
bool invertRotation() const;
/**
* Returns the Lua library that contains all Lua functions available to affect the
* interaction. The functions contained are
* - openspace::luascriptfunctions::setOrigin
* \return The Lua library that contains all Lua functions available to affect the
* interaction
*/
static scripting::LuaLibrary luaLibrary();
// Callback functions
void keyboardCallback(Key key, KeyModifier modifier, KeyAction action);
void mouseButtonCallback(MouseButton button, MouseAction action);
void mousePositionCallback(double x, double y);
void mouseScrollWheelCallback(double pos);
// Interaction functions
void orbitDelta(const glm::quat& rotation);
void orbit(const float &dx, const float &dy, const float &dz, const float &dist);
void rotateDelta(const glm::quat& rotation);
void distanceDelta(const PowerScaledScalar& distance, size_t iterations = 0);
void lookAt(const glm::quat& rotation);
void setRotation(const glm::quat& rotation);
private:
// Remove copy and move constructors
InteractionHandler(const InteractionHandler&) = delete;
InteractionHandler& operator=(const InteractionHandler&) = delete;
InteractionHandler(InteractionHandler&&) = delete;
InteractionHandler& operator=(InteractionHandler&&) = delete;
// Settings
float _controllerSensitivity;
bool _invertRoll;
bool _invertRotation;
// Pointers to entities to affect
Camera* _camera;
SceneGraphNode* _focusNode;
// Cached data
double _deltaTime;
std::mutex _mutex;
//bool _validKeyLua;
std::multimap<KeyWithModifier, std::string > _keyLua;
KeyboardController* _keyboardController;
MouseController* _mouseController;
std::vector<Controller*> _controllers;
properties::StringProperty _origin;
properties::StringProperty _coordinateSystem;
//remote controller
std::vector<network::datamessagestructures::PositionKeyframe> _keyframes;
double _currentKeyframeTime;
std::mutex _keyframeMutex;
};
#else // USE_OLD_INTERACTIONHANDLER
class InteractionHandler : public properties::PropertyOwner
{
public:
InteractionHandler();
~InteractionHandler();
void initialize();
void deinitialize();
// Mutators
void setFocusNode(SceneGraphNode* node);
void setCamera(Camera* camera);
@@ -165,9 +67,10 @@ public:
void resetKeyBindings();
void addKeyframe(const network::datamessagestructures::PositionKeyframe &kf);
void addKeyframe(const datamessagestructures::CameraKeyframe &kf);
void clearKeyframes();
void bindKeyLocal(Key key, KeyModifier modifier, std::string lua);
void bindKey(Key key, KeyModifier modifier, std::string lua);
void lockControls();
void unlockControls();
@@ -206,7 +109,7 @@ private:
bool _cameraUpdatedFromScript = false;
std::multimap<KeyWithModifier, std::string > _keyLua;
std::multimap<KeyWithModifier, std::pair<std::string, bool>> _keyLua;
std::unique_ptr<InputState> _inputState;
Camera* _camera;
@@ -228,8 +131,6 @@ private:
properties::FloatProperty _rapidness;
};
#endif // USE_OLD_INTERACTIONHANDLER
} // namespace interaction
} // namespace openspace

View File

@@ -75,15 +75,16 @@ namespace interaction {
void mouseScrollWheelCallback(double mouseScrollDelta);
// Mutators
void addKeyframe(const network::datamessagestructures::PositionKeyframe &kf);
void addKeyframe(const datamessagestructures::CameraKeyframe &kf);
void clearKeyframes();
void clearOldKeyframes();
// Accessors
const std::list<std::pair<Key, KeyModifier> >& getPressedKeys() const;
const std::list<MouseButton>& getPressedMouseButtons() const;
glm::dvec2 getMousePosition() const;
double getMouseScrollDelta() const;
std::vector<network::datamessagestructures::PositionKeyframe>& getKeyFrames() const;
const std::vector<datamessagestructures::CameraKeyframe>& keyframes() const;
bool isKeyPressed(std::pair<Key, KeyModifier> keyModPair) const;
bool isKeyPressed(Key key) const;
@@ -96,8 +97,7 @@ namespace interaction {
double _mouseScrollDelta;
// Remote input via keyframes
std::vector<network::datamessagestructures::PositionKeyframe> _keyframes;
std::mutex _keyframeMutex;
std::vector<datamessagestructures::CameraKeyframe> _keyframes;
};
@@ -192,6 +192,7 @@ public:
virtual void updateCameraStateFromMouseStates(Camera& camera);
private:
std::vector<datamessagestructures::CameraKeyframe> _keyframes;
double _currentKeyframeTime;
};

View File

@@ -26,6 +26,7 @@
#define LUACONSOLE_H
#include <openspace/scripting/scriptengine.h>
#include <openspace/network/parallelconnection.h>
#include <openspace/util/keys.h>
@@ -50,12 +51,16 @@ public:
bool isVisible() const;
void setVisible(bool visible);
void toggleVisibility();
bool isRemoteScripting() const;
void setRemoteScripting(bool remoteScripting);
void toggleMode();
static scripting::LuaLibrary luaLibrary();
private:
void parallelConnectionChanged(const ParallelConnection::Status& status);
void addToCommand(std::string c);
std::string UnicodeToUTF8(unsigned int codepoint);
@@ -73,6 +78,7 @@ private:
} _autoCompleteInfo;
bool _isVisible;
bool _remoteScripting;
};
} // namespace openspace

View File

@@ -0,0 +1,146 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2016 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
* without restriction, including without limitation the rights to use, copy, modify, *
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
* permit persons to whom the Software is furnished to do so, subject to the following *
* conditions: *
* *
* The above copyright notice and this permission notice shall be included in all copies *
* or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#ifndef __MISSION_H__
#define __MISSION_H__
#include <openspace/documentation/documentation.h>
#include <openspace/util/timerange.h>
#include <functional>
#include <string>
#include <vector>
namespace ghoul { class Dictionary; }
namespace openspace {
/**
* Used to represent a named period of time within a mission. Allows nested phases, i.e.
* phases within phases. Designed for WORM usage (Write Once, Read Multiple), and,
* therefore, has only accessors.
*
* Each MissionPhase is characterized by its MissionPhase::name, a TimeRange, an
* optional MissionPhase::description, and optional subphases.
*/
class MissionPhase {
public:
/**
* Constructs a MissionPhase from the information provided in the \p dictionary. See
* the MissionPhase::Documentation for accepted ghoul::Dictionary values.
* \param dictionary The ghoul::Dictionary that contains information about the current
* MissionPhase
* \throw SpecificationError If the \p dictionary does not adhere to the Documentation
* \throw RuntimeError If the time range of subphases is smaller than the specified
* time range
* \throw RuntimeError If neither subphases or a time range is specified
*/
MissionPhase(const ghoul::Dictionary& dictionary);
/**
* Returns the name of the MissionPhase.
* \return The name of the MissionPhase
*/
const std::string& name() const;
/**
* Returns the TimeRange of the MissionPhase.
* \return The TimeRange of the MissionPhase
*/
const TimeRange& timeRange() const;
/**
* Returns the description of the MissionPhase.
* \return The description of the MissionPhase
*/
const std::string& description() const;
/**
* Returns all subphases sorted by start time.
* \return All subphases sorted by start time
*/
const std::vector<MissionPhase>& phases() const;
using Trace = std::vector<std::reference_wrapper<const MissionPhase>>;
/**
* Returns all MissionPhase%s whose MissionPhase::timeRange includes the provided
* \p time, up to a maximum subphase depth of \p maxDepth.
* \param time The time in which the subphases have to be active in order to be
* included
* \param maxDepth The maximum levels of subphases that will be considered. If this
* value is equal to <code>-1</code>, an infinite depth will be considered.
* \return A list of MissionPhases that cover the provided \p time
*/
Trace phaseTrace(double time, int maxDepth = -1) const;
/**
* Returns the Documentation that describes the ghoul::Dictionarty that this
* MissionPhase can be constructed from.
* \return The Documentation that describes the required structure for a Dictionary
*/
static openspace::Documentation Documentation();
protected:
/**
* Recursive function that walks the subphases and adds the MissionPhase%s that cover
* the provided \p time and adds these to the list of \p trace%s. Each recursive call
* will decrease the \p maxDepth counter until it reaches 0.
* \param time The time which the subphases have to cover to be added to the \p trace
* \param trace The list of MissionPhase%s that are active during the time \p time
* \param maxDepth The maximum depth of levels that will be considered
*/
void phaseTrace(double time, Trace& trace, int maxDepth) const;
/// The name of the MissionPhase
std::string _name;
/// The description of the MissionPhase
std::string _description;
/// The range in time that is covered by this MissionPhase
TimeRange _timeRange;
/// A list of subphases into which this MissionPhase is separated
std::vector<MissionPhase> _subphases;
};
/**
* A Mission is a list of MissionPhases that has a name, an optional description, a
* TimeRange for which the Mission is active, and a potential list of subphases.
*/
using Mission = MissionPhase;
/**
* This function constructs a Mission from the provided \p filename. The file must be a
* Lua table that describes the Mission according to MissionPhase::Documentation
* \param filename The file that is used to create the Mission
* \return The constructed Mission
* \pre \p filename must not be empty
* \pre \p filename must not contain tokens
* \pre \p filename must exist
*/
Mission missionFromFile(std::string filename);
} // namespace openspace
#endif // __MISSION_H__

View File

@@ -22,102 +22,61 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#ifndef __MISSIONPHASEEQUENCER_H__
#define __MISSIONPHASEEQUENCER_H__
#ifndef __MISSIONMANAGER_H__
#define __MISSIONMANAGER_H__
#include <openspace/mission/mission.h>
#include <vector>
#include <list>
#include <ghoul/designpattern/singleton.h>
#include <ghoul/misc/exception.h>
#include <map>
#include <string>
#include <unordered_map>
#include <openspace/util/timerange.h>
#include <ghoul/misc/dictionary.h>
#include <ghoul/lua/ghoul_lua.h>
namespace openspace {
/**
* Used to represent a named period of time within a mission. Allows nested phases, i.e.
* phases within phases. Designed for WORM usage (Write Once, Read Multiple), and therefor
* has only accessors.
*/
class MissionPhase {
public:
MissionPhase() : _name(""), _description("") {};
MissionPhase(const ghoul::Dictionary& dict);
const std::string& name() const { return _name; }
const TimeRange& timeRange() const { return _timeRange; };
const std::string& description() const { return _description; };
/**
* Returns all subphases sorted by start time
*/
const std::vector<MissionPhase>& phases() const { return _subphases; }
/**
* Returns the i:th subphase, sorted by start time
*/
const MissionPhase& phase(size_t i) const { return _subphases[i]; }
std::list<const MissionPhase*> phaseTrace(double time, int maxDepth = -1) const;
protected:
bool phaseTrace(double time, std::list<const MissionPhase*>& trace, int maxDepth) const;
std::string _name;
std::string _description;
TimeRange _timeRange;
std::vector<MissionPhase> _subphases;
};
class Mission : public MissionPhase {
public:
Mission() {};
Mission(std::string filename);
private:
static ghoul::Dictionary readDictFromFile(std::string filepath);
std::string _filepath;
};
namespace scripting { struct LuaLibrary; }
/**
* Singleton class keeping track of space missions.
*/
class MissionManager {
class MissionManager : public ghoul::Singleton<MissionManager> {
public:
struct MissionManagerException : public ghoul::RuntimeError {
explicit MissionManagerException(std::string error);
};
static MissionManager& ref();
static void initialize();
static void deinitialize();
MissionManager();
/**
* Reads a mission from file and maps the mission name to the Mission object. If
* this is the first mission to be loaded, the mission will also be set as the
* current active mission.
* \pre \p filename must not be empty
* \pre \p filename must not contain tokens
* \pre \p filename must exist
*/
void loadMission(const std::string& fileName);
void loadMission(const std::string& filename);
/**
* Returns whether the provided \p missionName has previously been added to the
* MissionManager.
* \param missionName The name of the mission that is to be tested
* \return \c true if the \p missionName has been added before
*/
bool hasMission(const std::string& missionName);
/**
* Sets the mission with the name <missionName> as the current mission. The current
* mission is what is return by `currentMission()`.
* \pre missionName must not be empty
*/
void setCurrentMission(const std::string missionName);
void setCurrentMission(const std::string& missionName);
/**
* Returns true if a current mission exists
*/
bool hasCurrentMission() const { return _currentMissionIter != _missionMap.end(); }
bool hasCurrentMission() const;
/**
* Returns the latest mission specified to `setCurrentMission()`. If no mission has
@@ -126,22 +85,15 @@ public:
*/
const Mission& currentMission();
private:
static scripting::LuaLibrary luaLibrary();
static MissionManager* _instance;
typedef std::unordered_map<std::string, Mission> MissionMap;
private:
using MissionMap = std::map<std::string, Mission>;
MissionMap _missionMap;
MissionMap::iterator _currentMissionIter;
// Singleton
MissionManager() : _currentMissionIter(_missionMap.end()) { };
MissionMap::iterator _currentMission;
};
} // namespace openspace
#endif // __MISSIONPHASEEQUENCER_H__
#endif // __MISSIONMANAGER_H__

View File

@@ -33,133 +33,135 @@
#include <glm/gtx/quaternion.hpp>
//openspace includes
#include <openspace/util/powerscaledcoordinate.h>
#include <openspace/util/camera.h>
namespace openspace{
namespace network{
namespace datamessagestructures{
enum type{
PositionData = 0,
TimeData,
ScriptData
};
struct PositionKeyframe{
glm::quat _viewRotationQuat;
psc _position;
double _timeStamp;
void serialize(std::vector<char> &buffer){
//add position
buffer.insert(buffer.end(), reinterpret_cast<char*>(&_position), reinterpret_cast<char*>(&_position) + sizeof(_position));
//add orientation
buffer.insert(buffer.end(), reinterpret_cast<char*>(&_viewRotationQuat), reinterpret_cast<char*>(&_viewRotationQuat) + sizeof(_viewRotationQuat));
//add timestamp
buffer.insert(buffer.end(), reinterpret_cast<char*>(&_timeStamp), reinterpret_cast<char*>(&_timeStamp) + sizeof(_timeStamp));
};
void deserialize(const std::vector<char> &buffer){
int offset = 0;
int size = 0;
//position
size = sizeof(_position);
memcpy(&_position, buffer.data() + offset, size);
offset += size;
//orientation
size = sizeof(_viewRotationQuat);
memcpy(&_viewRotationQuat, buffer.data() + offset, size);
offset += size;
//timestamp
size = sizeof(_timeStamp);
memcpy(&_timeStamp, buffer.data() + offset, size);
};
};
struct TimeKeyframe{
namespace datamessagestructures {
enum class Type : uint32_t {
CameraData = 0,
TimeData,
ScriptData
};
double _time;
double _dt;
bool _paused;
bool _requiresTimeJump;
void serialize(std::vector<char> &buffer){
//add current time
buffer.insert(buffer.end(), reinterpret_cast<char*>(&_time), reinterpret_cast<char*>(&_time) + sizeof(_time));
//add delta time
buffer.insert(buffer.end(), reinterpret_cast<char*>(&_dt), reinterpret_cast<char*>(&_dt) + sizeof(_dt));
//add wether time is paused or not
buffer.insert(buffer.end(), reinterpret_cast<char*>(&_paused), reinterpret_cast<char*>(&_paused) + sizeof(_paused));
//add wether a time jump is necessary (recompute paths etc)
buffer.insert(buffer.end(), reinterpret_cast<char*>(&_requiresTimeJump), reinterpret_cast<char*>(&_requiresTimeJump) + sizeof(_requiresTimeJump));
};
void deserialize(const std::vector<char> &buffer){
int offset = 0;
int size = 0;
//current time
size = sizeof(_time);
memcpy(&_time, buffer.data() + offset, size);
offset += size;
//delta time
size = sizeof(_dt);
memcpy(&_dt, buffer.data() + offset, size);
offset += size;
//is time paused?
size = sizeof(_paused);
memcpy(&_paused, buffer.data() + offset, size);
offset += sizeof(_paused);
//is a time jump required?
size = sizeof(_requiresTimeJump);
memcpy(&_requiresTimeJump, buffer.data() + offset, size);
};
};
struct ScriptMessage{
uint16_t _scriptlen;
std::string _script;
void serialize(std::vector<char> &buffer){
//add script length
buffer.insert(buffer.end(), reinterpret_cast<char*>(&_scriptlen), reinterpret_cast<char*>(&_scriptlen) + sizeof(_scriptlen));
//add script
buffer.insert(buffer.end(), _script.begin(), _script.end());
};
void deserialize(const std::vector<char> &buffer){
int offset = 0;
int size = 0;
//size of script
size = sizeof(uint16_t);
memcpy(&_scriptlen, buffer.data() + offset, size);
offset += size;
//actual script
_script.assign(buffer.begin() + offset, buffer.end());
};
};
} //namespace messagestructures
struct CameraKeyframe {
CameraKeyframe() {}
CameraKeyframe(const std::vector<char> &buffer) {
deserialize(buffer);
}
} // namespace network
glm::dvec3 _position;
glm::dquat _rotation;
double _timestamp;
void serialize(std::vector<char> &buffer){
//add position
buffer.insert(buffer.end(), reinterpret_cast<char*>(&_position), reinterpret_cast<char*>(&_position) + sizeof(_position));
//add orientation
buffer.insert(buffer.end(), reinterpret_cast<char*>(&_rotation), reinterpret_cast<char*>(&_rotation) + sizeof(_rotation));
//add timestamp
buffer.insert(buffer.end(), reinterpret_cast<char*>(&_timestamp), reinterpret_cast<char*>(&_timestamp) + sizeof(_timestamp));
};
void deserialize(const std::vector<char> &buffer){
int offset = 0;
int size = 0;
//position
size = sizeof(_position);
memcpy(&_position, buffer.data() + offset, size);
offset += size;
//orientation
size = sizeof(_rotation);
memcpy(&_rotation, buffer.data() + offset, size);
offset += size;
//timestamp
size = sizeof(_timestamp);
memcpy(&_timestamp, buffer.data() + offset, size);
};
};
struct TimeKeyframe {
TimeKeyframe() {}
TimeKeyframe(const std::vector<char> &buffer) {
deserialize(buffer);
}
double _time;
double _dt;
bool _paused;
bool _requiresTimeJump;
double _timestamp;
void serialize(std::vector<char> &buffer){
//add current time
buffer.insert(buffer.end(), reinterpret_cast<char*>(&_time), reinterpret_cast<char*>(&_time) + sizeof(_time));
//add delta time
buffer.insert(buffer.end(), reinterpret_cast<char*>(&_dt), reinterpret_cast<char*>(&_dt) + sizeof(_dt));
//add wether time is paused or not
buffer.insert(buffer.end(), reinterpret_cast<char*>(&_paused), reinterpret_cast<char*>(&_paused) + sizeof(_paused));
//add wether a time jump is necessary (recompute paths etc)
buffer.insert(buffer.end(), reinterpret_cast<char*>(&_requiresTimeJump), reinterpret_cast<char*>(&_requiresTimeJump) + sizeof(_requiresTimeJump));
//add timestamp
buffer.insert(buffer.end(), reinterpret_cast<char*>(&_timestamp), reinterpret_cast<char*>(&_timestamp) + sizeof(_timestamp));
};
void deserialize(const std::vector<char> &buffer){
int offset = 0;
int size = 0;
//current time
size = sizeof(_time);
memcpy(&_time, buffer.data() + offset, size);
offset += size;
//delta time
size = sizeof(_dt);
memcpy(&_dt, buffer.data() + offset, size);
offset += size;
//is time paused?
size = sizeof(_paused);
memcpy(&_paused, buffer.data() + offset, size);
offset += sizeof(_paused);
//is a time jump required?
size = sizeof(_requiresTimeJump);
memcpy(&_requiresTimeJump, buffer.data() + offset, size);
offset += size;
// timestamp
size = sizeof(_timestamp);
memcpy(&_timestamp, buffer.data() + offset, size);
offset += size;
};
};
struct ScriptMessage {
ScriptMessage() {}
ScriptMessage(const std::vector<char> &buffer) {
deserialize(buffer);
}
std::string _script;
void serialize(std::vector<char> &buffer){
buffer.insert(buffer.end(), _script.begin(), _script.end());
};
void deserialize(const std::vector<char> &buffer){
_script.assign(buffer.begin(), buffer.end());
};
};
} //namespace messagestructures
} // namespace openspace
#endif // __MESSAGESTRUCTURES_H__

View File

@@ -26,19 +26,20 @@
#define __PARALLELCONNECTION_H__
//openspace includes
#include <openspace/scripting/scriptengine.h>
#include <openspace/util/powerscaledcoordinate.h>
#include <openspace/network/messagestructures.h>
//glm includes
#include <glm/gtx/quaternion.hpp>
//ghoul includes
#include <ghoul/designpattern/event.h>
//std includes
#include <string>
#include <vector>
#include <deque>
#include <atomic>
#include <thread>
#include <sstream>
#include <mutex>
#include <map>
#include <condition_variable>
@@ -59,150 +60,149 @@ typedef int _SOCKET;
#include <netdb.h>
#endif
namespace openspace{
namespace network{
class ParallelConnection{
public:
ParallelConnection();
~ParallelConnection();
void clientConnect();
void setPort(const std::string &port);
void setAddress(const std::string &address);
void setName(const std::string& name);
bool isHost();
void requestHostship(const std::string &password);
namespace openspace {
void setPassword(const std::string &password);
void signalDisconnect();
void preSynchronization();
void scriptMessage(const std::string propIdentifier, const std::string propValue);
enum MessageTypes{
Authentication=0,
Initialization,
Data,
Script, //obsolete now
HostInfo,
InitializationRequest,
HostshipRequest,
InitializationCompleted
};
/**
* Returns the Lua library that contains all Lua functions available to affect the
* remote OS parallel connection. The functions contained are
* -
* \return The Lua library that contains all Lua functions available to affect the
* interaction
*/
static scripting::LuaLibrary luaLibrary();
protected:
private:
//@TODO change this into the ghoul hasher for client AND server
uint32_t hash(const std::string &val){
uint32_t hashVal = 0, i;
size_t len = val.length();
class ParallelConnection {
public:
enum class Status : uint32_t {
Disconnected = 0,
ClientWithoutHost,
ClientWithHost,
Host
};
for (hashVal = i = 0; i < len; ++i){
hashVal += val.c_str()[i];
hashVal += (hashVal << 10);
hashVal ^= (hashVal >> 6);
}
enum class MessageType : uint32_t {
Authentication = 0,
Data,
ConnectionStatus,
HostshipRequest,
HostshipResignation,
NConnections
};
hashVal += (hashVal << 3);
hashVal ^= (hashVal >> 11);
hashVal += (hashVal << 15);
struct Message {
Message() {};
Message(MessageType t, const std::vector<char>& c)
: type(t)
, content(c)
{};
MessageType type;
std::vector<char> content;
};
struct DataMessage {
DataMessage() {};
DataMessage(datamessagestructures::Type t, const std::vector<char>& c)
: type(t)
, content(c)
{};
datamessagestructures::Type type;
std::vector<char> content;
};
ParallelConnection();
~ParallelConnection();
void clientConnect();
void setPort(const std::string &port);
void setAddress(const std::string &address);
void setName(const std::string& name);
bool isHost();
const std::string& hostName();
void requestHostship(const std::string &password);
void resignHostship();
void setPassword(const std::string &password);
void signalDisconnect();
void preSynchronization();
void sendScript(const std::string& script);
/**
* Returns the Lua library that contains all Lua functions available to affect the
* remote OS parallel connection. The functions contained are
* -
* \return The Lua library that contains all Lua functions available to affect the
* interaction
*/
static scripting::LuaLibrary luaLibrary();
Status status();
size_t nConnections();
std::shared_ptr<ghoul::Event<>> connectionEvent();
return hashVal;
};
void queueMessage(std::vector<char> message);
void disconnect();
private:
//@TODO change this into the ghoul hasher for client AND server
uint32_t hash(const std::string &val);
void queueOutMessage(const Message& message);
void queueOutDataMessage(const DataMessage& dataMessage);
void queueInMessage(const Message& message);
void disconnect();
void closeSocket();
bool initNetworkAPI();
void establishConnection(addrinfo *info);
void sendAuthentication();
void listenCommunication();
int receiveData(_SOCKET & socket, std::vector<char> &buffer, int length, int flags);
void handleMessage(const Message&);
void dataMessageReceived(const std::vector<char>& messageContent);
void connectionStatusMessageReceived(const std::vector<char>& messageContent);
void nConnectionsMessageReceived(const std::vector<char>& messageContent);
void broadcast();
void sendCameraKeyframe();
void sendTimeKeyframe();
void sendFunc();
void threadManagement();
void setStatus(Status status);
void setHostName(const std::string& hostName);
void setNConnections(size_t nConnections);
double calculateBufferedKeyframeTime(double originalTime);
uint32_t _passCode;
std::string _port;
std::string _address;
std::string _name;
void writeHeader(std::vector<char> &buffer, uint32_t messageType);
_SOCKET _clientSocket;
void closeSocket();
std::atomic<bool> _isConnected;
std::atomic<bool> _isRunning;
std::atomic<bool> _tryConnect;
std::atomic<bool> _disconnect;
std::atomic<bool> _initializationTimejumpRequired;
bool initNetworkAPI();
std::atomic<size_t> _nConnections;
std::atomic<Status> _status;
std::string _hostName;
void establishConnection(addrinfo *info);
void sendAuthentication();
void listenCommunication();
void delegateDecoding(uint32_t type);
void initializationMessageReceived();
void dataMessageReceived();
void hostInfoMessageReceived();
std::condition_variable _disconnectCondition;
std::mutex _disconnectMutex;
void initializationRequestMessageReceived();
std::condition_variable _sendCondition;
std::deque<Message> _sendBuffer;
std::mutex _sendBufferMutex;
void broadcast();
std::deque<Message> _receiveBuffer;
std::mutex _receiveBufferMutex;
int headerSize();
std::atomic<bool> _timeJumped;
std::mutex _latencyMutex;
std::deque<double> _latencyDiffs;
double _initialTimeDiff;
int receiveData(_SOCKET & socket, std::vector<char> &buffer, int length, int flags);
void sendFunc();
bool parseHints(addrinfo &info);
void threadManagement();
std::string scriptFromPropertyAndValue(const std::string property, const std::string value);
uint32_t _passCode;
std::string _port;
std::string _address;
std::string _name;
_SOCKET _clientSocket;
std::thread *_connectionThread;
std::thread *_broadcastThread;
std::thread *_sendThread;
std::thread *_listenThread;
std::thread *_handlerThread;
std::atomic<bool> _isHost;
std::atomic<bool> _isConnected;
std::atomic<bool> _performDisconnect;
std::atomic<bool> _isRunning;
std::atomic<bool> _tryConnect;
std::atomic<bool> _initializationTimejumpRequired;
std::unique_ptr<std::thread> _connectionThread;
std::unique_ptr<std::thread> _broadcastThread;
std::unique_ptr<std::thread> _sendThread;
std::unique_ptr<std::thread> _listenThread;
std::unique_ptr<std::thread> _handlerThread;
std::shared_ptr<ghoul::Event<>> _connectionEvent;
};
std::condition_variable _disconnectCondition;
std::mutex _disconnectMutex;
std::vector<std::vector<char>> _sendBuffer;
std::mutex _sendBufferMutex;
std::condition_variable _sendCondition;
network::datamessagestructures::TimeKeyframe _latestTimeKeyframe;
std::mutex _timeKeyframeMutex;
std::atomic<bool> _latestTimeKeyframeValid;
std::map<std::string, std::string> _currentState;
std::mutex _currentStateMutex;
};
} // namespace network
} // namespace openspace
#endif // __OSPARALLELCONNECTION_H__

View File

@@ -124,7 +124,7 @@ public:
private:
bool loadSceneInternal(const std::string& sceneDescriptionFilePath);
void writePropertyDocumentation(const std::string& filename, const std::string& type);
void writePropertyDocumentation(const std::string& filename, const std::string& type, const std::string& sceneFilename);
std::string _focus;

View File

@@ -29,7 +29,7 @@
#include <openspace/documentation/documentation.h>
#include <openspace/rendering/renderable.h>
#include <openspace/scene/ephemeris.h>
#include <openspace/scene/translation.h>
#include <openspace/scene/rotation.h>
#include <openspace/scene/scale.h>
#include <openspace/properties/propertyowner.h>
@@ -103,9 +103,9 @@ public:
// @TODO Remove once the scalegraph is in effect ---abock
void setEphemeris(Ephemeris* eph) {
delete _ephemeris;
_ephemeris = eph;
void setEphemeris(Translation* eph) {
delete _translation;
_translation = eph;
}
static documentation::Documentation Documentation();
@@ -129,7 +129,7 @@ private:
PowerScaledScalar _boundingSphere;
// Transformation defined by ephemeris, rotation and scale
Ephemeris* _ephemeris;
Translation* _translation;
Rotation* _rotation;
Scale* _scale;

View File

@@ -22,8 +22,8 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#ifndef __EPHEMERIS_H__
#define __EPHEMERIS_H__
#ifndef __TRANSLATION_H__
#define __TRANSLATION_H__
#include <openspace/properties/propertyowner.h>
@@ -34,11 +34,11 @@
namespace openspace {
class Ephemeris : public properties::PropertyOwner {
class Translation : public properties::PropertyOwner {
public:
static Ephemeris* createFromDictionary(const ghoul::Dictionary& dictionary);
static Translation* createFromDictionary(const ghoul::Dictionary& dictionary);
virtual ~Ephemeris();
virtual ~Translation();
virtual bool initialize();
virtual glm::dvec3 position() const = 0;
virtual void update(const UpdateData& data);
@@ -48,4 +48,4 @@ public:
} // namespace openspace
#endif // __EPHEMERIS_H__
#endif // __TRANSLATION_H__

View File

@@ -37,9 +37,8 @@ namespace scripting {
struct LuaLibrary {
/**
* This structure represents a Lua function with its #name, #function pointer
* #argumentText describing the arguments this function takes, the #helpText
* describing the function, and whether it should be shared in a parallel
* connection (#parallelShared)
* #argumentText describing the arguments this function takes, and the the #helpText
* describing the function.
*/
struct Function {
/// The name of the function
@@ -50,9 +49,6 @@ struct LuaLibrary {
std::string argumentText;
/// A help text describing what the function does/
std::string helpText;
/// If <code>true</code>, this function will be shared with other parallel
/// connections
bool parallelShared;
};
/// The name of the library
std::string name;

View File

@@ -50,6 +50,7 @@ namespace scripting {
*/
class ScriptEngine : public Syncable {
public:
using RemoteScripting = ghoul::Boolean;
/**
* Initializes the internal Lua state and registers a common set of library functions
* \throw LuaRuntimeException If the creation of the new Lua state fails
@@ -79,7 +80,7 @@ public:
virtual void decode(SyncBuffer* syncBuffer);
virtual void postsync(bool isMaster);
void queueScript(const std::string &script);
void queueScript(const std::string &script, RemoteScripting remoteScripting);
void setLogFile(const std::string& filename, const std::string& type);
@@ -88,9 +89,9 @@ public:
std::vector<std::string> allLuaFunctions() const;
//parallel functions
bool parseLibraryAndFunctionNames(std::string &library, std::string &function, const std::string &script);
bool shouldScriptBeSent(const std::string &library, const std::string &function);
void cacheScript(const std::string &library, const std::string &function, const std::string &script);
//bool parseLibraryAndFunctionNames(std::string &library, std::string &function, const std::string &script);
//bool shouldScriptBeSent(const std::string &library, const std::string &function);
//void cacheScript(const std::string &library, const std::string &function, const std::string &script);
private:
@@ -107,13 +108,13 @@ private:
//sync variables
std::mutex _mutex;
std::vector<std::string> _queuedScripts;
std::vector<std::pair<std::string, bool>> _queuedScripts;
std::vector<std::string> _receivedScripts;
std::string _currentSyncedScript;
//parallel variables
std::map<std::string, std::map<std::string, std::string>> _cachedScripts;
std::mutex _cachedScriptsMutex;
//std::map<std::string, std::map<std::string, std::string>> _cachedScripts;
//std::mutex _cachedScriptsMutex;
//logging variables
bool _logFileExists = false;

View File

@@ -0,0 +1,51 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2016 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
* without restriction, including without limitation the rights to use, copy, modify, *
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
* permit persons to whom the Software is furnished to do so, subject to the following *
* conditions: *
* *
* The above copyright notice and this permission notice shall be included in all copies *
* or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#ifndef __TIMEMANAGER_H__
#define __TIMEMANAGER_H__
#include <deque>
#include <openspace/network/messagestructures.h>
namespace openspace {
class TimeManager {
public:
void preSynchronization(double dt);
void addKeyframe(const datamessagestructures::TimeKeyframe& kf);
void removeKeyframesBefore(double timestamp);
void clearKeyframes();
private:
void consumeKeyframes(double dt);
std::deque<datamessagestructures::TimeKeyframe> _keyframes;
static bool compareKeyframeTimes(
const datamessagestructures::TimeKeyframe& a,
const datamessagestructures::TimeKeyframe& b);
double _latestConsumedTimestamp;
};
}
#endif // __TIMEMANAGER_H__

View File

@@ -1,37 +1,33 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2016 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
* without restriction, including without limitation the rights to use, copy, modify, *
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
* permit persons to whom the Software is furnished to do so, subject to the following *
* conditions: *
* *
* The above copyright notice and this permission notice shall be included in all copies *
* or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#include <ghoul/misc/dictionary.h>
#include <openspace/util/spicemanager.h> // ephemerisTimeFromDate
* *
* OpenSpace *
* *
* Copyright (c) 2014-2016 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
* without restriction, including without limitation the rights to use, copy, modify, *
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
* permit persons to whom the Software is furnished to do so, subject to the following *
* conditions: *
* *
* The above copyright notice and this permission notice shall be included in all copies *
* or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#ifndef __TIMERANGE_H__
#define __TIMERANGE_H__
namespace {
const std::string KEY_START = "Start";
const std::string KEY_END = "End";
}
#include <openspace/documentation/documentation.h>
namespace ghoul { class Dictionary; }
namespace openspace {
@@ -40,79 +36,41 @@ struct TimeRange {
/**
* Default constructor initializes an empty time range.
*/
TimeRange() : start(DBL_MAX), end(-DBL_MAX) { };
TimeRange();
/**
* Initializes a TimeRange with both start and end time. Initializing empty timeranges
* is OK.
*/
TimeRange(double startTime, double endTime) : start(startTime) , end(endTime) { };
TimeRange(double startTime, double endTime);
/**
* Throws exception if unable to parse the provided \class ghoul::Dictionary
*/
TimeRange(const ghoul::Dictionary& dict) {
if (!initializeFromDictionary(dict, *this)) {
throw std::runtime_error("Unable to read TimeRange from dictionary");
}
}
TimeRange(const ghoul::Dictionary& dict);
/**
* \returns true if timeRange could be initialized from the dictionary, false otherwise.
*/
static bool initializeFromDictionary(const ghoul::Dictionary& dict, TimeRange& timeRange) {
std::string startTimeStr;
std::string endTimeStr;
static bool initializeFromDictionary(const ghoul::Dictionary& dict, TimeRange& timeRange);
bool success = true;
success &= dict.getValue(KEY_START, startTimeStr);
success &= dict.getValue(KEY_END, endTimeStr);
if (success) {
// Parse to date.
// @TODO converting string to time stamp should not rely on Spice
timeRange.start = SpiceManager::ref().ephemerisTimeFromDate(startTimeStr);
timeRange.end = SpiceManager::ref().ephemerisTimeFromDate(endTimeStr);
return true;
}
else {
// Could not read TimeRange from Dict
return false;
}
}
void include(double val);
void include(double val){
if (start > val) start = val;
if (end < val) end = val;
};
void include(const TimeRange& other);
double duration() const;
void include(const TimeRange& other) {
if (other.start < start) start = other.start;
if (other.end > end) end = other.end;
}
bool isDefined() const;
double duration() const {
return end - start;
}
bool isEmpty() const;
bool isDefined() const {
return start <= end;
}
bool inRange(double min, double max);
bool isEmpty() const {
return !isDefined();
}
bool includes(double val) const;
bool inRange(double min, double max){
return (min >= start && max <= end);
}
bool includes(const TimeRange& o) const;
bool includes(double val) const {
return (start <= val && val <= end);
}
bool includes(const TimeRange& o) const {
return start <= o.start && o.end <= end;
}
static openspace::Documentation Documentation();
double start;
double end;

View File

@@ -42,8 +42,8 @@ set(HEADER_FILES
${CMAKE_CURRENT_SOURCE_DIR}/rendering/simplespheregeometry.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspaceframebuffer.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspaceimage.h
${CMAKE_CURRENT_SOURCE_DIR}/ephemeris/spiceephemeris.h
${CMAKE_CURRENT_SOURCE_DIR}/ephemeris/staticephemeris.h
${CMAKE_CURRENT_SOURCE_DIR}/translation/spicetranslation.h
${CMAKE_CURRENT_SOURCE_DIR}/translation/statictranslation.h
${CMAKE_CURRENT_SOURCE_DIR}/rotation/spicerotation.h
${CMAKE_CURRENT_SOURCE_DIR}/rotation/staticrotation.h
${CMAKE_CURRENT_SOURCE_DIR}/scale/staticscale.h
@@ -68,8 +68,8 @@ set(SOURCE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/rendering/simplespheregeometry.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspaceframebuffer.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspaceimage.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ephemeris/spiceephemeris.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ephemeris/staticephemeris.cpp
${CMAKE_CURRENT_SOURCE_DIR}/translation/spicetranslation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/translation/statictranslation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rotation/spicerotation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rotation/staticrotation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/scale/staticscale.cpp

View File

@@ -48,8 +48,8 @@
#include <modules/base/rendering/screenspaceimage.h>
#include <modules/base/rendering/screenspaceframebuffer.h>
#include <modules/base/ephemeris/staticephemeris.h>
#include <modules/base/ephemeris/spiceephemeris.h>
#include <modules/base/translation/statictranslation.h>
#include <modules/base/translation/spicetranslation.h>
#include <modules/base/rotation/staticrotation.h>
#include <modules/base/rotation/spicerotation.h>
@@ -108,11 +108,11 @@ void BaseModule::internalInitialize() {
fRenderable->registerClass<RenderableTrail>("RenderableTrail");
fRenderable->registerClass<RenderableTrailNew>("RenderableTrailNew");
auto fEphemeris = FactoryManager::ref().factory<Ephemeris>();
ghoul_assert(fEphemeris, "Ephemeris factory was not created");
auto fTranslation = FactoryManager::ref().factory<Translation>();
ghoul_assert(fTranslation, "Ephemeris factory was not created");
fEphemeris->registerClass<StaticEphemeris>("StaticEphemeris");
fEphemeris->registerClass<SpiceEphemeris>("SpiceEphemeris");
fTranslation->registerClass<StaticTranslation>("StaticTranslation");
fTranslation->registerClass<SpiceTranslation>("SpiceTranslation");
auto fRotation = FactoryManager::ref().factory<Rotation>();
ghoul_assert(fRotation, "Rotation factory was not created");
@@ -137,8 +137,8 @@ void BaseModule::internalInitialize() {
std::vector<Documentation> BaseModule::documentations() const {
return {
StaticScale::Documentation(),
StaticEphemeris::Documentation(),
SpiceEphemeris::Documentation()
StaticTranslation::Documentation(),
SpiceTranslation::Documentation()
};
}

View File

@@ -37,6 +37,7 @@ Documentation StaticScale::Documentation() {
using namespace openspace::documentation;
return {
"Static Scaling",
"base_scale_static",
{{
KeyValue,
new DoubleVerifier,

View File

@@ -22,7 +22,7 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#include <modules/base/ephemeris/spiceephemeris.h>
#include <modules/base/translation/spicetranslation.h>
#include <openspace/util/spicemanager.h>
#include <openspace/util/time.h>
@@ -41,7 +41,7 @@ namespace {
namespace openspace {
Documentation SpiceEphemeris::Documentation() {
Documentation SpiceTranslation::Documentation() {
using namespace openspace::documentation;
return {
@@ -50,7 +50,7 @@ Documentation SpiceEphemeris::Documentation() {
{
{
"Type",
new StringEqualVerifier("SpiceEphemeris"),
new StringEqualVerifier("SpiceTranslation"),
"",
Optional::No
},
@@ -89,7 +89,7 @@ Documentation SpiceEphemeris::Documentation() {
};
}
SpiceEphemeris::SpiceEphemeris(const ghoul::Dictionary& dictionary)
SpiceTranslation::SpiceTranslation(const ghoul::Dictionary& dictionary)
: _target("target", "Target", "")
, _origin("origin", "Origin", "")
, _kernelsLoadedSuccessfully(true)
@@ -97,7 +97,7 @@ SpiceEphemeris::SpiceEphemeris(const ghoul::Dictionary& dictionary)
documentation::testSpecificationAndThrow(
Documentation(),
dictionary,
"SpiceEphemeris"
"SpiceTranslation"
);
_target = dictionary.value<std::string>(KeyBody);
@@ -132,11 +132,11 @@ SpiceEphemeris::SpiceEphemeris(const ghoul::Dictionary& dictionary)
}
}
glm::dvec3 SpiceEphemeris::position() const {
glm::dvec3 SpiceTranslation::position() const {
return _position;
}
void SpiceEphemeris::update(const UpdateData& data) {
void SpiceTranslation::update(const UpdateData& data) {
double lightTime = 0.0;
_position = SpiceManager::ref().targetPosition(
_target, _origin, ReferenceFrame, {}, data.time, lightTime

View File

@@ -22,19 +22,19 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#ifndef __SPICEEPHEMERIS_H__
#define __SPICEEPHEMERIS_H__
#ifndef __SPICETRANSLATION_H__
#define __SPICETRANSLATION_H__
#include <openspace/scene/ephemeris.h>
#include <openspace/scene/translation.h>
#include <openspace/documentation/documentation.h>
#include <openspace/properties/stringproperty.h>
namespace openspace {
class SpiceEphemeris : public Ephemeris {
class SpiceTranslation : public Translation {
public:
SpiceEphemeris(const ghoul::Dictionary& dictionary);
SpiceTranslation(const ghoul::Dictionary& dictionary);
glm::dvec3 position() const;
void update(const UpdateData& data) override;
@@ -50,4 +50,4 @@ private:
} // namespace openspace
#endif // __SPICEEPHEMERIS_H__
#endif // __SPICETRANSLATION_H__

View File

@@ -22,7 +22,7 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#include <modules/base/ephemeris/staticephemeris.h>
#include <modules/base/translation/statictranslation.h>
#include <openspace/documentation/verifier.h>
@@ -32,7 +32,7 @@ namespace {
namespace openspace {
Documentation StaticEphemeris::Documentation() {
Documentation StaticTranslation::Documentation() {
using namespace openspace::documentation;
return {
"Static Translation",
@@ -40,7 +40,7 @@ Documentation StaticEphemeris::Documentation() {
{
{
"Type",
new StringEqualVerifier("StaticEphemeris"),
new StringEqualVerifier("StaticTranslation"),
"",
Optional::No
},
@@ -57,7 +57,7 @@ Documentation StaticEphemeris::Documentation() {
}
StaticEphemeris::StaticEphemeris()
StaticTranslation::StaticTranslation()
: _position(
"position",
"Position",
@@ -69,8 +69,8 @@ StaticEphemeris::StaticEphemeris()
addProperty(_position);
}
StaticEphemeris::StaticEphemeris(const ghoul::Dictionary& dictionary)
: StaticEphemeris()
StaticTranslation::StaticTranslation(const ghoul::Dictionary& dictionary)
: StaticTranslation()
{
documentation::testSpecificationAndThrow(
Documentation(),
@@ -81,12 +81,12 @@ StaticEphemeris::StaticEphemeris(const ghoul::Dictionary& dictionary)
_position = dictionary.value<glm::dvec3>(KeyPosition);
}
StaticEphemeris::~StaticEphemeris() {}
StaticTranslation::~StaticTranslation() {}
glm::dvec3 StaticEphemeris::position() const {
glm::dvec3 StaticTranslation::position() const {
return _position;
}
void StaticEphemeris::update(const UpdateData&) {}
void StaticTranslation::update(const UpdateData&) {}
} // namespace openspace

View File

@@ -22,21 +22,21 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#ifndef __STATICEPHEMERIS_H__
#define __STATICEPHEMERIS_H__
#ifndef __STATICTRANSLATION_H__
#define __STATICTRANSLATION_H__
#include <openspace/scene/ephemeris.h>
#include <openspace/scene/translation.h>
#include <openspace/documentation/documentation.h>
#include <openspace/properties/vectorproperty.h>
namespace openspace {
class StaticEphemeris : public Ephemeris {
class StaticTranslation : public Translation {
public:
StaticEphemeris();
StaticEphemeris(const ghoul::Dictionary& dictionary);
virtual ~StaticEphemeris();
StaticTranslation();
StaticTranslation(const ghoul::Dictionary& dictionary);
virtual ~StaticTranslation();
virtual glm::dvec3 position() const;
virtual void update(const UpdateData& data) override;
@@ -48,4 +48,4 @@ private:
} // namespace openspace
#endif // __STATICEPHEMERIS_H__
#endif // __STATICTRANSLATION_H__

View File

@@ -134,7 +134,7 @@ bool GalaxyRaycaster::cameraIsInside(const RenderData& data, glm::vec3& localPos
glm::vec4 modelPos = (glm::inverse(scaledModelTransform) / divisor) * camWorldPos;
localPosition = (modelPos.xyz() + glm::vec3(0.5));
localPosition = (glm::vec3(modelPos) + glm::vec3(0.5));
return (localPosition.x > 0 && localPosition.y > 0 && localPosition.z > 0 && localPosition.x < 1 && localPosition.y < 1 && localPosition.z < 1);
}

View File

@@ -41,8 +41,8 @@
#include <algorithm>
#include <gdal_priv.h>
#include <openspace/engine/openspaceengine.h>
#include <openspace/engine/configurationmanager.h>
namespace {
@@ -170,10 +170,55 @@ namespace openspace {
if (!GdalHasBeenInitialized) {
GDALAllRegister();
CPLSetConfigOption("GDAL_DATA", absPath("${MODULE_GLOBEBROWSING}/gdal_data").c_str());
setGdalProxyConfiguration();
GdalHasBeenInitialized = true;
}
}
void TileDataset::setGdalProxyConfiguration() {
ghoul::Dictionary proxySettings;
bool proxyEnabled = OsEng.configurationManager().getValue(ConfigurationManager::KeyHttpProxy, proxySettings);
if (proxyEnabled) {
std::string proxyAddress, proxyPort, proxyUser, proxyPassword, proxyAuth;
bool success = proxySettings.getValue(ConfigurationManager::PartHttpProxyAddress, proxyAddress);
success &= proxySettings.getValue(ConfigurationManager::PartHttpProxyPort, proxyPort);
proxySettings.getValue(ConfigurationManager::PartHttpProxyAuthentication, proxyAuth);
std::string proxyAuthString = "BASIC";
if (proxyAuth == "basic" || proxyAuth == "") {
proxyAuthString = "BASIC";
} else if (proxyAuth == "ntlm") {
proxyAuthString = "NTLM";
} else if (proxyAuth == "digest") {
proxyAuthString = "DIGEST";
} else if (proxyAuth == "any") {
proxyAuthString = "ANY";
} else {
success = false;
}
bool userAndPassword = proxySettings.getValue(ConfigurationManager::PartHttpProxyUser, proxyUser);
userAndPassword &= proxySettings.getValue(ConfigurationManager::PartHttpProxyPassword, proxyPassword);
if (success) {
std::string proxy = proxyAddress + ":" + proxyPort;
CPLSetConfigOption("GDAL_HTTP_PROXY", proxy.c_str());
LDEBUG("Using proxy server " << proxy);
if (userAndPassword) {
std::string proxyUserPwd = proxyUser + ":" + proxyPassword;
CPLSetConfigOption("GDAL_HTTP_PROXYUSERPWD", proxyUserPwd.c_str());
CPLSetConfigOption("GDAL_HTTP_PROXYAUTH", proxyAuthString.c_str());
LDEBUG("Using authentication method: " << proxyAuthString);
}
} else {
LERROR("Invalid proxy settings for GDAL");
}
} else {
LDEBUG("Setting up GDAL without proxy server");
}
}
GDALDataset* TileDataset::gdalDataset(const std::string& gdalDatasetDesc) {
GDALDataset* dataset = (GDALDataset *)GDALOpen(gdalDatasetDesc.c_str(), GA_ReadOnly);
if (!dataset) {

View File

@@ -136,6 +136,7 @@ namespace openspace {
//////////////////////////////////////////////////////////////////////////////////
void gdalEnsureInitialized();
void setGdalProxyConfiguration();
GDALDataset* gdalDataset(const std::string& gdalDatasetDesc);
bool gdalHasOverviews() const;
int gdalOverview(const PixelRange& baseRegionSize) const;

View File

@@ -108,7 +108,7 @@ protected:
private:
bool readyToRender() const override;
bool downloadTextureResource(double timestamp = Time::ref().currentTime()) override;
bool downloadTextureResource(double timestamp = Time::ref().j2000Seconds()) override;
};
} //namespace openspace

View File

@@ -178,7 +178,7 @@ void IswaCygnet::update(const UpdateData& data){
// the texture resource is downloaded ahead of time, so we need to
// now if we are going backwards or forwards
double clockwiseSign = (Time::ref().deltaTime()>0) ? 1.0 : -1.0;
_openSpaceTime = Time::ref().currentTime();
_openSpaceTime = Time::ref().j2000Seconds();
_realTime = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch());
_stateMatrix = TransformationManager::ref().frameTransformationMatrix(_data->frame, "GALACTIC", _openSpaceTime);
@@ -222,7 +222,7 @@ void IswaCygnet::unregisterProperties(){
}
void IswaCygnet::initializeTime(){
_openSpaceTime = Time::ref().currentTime();
_openSpaceTime = Time::ref().j2000Seconds();
_lastUpdateOpenSpaceTime = 0.0;
_realTime = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch());

View File

@@ -50,7 +50,7 @@ ScreenSpaceCygnet::ScreenSpaceCygnet(const ghoul::Dictionary& dictionary)
_downloadImage = true;
_url = IswaManager::ref().iswaUrl(_cygnetId);
_openSpaceTime = Time::ref().currentTime();
_openSpaceTime = Time::ref().j2000Seconds();
_lastUpdateOpenSpaceTime = _openSpaceTime;
_realTime = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch());
@@ -69,7 +69,7 @@ ScreenSpaceCygnet::ScreenSpaceCygnet(const ghoul::Dictionary& dictionary)
ScreenSpaceCygnet::~ScreenSpaceCygnet(){}
void ScreenSpaceCygnet::update(){
_openSpaceTime = Time::ref().currentTime();
_openSpaceTime = Time::ref().j2000Seconds();
_realTime = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch());
bool timeToUpdate = (fabs(_openSpaceTime-_lastUpdateOpenSpaceTime) >= _updateTime &&

View File

@@ -43,7 +43,7 @@ public:
protected:
bool updateTexture() override;
bool downloadTextureResource(double timestamp = Time::ref().currentTime()) override;
bool downloadTextureResource(double timestamp = Time::ref().j2000Seconds()) override;
bool readyToRender() const override;
bool updateTextureResource() override;

View File

@@ -149,7 +149,7 @@ bool MultiresVolumeRaycaster::cameraIsInside(const RenderData& data, glm::vec3&
glm::vec4 modelPos = (glm::inverse(scaledModelTransform) / divisor) * camWorldPos;
localPosition = (modelPos.xyz() + glm::vec3(0.5));
localPosition = (glm::vec3(modelPos) + glm::vec3(0.5));
return (localPosition.x > 0 && localPosition.y > 0 && localPosition.z > 0 && localPosition.x < 1 && localPosition.y < 1 && localPosition.z < 1);
}

View File

@@ -36,7 +36,6 @@ set(HEADER_FILES
${CMAKE_CURRENT_SOURCE_DIR}/util/hongkangparser.h
${CMAKE_CURRENT_SOURCE_DIR}/util/instrumenttimesparser.h
${CMAKE_CURRENT_SOURCE_DIR}/util/imagesequencer.h
${CMAKE_CURRENT_SOURCE_DIR}/util/missionmanager.h
${CMAKE_CURRENT_SOURCE_DIR}/util/instrumentdecoder.h
${CMAKE_CURRENT_SOURCE_DIR}/util/labelparser.h
${CMAKE_CURRENT_SOURCE_DIR}/util/projectioncomponent.h
@@ -59,7 +58,6 @@ set(SOURCE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/util/hongkangparser.cpp
${CMAKE_CURRENT_SOURCE_DIR}/util/instrumenttimesparser.cpp
${CMAKE_CURRENT_SOURCE_DIR}/util/imagesequencer.cpp
${CMAKE_CURRENT_SOURCE_DIR}/util/missionmanager.cpp
${CMAKE_CURRENT_SOURCE_DIR}/util/instrumentdecoder.cpp
${CMAKE_CURRENT_SOURCE_DIR}/util/labelparser.cpp
${CMAKE_CURRENT_SOURCE_DIR}/util/projectioncomponent.cpp

View File

@@ -1,253 +0,0 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2016 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
* without restriction, including without limitation the rights to use, copy, modify, *
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
* permit persons to whom the Software is furnished to do so, subject to the following *
* conditions: *
* *
* The above copyright notice and this permission notice shall be included in all copies *
* or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#include <assert.h>
#include <ghoul/filesystem/filesystem.h>
#include <openspace/util/spicemanager.h>
#include <modules/newhorizons/util/missionmanager.h>
#include <openspace/engine/openspaceengine.h>
namespace {
const std::string _loggerCat = "MissionPhaseSequencer";
const std::string KEY_PHASE_NAME = "Name";
const std::string KEY_PHASE_DESCRIPTION = "Description";
const std::string KEY_PHASE_SUBPHASES = "Phases";
const std::string KEY_TIME_RANGE = "TimeRange";
}
namespace openspace {
MissionPhase::MissionPhase(const ghoul::Dictionary& dict) {
const auto byPhaseStartTime = [](const MissionPhase& a, const MissionPhase& b)->bool{
return a.timeRange().start < b.timeRange().start;
};
_name = dict.value<std::string>(KEY_PHASE_NAME);
if (!dict.getValue(KEY_PHASE_DESCRIPTION, _description)) {
// If no description specified, just init to empty string
_description = "";
}
ghoul::Dictionary childDicts;
if (dict.getValue(KEY_PHASE_SUBPHASES, childDicts)) {
// This is a nested mission phase
_subphases.resize(childDicts.size());
for (size_t i = 0; i < childDicts.size(); ++i) {
std::string key = std::to_string(i + 1);
_subphases[i] = MissionPhase(childDicts.value<ghoul::Dictionary>(key));
}
// Ensure subphases are sorted
std::stable_sort(_subphases.begin(), _subphases.end(), byPhaseStartTime);
// Calculate the total time range of all subphases
TimeRange timeRangeSubPhases;
timeRangeSubPhases.start = _subphases[0].timeRange().start;
timeRangeSubPhases.end = _subphases.back().timeRange().end;
// user may specify an overall time range. In that case expand this timerange.
ghoul::Dictionary timeRangeDict;
if (dict.getValue(KEY_TIME_RANGE, timeRangeDict)) {
TimeRange overallTimeRange(timeRangeDict);
ghoul_assert(overallTimeRange.includes(timeRangeSubPhases),
"User specified time range must at least include its subphases'");
_timeRange.include(overallTimeRange);
}
else {
// Its OK to not specify an overall time range, the time range for the
// subphases will simply be used.
_timeRange.include(timeRangeSubPhases);
}
}
else {
ghoul::Dictionary timeRangeDict;
if (dict.getValue(KEY_TIME_RANGE, timeRangeDict)) {
_timeRange = TimeRange(timeRangeDict); // throws exception if unable to parse
}
else {
throw std::runtime_error("Must specify key: " + KEY_TIME_RANGE);
}
}
};
std::list<const MissionPhase*> MissionPhase::phaseTrace(double time, int maxDepth) const {
std::list<const MissionPhase*> trace;
if (_timeRange.includes(time)) {
trace.push_back(this);
phaseTrace(time, trace, maxDepth);
}
return std::move(trace);
}
bool MissionPhase::phaseTrace(double time, std::list<const MissionPhase*>& trace, int maxDepth) const {
if (maxDepth == 0) {
return false;
}
for (int i = 0; i < _subphases.size(); ++i) {
if (_subphases[i]._timeRange.includes(time)) {
trace.push_back(&_subphases[i]);
_subphases[i].phaseTrace(time, trace, maxDepth - 1);
return true; // only add the first one
}
// Since time ranges are sorted we can do early termination
else if (_subphases[i]._timeRange.start > time) {
return false;
}
}
return true;
}
Mission::Mission(std::string filepath)
: MissionPhase(readDictFromFile(filepath))
, _filepath(filepath)
{
}
ghoul::Dictionary Mission::readDictFromFile(std::string filepath) {
filepath = absPath(filepath);
LINFO("Reading mission phases fomr file: " << filepath);
if (!FileSys.fileExists(filepath))
throw ghoul::FileNotFoundError(filepath, "Mission file path");
ghoul::Dictionary missionDict;
try {
ghoul::lua::loadDictionaryFromFile(filepath, missionDict);
return missionDict;
}
catch (ghoul::RuntimeError& e) {
LERROR("Unable to load mission phases");
LERROR(e.message);
}
return {};
}
MissionManager* MissionManager::_instance = nullptr;
MissionManager& MissionManager::ref() {
assert(_instance != nullptr);
return *_instance;
}
void MissionManager::initialize() {
assert(_instance == nullptr);
_instance = new MissionManager;
OsEng.scriptEngine().addLibrary(MissionManager::luaLibrary());
}
void MissionManager::deinitialize() {
delete _instance;
_instance = nullptr;
}
void MissionManager::setCurrentMission(const std::string missionName) {
auto it = _missionMap.find(missionName);
if (it == _missionMap.end()) {
LWARNING("Mission with name \"" << missionName << "\" has not been loaded!");
}
else {
_currentMissionIter = it;
}
}
void MissionManager::loadMission(const std::string& filepath) {
Mission mission(filepath);
_missionMap[mission.name()] = mission;
if (_missionMap.size() == 1) {
setCurrentMission(mission.name());
}
}
const Mission& MissionManager::currentMission() {
if (_currentMissionIter == _missionMap.end()) {
LWARNING("No current mission has been specified. returning dummy mission");
return Mission();
}
return _currentMissionIter->second;
}
namespace luascriptfunctions {
int loadMission(lua_State* L) {
using ghoul::lua::luaTypeToString;
int nArguments = lua_gettop(L);
if (nArguments != 1)
return luaL_error(L, "Expected %i arguments, got %i", 1, nArguments);
std::string missionFileName = luaL_checkstring(L, -1);
if (missionFileName.empty()) {
return luaL_error(L, "filepath string is empty");
}
MissionManager::ref().loadMission(missionFileName);
}
int setCurrentMission(lua_State* L) {
using ghoul::lua::luaTypeToString;
int nArguments = lua_gettop(L);
if (nArguments != 1)
return luaL_error(L, "Expected %i arguments, got %i", 1, nArguments);
std::string missionName = luaL_checkstring(L, -1);
if (missionName.empty()) {
return luaL_error(L, "mission name string is empty");
}
MissionManager::ref().setCurrentMission(missionName);
}
} // namespace luascriptfunction
scripting::LuaLibrary MissionManager::luaLibrary() {
return{
"",
{
{
"loadMission",
&luascriptfunctions::loadMission,
"string",
"Load mission phases from file"
},
{
"setCurrentMission",
&luascriptfunctions::setCurrentMission,
"string",
"Set the currnet mission"
},
}
};
}
} // namespace openspace

View File

@@ -1,227 +0,0 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2016 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
* without restriction, including without limitation the rights to use, copy, modify, *
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
* permit persons to whom the Software is furnished to do so, subject to the following *
* conditions: *
* *
* The above copyright notice and this permission notice shall be included in all copies *
* or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#include <assert.h>
#include <ghoul/filesystem/filesystem.h>
#include <openspace/util/spicemanager.h>
#include <modules/newhorizons/util/missionmanager.h>
#include <openspace/engine/openspaceengine.h>
namespace {
const std::string _loggerCat = "MissionPhaseSequencer";
}
namespace openspace {
MissionPhase::MissionPhase(const ghoul::Dictionary& dict) {
const auto byPhaseStartTime = [](const MissionPhase& a, const MissionPhase& b)->bool{
return a.timeRange().start < b.timeRange().start;
};
_name = dict.value<std::string>("Name");
ghoul::Dictionary childDicts;
if (dict.getValue("Phases", childDicts)) {
// This is a nested mission phase
size_t numSubPhases = childDicts.size();
_subphases.resize(numSubPhases);
for (size_t i = 0; i < numSubPhases; ++i) {
std::string key = std::to_string(i + 1);
_subphases[i] = MissionPhase(childDicts.value<ghoul::Dictionary>(key));
}
std::stable_sort(_subphases.begin(), _subphases.end(), byPhaseStartTime);
// The subphases will have a total time phases
TimeRange timeRangeSubPhases;
timeRangeSubPhases.start = _subphases[0].timeRange().start;
timeRangeSubPhases.end = _subphases.back().timeRange().end;
// user may specify an overall time range. In that case expand this timerange.
TimeRange overallTimeRange;
try {
overallTimeRange = parseTimeRange(dict);
ghoul_assert(overallTimeRange.includes(timeRangeSubPhases),
"User specified time range must at least include its subphases'");
_timeRange.include(overallTimeRange);
}
catch (...) {
// Its OK to not specify an overall time range, the time range for the
// subphases will simply be used.
_timeRange.include(timeRangeSubPhases);
}
}
else {
_timeRange = parseTimeRange(dict);
}
};
TimeRange MissionPhase::parseTimeRange(const ghoul::Dictionary& dict) {
std::string startTimeStr;
std::string endTimeStr;
bool success = true;
success &= dict.getValue("StartTime", startTimeStr);
success &= dict.getValue("EndTime", endTimeStr);
if (!success) {
// Had to do this because ghoul::Dictionary::value<>(std::string key) throws
// uncatchable xtree error on my AMNH windwos machine/ eb)
throw "meh";
}
// Parse to date
TimeRange timeRange;
timeRange.start = SpiceManager::ref().ephemerisTimeFromDate(startTimeStr);
timeRange.end = SpiceManager::ref().ephemerisTimeFromDate(endTimeStr);
return timeRange;
}
Mission::Mission(std::string filepath)
: MissionPhase(readDictFromFile(filepath))
, _filepath(filepath)
{
}
ghoul::Dictionary Mission::readDictFromFile(std::string filepath) {
filepath = absPath(filepath);
LINFO("Reading mission phases fomr file: " << filepath);
if (!FileSys.fileExists(filepath))
throw ghoul::FileNotFoundError(filepath, "Mission file path");
ghoul::Dictionary missionDict;
try {
ghoul::lua::loadDictionaryFromFile(filepath, missionDict);
return missionDict;
}
catch (ghoul::RuntimeError& e) {
LWARNING("Unable to load mission phases");
LWARNING(e.message);
}
return {};
}
MissionManager* MissionManager::_instance = nullptr;
MissionManager& MissionManager::ref() {
assert(_instance != nullptr);
return *_instance;
}
void MissionManager::initialize() {
assert(_instance == nullptr);
_instance = new MissionManager;
OsEng.scriptEngine().addLibrary(MissionManager::luaLibrary());
}
void MissionManager::deinitialize() {
delete _instance;
_instance = nullptr;
}
void MissionManager::setCurrentMission(const std::string missionName) {
auto it = _missionMap.find(missionName);
if (it == _missionMap.end()) {
LWARNING("Mission with name \"" << missionName << "\" has not been loaded!");
}
else {
_currentMissionIter = it;
}
}
void MissionManager::loadMission(const std::string& filepath) {
Mission mission(filepath);
_missionMap[mission.name()] = mission;
if (_missionMap.size() == 1) {
setCurrentMission(mission.name());
}
}
const Mission& MissionManager::currentMission() {
if (_currentMissionIter == _missionMap.end()) {
LWARNING("No current mission has been specified. returning dummy mission");
}
return _currentMissionIter->second;
}
namespace luascriptfunctions {
int loadMission(lua_State* L) {
using ghoul::lua::luaTypeToString;
int nArguments = lua_gettop(L);
if (nArguments != 1)
return luaL_error(L, "Expected %i arguments, got %i", 1, nArguments);
std::string missionFileName = luaL_checkstring(L, -1);
if (missionFileName.empty()) {
return luaL_error(L, "filepath string is empty");
}
MissionManager::ref().loadMission(missionFileName);
}
int setCurrentMission(lua_State* L) {
using ghoul::lua::luaTypeToString;
int nArguments = lua_gettop(L);
if (nArguments != 1)
return luaL_error(L, "Expected %i arguments, got %i", 1, nArguments);
std::string missionName = luaL_checkstring(L, -1);
if (missionName.empty()) {
return luaL_error(L, "mission name string is empty");
}
MissionManager::ref().setCurrentMission(missionName);
}
} // namespace luascriptfunction
scripting::LuaLibrary MissionManager::luaLibrary() {
return{
"",
{
{
"loadMission",
&luascriptfunctions::loadMission,
"string",
"Load mission phases from file"
},
{
"setCurrentMission",
&luascriptfunctions::setCurrentMission,
"string",
"Set the currnet mission"
},
}
};
}
} // namespace openspace

View File

@@ -155,7 +155,7 @@ void addScreenSpaceRenderable(std::string texturePath) {
std::string luaTable =
"{Type = 'ScreenSpaceImage', TexturePath = '" + absPath(texturePath) + "' }";
std::string script = "openspace.registerScreenSpaceRenderable(" + luaTable + ");";
OsEng.scriptEngine().queueScript(script);
OsEng.scriptEngine().queueScript(script, openspace::scripting::ScriptEngine::RemoteScripting::Yes);
}
} // namespace
@@ -453,22 +453,26 @@ void GUI::render() {
if (toSun) {
OsEng.scriptEngine().queueScript(
"openspace.setPropertyValue('Interaction.coordinateSystem', 'Sun');"
"openspace.setPropertyValue('Interaction.coordinateSystem', 'Sun');",
scripting::ScriptEngine::RemoteScripting::Yes
);
}
if (toPluto) {
OsEng.scriptEngine().queueScript(
"openspace.setPropertyValue('Interaction.coordinateSystem', 'Pluto');"
"openspace.setPropertyValue('Interaction.coordinateSystem', 'Pluto');",
scripting::ScriptEngine::RemoteScripting::Yes
);
}
if (toJupiter) {
OsEng.scriptEngine().queueScript(
"openspace.setPropertyValue('Interaction.coordinateSystem', 'Jupiter');"
"openspace.setPropertyValue('Interaction.coordinateSystem', 'Jupiter');",
scripting::ScriptEngine::RemoteScripting::Yes
);
}
if (to67P) {
OsEng.scriptEngine().queueScript(
"openspace.setPropertyValue('Interaction.coordinateSystem', '67P');"
"openspace.setPropertyValue('Interaction.coordinateSystem', '67P');",
scripting::ScriptEngine::RemoteScripting::Yes
);
}

Some files were not shown because too many files have changed in this diff Show More