# # This example script makes the program take users for a 2 minute trip # to the Earth and Moon. # # Import Cosmographia scripting module. # import cosmoscripting cosmo = cosmoscripting.Cosmo() waittime = 1 msgwaittime = 1 msgshowtime = 2 testjson = "/Users/aescalante/spice/missions/bc/bepicolombo/misc/cosmo/scenarios/load_BEPIC_ops_001.json" # cosmo.displayNote('cosmo.loadCatalogFile(testjson)', msgshowtime).wait(0) cosmo.loadCatalogFile(testjson).wait( waittime ) cosmo.gotoHome() cosmo.showPlanetOrbits() cosmo.wait(1) cosmo.setTimeRate(1) cosmo.setTime( "2018-11-01 00:00:00 UTC" ) cosmo.trajectoryWidth("MPO",2) cosmo.showTrajectory("MPO") cosmo.unpause() for i in range(0, 6): cosmo.faster10x() cosmo.wait(14) cosmo.setTimeRate(1) # speed 2e6 # earth flyby 1 cosmo.setTime("2020-04-09 17:00:00 UTC") cosmo.gotoObject("MPO") cosmo.hideTrajectory( "MPO" ) cosmo.hidePlanetOrbits() # cosmo.selectObject("MPO") cosmo.showBodyFixedFrame("MPO") cosmo.wait(3) cosmo.hideBodyFixedFrame("MPO") cosmo.showSpiceFrame("MPO","MPO_SPACECRAFT") cosmo.wait(3) cosmo.showDirectionVector("MPO", "Earth") cosmo.selectObject("Earth") cosmo.showLatLongGrid("Earth") cosmo.showTerminator("Earth") cosmo.selectObject("MPO") cosmo.moveToPov( "MPO" , [0, 0.05, 0.05], [0, -0.05, -0.05], [1, 0, 0], 2) cosmo.pointAtObject("Earth") cosmo.trackObject("Earth") cosmo.loadCatalogFile("/Users/aescalante/spice/missions/bc/bepicolombo/misc/cosmo/sensors/sensor_BEPIC_MTM_MCAM3-EARTH.json") cosmo.loadCatalogFile("/Users/aescalante/spice/missions/bc/bepicolombo/misc/cosmo/sensors/sensor_BEPIC_MTM_MCAM2-MERCURY.json") cosmo.loadCatalogFile("/Users/aescalante/spice/missions/bc/bepicolombo/misc/cosmo/sensors/sensor_BEPIC_MPO_MERTIS_TIS_SPACE-MERCURY.json") cosmo.setTimeRate(1000) cosmo.setFov(90,2) cosmo.wait(60) cosmo.unloadLastCatalog() cosmo.unloadLastCatalog() cosmo.unloadLastCatalog() cosmo.loadCatalogFile("/Users/aescalante/spice/missions/bc/bepicolombo/misc/cosmo/sensors/sensor_BEPIC_MTM_MCAM1-EARTH.json") cosmo.wait(20) cosmo.displayNote("Looking along MCAM1 boresight",5) cosmo.moveToPovSpiceFrame('MTM_MCAM1', "MTM_MCAM1", [0,0,0.001], [0, 0, 1], [0, 1, 0], 2) cosmo.wait(20) cosmo.unloadLastCatalog() # cosmo.pause() cosmo.setFov(60,2) testjson = "/Users/aescalante/spice/missions/bc/bepicolombo/misc/cosmo/scenarios/load_BEPIC_plan_001.json" cosmo.loadCatalogFile(testjson).wait( waittime ) cosmo.setTime("2026-12-20 00:00:00 UTC") cosmo.gotoObject("Mercury") cosmo.wait(3) cosmo.showTrajectory("MMO") cosmo.showTrajectory("MPO") cosmo.showLatLongGrid("Mercury") cosmo.showDirectionVector("Mercury","Sun") cosmo.moveToPovSpiceFrame('Mercury', "IAU_MERCURY", [0,0,20000], [0, 0, -1], [0, 0, 1], 2) cosmo.setTimeRate(100000) cosmo.saveScreenShotToFile('/Users/aescalante/Downloads/testshot.png') cosmo.wait(20) cosmo.setTimeRate(100) cosmo.moveToPovSpiceFrame('Mercury', "MPO_SPACECRAFT", [0,20000,0], [0, -1, 0], [0, 0, 1], 2) cosmo.setVideoRecordingResolution("720p") cosmo.startRecordingVideoToFile('/Users/aescalante/Downloads/testvideo.mp4') cosmo.wait(20) cosmo.stopRecordingVideo()