Skip to content

Commit

Permalink
[Lua]Add sample vessels in the Orbiter SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGondos committed Mar 15, 2024
1 parent b899fe9 commit dd813e6
Show file tree
Hide file tree
Showing 99 changed files with 16,388 additions and 0 deletions.
1 change: 1 addition & 0 deletions Orbitersdk/samples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ add_subdirectory(AscentMFD)
add_subdirectory(DialogTemplate)
add_subdirectory(LaunchpadParamTemplate)
add_subdirectory(MFDTemplate)
add_subdirectory(Lua)

endif()
18 changes: 18 additions & 0 deletions Orbitersdk/samples/Lua/Atlantis/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (c) Gondos
# Licensed under the MIT License

set(CONFIG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Config)
set(SCENARIO_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Scenario)
set(LUA_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Src)

install(DIRECTORY ${CONFIG_SOURCE_DIR}/
DESTINATION ${ORBITER_INSTALL_ROOT_DIR}/Config/Vessels
)

install(DIRECTORY ${LUA_SOURCE_DIR}/
DESTINATION ${ORBITER_INSTALL_ROOT_DIR}/Config/Vessels/Atlantis
)

install(DIRECTORY ${SCENARIO_SOURCE_DIR}/
DESTINATION ${ORBITER_INSTALL_ROOT_DIR}/Scenarios/Lua
)
3 changes: 3 additions & 0 deletions Orbitersdk/samples/Lua/Atlantis/Config/Atlantis.lua.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ClassName = Atlantis.lua
Module = ScriptVessel
Script = Atlantis/Atlantis.lua
6 changes: 6 additions & 0 deletions Orbitersdk/samples/Lua/Atlantis/Config/Atlantis_SRB.lua.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
; === Configuration file for vessel class Shuttle Solid Rocket Booster ===
; Used to manage SRB's after separation from the main tank
ClassName = Atlantis_SRB.lua
Module = ScriptVessel
Script = Atlantis/Atlantis_SRB.lua
ImageBmp = Images/Vessels/Default/Atlantis_SRB.bmp
5 changes: 5 additions & 0 deletions Orbitersdk/samples/Lua/Atlantis/Config/Atlantis_Tank.lua.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
; === Configuration file for vessel class Shuttle Solid Rocket Booster ===
; Used to manage SRB's after separation from the main tank
ClassName = Atlantis_Tank.lua
Module = ScriptVessel
Script = Atlantis/Atlantis_Tank.lua
2 changes: 2 additions & 0 deletions Orbitersdk/samples/Lua/Atlantis/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Lua port of the C++ Atlantis vessel in Src/Vessel/Atlantis/Atlantis
This module is using the resources from the original C++ module
79 changes: 79 additions & 0 deletions Orbitersdk/samples/Lua/Atlantis/Scenario/Atlantis.scn
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
BEGIN_HYPERDESC
<h1>Launch into sunrise</h1>
<p>Prepare for an early morning launch with Space Shuttle Atlantis. The sun has
not yet risen at the Cape, but you will catch the first rays of the morning
sun on your way to orbit!</p>
END_HYPERDESC

BEGIN_ENVIRONMENT
System Sol
Date MJD 51983.4772490220
END_ENVIRONMENT

BEGIN_FOCUS
Ship STS-101
END_FOCUS

BEGIN_CAMERA
TARGET STS-101
MODE Extern
POS 6.38 -0.80 -84.57
TRACKMODE TargetRelative
FOV 50.00
BEGIN_PRESET
Cockpit:STS-101:40.00
Ground:STS-101:40.00:Earth -80.62339 28.61960 110.00
Track:STS-101:50.00:RELATIVE 2.890 -0.009 -1.229
Ground:STS-101:10.00:Earth -80.65298 28.58028 20.00
Track:ISS:40.00:RELATIVE 1.983 -0.474 -0.522
Track:Earth:40.00:GLOBAL 2.896 2.132 -0.331
END_PRESET
END_CAMERA

BEGIN_HUD
TYPE Surface
END_HUD

BEGIN_MFD Left
TYPE Surface
SPDMODE 1
END_MFD

BEGIN_MFD Right
TYPE Orbit
PROJ Ship
FRAME Ecliptic
REF Earth
END_MFD


BEGIN_SHIPS
ISS:ProjectAlpha_ISS
STATUS Orbiting Earth
RPOS -5244945.21 4232409.61 14786.88
RVEL 4524.929 5604.748 -2692.388
AROT -151.42 21.95 29.84
VROT 0.00 0.05 -0.15
PRPLEVEL 0:1.000
IDS 0:1 100 1:2 100 2:3 100 3:4 100 4:5 100
NAVFREQ 0 0
XPDR 466
END
STS-101:Atlantis.lua
STATUS Landed Earth
POS -80.6208630 28.6270927
HEADING 180.57
ALT 47.361
AROT 151.063 -8.225 4.515
PRPLEVEL 0:1.000 1:1.000 2:1.000
NAVFREQ 0 0
CONFIGURATION 0
CARGODOOR 0 0.0000
GEAR 0 0.0000
KUBAND 0 0.0000
ARM_STATUS 0.5000 0.0000 0.0000 0.5000 0.5000 0.5000
SAT_OFS_X 0.000
SAT_OFS_Y 0.000
SAT_OFS_Z 0.000
END
END_SHIPS
Loading

0 comments on commit dd813e6

Please sign in to comment.