If what I'm thinking is feasible, the errors should be kept to a minimum (not
removed entirely to be sure!). See http://en.wikipedia.org/wiki/Ellipse for
the formulas regarding the Ellipse that I will try and use.
If I try to use only ONE triangle to solve for where a planet will be at any
given time, that will be the one where I have the greatest error possible in my
calculations. However, if I use a smaller time unit than the one BIG time
unit, I should be able to minimize the amount of error (or so I hope).
For instance:
Let us say that I wanted to determine where a planet will be 2 hours from now,
when I know where the planet is located at time unit zero (ie start of time).
I could determine the amount of area required to be swept out in 120 minutes,
or 7,200 seconds all as one triangle - or I can calculate where it will be in
one minute intervals for a total of 120 separate triangle computations and
summing up 120 triangles. With today's computers, it would be faster to do one
set of calculations for the single triangle, but could it be done as 120 sets
of calculations in a reasonable amount of time? What if I did it as 7,200 sets
of calculations? Would it be more accurate than say, one single calculation
set? That is what I'm thinking is the case. If not, then I will have to live
with the fact that a ball park figure is better than a figure pulled out of
thin air (otherwise known as pulled out of my ass!).
Now for the fun part.
If using the vector movement rules from TRAVELLER (ie first edition classic
traveler), it should be relatively easy to have a single heading for thrust,
determine built up velocity based upon duration of thrust times acceleration
for that period of time, and then determine how long it should take for the
ship to reach a given point. Will it be 100% accurate as far as celestial
movement is concerned? Nope. Will it be three dimensional? Nope. But for
"wargame" purposes, it will be in the general ball park to where we can keep
track of where a ship is at any given moment, where it is relative to the sun,
and also where it is relative to any other "body" within the star system (be it
natural or be it a space craft).
Like I said earlier. I could have just simplified things by assuming a
perfectly circular orbit, but I had hoped to find a way to simulate the
movement of a planet on its elliptical orbit, and find some way to accommodate
GURPS SPACE star system generation. The trick is - to re-acquaint myself with
trigonometry, as well as learn how to utilize the formula for an ellipse to
generate where any of the rays drawn from the sun to where the planet must be
at some time in its oribit. If in theory, this is good enough to get a working
model up and running, and for all intents and purposes, is sufficiently
accurate to do the job, then it is in my opinion, better than nothing.
Hasn't anyone ever truly wondered what it would be like to have a cat and mouse
style battle between ships created for GURPS TRAVELLER, or GURPS SPACESHIPS or
GURPS TRANSHUMAN SPACE or any other space game? Part of the problem is keeping
track of where the ships are at any given moment. Having a computer to keep
track of ship movements is the only way to make it work.
As for "accuracy issues". One need only look at GURPS TRAVELLER and note that
each hex of movement violates the physics of Displacement. The formula
displacement equals Original Velocity times time plus 1/2 acceleration times
time times time gives a different answer than "one hex movement per G of
acceleration" as per the GURPS TRAVELLER rules.
At least with this, we can get a ball park estimate - assuming that I can keep
at this long enough to get a working model in Visual Basic.net.
Now, for the really FUN part? If you or anyone else can give me a formula and
a programming methodology for executing the formula in calculus that gives me
the answer I seek - bypassing all of this required use of triangles etc - I'm
all ears. I'd rather keep it simple, and if this "kludge" is the only way I
can get it done because of my own limitations in mathematics, then so be it.
Right now, I've got a program that I've written that accepts as input, the
starting hex, and the ending hex, and automatically determines the distance
between those two hexes for use in a Traveller Campaign. I didn't design the
formula for that - someone else did, and showed it to me. I got it working in
excel first to see if it worked, and then I wrote code to get it to function in
VB.NET.
That code by the way is:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim StartX As Integer = Int(Val(TextBox1.Text) / 100)
REM MsgBox("StartX: " & Str(StartX))
Dim StartY As Integer = Val(TextBox1.Text) - StartX * 100
REM MsgBox("StartY: " & Str(StartY))
Dim EndX As Integer = Int(Val(TextBox2.Text) / 100)
REM MsgBox("EndX: " & Str(EndX))
Dim EndY As Integer = Val(TextBox2.Text) - EndX * 100
REM MsgBox("EndY: " & Str(EndY))
Dim DeltaX As Integer = Math.Abs(StartX - EndX)
REM MsgBox("Absolute Value StartX - EndX: " & Str(DeltaX))
Dim distance As Integer = 0
Dim DeltaY As Double = EndY - StartY
Dim StartXMod As Double = 0
Dim EndXMod As Double = 0
REM MsgBox("StartX Mod 2: " & Str(StartX Mod 2))
If (StartX Mod 2) = 0 Then
StartXMod = -0.5
Else
StartXMod = 0
End If
REM MsgBox("StartXMod = " & Str(StartXMod))
REM MsgBox("EndX Mod 2: " & Str(EndX Mod 2))
If (EndX Mod 2) = 0 Then
EndXMod = 0.5
Else
EndXMod = 0
End If
REM MsgBox("EndXMod = " & Str(EndXMod))
DeltaY = Math.Abs(DeltaY + StartXMod + EndXMod)
REM MsgBox("DeltaY = " & Str(DeltaY))
REM =IF(DeltaX>(2*AbsoluteDy),DeltaX,DeltaX/2+AbsoluteDy)
If DeltaX > (2 * DeltaY) Then
distance = DeltaX
Else
distance = (DeltaX / 2) + DeltaY
End If
TextBox3.Text = Str(distance)
End Sub
End Class
To make that program work with the code specified above, you need:
Button1
TextboxOne with a label on the form next to it that reads "Starting hex"
TextboxTwo with a label on the form next to it that reads "Ending Hex"
TextboxThree with a label on the form next to it that reads "Distance"
If anyone wants the program I've written to see if it works, send me an email
and I'll send you the installation file to put it on your computer. It has to
be an windows platform capable of handling NET version 4 (XP or WINDOWS 7).
Point is? This whole journey started out with wanting to be able to run a
GURPS TRAVELLER starship battle scenario on a virtual battle-mat where there is
no physical limitation of table size - as it will all be kept track of by the
computer. I wanted very much to be able to run a campaign where a single
captain player character might be told "Captain, I have a jump emergence flash
bearing 78.59 degrees, and a Doppler shift indicating that it emerged 3 hours
ago. Databases indicate that it has a signature comparable with a Beowulf 200
ton craft sir." From that point on, if the Beowulf is not within sensor range,
it becomes a cat and mouse game for the captain to discern where the ship might
be. If a ship heads for a main planet, whose location is known to be at X,
then the flight path of the Beowulf to reach that planet from its original
jump flash should be something that can be computed to some extent. Having a
COMPUTER do the computation is infinitely more preferable to having to do it
manually! ;)
So - again, if you or anyone else knows how to code the calculus formula to get
the correct answer given the specific parameters, and it bypasses my kludge,
I'd be grateful! :)
Hal
-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Anthony Jackson
Sent: Monday, October 10, 2011 7:42 PM
To: The GURPSnet mailing list
Subject: Re: [gurps] Planetary movement and checking the Math
On 10/10/2011 4:02 PM, Alaconius wrote:
> Hi Jonathan, The nice thing about the "methodology" that I'm
> attempting, is that it doesn't require calculus so much as it
> requires that I be able to determine the area of a triangle, and
> solve for the third leg of the triangle in question.
This will generate significant errors fairly quickly, and also doesn't
help much with determining the *shape* of the orbit.
_______________________________________________
GurpsNet-L mailing list <[email protected]>
http://mail.sjgames.com/mailman/listinfo/gurpsnet-l
_______________________________________________
GurpsNet-L mailing list <[email protected]>
http://mail.sjgames.com/mailman/listinfo/gurpsnet-l