77os = openspace .Api (ADDRESS , PORT )
88
99async def setPause ():
10- os .connect ()
11- openspace = await os .singleReturnLibrary ()
10+ await os .connect ()
11+ openspace = await os .library ()
1212 await openspace .time .setPause (True )
1313
1414async def goToGeo ():
15- os .connect ()
15+ await os .connect ()
1616
1717 lat = 40.7208636
1818 lon = - 74.0094477
1919 altitude = 220
2020
21- openspace = await os .singleReturnLibrary ()
22- await openspace .globebrowsing .goToGeo (lat , lon , altitude )
21+ openspace = await os .library ()
22+ # print(openspace.navigation)
23+ await openspace .navigation .jumpToGeo ("" , lat , lon , altitude )
2324
2425async def setYourTime ():
2526 import time
@@ -32,8 +33,8 @@ async def setYourTime():
3233 interval = 300 # in seconds
3334 number_of_photos = 20
3435
35- os .connect ()
36- openspace = await os .singleReturnLibrary ()
36+ await os .connect ()
37+ openspace = await os .library ()
3738
3839 for i in range (0 , number_of_photos ):
3940 await openspace .time .setTime (timestamp )
@@ -44,8 +45,8 @@ async def setYourTime():
4445
4546async def addLayersToGlobe ():
4647 # ... Prepare the layers
47- os .connect ()
48- openspace = await os .singleReturnLibrary ()
48+ await os .connect ()
49+ openspace = await os .library ()
4950 output_path = "C:/os/OpenSpaceData/Moon2/"
5051 globe_for_layers = "Moon"
5152 # await openspace.globebrowsing.addBlendingLayersFromDirectory(output_path, globe_for_layers)
0 commit comments