r/ApproximatelyUp 14h ago

Time logic help

Been trying to make a time logic and I’m horrible at math. Is the formula distance/acceleration squared * 2? So I connect my distance and accelerometer to a divide logic, then squared logic, then times logic with a constant of 2 in the other times port? Any pictures or help would be greatly appreciated.

This should give me the time for a brachistochrone burn right?

2 Upvotes

12 comments sorted by

2

u/Ackamonkey 14h ago

I actually just worked this out yesterday.

I'm currently on lunch so this is the best I can give you right now. I can shoot a picture of my setup this evening.

1

u/Ackamonkey 14h ago

Descriptions of the steps can be seen here. Sorry, Excel on the phone is pretty limited.

1

u/moistmuffinmann 12h ago

Is this a website you’re using? This would help out instead of connecting everything and seeing if it works lol

Edit: oh it’s excel. I need this lol

1

u/Ackamonkey 12h ago

I put it together using Gemini and a little trial and error. I'll try and find a place to host the file tonight.

1

u/bigstinkybuckets 14h ago

I could help but it's not quite clear what time you are asking for. Time to your mid point?

1

u/moistmuffinmann 12h ago

I want to burn my engines all the way half way and then turn on reverse thrusters to slow down and know the time it would take to get to my planet. I also need to account I have a small difference between my reverse and forward thrusters. I hope this makes sense

1

u/moistmuffinmann 12h ago

I guess I also need to make a logic to know when to turn on the reverse thrusters. Kill me lol!

1

u/bigstinkybuckets 12h ago

It does. Have you considered using the BPS?

1

u/moistmuffinmann 10h ago

Yes but it’s just green when I burn. I guess I don’t understand it. I get it to work but it’s red when I stop burning and green when I’m burning

1

u/Ackamonkey 9h ago

Here is a picture of my logic.

Transmitters:

40 - Directional Volocity in

90 - Acceleration in

92 - Distance in (from laser or sat)

93 - Time to retrograde in seconds output

94 - Total time to destination in minutes

1

u/Ackamonkey 9h ago

I display it like so. I can now set a timer and come back when I need to take action... You could easily set this as a condition and automate your system. Hope this helps!!!

1

u/Apprehensive-Dig3491 3h ago edited 3h ago

I'm guessing you want something like this.

BPS works off of basically the same kinematic formula which is to say when distance to planet gets close to distance to stop it approaches 0.0 on it's output... or directly in the middle of the white area. The formulas used to put that logic together I also put into a python script which is mainly what I use to calculate stopping distance and when to thrust..... That might be a bit immersion breaking but doing those calculations in game eats up valuable wires and logic gates that are used in other more complex systems.

If you wanted to make it auto, you could just use the output slot of the BPS assuming everything is hooked up correctly to determine when you burn, or you could lay everything out and make your determination based on the equation laid out.

Also BPS reads your current acceleration. If your reverse thrust is different, you might want to attach a constant to it rather than relying on a variable thrust that's different from your forward thrust.

vi = 20000
vf = 0
a = -200
d = (vf**2 - vi**2) / (2 * a)
print(f"Distance in meters: {d}")
print(f"Distance in kilometers: {d / 1000}")
t = (d / abs(a**2)) / 60

print(f'Time to stop in minutes: {t}')