Author Topic: Comet movement  (Read 779 times)

0 Members and 1 Guest are viewing this topic.

Offline Kyle

  • Warrant Officer, Class 2
  • ****
  • K
  • Posts: 71
  • Thanked: 149 times
  • Quasar4x dev
Comet movement
« on: September 06, 2018, 08:06:41 PM »
Hi, hoping Steve can answer this, I don't see that it's been answered anywhere.

What's the formula for how far a comet travels in a given time period?
When it's < 1 AU from the sun, it's a nice constant speed.
But farther out, comets tend to move slower and slower the farther away they get, and it's not clear exactly how the distance is determined.

Thanks!!

 

Offline Father Tim

  • Vice Admiral
  • **********
  • Posts: 1142
  • Thanked: 123 times
Re: Comet movement
« Reply #1 on: September 06, 2018, 11:07:46 PM »
Knowing Steve, it's probably the actual formulae for meteors/comets (Start here: http://mathscinotes.com/2011/07/speed-of-a-meteor/) modified ever-so-slightly for Aurora's 360-day year.
 

Offline Steve Walmsley

  • Aurora Designer
  • Star Marshal
  • S
  • Posts: 7745
  • Thanked: 3802 times
    • http://www.starfireassistant.com
Re: Comet movement
« Reply #2 on: September 07, 2018, 05:42:21 AM »
Here is the code for C#

Code: [Select]
                    double AUTime = 0;
                    double OrbitTime = Math.Pow(Math.Pow(Comet.OrbitalDistance / 2, 3) / Comet.ParentStar.StarType.Mass, 0.5); // result in years

                    if (Comet.CurrentDistance > 1)
                    {
                        double CloserOrbitTime = Math.Pow(Math.Pow((Comet.CurrentDistance - 1) / 2, 3) / Comet.ParentStar.StarType.Mass, 0.5); // result in years

                        // time to move 1 AU at this distance in seconds
                        AUTime = ((OrbitTime - CloserOrbitTime) / 2) * (double) GlobalValues.SECONDSPERYEAR;
                    }
                    else
                        AUTime = 0.18 * (double) GlobalValues.SECONDSPERYEAR; // comet moves about 5.5 AU per year

                    double AUMoved = Timescale / AUTime;
 
The following users thanked this post: Kyle

Offline Kyle

  • Warrant Officer, Class 2
  • ****
  • K
  • Posts: 71
  • Thanked: 149 times
  • Quasar4x dev
Re: Comet movement
« Reply #3 on: September 07, 2018, 07:26:04 AM »
AWESOME!
 

Offline Kyle

  • Warrant Officer, Class 2
  • ****
  • K
  • Posts: 71
  • Thanked: 149 times
  • Quasar4x dev
Re: Comet movement
« Reply #4 on: September 07, 2018, 08:19:31 AM »
Would it make more sense for Comet.OrbitalDistance to be Comet.CurrentDistance in line 2?
 

 

Sitemap 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