Simplest possible simulation on stock KSP — различия между версиями

Материал из SpaceProgram Wiki
Перейти к: навигация, поиск
(Новая страница: «The full Simulation mod pack is relatively reousrce demanding (RSS with medium textures require 12+ GB RAM). But you can try Simulation experience using Stock KSP…»)
 
 
(не показано 15 промежуточных версий 2 участников)
Строка 1: Строка 1:
The full Simulation mod pack is relatively reousrce demanding (RSS with medium textures require 12+ GB RAM).
+
= Intoduction =
 +
Traditional way to play KSP is based on trial-error cycle. It can be intuitive (Harvester's way) or based on info and calculations (with KER, Mechjeb, Prescise more, etc).
 +
But in any case player is both Pilot and Misson control. He can switch to map view at any time, play with maneuver nodes and hit F9 if something goes wrong.
 +
 
 +
But real life space flight is very diffirent. Kosmonauts in space ship near Earth can have good situration awarness due to GLONASS/GLS and geostationary statellites uplink, but the farer we go from LEO, the more important Mission Control role will be.
 +
 
 +
In US there are venues that provide experience close to real Mssion Control: Space Camp in Alamabama and Challenger Learning Center network:
 +
[[Файл:Challenger-learning-center.jpg]] [[Файл:Space-camp.png]]
 +
 
 +
Ever imagine playing KSP as just spaceship crew member? Or as flight directorm who can only indirectly influence crew actions? This is not new idea. There are mods ([https://forum.kerbalspaceprogram.com/index.php?/topic/118867-104-houston-v100-a-mission-control-ui-for-telemachus/ Houston], [https://forum.kerbalspaceprogram.com/index.php?/topic/172757-142-telemachus-continued-web-based-telemetry-and-cameras/ Telemahus], known attempts to try such gamestype [http://skyler.io/KSP/kerpollo.html], [https://www.reddit.com/r/KerbalSpaceProgram/comments/3dhby0/how_many_people_have_attempted_a_mission_control/] (and I saw such threads few years ago on official ksp forum).
 +
 
 +
Our project is about using KSP as a core of Space flight and Mission control simulation. We use KSP, KSPTOT, kOS, putty and plenty of other mods and tools to build simulation complex that can be used to run flight plans based on real life space programs. Modern, historical, future:
 +
[[Файл:Kazan-FC-1.jpg|800px]]
 +
 
 +
The full Simulation mod pack is relatively resource demanding (RSS with medium textures requires 12+ GB RAM).
 
But you can try Simulation experience using Stock KSP with minimal number of mods.
 
But you can try Simulation experience using Stock KSP with minimal number of mods.
  
= You'll need =
+
= Things you'll need =
 
== Software ==
 
== Software ==
 
*Kerbal Space Program 1.6.0+ [https://store.steampowered.com/app/220200/Kerbal_Space_Program/]
 
*Kerbal Space Program 1.6.0+ [https://store.steampowered.com/app/220200/Kerbal_Space_Program/]
Строка 23: Строка 37:
 
ma/duna-depature.mat from [https://github.com/1greywind/simplest-possible-simulation/archive/v0.2.zip archive]
 
ma/duna-depature.mat from [https://github.com/1greywind/simplest-possible-simulation/archive/v0.2.zip archive]
 
ma/duna-correction-burn.mat from [https://github.com/1greywind/simplest-possible-simulation/archive/v0.2.zip archive]
 
ma/duna-correction-burn.mat from [https://github.com/1greywind/simplest-possible-simulation/archive/v0.2.zip archive]
 
  
 
= Installation =
 
= Installation =
Строка 40: Строка 53:
 
== Install KSPTOT ==
 
== Install KSPTOT ==
 
*Download latest release archive compatible with your KSP version. Unzip to any folder.
 
*Download latest release archive compatible with your KSP version. Unzip to any folder.
*This archive also contains KSPTOTConnect plgin (you'll need it on next step).
+
*This archive also contains KSPTOTConnect plugin (you'll need it on the next step).
 
*Copy scenarios duna-depature.mat and ma/duna-correction-burn.mat from ma folder from [https://github.com/1greywind/simplest-possible-simulation/archive/v0.2.zip archive] to KSPTOT folder.
 
*Copy scenarios duna-depature.mat and ma/duna-correction-burn.mat from ma folder from [https://github.com/1greywind/simplest-possible-simulation/archive/v0.2.zip archive] to KSPTOT folder.
  
 
== Install mods ==
 
== Install mods ==
 
:Download archive with kOS release compatible with your KSP version. Unzip into $KSP_PATH folder.
 
:Download archive with kOS release compatible with your KSP version. Unzip into $KSP_PATH folder.
:Copy GameData folder from KSPTOT folder to $KSP_PATH folder.
+
:Copy GameData folder from KSPTOT to $KSP_PATH.
  
 
== Install kOS scripts ==
 
== Install kOS scripts ==
Строка 51: Строка 64:
  
 
== Setup voice commlink ==
 
== Setup voice commlink ==
Install Zello app to your smartphone or use real ptp radio.
+
Install Zello app to your smartphone or use real PTT radio.
  
 
= Run Simulation =
 
= Run Simulation =
Строка 87: Строка 100:
 
*kOS server is up and runing in KSP.
 
*kOS server is up and runing in KSP.
 
*We have putty terminal connected to kOS server and we can use it to control simulation.
 
*We have putty terminal connected to kOS server and we can use it to control simulation.
*KSPTOT connected to KSP through KSPTOTConnect and Mission architect opened and ready to use.
+
*KSPTOT connected to KSP through KSPTOTConnect and Mission Architect opened and ready to use.
 
*Voice commchannel ready to use..
 
*Voice commchannel ready to use..
  
 
We need to assign roles next. We need minimum two participants:
 
We need to assign roles next. We need minimum two participants:
*One (Mission Control) will play as будет совмещать роли Руководителя Полета, Главного оператора, Менеджера ресурсов и Баллистика
+
*One (Mission Control) will play as Flight Director, CAPCOM, EECOM and FDO.
*Другой (далее Экипаж) будет выполнять все роли в экипаже: Командира и пилота.
+
*Another (Crew) will combine roles of Spacecraft Commander and Pilot.
  
Наш план полета:
+
Our flight plan:
* Мы начинаем на орбите Кербина в период, удобный для отлета к Дюне.
+
* We start from low Kerbin orbit at the beginning of Duna transfer window period.
* Наша задача:
+
* Our tasks:
** Рассчитать маневр отлета к Дюне.
+
** Plan Duna depature burn.
** Выполнить его.
+
** Execute it.
** Проверить параметры орбиты после выполнения маневра.
+
** Verify orbit params after burn execution.
** Если нужно, рассчитать коррекцию.
+
** Compute correction burn if needed.
  
Как выполнить план полета:
+
How to execute flight plan:
* ЦУП связывается с Экипажем и сообщает что начинает расчет маневра
+
* Mission Control calls Crew and informs them that maneuver calculation process begins.
* Для для расчета маневра нужно:
+
* To calculate maneuver data you need:
** Загрузить в MA сценарий расчет отлета к Дюне (duna-depature.mat)
+
** Load duna-depature.mat scenario into Misson Archtect
** Импортировать параметры начальной орбиты из KSP
+
** Import initial orbit params from KSP.
** Запустить оптимизацию
+
** Run optimization (Ctrl+O)
* После завершения оптимизации ЦУП связывается с Экипажем и сообщает что маневр готов
+
* After optmization Mission Control calls Crew and informs them that maneuver data is ready.
* Экипаж подтверждает готовность принять маневр.
+
* Crew confirms that they are ready to receive maneuver data.
* ЦУП загружает маневр в KSP и сообщает Экипажу что маневр загружен
+
* Mission Control uploads maneuver to KSP and informs Crew that maneuver has been uploaded.
* Экипаж подтверждает, что видит маневр и для проверки называет величину маневра
+
* Crew confirms that they see maneuver and copy maneuver dV to Misison Control.
* ЦУП теперь должен рассчитать время включения двигателя
+
* Misison Control now needs to calculate engine startup time (relative to maneuver date).
** Для этого в утилиту Maneuver Execution Assistant импортируются параметры текущей орбиты
+
** Import current orbit params into Maneuver Execution Assistant (MEA) tool.
** Импортируются параметры маневра.
+
** Next import maneuver data to MEA.
** В терминале запускается команда "run res.", которая выводит текущую массу корабля
+
** Get ship mass by runnig command "run res." in the kOS terminal.
** Масса корабля и параметры двигательной установки (Isp=350s, Thrust=250kN) вводятся в Maneuver Execution Assistant.
+
** Enter ship mass, engine Isp and Thrust (Isp=350s, Thrust=250kN) into corresponding fields in MEA.
** Нажимается кнопка "Compute Burn Timing Information"
+
** Click "Compute Burn Timing Information"
* ЦУП вызывает экипаж и сообщает ему время включения двигателя относительно времени выполнения маневра (Burn Start Time = T-100 sec -> Время включения двигателя 100 секунд до времени маневра).
+
* Mission Control calls Crew and tells them Burn Start Time.
* Экипаж подтверждает получение времени включения двигателя.
+
* Crew copy burn start time.
* ЦУП запрашивает у экипажа, сколько времени ему нужно на подготовку к маневру
+
* Mission Control requests how many time for preparation for maneuver execution do Crew need.
* Экипаж оценивает время на построение ориентации корабля для выполнения маневра (в минутах, например 1 минута) и сообщает ЦУПу.
+
* Crew estimates time required to turn ship into direction of the maneuver in minutes (i.e. 1 minute) and passes it to Mission Control.
* ЦУП рассчитывает дату для ускорения времени по формуле: T = Время маневра - Время включения двигателя - Время на подготовку. Допустим время маневра - 40210 секунд, время включения двигателя - 100 секунд до маневра и экипаж просит 1 минуту (60 секунд) на подготовку. Дата для перемотки времени = 40050.
+
* Mission Control calculates date timestamp to warp time using formulae: T = Maneuver time - engine startup time - preparation time. Let's say maneuver time is 40210 seconds, engine startup time is 100 seconds and Crew requested 1 minute to prepare. This gives warp timestamp = 40210 - 100 - 60 = 40050.
* ЦУП запрашивает у Экипажа готовность к ускорению времени.
+
* Mission control calls Crew and requests are they ready for time warp.
* Экипаж подтверждает
+
* Crew says ok.
* ЦУП вводит в терминале команду "run warput(40050)." - начинается ускорение времени в игре.
+
* Mission control enter command "run warput(40050)." into kOS terminal - time warp starts in KSP.
* ЦУП запрашивает у Экипажа, видит ли тот ускорение времени.
+
* Mission control asks Crew do they observe time acceleration.
* Экипаж подтверждает.
+
* Crew confirms.
* Когда ускорение времени заканчивается, Экипаж сообщает об этом ЦУПу.
+
* When time warp ends, Crew informs Mission control.
* Экипаж выполняет маневр:
+
* Crew begins maneuver execution:
** Строит ориентацию для маневра.
+
** Turn ship into direction of maneuver (using SAS mode or manually).
** В установленный момент времени запускает двигатель.
+
** Start engine in time.
** ЦУП наблюдает за выполнением маневра с помощью телеметрии KSPTOT.
+
** Mission control monitors maneuver execution through MCC Real Time System.
** Ждет когда индикатор dV маневра дойдет до нуля.
+
** Crew waits until maneuver dV indicator reaches zero and turns off engine.
* Экипаж сообщает ЦУПу о успешном выполнении маневра.
+
* Crew notifies Mission Control that maneuver was executed.
* ЦУП проверяет результат выполнения маневра:
+
* Mission Control verivies maneuver execution:
** Загружает в MA сценарий duna-correction-burn.mat
+
** Load duna-correction-burn.mat secnario into Mission Architect
** Смотрит на параметры орбиты в боксе Final Spacecarft State: если там Orbiting about = Duna и в попапе при наведении Periapsis Alt. = 100-200 км, то коррекция не нужна. Если нет, то:
+
** Import current orbit data into Initial State event
** Запускается оптимизация
+
** Chck orbital params inside Final Spacecarft State box: if Orbiting about = Duna and in the mouse over popup Periapsis Alt. = 100-200 км, then maneuver execution was succesful. If no, we need to calculate correction burn:
** Если в результате оптимизации получается орбита, удовлетворяющая граничным условиям (Periapsis Alt. = 100 km, Inclanation = 0-10 degree), то маневр передается экипажу для исполнения как и было сделано ранее. Если нет, то:
+
** Run optimization.
** Надо попробовать увеличить диапазоны переменных оптимизации или время маневра
+
** If optimization result gives orbit that satisfies constraints (Periapsis Alt. = 100 km, Inclanation = 0-10 degree), maneuver data is uploaded to KSP and executes in the same way as was descibed before. If not, when:
* План полета считается выполненным, если после коррекции корабль оказывается на курсе, ведущем к Дюне с перицентром орбиты ~100 км и небольшим наклонением.
+
** You need to increase optimization variables range or shift maneuver date.
 +
* The flight plan is considered completed if, after correction, the ship is on a course leading to Duna with pericenter ~100 км and low inclanation.

Текущая версия на 23:19, 6 марта 2019

Intoduction

Traditional way to play KSP is based on trial-error cycle. It can be intuitive (Harvester's way) or based on info and calculations (with KER, Mechjeb, Prescise more, etc). But in any case player is both Pilot and Misson control. He can switch to map view at any time, play with maneuver nodes and hit F9 if something goes wrong.

But real life space flight is very diffirent. Kosmonauts in space ship near Earth can have good situration awarness due to GLONASS/GLS and geostationary statellites uplink, but the farer we go from LEO, the more important Mission Control role will be.

In US there are venues that provide experience close to real Mssion Control: Space Camp in Alamabama and Challenger Learning Center network: Challenger-learning-center.jpg Space-camp.png

Ever imagine playing KSP as just spaceship crew member? Or as flight directorm who can only indirectly influence crew actions? This is not new idea. There are mods (Houston, Telemahus, known attempts to try such gamestype [1], [2] (and I saw such threads few years ago on official ksp forum).

Our project is about using KSP as a core of Space flight and Mission control simulation. We use KSP, KSPTOT, kOS, putty and plenty of other mods and tools to build simulation complex that can be used to run flight plans based on real life space programs. Modern, historical, future: Kazan-FC-1.jpg

The full Simulation mod pack is relatively resource demanding (RSS with medium textures requires 12+ GB RAM). But you can try Simulation experience using Stock KSP with minimal number of mods.

Things you'll need

Software

  • Kerbal Space Program 1.6.0+ [3]
  • KSPTOT 1.6.0+ [4]
  • Putty [5]
  • Zello - mobile push-to-talk рация (или настоящая рация).

Mods

kOS scripts

Initial save for KSP

saves/initial_save.sfs from archive

Mission Architect scenarios

ma/duna-depature.mat from archive ma/duna-correction-burn.mat from archive

Installation

Install KSP

Buy KSP on Steam, GOG or developer site and install on your PC. Remember KSP installation folder path (will be referenced next as $KSP_PATH).

Install KSP inital save

  1. Launch KSP
    1. In main menu select "Start new"
    2. Click "New game"
    3. Select game type "Sandbox" and enter name "Simulation"
    4. Click "Start!"
  2. Copy file initial_save.sfs from saves folder from archive to $KSP_PATH/saves/Simulation folder

Install KSPTOT

  • Download latest release archive compatible with your KSP version. Unzip to any folder.
  • This archive also contains KSPTOTConnect plugin (you'll need it on the next step).
  • Copy scenarios duna-depature.mat and ma/duna-correction-burn.mat from ma folder from archive to KSPTOT folder.

Install mods

Download archive with kOS release compatible with your KSP version. Unzip into $KSP_PATH folder.
Copy GameData folder from KSPTOT to $KSP_PATH.

Install kOS scripts

Copy files warpup and res from kos folder from archive to $KSP_PATH/Ships/Script folder.

Setup voice commlink

Install Zello app to your smartphone or use real PTT radio.

Run Simulation

  1. Load initial save in KSP:
    1. Run KSP.
    2. Click "Start game".
    3. Click "Resume saved.
    4. Select "Simulation" and click "Load".
    5. Press Alt+F9 and select initial_save from the list.
  2. Launch kOS server
    Launch kOS server
  3. Run Putty (putty.exe)
  4. Connect to kOS server
    Connect to kOS server
  5. Launch KSPTOT (KSPTrajectoryOptimizationTool.exe)
  6. Connect KSPTOT to KSPTOTConnect
    Connect KSPTOT to KSP
  7. Launch Mission Architect in KSPTOT
  8. Make sure that you have voice commlink up and running (through Zello or radio).

How it works

Only scheme en.png

Data exchange channels are shown on the schema:

  • Mission control uses putty terminal to run kOS commands on the simulation computer:
    • _warput_ command is used to start time warp to the given date mark. Command accepts single argument: the target date mark in the timestamp foramt (number of seconds passed from the epoch). Date timestamps are calculated in KSPTOT.
    • _res_ command prints out ship resouses into terminal.
  • Mission control uses KSPTOT to:
    • Calculate maneuvers data and control their excution by Crew with the help of Mission Architec
    • Get engine startup time with the help of Maneuver Execution Assistant.
    • Convert date from calendar format to timestamp for the warput command (any date field in KSPTOT).
    • Upload maneuver data to KSP.
    • Get telemetry from KSP with MCC Real Time System.
  • Communication between Mission Control and Crew is run through single voice channel over Zello or PTT radio.

Lets start

We have:

  • Space flight simulation (in KSP) up and running on the simulation computer.
  • kOS server is up and runing in KSP.
  • We have putty terminal connected to kOS server and we can use it to control simulation.
  • KSPTOT connected to KSP through KSPTOTConnect and Mission Architect opened and ready to use.
  • Voice commchannel ready to use..

We need to assign roles next. We need minimum two participants:

  • One (Mission Control) will play as Flight Director, CAPCOM, EECOM and FDO.
  • Another (Crew) will combine roles of Spacecraft Commander and Pilot.

Our flight plan:

  • We start from low Kerbin orbit at the beginning of Duna transfer window period.
  • Our tasks:
    • Plan Duna depature burn.
    • Execute it.
    • Verify orbit params after burn execution.
    • Compute correction burn if needed.

How to execute flight plan:

  • Mission Control calls Crew and informs them that maneuver calculation process begins.
  • To calculate maneuver data you need:
    • Load duna-depature.mat scenario into Misson Archtect
    • Import initial orbit params from KSP.
    • Run optimization (Ctrl+O)
  • After optmization Mission Control calls Crew and informs them that maneuver data is ready.
  • Crew confirms that they are ready to receive maneuver data.
  • Mission Control uploads maneuver to KSP and informs Crew that maneuver has been uploaded.
  • Crew confirms that they see maneuver and copy maneuver dV to Misison Control.
  • Misison Control now needs to calculate engine startup time (relative to maneuver date).
    • Import current orbit params into Maneuver Execution Assistant (MEA) tool.
    • Next import maneuver data to MEA.
    • Get ship mass by runnig command "run res." in the kOS terminal.
    • Enter ship mass, engine Isp and Thrust (Isp=350s, Thrust=250kN) into corresponding fields in MEA.
    • Click "Compute Burn Timing Information"
  • Mission Control calls Crew and tells them Burn Start Time.
  • Crew copy burn start time.
  • Mission Control requests how many time for preparation for maneuver execution do Crew need.
  • Crew estimates time required to turn ship into direction of the maneuver in minutes (i.e. 1 minute) and passes it to Mission Control.
  • Mission Control calculates date timestamp to warp time using formulae: T = Maneuver time - engine startup time - preparation time. Let's say maneuver time is 40210 seconds, engine startup time is 100 seconds and Crew requested 1 minute to prepare. This gives warp timestamp = 40210 - 100 - 60 = 40050.
  • Mission control calls Crew and requests are they ready for time warp.
  • Crew says ok.
  • Mission control enter command "run warput(40050)." into kOS terminal - time warp starts in KSP.
  • Mission control asks Crew do they observe time acceleration.
  • Crew confirms.
  • When time warp ends, Crew informs Mission control.
  • Crew begins maneuver execution:
    • Turn ship into direction of maneuver (using SAS mode or manually).
    • Start engine in time.
    • Mission control monitors maneuver execution through MCC Real Time System.
    • Crew waits until maneuver dV indicator reaches zero and turns off engine.
  • Crew notifies Mission Control that maneuver was executed.
  • Mission Control verivies maneuver execution:
    • Load duna-correction-burn.mat secnario into Mission Architect
    • Import current orbit data into Initial State event
    • Chck orbital params inside Final Spacecarft State box: if Orbiting about = Duna and in the mouse over popup Periapsis Alt. = 100-200 км, then maneuver execution was succesful. If no, we need to calculate correction burn:
    • Run optimization.
    • If optimization result gives orbit that satisfies constraints (Periapsis Alt. = 100 km, Inclanation = 0-10 degree), maneuver data is uploaded to KSP and executes in the same way as was descibed before. If not, when:
    • You need to increase optimization variables range or shift maneuver date.
  • The flight plan is considered completed if, after correction, the ship is on a course leading to Duna with pericenter ~100 км and low inclanation.