UMEC Forum Index UMEC
United Mining Exploration Commission: A group of friends playing JumpGate-- "a MMORPG that launched smoothly, breaks from fantasy character setting, emphasizes PvP, and is the first persistent world space simulator that nobody talks about." ~Scorch
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Velocity Calculator program (plus theory)

 
Post new topic   Reply to topic    UMEC Forum Index -> Free Database (JumpGate)
View previous topic :: View next topic  
Author Message
MajorFreak
Guest





PostPosted: Wed Jan 16, 2002 6:23 am    Post subject: Velocity Calculator program (plus theory) Reply with quote

see last post for program

Last edited by MajorFreak on Sat Jun 15, 2002 3:29 pm; edited 4 times in total
Back to top
MajorFreak
Guest





PostPosted: Sat Jan 19, 2002 8:50 am    Post subject: Reply with quote

Quote:
If I am not completely mistaken, the following formula may be applied to calculate top speeds:

Speed = sqrt(thrust/drag factor)

Example: Phoon, drag factor 22.2 (JOSSH). 2x Guzzler: 2 * 2,200k thrust (JOSSH).

Therefore, its top speed is sqrt(2*2,200,000/22.2) = sqrt(198,198) = 445.19.

Note that this is just the top speed, and does not say how long it takes the Phoon to go there, i.e. the acceleration.

Mass has an influence on the acceleration, as any tow pilot will be able to testify. This does make sense, of course, given Newtonian Physics where F = m * a. Thus, if you have a force F propelling your ship forward, the acceleration will be lower if the mass is higher, inversely proportional to each other.

The real formula, however, will not be as easy, as the above one does not include the drag yet. I do not know ND's model, but if they assume that the "opposing force" (induced by the drag) is Stokes friction, and thus proportional to your speed, you would have something like

friction force = (some constant) * (drag factor) * v.

Thus, at high enough speeds, "c * DF * v" would equal the force F induced by your engines, and thus, your engines would only work to counter the drag induced friction, and can not accelerate your ship any further, and hence, you have a maximum speed (as opposed to real life space travel, where you would just move faster and faster, well, until relativitistic effects become significant for whatever application it is (the speeds can be quite low for that, in fact, for certain applications)).

I do not know whether or not ND implemented Stokes friction, however, it's clearly visible that the drag (not the drag factor) is speed dependent by watching how fast your ships slows down, depending on its speed.

Hm, in fact, when I apply above values, it could be that ND uses something like

friction force = drag factor * v^2,

at least for the Phoon, if I square the above max speed of 445.19 and multiply it by the drag factor of 22.2, the friction force is (minus rounding errors) equal to the thrust created by the two Guzzler engines. Can just be coincidence, though.

Hope that helped a little,

Xindaan


[ This Message was edited by: MajorFreak on 2002-02-03 02:20 ]
Back to top
MajorFreak
Guest





PostPosted: Fri Mar 08, 2002 1:07 am    Post subject: Reply with quote

Patch 50 ship database
Back to top
MajorFreak
Guest





PostPosted: Fri Mar 08, 2002 8:40 pm    Post subject: Reply with quote

THRUST AND TURN RATES
===========================

Please note that how fast you turn isn't related in any way to your mass or drag factor. just your thrust % and your turn rate. (whether baadf00d's data is correct or not is not up to me...its a gift horse. i ain't lookin it in the mouth)
Quote:
Originally posted by BaadF00d
Testing in the sim and I got the following equation:

Assuming a straight line curve:

y = m.x + c

x = thrust %
y = turn rate (degrees per second)

I timed the turn rates of a tow (by loading it with 500 iridium, and launching in the sim, and counting how long it took me to pass the station while spinning:

Code:

               Y      C      m
0 thrust:   38.3     39      ?
50 thrust:  26.9     39      -0.242
100 thrust: 14.7     39      -0.243
133 thrust:  7.3     39      -0.238


The points plotted lie along a straight line with just the 133 point showing a slight deviation.

So i thing its safe to assume that

y = -.243 * x + C

where C is 39.0 for a tows pitch axis, and x is the % thrust.

The numbers in game are in radians per second, to transform to degrees * 360 and divide by 2 pi.

Fido wrote:
The formula to calculate the number of second to turn 360 degrees using JOSSH listed numbers is:

(2*pi)/(JOSHH*1000)

for a pioneer listed as .000506 this means about 12.4 seconds. This only works at 0 throttle (while you coast). Applying thrust changes the turn rate.

not sure if this is accurate


Last edited by MajorFreak on Tue Jul 02, 2002 6:38 am; edited 2 times in total
Back to top
MajorFreak
Guest





PostPosted: Fri Mar 08, 2002 10:55 pm    Post subject: Reply with quote

MASS DISCREPANCIES
==========================
Quote:
Originally posted by BaadF00d
1. I dont have a real homepage for it at the moment, so youll have to download it as the attachment on this thread...

http://forums.jossh.com/showthread.php?s=&threadid=2303&perpage=40&pagenumber=4#post24741

2. My program plots the accelleration, velocity & dispalcement curves given the equation:

a = accelleration (m/s/s)
T = Thrust (Newtons)
dF = Drag Factor
v = velocity (m/s)
m = mass (kg)
F = Force (Newtons)
D = Drag (Newtons)

Given:
F=m.a

Nett force = Thrust - Drag.

Drag is proportional to the velocity squared:

D = dFv

So,

a = (T-dFv)/m

3. The "Real" masses for the fighter and bomber hulls, as of 1.0046 were: (the number in brakcets is by how much the number deviated from the number stated in JOSSH).

Code:

Phoenix     30400 (+5400)
Raptor      45900 (+6900)
Typhoon     21500 (-500)
Tornado     35000 (+1000)
Intensity   21800 (-1200)
Baracuda    36600 (+600)


4. I wrote my program a while back as a way to calculate for once and for all how long it would take to transport a heavy load from point a to point b. Around about version 1.0030 of Jumpgate someone noticed that my program was not giving the "correct" results when they performed test "accellerations" of craft in the sim and timed how long it took them to cover various distances.

5. If you want my program to produce the correct results for the ships as of Jumpgate 1.0046, do not add in the mass of MODx, and use the ship hull masses given above - wether or not you belive the numbers are incorrect is irrelevent - when used they produce the correct curves. Given that Jumpgate is a physics simulator, and when the developers say a ship has a mass of X - telling us the mass is pretty useless unless we can make accurate predictions - and thus have accurate expectations of ship performance given that mass.

6. Id rather not blab to the wide open world how i got those numbers. If it makes you any happier - I reverse engineered them by accellerating ships over distances in the sim and worked out what the hull masses must be to match the accelleration curve measured. Science after all is a process of reverse engineering.
we later discovered that the game engine only calculated one engine, and actually counted armour as mass (3k armour = 1kg mass)

Last edited by MajorFreak on Tue Jul 02, 2002 6:43 am; edited 1 time in total
Back to top
Fido
Private
Private


Joined: 01 Jun 2002
Posts: 4

PostPosted: Sun Jun 02, 2002 11:09 pm    Post subject: Reply with quote

The formula posted:

a = (T-dFv)/m

is valid for any instant in time, but cannot be used to calculate the time travelled between any two points in Jumpgate. This is because the NET acceleration on the ship varies with the square of the velocity, as is obvious by looking closely at the equation above. To obtain accurate results, the equation above must be integrated with respect to the desired variable.

For further explanation see this site.

which gives the solution for velocity. For the solution for time given the distance, use:

t=1/x*acosh[1/2*exp[2*ln(2) + D*x/q] - 1]

where the variables x = 2*k*q / M and q = sqrt([T / k) as discussed at that site (ignoring effects of gravity).

PM me if you have additional questions.
Back to top
View user's profile Send private message Send e-mail
MajorFreak
Guest





PostPosted: Wed Jul 03, 2002 12:42 am    Post subject: Reply with quote

Quote:
Formula reference for Jumpgate 3rd party programmers
The following post contains math. You can skip this safely, no harm will come of it. Really.

However I have seen several posts lately requesting formulas for various ship calculations relating to Jumpgate. No doubt these have been worked and re-worked by many 3rd party programmers and math nuts in this game. For the benefit and convenience of all, here are some useful ones that you can store away for future use.


Methods:

To find gate to gate travel time under constant acceleration use Eq. 3.

To find the time required to stop after launching add the following terms:
1 sec (launch time) + coast time during turn (Eq. 2) + brake time ( use Eq. 2 and Eq. 4 to get V_i for Eq. 6)

The time required to accelerate to a station, turn around, then come to a complete stop you would do this:
1. Make an initial guess for time of acceleration.
2. Using t (guess) find V_f and distance from Eq. 8 and Eq. 12
3. Use Eq. 2 to find turn around time. Use this value for t, and the velocity from step 2 for V_i to calculate V_f for coasting phase using Eq. 4. Use Eq. 5 to determine distance travelled.
4. Using velocity from step 3 as V_i for braking time Eq. 6 and braking distance Eq. 7.
5. Add distances from steps 2, 3, and 4 and iterate until distance equals required distance.
6. The "braking distance" or time you should stop your acceleration, begin turning around and apply trust is found by adding distances of step 3 and 4. The total time is the sum of times of steps 2, 3 and 4.

To find the effect of adding afterburner or flashfire on travel time requires considering each change in thrust as a separate "leg" over the total distance traveled from gate to gate. Then calculate q, x, s, and F for each leg. You can use Eq. 8 and 9 to get V_i and V_f on each leg for which the time of thrust is known (applying flashfire or afterburner). Use Eq. 10 for the final leg when the distance, but not the time, is known. Then use Eq. 11 to find the time elapsed on the final part of the trip.

There is a lot of optimizing that could be done here mathematically, I just thought I would get this out since it appears to be hard to find. These equations perform well in tests on my spread sheet, if there are errors of omission or typos please post the corrections so they can be available as well. The transition from paper to ascii is a tricky one!


REFERENCE

All formulas are based on integrating various forms of Newtons second law: F=ma. Adding in the drag factor: F-kv^2=ma

SHIP DATA (check your in-game info):
F=engine thrust
k=ship drag factor
rate=pitch/yaw/roll turn rate (in game not JOSSH database)
m=ship mass including armor, cargo, MODx, missiles, etc.
note afterburner = F * 1.3
note flashfire = F * 3
and thus AB + FF = F * 3.9

Flashfire adds thrust for 10 seconds. Afterburner fuel is maximum 5 minutes.


Other frequently used variables in the equations:
x = 2*q*k/m
s=(q+V_i)/(q-V_i)
when V_i equals some initial known velocity

Maximum ship speed (terminal velocity):

q=SQRT(F/k) (Eq. 1)

Time to turn 180 degrees in seconds (at 0 thrust or coasting):

t(turn)=PI/(1000*rate) (Eq.2)

Launch speed:
v150 (nominal)
It takes one second to launch from the tubes which are 150m long. Your actual launch speed can vary by as much as 10% from this number. I presume this is due to server/client lag verification routines, varying frame rates, modem/internet miscommunication, etc.

Time to travel a known distance beginning with velocity 0 and constant thrust:

t= (1/x)*acosh[ 1/2*exp[ 2*ln(2) + D*x/q ] - 1 ] (Eq.3)
This is the basic formula to calculate time to travel from gate to gate, for example.

Coasting equations:

Velocity after coasting a certain time (t in seconds) with beginning velocity (V_i)

V_f=Vo/(1+(V_i*k*t*k/m)) (Eq. 4)

and the distance you will have traveled while coasting:

D=m*LN(1+k*V_i*t/m)/k (Eq.5)

Braking equations:

Time from initial velocity (V_i) to velocity 0 while applying constant thrust:

t=(m*SQRT(F*k)*ATAN[(V_i*SQRT(F*k))/F])/(F*k) (Eq. 6)

Distance travelled while braking:

D=(LN(k*V_i^2+F)-LN(F))*m/(2*k) (Eq. 7)

Other thrust equations :

Velocity after applying constant thrust for t seconds from initial velocity 0:

V_f=q*(1-EXP(-x/t))/(1+EXP(-x/t)) (Eq.8)


Velocity after applying constant thrust for t seconds from initial velocity V_i:

V_f=q*(s-EXP(-x/t))/(s+EXP(-x/t)) (Eq.9)


Velocity after applying constant thrust for a known distance (D) from initial velocity V_i:

V_f=SQRT([F-(F-(k*V_i^2))*EXP(-2*D*k/m)]/k) (Eq.10)


Time required to reach V_f from initial velocity V_i

t=-(LN(s*(q-V_f)/(q+V_f))/x (Eq. 11)

Distance travelled during acceleration from a complete stop to some final velocity V_f:

D=-m*LN((F-k*v_f^2)/F)/(2*k) (Eq.12)


See also: http://www.execpc.com/~culp/rockets/multistg.html
from which most of these equations were derived.


__________________
We are -=MACK=-
Official -=MACK=- Radio Station



Last edited by MajorFreak on Mon Dec 02, 2002 1:42 am; edited 1 time in total
Back to top
Guest






PostPosted: Sat Jul 06, 2002 3:09 am    Post subject: Reply with quote

Edited on JOSSH:

V_f=V_i/(1+(V_i*t*k^2/m)) (Eq. 4)

Also afterburner fuel is 10 min with single engine ships.
Back to top
Fido
Private
Private


Joined: 01 Jun 2002
Posts: 4

PostPosted: Sun Dec 01, 2002 11:16 pm    Post subject: Reply with quote

Just noticed typos in Eq. 4, Eq. 8 and Eq. 9. Corrected formulae:

V_f=V_i/(1+(V_i*t*k/m)) (Eq. 4)

Velocity after applying constant thrust for t seconds from initial velocity 0:

V_f=q*(1-EXP(-x*t))/(1+EXP(-x*t)) (Eq. 8) (edited)


Velocity after applying constant thrust for t seconds from initial velocity V_i:

V_f=q*(s-EXP(-x*t))/(s+EXP(-x*t)) (Eq. 9) (edited)
Back to top
View user's profile Send private message Send e-mail
MajorFreak
Guest





PostPosted: Sun Mar 23, 2003 7:02 pm    Post subject: Reply with quote

EP2 RELEASE (EP2 FAQ)
toungoo wrote:
I've heard some rumours about the ModX mass being fixed now. In .61 the mass of equipped modx was just ignored. ND knew about that bug, they just didn't change it: "We dont want to throw the hard balance work out of the window, fixing it would change everything again".
I didn't notice any mass changes in Tensy, but I really wondered how fast I ran out of AB.

that would be nice, seeing as how FlashFires mass 1000kg each. Now where the hell is BaadF00d when you need him?
Back to top
Heretic
Chief WO4
Chief WO4


Joined: 09 Feb 2002
Posts: 473
Location: Tripoint

PostPosted: Tue Dec 07, 2004 12:42 pm    Post subject: FTP transfer from mindphyre to razorskiss complete Reply with quote

anyways, the corrected url for baadf00d's program is
http://razorskiss.net/archives/UMEC/PIC/JG/showship2.zip

please be advised most ship velocity data i use is without non-equipment items calculated. Also afterburn calculated. not to mention i tend to use a standard graphing variables different than baadf00d's default.
    The "graph" attached with any of my ship screenshots shows red=acceleration (vertical bars=300m/s2); blue=velocity (vertical bars=600m/s); yellow=distance (vertical bars=5000m)...with time set at 20seconds...(calculated for ABthrust for nonwpnry/missile/mox loadout)
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    UMEC Forum Index -> Free Database (JumpGate) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Space Pilot 3K template by Jakob Persson.
Powered by phpBB © 2001 phpBB Group