|
|
Line 1: |
Line 1: |
− | {| class="wikitable sortable"
| |
− | |- <!-- sort doesn't work with rowspan -->
| |
− | !
| |
− | ! colspan="2" | Surface
| |
− | ! colspan="3" | In Atmosphere
| |
− | ! colspan="3" | In Space
| |
− | ! Craft
| |
− | |-
| |
− | ! Celestial body
| |
− | ! Landed
| |
− | ! Splashed
| |
− | ! Low
| |
− | ! High
| |
− | ! Border
| |
− | ! Low
| |
− | ! High
| |
− | ! Border
| |
− | ! Recovery
| |
− | |-
| |
− | | style="font-weight: bold;" | [[Kerbol]]
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | data-sort-value="11.0" | 11×
| |
− | | data-sort-value="02.0" | 2×
| |
− | | data-sort-value="0000001e+9" | 1 Gm
| |
− | | data-sort-value="04.0" | 4×
| |
− | |-
| |
− | | style="font-weight: bold;" | [[Moho]]
| |
− | | data-sort-value="10.0" | 10×
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | data-sort-value="08.0" | 8×
| |
− | | data-sort-value="07.0" | 7×
| |
− | | data-sort-value="0000080000" | 80 km
| |
− | | data-sort-value="07.0" | 7×
| |
− | |-
| |
− | | style="font-weight: bold;" | [[Eve]]
| |
− | | data-sort-value="08.0" | 8×
| |
− | | data-sort-value="08.0" | 8×
| |
− | | data-sort-value="06.0" | 6×
| |
− | | data-sort-value="06.0" | 6×
| |
− | | data-sort-value="0000022000" | 22 km
| |
− | | data-sort-value="07.0" | 7×
| |
− | | data-sort-value="05.0" | 5×
| |
− | | data-sort-value="0000400000" | 400 km
| |
− | | data-sort-value="05.0" | 5×
| |
− | |-
| |
− | | style="font-weight: bold;" | [[Gilly]]
| |
− | | data-sort-value="09.0" | 9×
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | data-sort-value="08.0" | 8×
| |
− | | data-sort-value="06.0" | 6×
| |
− | | data-sort-value="0000006000" | 6 km
| |
− | | data-sort-value="06.0" | 6×
| |
− | |-
| |
− | | style="font-weight: bold;" | [[Kerbin]]
| |
− | | data-sort-value="00.3" | 0.3×
| |
− | | data-sort-value="00.4" | 0.4×
| |
− | | data-sort-value="00.7" | 0.7×
| |
− | | data-sort-value="00.9" | 0.9×
| |
− | | data-sort-value="0000018000" | 18 km
| |
− | | data-sort-value="01.0" | 1×
| |
− | | data-sort-value="01.5" | 1.5×
| |
− | | data-sort-value="0000250000" | 250 km
| |
− | | data-sort-value="01.0" | 1×
| |
− | |-
| |
− | | style="font-weight: bold;" | [[Mun]]
| |
− | | data-sort-value="04.0" | 4×
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | data-sort-value="03.0" | 3×
| |
− | | data-sort-value="02.0" | 2×
| |
− | | data-sort-value="0000060000" | 60 km
| |
− | | data-sort-value="02.0" | 2×
| |
− | |-
| |
− | | style="font-weight: bold;" | [[Minmus]]
| |
− | | data-sort-value="05.0" | 5×
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | data-sort-value="04.0" | 4×
| |
− | | data-sort-value="02.5" | 2.5×
| |
− | | data-sort-value="0000030000" | 30 km
| |
− | | data-sort-value="02.5" | 2.5×
| |
− | |-
| |
− | | style="font-weight: bold;" | [[Duna]]
| |
− | | data-sort-value="08.0" | 8×
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | data-sort-value="05.0" | 5×
| |
− | | data-sort-value="05.0" | 5×
| |
− | | data-sort-value="0000012000" | 12 km
| |
− | | data-sort-value="07.0" | 7×
| |
− | | data-sort-value="05.0" | 5×
| |
− | | data-sort-value="0000140000" | 140 km
| |
− | | data-sort-value="05.0" | 5×
| |
− | |-
| |
− | | style="font-weight: bold;" | [[Ike]]
| |
− | | data-sort-value="08.0" | 8×
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | data-sort-value="07.0" | 7×
| |
− | | data-sort-value="05.0" | 5×
| |
− | | data-sort-value="0000050000" | 50 km
| |
− | | data-sort-value="05.0" | 5×
| |
− | |-
| |
− | | style="font-weight: bold;" | [[Dres]]
| |
− | | data-sort-value="08.0" | 8×
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | data-sort-value="07.0" | 7×
| |
− | | data-sort-value="06.0" | 6×
| |
− | | data-sort-value="0000025000" | 25 km
| |
− | | data-sort-value="06.0" | 6×
| |
− | |-
| |
− | | style="font-weight: bold;" | [[Jool]]
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | data-sort-value="12.0" | 12×
| |
− | | data-sort-value="09.0" | 9×
| |
− | | data-sort-value="0000120000" | 120 km
| |
− | | data-sort-value="07.0" | 7×
| |
− | | data-sort-value="06.0" | 6×
| |
− | | data-sort-value="0004000000" | 4 Mm
| |
− | | data-sort-value="06.0" | 6×
| |
− | |-
| |
− | | style="font-weight: bold;" | [[Laythe]]
| |
− | | data-sort-value="14.0" | 14×
| |
− | | data-sort-value="12.0" | 12×
| |
− | | data-sort-value="11.0" | 11×
| |
− | | data-sort-value="10.0" | 10×
| |
− | | data-sort-value="0000010000" | 10 km
| |
− | | data-sort-value="09.0" | 9×
| |
− | | data-sort-value="08.0" | 8×
| |
− | | data-sort-value="0000200000" | 200 km
| |
− | | data-sort-value="08.0" | 8×
| |
− | |-
| |
− | | style="font-weight: bold;" | [[Vall]]
| |
− | | data-sort-value="12.0" | 12×
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | data-sort-value="09.0" | 9×
| |
− | | data-sort-value="08.0" | 8×
| |
− | | data-sort-value="0000090000" | 90 km
| |
− | | data-sort-value="08.0" | 8×
| |
− | |-
| |
− | | style="font-weight: bold;" | [[Tylo]]
| |
− | | data-sort-value="12.0" | 12×
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | data-sort-value="10.0" | 10×
| |
− | | data-sort-value="08.0" | 8×
| |
− | | data-sort-value="0000250000" | 250 km
| |
− | | data-sort-value="08.0" | 8×
| |
− | |-
| |
− | | style="font-weight: bold;" | [[Bop]]
| |
− | | data-sort-value="12.0" | 12×
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | data-sort-value="09.0" | 9×
| |
− | | data-sort-value="08.0" | 8×
| |
− | | data-sort-value="0000025000" | 25 km
| |
− | | data-sort-value="08.0" | 8×
| |
− | |-
| |
− | | style="font-weight: bold;" | [[Pol]]
| |
− | | data-sort-value="12.0" | 12×
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | data-sort-value="09.0" | 9×
| |
− | | data-sort-value="08.0" | 8×
| |
− | | data-sort-value="0000022000" | 22 km
| |
− | | data-sort-value="08.0" | 8×
| |
− | |-
| |
− | | style="font-weight: bold;" | [[Eeloo]]
| |
− | | data-sort-value="15.0" | 15×
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | style="background-color: lightgray;" | N/A
| |
− | | data-sort-value="12.0" | 12×
| |
− | | data-sort-value="10.0" | 10×
| |
− | | data-sort-value="0000060000" | 60 km
| |
− | | data-sort-value="10.0" | 10×
| |
− | |}
| |
| | | |
− | <pre>
| |
− | from decimal import Decimal
| |
− |
| |
− | lines = '''Sun In Space Low 11
| |
− | Sun In Space High 2
| |
− | Sun Surface Landed 1
| |
− | Sun Splashed 1
| |
− | Sun Recovered Craft 4
| |
− | Sun Space Threshold Altitude 1E+09
| |
− | Kerbin In Space Low 1
| |
− | Kerbin In Space High 1.5
| |
− | Kerbin Surface Landed 0.3
| |
− | Kerbin Splashed 0.4
| |
− | Kerbin Recovered Craft 1
| |
− | Kerbin Flying Low 0.7
| |
− | Kerbin Flying High 0.9
| |
− | Kerbin Flying Threshold Altitude 18000
| |
− | Kerbin Space Threshold Altitude 250000
| |
− | Mun In Space Low 3
| |
− | Mun In Space High 2
| |
− | Mun Surface Landed 4
| |
− | Mun Splashed 1
| |
− | Mun Recovered Craft 2
| |
− | Mun Space Threshold Altitude 60000
| |
− | Minmus In Space Low 4
| |
− | Minmus In Space High 2.5
| |
− | Minmus Surface Landed 5
| |
− | Minmus Splashed 1
| |
− | Minmus Recovered Craft 2.5
| |
− | Minmus Space Threshold Altitude 30000
| |
− | Moho In Space Low 8
| |
− | Moho In Space High 7
| |
− | Moho Surface Landed 10
| |
− | Moho Splashed 1
| |
− | Moho Recovered Craft 7
| |
− | Moho Space Threshold Altitude 80000
| |
− | Eve In Space Low 7
| |
− | Eve In Space High 5
| |
− | Eve Surface Landed 8
| |
− | Eve Splashed 8
| |
− | Eve Recovered Craft 5
| |
− | Eve Flying Low 6
| |
− | Eve Flying High 6
| |
− | Eve Flying Threshold Altitude 22000
| |
− | Eve Space Threshold Altitude 400000
| |
− | Duna In Space Low 7
| |
− | Duna In Space High 5
| |
− | Duna Surface Landed 8
| |
− | Duna Splashed 1
| |
− | Duna Recovered Craft 5
| |
− | Duna Flying Low 5
| |
− | Duna Flying High 5
| |
− | Duna Flying Threshold Altitude 12000
| |
− | Duna Space Threshold Altitude 140000
| |
− | Ike In Space Low 7
| |
− | Ike In Space High 5
| |
− | Ike Surface Landed 8
| |
− | Ike Splashed 1
| |
− | Ike Recovered Craft 5
| |
− | Ike Space Threshold Altitude 50000
| |
− | Jool In Space Low 7
| |
− | Jool In Space High 6
| |
− | Jool Surface Landed 30
| |
− | Jool Splashed 1
| |
− | Jool Recovered Craft 6
| |
− | Jool Flying Low 12
| |
− | Jool Flying High 9
| |
− | Jool Flying Threshold Altitude 120000
| |
− | Jool Space Threshold Altitude 4000000
| |
− | Laythe In Space Low 9
| |
− | Laythe In Space High 8
| |
− | Laythe Surface Landed 14
| |
− | Laythe Splashed 12
| |
− | Laythe Recovered Craft 8
| |
− | Laythe Flying Low 11
| |
− | Laythe Flying High 10
| |
− | Laythe Flying Threshold Altitude 10000
| |
− | Laythe Space Threshold Altitude 200000
| |
− | Vall In Space Low 9
| |
− | Vall In Space High 8
| |
− | Vall Surface Landed 12
| |
− | Vall Splashed 1
| |
− | Vall Recovered Craft 8
| |
− | Vall Space Threshold Altitude 90000
| |
− | Bop In Space Low 9
| |
− | Bop In Space High 8
| |
− | Bop Surface Landed 12
| |
− | Bop Splashed 1
| |
− | Bop Recovered Craft 8
| |
− | Bop Space Threshold Altitude 25000
| |
− | Tylo In Space Low 10
| |
− | Tylo In Space High 8
| |
− | Tylo Surface Landed 12
| |
− | Tylo Splashed 1
| |
− | Tylo Recovered Craft 8
| |
− | Tylo Space Threshold Altitude 250000
| |
− | Gilly In Space Low 8
| |
− | Gilly In Space High 6
| |
− | Gilly Surface Landed 9
| |
− | Gilly Splashed 1
| |
− | Gilly Recovered Craft 6
| |
− | Gilly Space Threshold Altitude 6000
| |
− | Pol In Space Low 9
| |
− | Pol In Space High 8
| |
− | Pol Surface Landed 12
| |
− | Pol Splashed 1
| |
− | Pol Recovered Craft 8
| |
− | Pol Space Threshold Altitude 22000
| |
− | Dres In Space Low 7
| |
− | Dres In Space High 6
| |
− | Dres Surface Landed 8
| |
− | Dres Splashed 1
| |
− | Dres Recovered Craft 6
| |
− | Dres Space Threshold Altitude 25000
| |
− | Eeloo In Space Low 12
| |
− | Eeloo In Space High 10
| |
− | Eeloo Surface Landed 15
| |
− | Eeloo Splashed 1
| |
− | Eeloo Recovered Craft 10
| |
− | Eeloo Space Threshold Altitude 60000
| |
− | '''.splitlines()
| |
− |
| |
− | situations = ['Surface Landed', 'Splashed', 'Flying Low', 'Flying High',
| |
− | 'Flying Threshold Altitude', 'In Space Low', 'In Space High',
| |
− | 'Space Threshold Altitude', 'Recovered Craft']
| |
− | bodies = dict()
| |
− | for line in lines:
| |
− | body,situation,value = line.split('\t')
| |
− | if body == 'Sun':
| |
− | body = 'Kerbol'
| |
− | if body not in bodies:
| |
− | bodies[body] = {'Name': body}
| |
− | bodies[body][situation] = Decimal(value)
| |
− |
| |
− | for i,body in enumerate(['Kerbol', 'Moho', 'Eve', 'Gilly', 'Kerbin', 'Mun',
| |
− | 'Minmus', 'Duna', 'Ike', 'Dres', 'Jool', 'Laythe',
| |
− | 'Vall', 'Tylo', 'Bop', 'Pol', 'Eeloo']):
| |
− | bodies[body]['Rank'] = i
| |
− |
| |
− | altitude_units = ['m', 'km', 'Mm', 'Gm']
| |
− | for body in sorted(bodies.itervalues(), key=lambda body: body['Rank']):
| |
− | print '|-'
| |
− | print '| style="font-weight: bold;" | [[{0}]]'.format(body['Name'])
| |
− | for situation in situations:
| |
− | if situation not in body:
| |
− | print '| style="background-color: lightgray;" | N/A'
| |
− | elif situation == 'Surface Landed' and body in ['Kerbol', 'Jool']: # probably wrong, replace by N/A
| |
− | print '| style="background-color: lightgray;" | N/A'
| |
− | elif situation == 'Splashed' and body[situation] == 1: # probably wrong, replace by N/A
| |
− | print '| style="background-color: lightgray;" | N/A'
| |
− | elif situation.endswith('Threshold Altitude'):
| |
− | sort_key = '{0:010n}'.format(body[situation])
| |
− | unit_index = 0
| |
− | magnitude = body[situation]
| |
− | while magnitude >= 1000:
| |
− | unit_index += 1
| |
− | magnitude /= 1000
| |
− | print '| data-sort-value="{0}" | {1}&nbsp;{2}'.format(sort_key, magnitude, altitude_units[unit_index])
| |
− | else:
| |
− | print '| data-sort-value="{0:04.1f}" | {1}&times;'.format(body[situation], body[situation])
| |
− | </pre>
| |