Page 1 of 1
Possible bug - calculation of turnaround distance / velocity
Posted: Thu Dec 23, 2010 12:13 am
by Bugbear
I’ve been wrestling with the physics equations to work out various navigation numbers. Today the penny finally dropped so I thought I’d share my work…When I travel from point A to point B, I usually check the total distance, calculate the turnaround point (I'll explain how I calculate that in a moment), then accelerate using the forward thrusters to turnaround, then decelerate using reverse thrusters. With this method I usually get to within 1-3% of my destination (sometimes overshooting, sometimes undershooting). Rinse and repeat until I'm close enough to cruise at a low constant speed.I calculate turnaround by using a ratio of the foward vs reverse thrust values (which you can get by looking at the ship's .lua file).For an Eagle Long Range FighterForward Thrust = Ft = 6,200,000 NReverse Thrust = Rt = 2,500,000 NMy turnaround ratio = Rt / ( Ft + Rt ) = 0.71 approx for this ship.Let's say I need to travel 5.90 a.u. Turnaround point is 5.80 * 0.71 = 4.205 a.u.Therefore, I accelerate (set speed to > 20,000km/s) until the distance remaining is 4.20 a.u. then set speed to zero.I was getting frustrated when working out what my turnaround velocity would be.Listing Newton's motion equationsForce = mass * acceleration ( F = ma ) (eq.1)Velocity = initial velocity + acceleration * time ( v = u + at ) (eq.2)Distance = initial distance + initial velocity * time + 1/2 * acceleration * time squared ( S = S0 + ut + 1/2*a*t^2 ) (eq.3)The tricky thing here is to convert all your units to S.I., so that means the following:Force in Newtons ( kg.m.s^-2 )Acceleration in metres per second squared ( m.s^-2 )Velocity in metres per second ( m.s^-1 )Distance in metres ( m )Mass in kilograms ( kg )For reference 1 a.u. = 149 598 000 km = 149 598 000 000 mGetting acceleration is easy enough: a = m/FWe then want a relationship linking distance and acceleration. Equation 3 looks to be a good starting point.As we've already worked out our turnaround point, we really only need to concern ourselves with the velocity our ship would achieve accelerating over the turnaround distance using the deceleration thrust. This simplifies the equation greatly as we can assume the following:S = Turnaround distanceu = 0S0 = 0So we're left with S = 1/2*a*t^2 (eq.4)We can also substitute t by rearranging eq.2 using the same initial conditionsv = atTherefore t = v/a (eq.5)Putting eq.5 into eq.4 we get...S = 1/2*a*(v/a)^2Cleaning up a little we get...S = v^2 / 2acleaning up a bit more...v^2 = 2aScleaning up once more...v = ( 2aS )^0.5Back to our example.Our ship's mass is 24000kg so deceleration is 2500000 N / 24000 kg = 104.2m.s^-2Travelling 5.8 a.u. means we accelerate until the distance remaining is 4.20 a.u. 1a.u. = 149,598,000km so 4.13 a.u. = 628,999,406,897 metres.At this point our velocity would be:v = ( 2 * 104.2 m.s^-2 * 628,999,406,897 m )^0.5 = 11,447,337.82 m.s^-1 = 11,447km.s^-1Which sounds about right.Where I get confused, though is when I punch these numbers into Pioneer (using alpha v7).As per the above example, I have to travel 5.90 a.u.; the above formula spits out the following information:Turnaround distance = 4.205 a.u.Turnaround velocity = 11,447km/sSo I dial up 11,447km/s and accelerate time until I reach this speed. What I find, however, is that the ship is nowhere near the turnaround point. So I continue to accelerate some more until turnaround distance is reached.Once I get to turnaround, my velocity is 25,040km/s.(For anyone who gets this far into my post, I congratulate you on your persistence!!!)So, I'm assuming the turnaround distance is correct, considering the success I've had using that metric to navigate.I then turn to the acceleration and mass figures. I've found that if I change the ship mass to 5,000kg instead of the laden mass of 24,000kg (because I'd burnt off 1T of hydrogen fuel during the hyperspace jump), I find the turnaround velocity numbers become correct.I'm wondering if there's a calculation bug that I've uncovered. I suspect it's no coincidence that using the unladen ship mass instead of laden mass corrects the output. Either that or my equation manipulation is not up to scratch.I'd appreciate it if someone else could confirm or deny what I'm seeing.I've got all this in a GoogleDocs spreadsheet so if you want to have a play with the numbers, go ahead. You'll need to download the spreadsheet to your local system to edit it.Only edit the figures in the cells with purple background. The output is shown in the cells with blue background.
RE: Possible bug - calculation of turnaround distance / velocity
Posted: Thu Dec 23, 2010 1:20 am
by Bugbear
SUMMARY OF MY ABOVE POSTFor those not wanting to go through the gory details above...I suspect that the unladen ship mass rather than the actual ship mass is being used in calculating acceleration figures.The link in the above post takes you to a google docs spreadsheet that contains my calculation formulae.
RE: Possible bug - calculation of turnaround distance / velocity
Posted: Thu Dec 23, 2010 2:54 am
by UncleBob
I was just going to suggest that you should use equations that take propellant consumption into account, since it makes mass variable, but considering that Pioneer ships use less than a single ton during a whole week that would probably be somewhat overkill... And your post is about pioneer potentially calculating with the fixed empty weight anyways, so a change in formulae wouldn't be in order.I don't quite understand why you decelerate using the retro thrusters, though, considering that you'll be a lot faster using main thrusters both ways.The autopilot in pioneer currently seems to work pretty nicely in terms of results, though not in terms of efficiency. I have no Idea why it's using only a minute amount of thrust instead of burning at full force, making the trips somewhat longer than neccessary.
RE: Possible bug - calculation of turnaround distance / velocity
Posted: Thu Dec 23, 2010 3:40 am
by Bugbear
UncleBob wrote:
/*snip*/I don't quite understand why you decelerate using the retro thrusters, though, considering that you'll be a lot faster using main thrusters both ways./*snip*/
No particular reason, it's just the way I like to play. I realise that it is faster to accelerate to midpoint, then spin around and use the forward thrusters to slow down.I did the sums for that with the Eagle LRF, and I found on a 6.0AU trip, using the main thrusters to accelerate and decelerate only saves a few hours game time anyway (14.9 hours vs 19.7 hours)I guess I like to be looking in my direction of travel

RE: Possible bug - calculation of turnaround distance / velocity
Posted: Thu Dec 23, 2010 10:49 am
by s2odan
Bugbear1973 wrote:
I suspect that the unladen ship mass rather than the actual ship mass is being used in calculating acceleration figures.
Negative, but there is a bug related to this.Here is the work-around:If you buy a ship or start a new game and load your ship up with goods, then it will use an unladden mass for the figures, however simply make a save before you blast off and then reload it and then the correct values are used.Its very easy to test this with Alpha 7.5 using the updating acceleration figure, start a game and fill your hold till you have only 1G of accel left, then take-off, you will notice that the ship will fly with no troubles, however if you save and load, it will now try to take-off using the correct 1G accel, which means no take-off.There was also no need to make 3 seperate threads about bugs, try to keep them nice and neat and together please. It will help stop these bugs being spammed a lot, as they have all (except this one) been mentioned and explained before.
UncleBob wrote:
..I don't quite understand why you decelerate using the retro thrusters, though, considering that you'll be a lot faster using main thrusters both ways.The autopilot in pioneer currently seems to work pretty nicely in terms of results, though not in terms of efficiency.....
I don't get it either

But each unto their own.
Bugbear1973 wrote:
I guess I like to be looking in my direction of travel

So do I, thats why I press F1.
Quote:
I did the sums for that with the Eagle LRF, and I found on a 6.0AU trip, using the main thrusters to accelerate and decelerate only saves a few hours game time anyway (14.9 hours vs 19.7 hours)
6AU is not particularly large in terms of distance though, you will really notice the difference on those really big journeys.
RE: Possible bug - calculation of turnaround distance / velocity
Posted: Thu Dec 23, 2010 9:29 pm
by Bugbear
s20dan wrote:
Negative, but there is a bug related to this.Here is the work-around:If you buy a ship or start a new game and load your ship up with goods, then it will use an unladden mass for the figures, however simply make a save before you blast off and then reload it and then the correct values are used.Its very easy to test this with Alpha 7.5 using the updating acceleration figure, start a game and fill your hold till you have only 1G of accel left, then take-off, you will notice that the ship will fly with no troubles, however if you save and load, it will now try to take-off using the correct 1G accel, which means no take-off.
I was going to post a follow-up to my original posting. I found that after I'd traveled from Sol to Alpha Centauri (for argument's sake), and unloaded some cargo, my calculations started making sense.
s20dan wrote:
There was also no need to make 3 seperate threads about bugs, try to keep them nice and neat and together please. It will help stop these bugs being spammed a lot, as they have all (except this one) been mentioned and explained before.
Apologies for that. Consider myself appropriately chastened!
RE: Possible bug - calculation of turnaround distance / velocity
Posted: Thu Dec 23, 2010 9:43 pm
by s2odan
Quote:
I was going to post a follow-up to my original posting. I found that after I'd traveled from Sol to Alpha Centauri (for argument's sake), and unloaded some cargo, my calculations started making sense.

Yes its a strange one, luckily very easy to work around it.
Quote:
Apologies for that. Consider myself appropriately chastened!
Oh don't worry about that

Its not like anyone else will care, I only mentioned it because I didn't see that you needed to make the seperate threads. And I must of had my bossy hat on.
RE: Possible bug - calculation of turnaround distance / velocity
Posted: Thu Jan 13, 2011 6:46 pm
by Potsmoke66
yep, some will take out the calculator, i have no time for such, i have to get rid of that viper in my back.i just fly, could it be so hard?turning the ship around at half of the way?yes, i was wondering to why the autopilot doesn't accel/decel with full thrustbut he didn't do that in FE2 to and maybe we have to give the machine time to calculate?anywehz, else you won't have no profit flying manually, still you can "save" a mission by manual aproach.speed especially max. is anyways a riddle to me, there seems to be no Lightspeed in pioneer, or to say in other words you can accelerate to a unbelievable high speed, at i don't remember, the set speed will overflow, showing something like a $ and the game terminates.funny, this number is very very high, while the max. cost for a ship overflows at 10'000'000.00.usually you're much faster compared to what's possible in FE2, since there is a locked speed at 2000km/s2000km/s that's where pioneer starts, to compare.you can be FTL, even without engines in pioneer, after a good sling shot you can find yourself in the outer regions of a system in seconds without stardreamer.btw, does anybody managed ever to CRASH into a sun (except a bad calculated autopilots course), i allways got shot off. no matter how, gained speed will allways be higher in the end as the escape velocity needed.
RE: Possible bug - calculation of turnaround distance / velocity
Posted: Thu Jan 13, 2011 7:09 pm
by s2odan
Quote:
yep, some will take out the calculator, i have no time for such, i have to get rid of that viper in my back.i just fly, could it be so hard?turning the ship around at half of the way?
Me too, I always just fly halfway pointing towards it on the front camera, then fly the rest pointing on the rear camera, a tactic that has served me well since the ancient days

Quote:
yes, i was wondering to why the autopilot doesn't accel/decel with full thrustbut he didn't do that in FE2 to and maybe we have to give the machine time to calculate?anywehz, else you won't have no profit flying manually, still you can "save" a mission by manual aproach.
You got it. I had a play with all the settings, and discovered they are the way they are for a reason

The ship would use full thrusters, but it would be constantly accelerating and breaking and turning left then right a little very very quickly. Basically oscillating.
Quote:
speed especially max. is anyways a riddle to me, there seems to be no Lightspeed in pioneer, or to say in other words you can accelerate to a unbelievable high speed, at i don't remember, the set speed will overflow, showing something like a $ and the game terminates.funny, this number is very very high, while the max. cost for a ship overflows at 10'000'000.00.
I think it would be a neat idea to increase the ships mass to some large figure when it reaches 299,791 KM/s velocity relative to the system.
Quote:
usually you're much faster compared to what's possible in FE2, since there is a locked speed at 2000km/s2000km/s that's where pioneer starts, to compare.
Really I never knew that about FE2. In FFE once you reached a speed of about 200,000 KM/s (2/3 light speed) you would suddenly shoot off in the opposite direction at extreme speed
Quote:
btw, does anybody managed ever to CRASH into a sun (except a bad calculated autopilots course), i allways got shot off. no matter how, gained speed will allways be higher in the end as the escape velocity needed.
Not a sun no, but I got sucked into a blackhole while testing
