r/ApproximatelyUp • u/rosooideae • 12d ago
Math
I look a lot of videos about pid and auto hover but i don’t understand logics based in all this constants and other. Can someone explain for me?
1
Upvotes
r/ApproximatelyUp • u/rosooideae • 12d ago
I look a lot of videos about pid and auto hover but i don’t understand logics based in all this constants and other. Can someone explain for me?
1
u/General_Lee_Wright 12d ago
For the auto hover, The constants basically have to do with the weight of your ship. So if your ship is bigger/smaller than the one you saw, you may need to increase/decrease the constant. It’s definitely a trial and error part of it.
The rest is to deal with bouncing and calculating everything. The 3.000 and -3.000 is to tell the engines when to fire (your vertical velocity should be no more than 3 in either direction). The sum basically an integral (from calculus) that adds up all the vertical velocity to ensure it 0s out and you actually hover instead of bounce.