I am working on a code, but I want a way to get rid of all of my lateral velocity. Is there any way to lock heading retrograde lateral? I have been using a code where it quickly sets heading to retrograde then pitch to 0, but I end up in the middle of retrograde and 0 pitch, and it wastes a lot of fuel.
Tags
Question18 Comments
- Log in to leave a comment
-
3,664 JSO18
@Tweedle_Aerospace I am not going for an accurate landing, I just want to get rid of lateral speed
-
4,796 TweedleAerospace
@JSO18 What I usually do is lock heading on vector (the PCI coordinates of the launch pad or anything you else want)
-
-
3,664 JSO18
@Tweedle_Aerospace I already have that, but it does not work that well. I am going to try to make it work better
-
4,796 TweedleAerospace
@JSO18 then maybe put a wait seconds after the set pitch 0. That will give it some time to get to zero.
-
3,664 JSO18
@Tweedle_Aerospace the problem is I need to constantly change between retrograde and 0 to keep the heading constantly updating to retrograde
-
4,796 TweedleAerospace
@Tweedle_Aerospace I haven’t coded in a while so that isn’t exactly what it would look like.
-
4,796 TweedleAerospace
@JSO18 that is your problem. It is trying to go 0 pitch and retrograde pitch at the same time. Try to exclude the retrograde outside of the while loop. Or you could do a
<while>
if pitch >0
lock heading retrograde
then
set pitch to 0<while/>
-
3,664 JSO18
@Tweedle_Aerospace a while loop that says while velocity lateral > 15 lock heading on retrograde, unlock heading, lock pitch 0
-
4,796 TweedleAerospace
@JSO18 wait, so is it a while loop or repeat loop that has retrograde and pitch to 0.
-
3,664 JSO18
@Tweedle_Aerospace it is not a bug, the rocket is just constantly trying to go to both pitches so it stays in the middle
-
-
-
10.9k Insanity
I mean you dont need to constantly switch between retrograde and 0 pitch, shouldnt it be fine to set it once or just every couple seconds or so?
-
-
3,664 JSO18
@Tweedle_Aerospace it’s not rcs and gyro that is the problem, it is the fact that when the pitch is constantly changing, the rocket will just hover on a pitch in the middle.
-
4,796 TweedleAerospace
I don’t think that there is any other than burning fuel at 0 pitch like you are doing in the opposite direction. Maybe get more rcs or more powerful rcs or maybe a big gyro
@JSO18 oh