transform function of distance to function of time

Mythos

Addon Developer
Addon Developer
Donator
Joined
Apr 28, 2012
Messages
103
Reaction score
7
Points
33
Location
Kiel
Hi guys,

I got stuck with some maths and maybe someone here can help me.

I'm coding an AP to approach a certain target. After the main stage of linear deceleration I have defined a point for the very last much smoother approach. Here I say my aimed speed v is a linear function of the distance s to my target. Where x is some constant parameter depending mainly on the vessels acceleration capabilities:

v = x * s

I know the exact distance s and the resulting speed v for the moment when I enter this stage. What I want to know is the ETA time the stage will take (overall and from every point within) until target is reached where s = 0 and v = 0.

So how can I tranform this function of distance v=f(s) into a function of time v=f(t)?
 

dgatsoulis

ele2png user
Donator
Joined
Dec 2, 2009
Messages
1,927
Reaction score
340
Points
98
Location
Sparta
Have a look at Ajaja's post here.

In that thread we were discussing the rocket equation vs braking distance, but if I think it suits what you want to do.
 

Mythos

Addon Developer
Addon Developer
Donator
Joined
Apr 28, 2012
Messages
103
Reaction score
7
Points
33
Location
Kiel
Thank you for your quick response, but I don't see any hint :hmm:

The question how to determine a time to burn by distance instead of time I solved already for my constant-deceleration-stage. There I aimed a speed of v = sqrt(2*s*F/m) which results in constant deceleration. Here I know how to get something by distance instead of time, since I know all the functions for a, v and s.

But now I set v = f(s) to a linear one, then my acceleration isn't constant anymore so all my equations from before are wrong. Maybe my acceleration is linear then, but even that I don't know :(

The other problem of that thread with the rocket function is about losing fuel all the time and that changes acceleration of course. But I don't care about that, I don't want that precision but just to have ETA time nearly correct in seconds.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,627
Reaction score
2,345
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
You need to solve for "correction towards ideal trajectory". Which essentially means you need to:

Navigate, so you know where you are relative to your target
Predict how you are going to miss your target
Guide towards your target and finally
Control your spacecraft.

This task is generally called a powered explicit guidance (or PEG) and there are some many variants and implementations for it. The hardest task is actually the prediction, not the correction once you have properly predicted your solution error. prediction must include time to target.
 
Top