So I asked this question before, and @sflanker helped me solve it, but the problem is that it points toward the planet, not the middle of the orbit, so it only works if you are in a circular orbit. I am using this for when I have a moon encounter, so I do not even have a complete orbit. I want to stay locked perpendicular to prograde/retrograde, while making sure it is at the right angle (no up/down, as if it were on a 2D plane) and is pointing in, not out. Is there any way to do this in vizzy?

Tags
Question

4 Comments

  • Log in to leave a comment
  • Profile image
    3,634 JSO18

    @sflanker thanks so much! I will try this.

    3.3 years ago
  • Profile image
    Mod sflanker

    @TestRunner Angle of attack sort of works for this because it gives the angle between the orientation fo the craft and the velocity vector, thus it will be 90 when the craft is in the orientation that JSO18 is trying to achieve. However you can really use this information to lock your heading effectively.

    +1 3.3 years ago
  • Profile image
    Mod sflanker

    @Arstotzka @JSO18 Sorry for failing to follow up on your earlier thread. Pitch is based on the vector to the planet, so locking to a pitch of 90 will also point toward the planet not perpendicular to the velocity vector. What you really want here is to take the cross product of the velocity vector and the orbit normal. The cross product of two vectors is a third vector that is perpendicular two the two inputs, and which direction it points (in this case either toward the center of the orbit or away from the center of the orbit). The trick is getting the orbit normal. For orbits with an inclination near zero it is really easy: (0, 1, 0), which means the expression you need is lock heading on vector [ [ velocity |Orbit| ] |cross| [ (0, 1, 0) ] ]. However if you want this to work for inclined orbits as well you will need to rotate (0, 1, 0) around your ascending node by your inclination, and you can get your ascending node by rotating (1, 0, 0) around (0, 1, 0) by your Right Ascension. I'm sorry to say that Right Ascension isn't an orbital parameter that you can get trivially! You instead have to compute it from your Position and Velocity vectors (also called Cartesian State Vectors). One option to simplify this would be to use Vizzy++ which has an expression for getting a craft or planet's Orbit Normal, but if you cannot use mods then you could take a look at this craft which has a flight program with custom expressions to calculate these things.

    +2 3.3 years ago
  • Profile image
    3,634 JSO18

    @Arstotzka thanks I will try that

    3.3 years ago

No Upvotes

Log in in to upvote this post.