[gcompris] place your satellite, now the distance changes
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gcompris] place your satellite, now the distance changes
- Date: Thu,  4 Oct 2012 23:08:25 +0000 (UTC)
commit c05d71d7d4274cb5a069b08cd494b873f554a938
Author: Bruno Coudoin <bruno coudoin free fr>
Date:   Fri Oct 5 00:27:38 2012 +0200
    place your satellite, now the distance changes
    
    Now the distance to satellite / planet changes depending on the speed.
    This should makes the simulation more visual but in fact it changes too
    slow to make a real difference.
 .../place_your_satellite.py                        |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/place_your_satellite-activity/place_your_satellite.py b/src/place_your_satellite-activity/place_your_satellite.py
index b1b3684..da0d1b6 100644
--- a/src/place_your_satellite-activity/place_your_satellite.py
+++ b/src/place_your_satellite-activity/place_your_satellite.py
@@ -258,6 +258,7 @@ class Satellite:
     # Check current speed against required orbital speed
     self.orbital_speed = math.sqrt(abs(self.mass/self.distance))
     difference = abs(self.speed) - self.orbital_speed
+    self.distance += difference / 5
     if abs(difference) < 0.5:
       value = self.revolve(x_center, y_center, 0)
       return value
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]