-
Notifications
You must be signed in to change notification settings - Fork 2
/
KerbalismStarRadiationCalc.cfg
72 lines (66 loc) · 1.53 KB
/
KerbalismStarRadiationCalc.cfg
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
// RadiationBody
// {
// name = Sun
// radiation_model = heliopause
// radiation_pause = -0.025
// we want ~0.01 rad/h at Kerbin (d = 1 AU)
// d = 13.599.000.000 m
// r = sun radius = 261.600.000
// surface radiation = 0.01 / (r^2 / AU^2)
// radiation_surface = 27
// 8 kerbin years
// solar_cycle = 72576000
// }
RadiationBody
{
name = Sun
solar_cycle = 72576000
radiation_model = heliopause
radiation_pause = -0.025
}
@RadiationBody[Sun]:AFTER[Kopernicus]
{
#@Kopernicus/Body[Sun]/ScaledVersion/Light {}
#@Kopernicus/Body[Sun]/Properties {}
#@Kopernicus/Body[Sun]/Atmosphere {}
}
@RadiationBody[Sun]:AFTER[Kopernicus]
{
dist = #$Light/sunAU$
radius = #$Properties/radius$
dist2 = #$dist$
radius2 = #$radius$
@dist2 != 2
@radius2 != 2
invsq = #$dist2$
@invsq /= #$radius2$
radiation_surface = 0.01
@radiation_surface /= #$invsq$
// get relative gee
// relG = 71.4 // get gASL; debug sample
relG = #$Properties/geeASL$ // get gASL
@relG /= 27 // div by Sun
@relG != 4 // give 4th power
// get relative temp
// relTemp = 5778 // get temp; debug sample
relTemp = #$Atmosphere/temperatureSeaLevel$ // get temp
@relTemp /= 3550 // div by Sun
// get radiation_surface
radiation_surface = #$relG$ // relative gASL
@radiation_surface /= #$relTemp$ // div by temp
@radiation_surface != 0.5 // sqrt final
@radiation_surface *= 27
}
@RadiationBody[Sun]:AFTER[Kopernicus]
{
!dist = nope
!dist2 = nope
!invsq = nope
!radius = nope
!radius2 = nope
!relG = nope
!relTemp = nope
!Light {}
!Properties {}
!Atmosphere {}
}