Space Engineers

Space Engineers

View Stats:
box25 Jan 30, 2016 @ 4:46am
how to calculate the stopping distance of an ship
Hello, at the moment I'm writing a script to calculate the stop distance for a ship. Now i have researched and tried different calculations for over 3 days, but no calculation seems to do the jop perfect. I have calculatet the stop distance with normal logical calculations, and then i had seen, that the inventory world settings did change the acceleration of the mass in the cargo containers, but does not effect the ship mass acceleration, but although with these calculation the stopping distance was not wright, but it was more nearly on the answer. Now i have no more Idea how the acceleration/stopdistance is calculatet from the game. at the moment the calculation:

(CurSpeed*CurSpeed)/(2*(brakeForce/((CargoMass/InventoryWorldSize)+emptyShipMass)))

seems to be very close to the goal, but something is still wrong. Could some moderator or experinced player please give me the exact formular/calculation for the stopdistance (in space, no gravity).
Last edited by box25; Jan 31, 2016 @ 2:07am
< >
Showing 1-9 of 9 comments
Thalyn Jan 30, 2016 @ 5:46am 
So just off the top of my head...

A = F / M lets you know how quickly you're going to descelerate. You can then use T = S / A to work out how long it will take to go from your current speed to 0 (or 0 to your current speed - both take the same time given the same force applied). And finally D = (Si + Sf) / 2 * T for the distance. Conveniently, Sf = 0 and Si = S.

Rework and combine...
T = S / (F / M) = MS / F
D = (Si + 0) / 2 * T = ST / 2 = S (MS / F) / 2 = MS² / 2F

Expand to your terms...

((CargoMass/InventoryWorldSize)+emptyShipMass) * (CurSpeed * CurSpeed) / (2*brakeForce)

Which is actually the same formula you're already using, just differently organised.

So that brings up the obvious question - how much is it out by? And, less obviously, is your sim speed 1.00 when testing theory against practice?
Shabazza Jan 30, 2016 @ 9:26am 
For braking with inertia dampeners, my information is as follows:
A ships braking force is capped at the needed value for achieving a deceleration of a=2*v.
Means: Even if the thrusters would be capable of achieving a higher deceleration,
the thrusters force will be adjusted constantly to not exceed a target deceleration of 2*v.
(--> A ship that travels at 100 m/s with plenty of available braking thrust will brake with 200 m/s² at max. and the deceleration will decrease further according to the remaining speed to stay at this 2*v target decelertion.)
There is also a threshold at which the thrusters begin to reduce their braking force linearly.
This happens at a braking force below 1 m/s² to not strech the braking distance too much in the lower speed area.
And below a speed of 0.5 m/s, the ships inertia dampeners will make the ship brake with a constant force to bring it to a halt eventually.
As far as I know, this rules are still valid. The only thing that changed are the 10x/5x inertia dampening factors which were removed a couple of patches ago.

EDIT: exchanged "breaking" with "braking"....
It's true - ships are "breaking" alot in this game, but yeah... XD
Last edited by Shabazza; Jan 31, 2016 @ 1:06am
box25 Jan 31, 2016 @ 2:00am 
ok, thank's for your replis, and the thing with the simulatio9n speed is an good idea, i will look at it, and write to you if these was the answer.

although thanks for the correction of the word :D

and the thing with the brakingforce under 1 m/s is very interresting, but it is such a little annomalie, that it is not important for my calculation, but thanks for that
box25 Jan 31, 2016 @ 2:05am 
Ok, I have searched for the simulation speed, but i can't find it, is is normal 1 and if your pc is not good enough it drops, or can u change the simulationspeed? and what is it standart value?
box25 Jan 31, 2016 @ 2:15am 
I have found the calculation speed, and it is 1.0 all the time, means these have to be right. and what I have seen although is that The brakdistance error is far bigger if the ship is not loadet with cargo, these could mean, that 1. the weight of the ship is calculatet a nother way, than I use in the calculation or 2. that the error is not lineal, it is much larger when the input is low, and very accurate if the input is big.
Thalyn Jan 31, 2016 @ 2:55am 
How odd. If the ship is empty (no cargo) than the weight multiplier for cargo shouldn't have any bearing at all since you'd be working strictly off grid mass, and that is fixed regardless of your inventory multiplier.

Do keep in mind that if you're using a programmable block to get the ship's weight than it will be lower than the actual value if you use any armor blocks. This would account for the measurement being short, and also why it's proportionally closer the more non-block weight you're carrying. Programmable blocks can only access blocks with functionality, of which the armor blocks have none.

Sim speed is accessible by pressing Shift+F11. It should show as one of the first few values. You can't alter it yourself - it's simply the resulting speed you're getting based on how much is happening in-game and the power of the slowest machine currently in the game. Ideally it should stay on 1.00 the entire time, but if it goes below 1 than things invoving thrust could get a little more interesting.
box25 Jan 31, 2016 @ 4:05am 
thx, but i have manually typed in the empty ship weight, and these i have get by emptiing all the cargos from the ship, and then took the ships grid mass. but thx
Mabs Jan 31, 2016 @ 7:37am 
I'm sorry? This is an action survival game. What do you think you're doing trying to engineer something?

(jk this is cool, subscribed)
box25 Jan 31, 2016 @ 11:42am 
ok, if sb. really want to know what i am doing, and maybe can help me because of these better: I am trying to do a scriptet autominer, whic mines and then returns to base, dock, cleans cargo, undocks, and go back to the planet for mineng. These programm is gps guidet, and although the mining shafts are made with logic, and symetry. These miningshafts are as a square in the commet, and after some time, the hole planet is away in your base cargo container :D . and now the problem is, that i want to go very quick from asteroid to station, and for these i want to go full throttle, and then at a specific point turn the breaks(backthrusters) on, and these specipic point should be plased such exactli, thst in the moment when the ship reaces 0 m/s it is perfectly at the connector from the base. If i can get the calculation for the brakingdistance in space engineers, I hav build an completly autonomus mining ship, whic u fly to a planet press a button, dock to your base press a nother button and then the ship do everything by its own, the only problem you will have from these point, is that your bases cargo is overfilled with ores :D
< >
Showing 1-9 of 9 comments
Per page: 1530 50

Date Posted: Jan 30, 2016 @ 4:46am
Posts: 9