summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorBernhard Tittelbach <xro@realraum.at>2012-03-22 18:00:35 +0000
committerBernhard Tittelbach <xro@realraum.at>2012-03-22 18:00:35 +0000
commitb2a4665fd62462c1ef31dabb4e14799b3fa52baf (patch)
tree3d43a33ce64f024f4fae24ce1503bfc247a16378 /tools
parentadded moon, added example constellations, added timestep choosen for shannon ... (diff)
try to improve earth model a bit
git-svn-id: https://svn.spreadspace.org/mur.sat@328 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'tools')
-rwxr-xr-xtools/photodiodesim/pd_sim.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/photodiodesim/pd_sim.py b/tools/photodiodesim/pd_sim.py
index 14cbd22..33572c1 100755
--- a/tools/photodiodesim/pd_sim.py
+++ b/tools/photodiodesim/pd_sim.py
@@ -39,7 +39,9 @@ moon = [1,1,1]
#~ earth = [-1,-2,-1]
#~ moon = [-1,2,-1]
sun_intensity = 1.0
-earth_reflection_intensity = 0.10 * sun_intensity # 0 to turn earth off ;-)
+#raised earth_reflection_intensity to account not only for light from a single ray but for multiple rays reflected from a surface.
+#todo: this should propably be included in the earth model instead, once I find good way to do that
+earth_reflection_intensity = 0.50 * sun_intensity # 0 to turn earth off ;-)
moon_reflection_intensity = 0.07 * sun_intensity # 0 to turn moon off ;-)
orbit_height = 310e3 #m
numperiods = 4
@@ -133,7 +135,8 @@ def earthdisc_light_rel_intensity(angle):
return 0.0
#todo: factor in angle of actually lightened surface depending on angle_sun_earth and the angle between sat orbit and the sun
elif angle < angle_earthdisc_visible:
- return 1.0
+ #account for varying reflection of different earth surface materials [0.75 .. 1.25]
+ return 1.0 + (np.random.ranf() - 0.5)/4.0
else:
return sensor_model(angle - angle_earthdisc_visible)
@@ -175,7 +178,7 @@ for cur_rot in angular_speed_sum_vectors:
sun_intensity * np.array([sun_model(a) for a in angles_to_sun]) + \
earth_reflection_intensity * np.array([earth_model(a) for a in angles_to_earth]) + \
moon_reflection_intensity * np.array([moon_model(a) for a in angles_to_moon])
- senstrace.append(light_intensity_per_sensor)
+ senstrace.append(np.minimum(1.0, light_intensity_per_sensor))
suntrace.append(angles_to_sun)
earthtrace.append(angles_to_earth)