forked from KSP-KOS/KOS_DOC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbindings.html
968 lines (833 loc) · 48.8 KB
/
bindings.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Catalog of Bound Variable Names — kOS 1.1.5.0 documentation</title>
<link rel="shortcut icon" href="_static/favicon.ico"/>
<link rel="stylesheet" href="_static/css/kos_theme.css" type="text/css" />
<link rel="author" title="About these documents"
href="about.html"/>
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="copyright" title="Copyright" href="copyright.html"/>
<link rel="top" title="kOS 1.1.5.0 documentation" href="index.html"/>
<link rel="up" title="General Topics" href="general.html"/>
<link rel="next" title="CPU Vessel (SHIP)" href="general/cpu_vessel.html"/>
<link rel="prev" title="General Topics" href="general.html"/>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="contents.html" class="icon icon-home"> kOS
<img src="_static/kos_logo_small.png" class="logo" />
</a>
<div class="version">
1.1.5.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="index.html">Home</a></li>
<li class="toctree-l1"><a class="reference internal" href="contents.html">Table of Contents</a></li>
<li class="toctree-l1"><a class="reference internal" href="downloads_links.html">Downloads and Links</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorials.html">Tutorials</a></li>
<li class="toctree-l1"><a class="reference internal" href="library.html">Community Example Library</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="general.html">General</a><ul class="current">
<li class="toctree-l2 current"><a class="current reference internal" href="#">Bound Variables</a></li>
<li class="toctree-l2"><a class="reference internal" href="general/cpu_vessel.html">CPU Vessel (SHIP)</a></li>
<li class="toctree-l2"><a class="reference internal" href="general/cpu_hardware.html">CPU Hardware</a></li>
<li class="toctree-l2"><a class="reference internal" href="general/kospartmodule.html">Game Part</a></li>
<li class="toctree-l2"><a class="reference internal" href="general/settingsWindows.html">Settings Windows</a></li>
<li class="toctree-l2"><a class="reference internal" href="general/gui.html">Making User GUIs</a></li>
<li class="toctree-l2"><a class="reference internal" href="general/telnet.html">Telnet Server</a></li>
<li class="toctree-l2"><a class="reference internal" href="general/volumes.html">Files & Volumes</a></li>
<li class="toctree-l2"><a class="reference internal" href="general/compiling.html">Machine Code</a></li>
<li class="toctree-l2"><a class="reference internal" href="general/skid.html">Sound Chip (SKID)</a></li>
<li class="toctree-l2"><a class="reference internal" href="general/nametag.html">Name Tags</a></li>
<li class="toctree-l2"><a class="reference internal" href="general/parts_and_partmodules.html">Parts & PartModules</a></li>
<li class="toctree-l2"><a class="reference internal" href="general/career_limits.html">Respecting Career Limits</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="language.html">Language</a></li>
<li class="toctree-l1"><a class="reference internal" href="math.html">Mathematics</a></li>
<li class="toctree-l1"><a class="reference internal" href="commands.html">Commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="structures.html">Structures</a></li>
<li class="toctree-l1"><a class="reference internal" href="addons.html">Addons</a></li>
<li class="toctree-l1"><a class="reference internal" href="contribute.html">Contribute</a></li>
<li class="toctree-l1"><a class="reference internal" href="changes.html">Changes</a></li>
<li class="toctree-l1"><a class="reference internal" href="about.html">About</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="contents.html">kOS</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="contents.html">Docs</a> »</li>
<li><a href="general.html">General Topics</a> »</li>
<li>Catalog of Bound Variable Names</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/bindings.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="catalog-of-bound-variable-names">
<span id="bindings"></span><h1>Catalog of Bound Variable Names<a class="headerlink" href="#catalog-of-bound-variable-names" title="Permalink to this headline">¶</a></h1>
<p>This is the list of special reserved keyword variable names that kOS
will interpret
to mean something special. If they are used as normal variable names by
your kOS script
program they may not work. Understanding them and their meaning is
crucial to creating
effective kOS scripts.</p>
<div class="section" id="named-vessels-and-bodies">
<h2>NAMED VESSELS AND BODIES<a class="headerlink" href="#named-vessels-and-bodies" title="Permalink to this headline">¶</a></h2>
<p>SHIP:</p>
<ul class="simple">
<li><strong>Variable name</strong>: SHIP</li>
<li><strong>Gettable</strong>: yes</li>
<li><strong>Settable</strong>: no</li>
<li><strong>Type</strong>: <a class="reference external" href="structures/vessels/vessel.html">Vessel</a></li>
<li><strong>Description</strong>: Whichever vessel happens to be the one containing the
CPU part that is running this Kerboscript code at the moment. This is
the <a class="reference external" href="general/cpu_vessel.html">CPU Vessel</a>.</li>
</ul>
<p>TARGET:</p>
<ul class="simple">
<li><strong>Variable Name</strong>: TARGET</li>
<li><strong>Gettable</strong>: yes</li>
<li><strong>Settable</strong>: yes</li>
<li><strong>Type</strong>: <a class="reference external" href="structures/vessels/vessel.html">Vessel</a> or
<a class="reference external" href="structures/celestial_bodies/body.html">Body</a> or
<a class="reference external" href="structures/vessels/part.html">Part</a></li>
<li><strong>Description</strong>: Whichever <a class="reference external" href="structures/orbits/orbitable.html">Orbitable</a>
object happens to be the one selected as the current KSP target. If a
docking port is selected as the target, it will be the corresponding part.
If set to a string, it will assume the string is the name of a vessel being
targeted and set it to a vessel by that name. For best results set it
to Body(“some name”) or Vessel(“some name”) explicitly. This will
throw an exception if called from a vessel other than the active vessel,
as limitations in how KSP sets the target vessel limit the
implementation to working with only the active vessel.</li>
</ul>
<p id="hastarget">HASTARGET:</p>
<ul class="simple">
<li><strong>Variable Name</strong>: TARGET</li>
<li><strong>Gettable</strong>: yes</li>
<li><strong>Settable</strong>: no</li>
<li><strong>Type</strong>: boolean</li>
<li><strong>Description</strong>: Will return true if the ship has a target selected.
This will always return false when not on the active vessel, due to
limitations in how KSP sets the target vessel.</li>
</ul>
</div>
<div class="section" id="alias-shortcuts-for-ship-fields">
<h2>Alias shortcuts for SHIP fields<a class="headerlink" href="#alias-shortcuts-for-ship-fields" title="Permalink to this headline">¶</a></h2>
<p>The following are all alias shortcuts for accessing the fields of the
SHIP vessel.
To see their definition, please consult the
<a class="reference external" href="structures/vessels/vessel.html">Vessel</a>
page, as they are all just instances of the standard vessel suffixes.</p>
<table border="1" class="docutils">
<colgroup>
<col width="17%" />
<col width="83%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Variable</th>
<th class="head">Same as</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>HEADING</td>
<td>Same as SHIP:HEADING</td>
</tr>
<tr class="row-odd"><td>PROGRADE</td>
<td>Same as SHIP:PROGRADE</td>
</tr>
<tr class="row-even"><td>RETROGRADE</td>
<td>Same as SHIP:RETROGRADE</td>
</tr>
<tr class="row-odd"><td>FACING</td>
<td>Same as SHIP:FACING</td>
</tr>
<tr class="row-even"><td>MAXTHRUST</td>
<td>Same as SHIP:MAXTHRUST</td>
</tr>
<tr class="row-odd"><td>VELOCITY</td>
<td>Same as SHIP:VELOCITY</td>
</tr>
<tr class="row-even"><td>GEOPOSITION</td>
<td>Same as SHIP:GEOPOSITION</td>
</tr>
<tr class="row-odd"><td>LATITUDE</td>
<td>Same as SHIP:LATITUDE</td>
</tr>
<tr class="row-even"><td>LONGITUDE</td>
<td>Same as SHIP:LONGITUDE</td>
</tr>
<tr class="row-odd"><td>UP</td>
<td>Same as SHIP:UP</td>
</tr>
<tr class="row-even"><td>NORTH</td>
<td>Same as SHIP:NORTH</td>
</tr>
<tr class="row-odd"><td>BODY</td>
<td>Same as SHIP:BODY</td>
</tr>
<tr class="row-even"><td>ANGULARMOMENTUM</td>
<td>Same as SHIP:ANGULARMOMENTUM</td>
</tr>
<tr class="row-odd"><td>ANGULARVEL</td>
<td>Same as SHIP:ANGULARVEL</td>
</tr>
<tr class="row-even"><td>ANGULARVELOCITY</td>
<td>Same as SHIP:ANGULARVEL</td>
</tr>
<tr class="row-odd"><td>MASS</td>
<td>Same as SHIP:MASS</td>
</tr>
<tr class="row-even"><td>VERTICALSPEED</td>
<td>Same as SHIP:VERTICALSPEED</td>
</tr>
<tr class="row-odd"><td>GROUNDSPEED</td>
<td>Same as SHIP:GROUNDSPEED</td>
</tr>
<tr class="row-even"><td>SURFACESPEED</td>
<td>This has been obsoleted as of kOS 0.18.0. Replace it with GROUNDSPEED.</td>
</tr>
<tr class="row-odd"><td>AIRSPEED</td>
<td>Same as SHIP:AIRSPEED</td>
</tr>
<tr class="row-even"><td>ALTITUDE</td>
<td>Same as SHIP:ALTITUDE</td>
</tr>
<tr class="row-odd"><td>APOAPSIS</td>
<td>Same as SHIP:APOAPSIS</td>
</tr>
<tr class="row-even"><td>PERIAPSIS</td>
<td>Same as SHIP:PERIAPSIS</td>
</tr>
<tr class="row-odd"><td>SENSORS</td>
<td>Same as SHIP:SENSORS</td>
</tr>
<tr class="row-even"><td>SRFPROGRADE</td>
<td>Same as SHIP:SRFPROGRADE</td>
</tr>
<tr class="row-odd"><td>SRFREROGRADE</td>
<td>Same as SHIP:SRFREROGRADE</td>
</tr>
<tr class="row-even"><td>OBT</td>
<td>Same as SHIP:OBT</td>
</tr>
<tr class="row-odd"><td>STATUS</td>
<td>Same as SHIP:STATUS</td>
</tr>
<tr class="row-even"><td>SHIPNAME</td>
<td>Same as SHIP:NAME</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="constants-pi-e-etc">
<h2>Constants (pi, e, etc)<a class="headerlink" href="#constants-pi-e-etc" title="Permalink to this headline">¶</a></h2>
<p>Get-only.</p>
<p>The variable <code class="docutils literal"><span class="pre">constant</span></code> provides a way to access a few
<a class="reference internal" href="math/basic.html#constants"><span class="std std-ref">basic math and physics constants</span></a>, such as Pi, Euler’s
number, and so on.</p>
<p>Example:</p>
<div class="highlight-kerboscript"><div class="highlight"><pre><span></span><span class="k">print</span> <span class="s">"Kerbin's circumference: "</span> <span class="o">+</span> <span class="p">(</span><span class="mf">2</span><span class="o">*</span><span class="nv">constant</span><span class="p">:</span><span class="nv">pi</span><span class="o">*</span><span class="nv">Kerbin</span><span class="p">:</span><span class="nv">radius</span><span class="p">)</span> <span class="o">+</span> <span class="s">"meters."</span><span class="p">.</span>
</pre></div>
</div>
<p>The full list is here: <a class="reference internal" href="math/basic.html#constants"><span class="std std-ref">constants page</span></a>.</p>
</div>
<div class="section" id="terminal">
<h2>Terminal<a class="headerlink" href="#terminal" title="Permalink to this headline">¶</a></h2>
<p>Get-only. <code class="docutils literal"><span class="pre">terminal</span></code> returns a <a class="reference internal" href="structures/misc/terminal.html#structure:TERMINAL" title="TERMINAL structure"><code class="xref ks ks-struct docutils literal"><span class="pre">terminal</span></code></a> structure describing
the attributes of the current terminal screen associated with the
CPU this script is running on.</p>
</div>
<div class="section" id="core">
<h2>Core<a class="headerlink" href="#core" title="Permalink to this headline">¶</a></h2>
<p>Get-only. <code class="docutils literal"><span class="pre">core</span></code> returns a <a class="reference internal" href="structures/vessels/core.html#structure:CORE" title="CORE structure"><code class="xref ks ks-struct docutils literal"><span class="pre">core</span></code></a> structure referring to the CPU you
are running on.</p>
</div>
<div class="section" id="archive">
<h2>Archive<a class="headerlink" href="#archive" title="Permalink to this headline">¶</a></h2>
<p>Get-only. <code class="docutils literal"><span class="pre">archive</span></code> returns a <a class="reference internal" href="structures/volumes_and_files/volume.html#structure:VOLUME" title="VOLUME structure"><code class="xref ks ks-struct docutils literal"><span class="pre">Volume</span></code></a> structure referring to the archive.
You can read more about what archive is on the <a class="reference internal" href="general/volumes.html#volumes"><span class="std std-ref">File & volumes</span></a> page.</p>
</div>
<div class="section" id="stage">
<h2>Stage<a class="headerlink" href="#stage" title="Permalink to this headline">¶</a></h2>
<p>Get-only. <code class="docutils literal"><span class="pre">stage</span></code> returns a <a class="reference internal" href="structures/vessels/stage.html#structure:STAGE" title="STAGE structure"><code class="xref ks ks-struct docutils literal"><span class="pre">stage</span></code></a> structure used to count resources
in the current stage. Not to be confused with the COMMAND stage
which triggers the next stage.</p>
</div>
<div class="section" id="nextnode">
<h2>NextNode<a class="headerlink" href="#nextnode" title="Permalink to this headline">¶</a></h2>
<p>See the <a class="reference internal" href="structures/vessels/node.html#global:NEXTNODE" title="NEXTNODE global"><code class="xref ks ks-global docutils literal"><span class="pre">NEXTNODE</span></code></a> documentation.</p>
</div>
<div class="section" id="hasnode">
<h2>HasNode<a class="headerlink" href="#hasnode" title="Permalink to this headline">¶</a></h2>
<p>See the <a class="reference internal" href="structures/vessels/node.html#global:HASNODE" title="HASNODE global"><code class="xref ks ks-global docutils literal"><span class="pre">HASNODE</span></code></a> documentation.</p>
</div>
<div class="section" id="allnodes">
<h2>AllNodes<a class="headerlink" href="#allnodes" title="Permalink to this headline">¶</a></h2>
<p>See the <a class="reference internal" href="structures/vessels/node.html#global:ALLNODES" title="ALLNODES global"><code class="xref ks ks-global docutils literal"><span class="pre">ALLNODES</span></code></a> documentation.</p>
</div>
<div class="section" id="resource-types">
<h2>Resource Types<a class="headerlink" href="#resource-types" title="Permalink to this headline">¶</a></h2>
<p>Any time there is a resource on the ship it can be queried. The
resources are the values that appear when you click on the upper-right
corner of the screen in the KSP window. <img alt="Resources" src="_images/resources.png" /></p>
<div class="highlight-kerboscript"><div class="highlight"><pre><span></span><span class="nv">LIQUIDFUEL</span>
<span class="nv">OXIDIZER</span>
<span class="nv">ELECTRICCHARGE</span>
<span class="nv">MONOPROPELLANT</span>
<span class="nv">INTAKEAIR</span>
<span class="nv">SOLIDFUEL</span>
</pre></div>
</div>
<p>All of the above resources can be queried using either the prefix SHIP
or STAGE, depending on whether you are trying to query how much is left
in the current stage or the entire ship:</p>
<p>How much liquid fuel is left in the entire ship:</p>
<div class="highlight-kerboscript"><div class="highlight"><pre><span></span><span class="k">PRINT</span> <span class="s">"There is "</span> <span class="o">+</span> <span class="nv">SHIP</span><span class="p">:</span><span class="nv">LIQUIDFUEL</span> <span class="o">+</span> <span class="s">" liquid fuel on the ship."</span><span class="p">.</span>
</pre></div>
</div>
<p>How much liquid fuel is left in just the current stage:</p>
<div class="highlight-kerboscript"><div class="highlight"><pre><span></span><span class="k">PRINT</span> <span class="s">"There is "</span> <span class="o">+</span> <span class="k">STAGE</span><span class="p">:</span><span class="nv">LIQUIDFUEL</span> <span class="o">+</span> <span class="s">" liquid fuel in this stage."</span><span class="p">.</span>
</pre></div>
</div>
<p>How much liquid fuel is left in the target vessel:</p>
<div class="highlight-kerboscript"><div class="highlight"><pre><span></span><span class="k">PRINT</span> <span class="s">"There is "</span> <span class="o">+</span> <span class="nv">TARGET</span><span class="p">:</span><span class="nv">LIQUIDFUEL</span> <span class="o">+</span> <span class="s">" liquid fuel in the target ship."</span><span class="p">.</span>
</pre></div>
</div>
<p>Any other resources that you have added using other mods should be
query-able this way, provided that you spell
the term exactly as it appears in the resources window.</p>
<p>You can also get a list of all resources, either in SHIP: or STAGE: with the :RESOURCES suffix.</p>
</div>
<div class="section" id="alt-alias">
<h2>ALT ALIAS<a class="headerlink" href="#alt-alias" title="Permalink to this headline">¶</a></h2>
<p>The special variable <a class="reference external" href="structures/vessels/alt.html">ALT</a> gives you
access to a few altitude predictions:</p>
<p>ALT:APOAPSIS</p>
<p>ALT:PERIAPSIS</p>
<p>ALT:RADAR</p>
<p>Further details are found on the <a class="reference external" href="structures/vessels/alt.html">ALT page</a> .</p>
</div>
<div class="section" id="eta-alias">
<h2>ETA ALIAS<a class="headerlink" href="#eta-alias" title="Permalink to this headline">¶</a></h2>
<p>The special variable <a class="reference external" href="structures/vessels/eta.html">ETA</a> gives you
access to a few time predictions:</p>
<p>ETA:APOAPSIS</p>
<p>ETA:PERIAPSIS</p>
<p>ETA:TRANSITION</p>
<p>Further details are found on the <a class="reference external" href="structures/vessels/eta.html">ETA page</a> .</p>
</div>
<div class="section" id="encounter">
<h2>ENCOUNTER<a class="headerlink" href="#encounter" title="Permalink to this headline">¶</a></h2>
<p>The orbit patch describing the next encounter with a body the current
vessel will enter. If there is no such encounter coming, it will return
the special string “None”. If there is an encounter coming, it will
return an object <a class="reference internal" href="structures/orbits/orbit.html#orbit"><span class="std std-ref">of type Orbit</span></a>. (i.e. to obtain the name
of the planet the encounter is with, you can do:
<code class="docutils literal"><span class="pre">print</span> <span class="pre">ENCOUNTER:BODY:NAME.</span></code>, for example.).</p>
</div>
<div class="section" id="boolean-toggle-flags">
<h2>BOOLEAN TOGGLE FLAGS:<a class="headerlink" href="#boolean-toggle-flags" title="Permalink to this headline">¶</a></h2>
<p>These are special <a class="reference internal" href="structures/misc/boolean.html#structure:BOOLEAN" title="BOOLEAN structure"><code class="xref ks ks-struct docutils literal"><span class="pre">Boolean</span></code></a> variables that interact with ship systems.
They can be <code class="docutils literal"><span class="pre">True</span></code> or <code class="docutils literal"><span class="pre">False</span></code>, and can be set or toggled using the <code class="docutils literal"><span class="pre">ON</span></code>,
<code class="docutils literal"><span class="pre">OFF</span></code>, and <code class="docutils literal"><span class="pre">TOGGLE</span></code> <a class="reference internal" href="language/variables.html#toggle"><span class="std std-ref">commands</span></a>. Many of these are for stock
action groups, while others are specific to kOS.</p>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt><a class="reference internal" href="commands/flight/systems.html#stock-boolean-flags"><span class="std std-ref">STOCK ACTION GROUPS</span></a></dt>
<dd>Stock action groups are independent of actual part state and must be
toggled to have an effect.</dd>
<dt><a class="reference internal" href="commands/flight/systems.html#kos-boolean-flags"><span class="std std-ref">kOS PSEUDO ACTION GROUPS</span></a></dt>
<dd>Pseudo-action groups added by kOS which are dependent on actual part
state and may still affect parts if set to the current value.</dd>
</dl>
</div>
<table border="1" class="docutils">
<colgroup>
<col width="28%" />
<col width="10%" />
<col width="9%" />
<col width="9%" />
<col width="45%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Variable Name</th>
<th class="head">Can Read</th>
<th class="head">Can Set</th>
<th class="head">Source</th>
<th class="head">What it manages</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference internal" href="commands/flight/systems.html#global:SAS" title="SAS global"><code class="xref ks ks-global docutils literal"><span class="pre">SAS</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>stock</td>
<td>SAS action group</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="commands/flight/systems.html#global:RCS" title="RCS global"><code class="xref ks ks-global docutils literal"><span class="pre">RCS</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>stock</td>
<td>RCS thrusters action group</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="commands/flight/systems.html#global:GEAR" title="GEAR global"><code class="xref ks ks-global docutils literal"><span class="pre">GEAR</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>stock</td>
<td>Landing gear action group</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="commands/flight/systems.html#global:LIGHTS" title="LIGHTS global"><code class="xref ks ks-global docutils literal"><span class="pre">LIGHTS</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>stock</td>
<td>Lights action group</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="commands/flight/systems.html#global:BRAKES" title="BRAKES global"><code class="xref ks ks-global docutils literal"><span class="pre">BRAKES</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>stock</td>
<td>Brakes action group</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="commands/flight/systems.html#global:ABORT" title="ABORT global"><code class="xref ks ks-global docutils literal"><span class="pre">ABORT</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>stock</td>
<td>Abort action group</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="commands/flight/systems.html#global:LEGS" title="LEGS global"><code class="xref ks ks-global docutils literal"><span class="pre">LEGS</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>kOS</td>
<td>The extended state of all landing legs</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="commands/flight/systems.html#global:CHUTES" title="CHUTES global"><code class="xref ks ks-global docutils literal"><span class="pre">CHUTES</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>kOS</td>
<td>The armed state of all parachutes</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="commands/flight/systems.html#global:CHUTESSAFE" title="CHUTESSAFE global"><code class="xref ks ks-global docutils literal"><span class="pre">CHUTESSAFE</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>kOS</td>
<td>The armed state of all “safe” parachutes</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="commands/flight/systems.html#global:PANELS" title="PANELS global"><code class="xref ks ks-global docutils literal"><span class="pre">PANELS</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>kOS</td>
<td>The deployed state of solar panels</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="commands/flight/systems.html#global:RADIATORS" title="RADIATORS global"><code class="xref ks ks-global docutils literal"><span class="pre">RADIATORS</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>kOS</td>
<td>The deployed state of radiators</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="commands/flight/systems.html#global:LADDERS" title="LADDERS global"><code class="xref ks ks-global docutils literal"><span class="pre">LADDERS</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>kOS</td>
<td>The extended state of ladders</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="commands/flight/systems.html#global:BAYS" title="BAYS global"><code class="xref ks ks-global docutils literal"><span class="pre">BAYS</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>kOS</td>
<td>The opened state of payload/service bays</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="commands/flight/systems.html#global:INTAKES" title="INTAKES global"><code class="xref ks ks-global docutils literal"><span class="pre">INTAKES</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>kOS</td>
<td>The opened state of all intakes</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="commands/flight/systems.html#global:DEPLOYDRILLS" title="DEPLOYDRILLS global"><code class="xref ks ks-global docutils literal"><span class="pre">DEPLOYDRILLS</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>kOS</td>
<td>The deployment state of all drills</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="commands/flight/systems.html#global:DRILLS" title="DRILLS global"><code class="xref ks ks-global docutils literal"><span class="pre">DRILLS</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>kOS</td>
<td>The running state of all drills</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="commands/flight/systems.html#global:FUELCELLS" title="FUELCELLS global"><code class="xref ks ks-global docutils literal"><span class="pre">FUELCELLS</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>kOS</td>
<td>The running state of all fuel cells</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="commands/flight/systems.html#global:ISRU" title="ISRU global"><code class="xref ks ks-global docutils literal"><span class="pre">ISRU</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>kOS</td>
<td>The running state of all resource converters</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="commands/flight/systems.html#global:AG1 ... AG10" title="AG1 ... AG10 global"><code class="xref any ks ks-global docutils literal"><span class="pre">AG1</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>stock</td>
<td>Action Group 1.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="commands/flight/systems.html#global:AG1 ... AG10" title="AG1 ... AG10 global"><code class="xref any ks ks-global docutils literal"><span class="pre">AG2</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>stock</td>
<td>Action Group 2.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="commands/flight/systems.html#global:AG1 ... AG10" title="AG1 ... AG10 global"><code class="xref any ks ks-global docutils literal"><span class="pre">AG3</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>stock</td>
<td>Action Group 3.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="commands/flight/systems.html#global:AG1 ... AG10" title="AG1 ... AG10 global"><code class="xref any ks ks-global docutils literal"><span class="pre">AG4</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>stock</td>
<td>Action Group 4.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="commands/flight/systems.html#global:AG1 ... AG10" title="AG1 ... AG10 global"><code class="xref any ks ks-global docutils literal"><span class="pre">AG5</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>stock</td>
<td>Action Group 5.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="commands/flight/systems.html#global:AG1 ... AG10" title="AG1 ... AG10 global"><code class="xref any ks ks-global docutils literal"><span class="pre">AG6</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>stock</td>
<td>Action Group 6.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="commands/flight/systems.html#global:AG1 ... AG10" title="AG1 ... AG10 global"><code class="xref any ks ks-global docutils literal"><span class="pre">AG7</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>stock</td>
<td>Action Group 7.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="commands/flight/systems.html#global:AG1 ... AG10" title="AG1 ... AG10 global"><code class="xref any ks ks-global docutils literal"><span class="pre">AG8</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>stock</td>
<td>Action Group 8.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="commands/flight/systems.html#global:AG1 ... AG10" title="AG1 ... AG10 global"><code class="xref any ks ks-global docutils literal"><span class="pre">AG9</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>stock</td>
<td>Action Group 9.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="commands/flight/systems.html#global:AG1 ... AG10" title="AG1 ... AG10 global"><code class="xref any ks ks-global docutils literal"><span class="pre">AG10</span></code></a></td>
<td>yes</td>
<td>yes</td>
<td>stock</td>
<td>Action Group 10.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="addons/AGX.html#agx"><span class="std std-ref">AGn</span></a></td>
<td>yes</td>
<td>yes</td>
<td>AGX</td>
<td>ActionGroupsExtended action groups</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="flight-control">
<h2>Flight Control<a class="headerlink" href="#flight-control" title="Permalink to this headline">¶</a></h2>
<p>There are bound variables used in controlling the flight of a ship, which
can be found at the following links:</p>
<p>If you want to let kOS do a lot of the work of aligning to a desired
heading for you, use <a class="reference external" href="commands/flight/cooked.html">Cooked Control</a>.</p>
<p>If you want your script to manipulate the controls directly (as in “set
yaw axis halfway left for a few seconds (using the ‘A’ key)”, then
use <a class="reference external" href="commands/flight/raw.html">Raw Control</a>.</p>
<p>If you want to be able to READ what the player is attempting to do
while your script is running, and perhaps respond to it, then use
<a class="reference external" href="commands/flight/pilot.html">Reading the Pilot’s Control settings (i.e reading what the manual input is attempting)</a>
(By default your script will override manual piloting attempts, but
you can read what the pilot’s controls are set at and make your
autopilot take them under advisement - sort of like how a
fly-by-wire plane works.)</p>
<div class="section" id="controls-that-must-be-used-with-lock">
<h3>Controls that must be used with LOCK<a class="headerlink" href="#controls-that-must-be-used-with-lock" title="Permalink to this headline">¶</a></h3>
<div class="highlight-kerboscript"><div class="highlight"><pre><span></span><span class="nv">THROTTLE</span> <span class="c1">// Lock to a decimal value between 0 and 1.</span>
<span class="nv">STEERING</span> <span class="c1">// Lock to a direction, either a Vector or a Direction.</span>
<span class="nv">WHEELTHROTTLE</span> <span class="c1">// Separate throttle for wheels</span>
<span class="nv">WHEELSTEERING</span> <span class="c1">// Separate steering system for wheels</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="time">
<h2>Time<a class="headerlink" href="#time" title="Permalink to this headline">¶</a></h2>
<div class="section" id="missiontime">
<h3>MISSIONTIME<a class="headerlink" href="#missiontime" title="Permalink to this headline">¶</a></h3>
<p>You can obtain the number of seconds it has been since the current
CPU vessel has been launched with the bound global variable
<code class="docutils literal"><span class="pre">MISSIONTIME</span></code>. In real space programs this is referred to usually
as “MET” - Mission Elapsed Time, and it’s what’s being measured when
you hear that familiar voice saying “T minus 10 seconds...” Point “T”
is the zero point of the mission elapsed time, and everything before that
is a negative number and everything after it is a positive number.
kOS is only capable of returning the “T+” times, not the “T-” times,
because it doesn’t read your mind to know ahead of time when you plan
to launch.</p>
</div>
<div class="section" id="time-structure">
<h3>Time Structure<a class="headerlink" href="#time-structure" title="Permalink to this headline">¶</a></h3>
<p><a class="reference external" href="structures/misc/time.html">Time</a> is the simulated amount of time that passed since the beginning of the game’s universe epoch. (A brand new campaign that just started begins at TIME zero.)</p>
<p>TIME is a useful system variable for calculating the passage of time
between taking
physical measurements (i.e. to calculate how fast a phenomenon is
changing in a loop).
It returns the KSP <em>simulated</em> time, rather than the actual realtime
sitting in the
chair playing the game. If everything is running smoothly on a fast
computer, one
second of simulated time will match one second of real time, but if
anything is
causing the game to stutter or lag a bit, then the simulated time will
be a bit
slower than the real time. For any script program trying to calculate
physical
properties of the KSP universe, the time that matters is the simulated
time, which
is what TIME returns.</p>
<p>It’s important to be aware of the
<a class="reference internal" href="general/cpu_hardware.html#frozen"><span class="std std-ref">frozen update nature</span></a> of the kOS
computer when reading TIME.</p>
</div>
</div>
<div class="section" id="system-variables">
<h2>System Variables<a class="headerlink" href="#system-variables" title="Permalink to this headline">¶</a></h2>
<p>This section is about variables that describe the things that are slightly
outside the simulated universe of the game and are more about
the game’s user interface or the kOS mod itself. They represent things
that slightly “break the fourth wall” and let your script access
something entirely outside the in-character experience.</p>
<div class="highlight-kerboscript"><div class="highlight"><pre><span></span><span class="k">PRINT</span> <span class="nv">VERSION</span><span class="p">.</span> <span class="c1">// Returns operating system version number. e.g. 0.1.2.3</span>
<span class="k">PRINT</span> <span class="nv">VERSION</span><span class="p">:</span><span class="nv">MAJOR</span><span class="p">.</span> <span class="c1">// Returns major version number. e.g. 0 if version is 0.1.2.3</span>
<span class="k">PRINT</span> <span class="nv">VERSION</span><span class="p">:</span><span class="nv">MINOR</span><span class="p">.</span> <span class="c1">// Returns minor version number. e.g. 1 if version is 0.1.2.3</span>
<span class="k">PRINT</span> <span class="nv">VERSION</span><span class="p">:</span><span class="nv">PATCH</span><span class="p">.</span> <span class="c1">// Returns patch version number. e.g. 2 if version is 0.1.2.3</span>
<span class="k">PRINT</span> <span class="nv">VERSION</span><span class="p">:</span><span class="nv">BUILD</span><span class="p">.</span> <span class="c1">// Returns build version number. e.g. 3 if version is 0.1.2.3</span>
<span class="k">PRINT</span> <span class="nv">SESSIONTIME</span><span class="p">.</span> <span class="c1">// Returns amount of time, in seconds, from vessel load.</span>
</pre></div>
</div>
<p>NOTE the following important difference:</p>
<p>SESSIONTIME is the time since the last time this vessel was loaded from
on-rails into full physics.</p>
<p>TIME is the time since the entire saved game campaign started, in the
kerbal universe’s time. i.e. TIME = 0 means a brand new campaign was
just started.</p>
<dl class="object">
<dt>
<code class="descname">HOMECONNECTION</code></dt>
<dd><div class="admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt><a class="reference internal" href="commands/communication.html#global:HOMECONNECTION" title="HOMECONNECTION global"><code class="xref ks ks-global docutils literal"><span class="pre">HOMECONNECTION</span></code></a></dt>
<dd>Globally bound variable for the connection to “home”.</dd>
</dl>
</div>
</dd></dl>
<dl class="object">
<dt>
<code class="descname">CONTROLCONNECTION</code></dt>
<dd><div class="admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt><a class="reference internal" href="commands/communication.html#global:CONTROLCONNECTION" title="CONTROLCONNECTION global"><code class="xref ks ks-global docutils literal"><span class="pre">CONTROLCONNECTION</span></code></a></dt>
<dd>Globally bound variable for the connection to a control source.</dd>
</dl>
</div>
</dd></dl>
<div class="section" id="kuniverse">
<h3>KUNIVERSE<a class="headerlink" href="#kuniverse" title="Permalink to this headline">¶</a></h3>
<p><a class="reference internal" href="structures/misc/kuniverse.html#kuniverse"><span class="std std-ref">Kuniverse</span></a> is a structure that contains many settings that
break the fourth wall a little bit and control the game simulation directly.
The eventual goal is probably to move many of the variables you see listed
below into <code class="docutils literal"><span class="pre">kuniverse</span></code>.</p>
</div>
<div class="section" id="config">
<h3>Config<a class="headerlink" href="#config" title="Permalink to this headline">¶</a></h3>
<p>CONFIG is a special variable name that refers to the configuration
settings for the kOS mod, and can be used to set or get various
options.</p>
<p><a class="reference external" href="structures/misc/config.html">CONFIG has its own page</a> for further
details.</p>
</div>
<div class="section" id="warp-and-warpmode">
<h3>WARP and WARPMODE<a class="headerlink" href="#warp-and-warpmode" title="Permalink to this headline">¶</a></h3>
<p>Time warp can be controlled with the variables
WARP and WARPMODE. See <a class="reference internal" href="structures/misc/timewarp.html#warp"><span class="std std-ref">WARP</span></a></p>
</div>
<div class="section" id="mapview">
<h3>MAPVIEW<a class="headerlink" href="#mapview" title="Permalink to this headline">¶</a></h3>
<p>A boolean that is both gettable and settable.</p>
<p>If you query MAPVIEW, it’s true if on the map screen, and false if on the flight view screen. If you SET MAPVIEW, you can cause the game to switch between mapview and flight view or visa versa.</p>
</div>
<div class="section" id="loaddistance">
<h3>LOADDISTANCE<a class="headerlink" href="#loaddistance" title="Permalink to this headline">¶</a></h3>
<p>LOADDISTANCE sets the distance from the active vessel at
which vessels get removed from the full physics engine and put
on-rails, or visa versa. Note that as of KSP 1.0 the stock game
supports multiple different load distance settings for different
situations such that the value changes depending on where you are.
But kOS does not support this at the moment so in kOS if you set
the LOADDISTANCE, you are setting it to the same value
universally for all situations.</p>
</div>
</div>
<div class="section" id="profileresult">
<span id="id1"></span><h2>PROFILERESULT()<a class="headerlink" href="#profileresult" title="Permalink to this headline">¶</a></h2>
<p>If you have the runtime statistics configuration option
<a class="reference internal" href="structures/misc/config.html#attribute:CONFIG:STAT" title="CONFIG:STAT attribute"><code class="xref ks ks-attr docutils literal"><span class="pre">Config:STAT</span></code></a> set to <code class="docutils literal"><span class="pre">True</span></code>, then in addition to
the summary statistics after the program run, you can also
see a detailed report of the “profiling” result of your
most recent program run, by calling the built-in function
<code class="docutils literal"><span class="pre">ProfileResult()</span></code>. <em>“Profiling”</em> is a programmer’s term
that means gathering data about how long the program is
spending doing each piece of the program. If you are trying
to figure out whether your program spent more milliseconds
printing numbers to the screen, or more milliseconds
calculating a complex formula, or more milliseconds activating
actions on a PartModule, and so on, then this feature may
help. The ProfileResult() was meant mainly for kOS developers
trying to internally determine which parts of the system could
use the most optomizing. However, as long as it was implemented
for that purpose, it may as well be made available to all
the users of kOS as well.</p>
<p>To use:</p>
<div class="highlight-kerboscript"><div class="highlight"><pre><span></span><span class="k">SET</span> <span class="nv">CONFIG</span><span class="p">:</span><span class="nv">STAT</span> <span class="ow">TO</span> <span class="nb">TRUE</span><span class="p">.</span>
<span class="k">RUN</span> <span class="nv">MYPROGRAM</span><span class="p">.</span>
<span class="k">PRINT</span> <span class="nv">PROFILERESULT</span><span class="p">().</span>
<span class="c1">// <or></span>
<span class="k">LOG</span> <span class="nv">PROFILERESULT</span><span class="p">()</span> <span class="ow">TO</span> <span class="nv">SOMEFIELNAME</span><span class="p">.</span><span class="nv">csv</span><span class="p">.</span>
</pre></div>
</div>
<p>The function <code class="docutils literal"><span class="pre">ProfileResult()</span></code> returns a string containing
a formatted dump of your whole program, broken down into
the more low-level instructions that make it up, with data
values describing how long was spent in total on each
instruction, how many times that instruction was executed,
and the average time spent on a single execution of that
instruction (by dividing the total time by the count of how
many executions it had).</p>
<p>The format of <code class="docutils literal"><span class="pre">ProfileResult()</span></code> is designed to be suitable
for importing into a spreadsheet program if you like, because
it is formatted as a “comma separated values” file, or CSV
for short.</p>
</div>
<div class="section" id="solarprimevector">
<span id="id2"></span><h2>SOLARPRIMEVECTOR<a class="headerlink" href="#solarprimevector" title="Permalink to this headline">¶</a></h2>
<p>Gives the Prime Meridian <a class="reference internal" href="math/vector.html#structure:VECTOR" title="VECTOR structure"><code class="xref ks ks-struct docutils literal"><span class="pre">Vector</span></code></a> for the Solar System itself, in
current Ship-Raw XYZ coordinates.</p>
<p>Both the <a class="reference internal" href="structures/orbits/orbit.html#attribute:ORBIT:LONGITUDEOFASCENDINGNODE" title="ORBIT:LONGITUDEOFASCENDINGNODE attribute"><code class="xref ks ks-attr docutils literal"><span class="pre">Orbit:LONGITUDEOFASCENDINGNODE</span></code></a> orbit suffix and the
<a class="reference internal" href="structures/celestial_bodies/body.html#attribute:BODY:ROTATIONANGLE" title="BODY:ROTATIONANGLE attribute"><code class="xref ks ks-attr docutils literal"><span class="pre">Body:ROTATIONANGLE</span></code></a> body suffix are expressed in terms of
degree offsets from this <em>Prime Meridian Reference Vector</em>.</p>
<div class="section" id="what-is-the-solar-prime-reference-vector">
<h3>What is the Solar Prime Reference Vector?<a class="headerlink" href="#what-is-the-solar-prime-reference-vector" title="Permalink to this headline">¶</a></h3>
<p>The solar prime vector is an arbitrary vector in space used to measure
some orbital parameters that are supposed to remain fixed to space
regardless of how the planets underneath the orbit rotate, or where the
Sun is. In a sense it can be thought of as the celestial “prime
meridian” of the entire solar system, rather than the “prime meridian” of
any one particular rotating planet or moon.</p>
<p>In a hypothetical Earthling’s solar system our Kerbal scientists have
hypothesized may exist in a galaxy far away, Earthbound astronomers use
a reference they called the
<a class="reference external" href="https://en.wikipedia.org/wiki/First_Point_of_Aries">First Point of Aries</a>,
for this purpose.</p>
<p>For Kerbals, it refers to a more arbitrary line in space, pointing at a fixed
point in the firmament, also known as the “skybox”.</p>
</div>
</div>
<div class="section" id="addons">
<h2>Addons<a class="headerlink" href="#addons" title="Permalink to this headline">¶</a></h2>
<p>Get-only. <code class="docutils literal"><span class="pre">addons</span></code> is a special variable used to access various extensions
to kOS that are designed to support the features introduced by some other mods. More info can be found on the <a class="reference internal" href="addons.html#addons"><span class="std std-ref">addons</span></a> page.</p>
</div>
<div class="section" id="colors">
<h2>Colors<a class="headerlink" href="#colors" title="Permalink to this headline">¶</a></h2>
<p>There are several bound variables associated with <a class="reference internal" href="structures/misc/colors.html#colors"><span class="std std-ref">hardcoded colors</span></a> such as WHITE, BLACK, RED, etc. See the linked page for the full list.</p>
</div>
</div>
</div>
<div class="articleComments">
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="general/cpu_vessel.html" class="btn btn-neutral float-right" title="CPU Vessel (SHIP)" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="general.html" class="btn btn-neutral" title="General Topics" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
© <a href="copyright.html">Copyright</a> 2013-2017, Developed and maintained by kOS Team, Originally By Nivekk.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.1.5.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>