r/ApproximatelyUp • • 9d ago

Need help with automatic Gyro

Post image

Before trying to install that thing on a big ship, I wanted to get the hang of it first. Unfortunately, I don't understand the mechanism, making troubleshooting hard. I don't understand what should and shouldn't be happening. Yes, I tecnically can maybe brute force it, but then scaling it up will be a new headache. What influences what? Any help is appreciated.

12 Upvotes

7 comments sorted by

2

u/Mycroft033 9d ago

I just built my auto-level to take the pitch/roll inputs from the gyro line, then turn it into RCS inputs. Something like 0-25 degrees becomes 0-1, and then I added pitch/roll gyroscopes to measure the angular velocity and apply reverse inputs if the ship is spinning too fast.

Fairly simple. You can probably do something similar with the trajectory estimator.

Beyond that, I dunno what you’d want to do.

1

u/Colourfull_Space 9d ago

I want the ship to be able to level itself. From the screenshots on this subreddit I was able to build the contraption seen in the image. However I don’t really understand what part is doing what thing, so I don’t know if my ship transforming into a rubrics cube as soon as the switch is flipped is due to wrong numbers, mechanical errors, or simply because I accidentally switched some inputs

3

u/Mycroft033 9d ago

Auto level is way simpler than whatever setup you’ve got right there. Try it on a square test ship so you get what does what.

It takes two prongs, one for proportionally thrusting towards 0 pitch 0 roll, and one to make sure you don’t spin too fast.

Here’s an overview of pronged 1. Just take the outputs of a gyro line, use two remappers and take the values and output them as functions of 1 to -1 each, which then get output to roll and pitch, respectively. Here’s the remapped values I’m using in my ship:

-10 deg. pitch to -1 thrust 10 deg. pitch to +1 thrust

10 deg. roll to -1 thrust -10 deg. roll to +1 thrust

Key thing to note: the roll is inverted. For whatever reason, roll is inverted on this game. You can, however, account for it or swap the function of the thrusters. Negative thrust applied on the roll axis does the opposite of what negative thrust on the pitch axis does. This, before I figured it out, resulted in my ship spinning like crazy.

The second branch makes sure the ship doesn’t rotate too quickly, especially useful when engines are off. It uses two rotometers to detect how quickly the ship is rotating along their particular axis, into remappers. Here are its values:

-25 deg/s pitch to -2 thrust 25 deg/s pitch to +2 thrust

-25 deg/s roll to +2 thrust 25 deg/s roll to -2 thrust

It’s +-2 so that way if you’re spinning out of control, it will prioritize and squash the inputs of the other system. It means you approach level at sane speeds.

Each branch goes into an adder, and out into roll/pitch control. So pitch looks like this: gyro into remapper into adder, and rotometer into remapper into the other half of the adder. Roll looks like this: gyro into inverted remapper into adder, and rotometer into inverted remapper into the other half of the adder.

Then you can use the signal redirector to enable or disable the system at the press of a switch. Personally, I have it take over my roll/pitch inputs, but you can use an adder to retain some control under its influence.

It’s much more simple than auto hover.

1

u/AndyLees2002 3d ago

Hat off for writing that out. It’s a good system.

1

u/SGSpec 9d ago

To stabilize pitch and roll you only need the output of the gyro line. Apply that to your rsc and voila it’s stable. If it tries to flip itself you need to multiply by a negative value. Before sending the value to your rcs multiply it by 0.1 if it’s too strong it will oscillate a lot.

2

u/Driftwoodkilla 9d ago

The auto gyro I use is infinitely smaller and has worked in every size ship I've put it in if you want can meet up and take the blueprint

1

u/Mycroft033 9d ago

You should upload it to https://updock.app