Jump to content

Help with orbital frames of reference


Velo24

Recommended Posts

Hi guys,

I'm trying to make an add-on which will include closed-loop attitude control with tracking (I can tell the ship where to point and it will point in that direction). The problem I'm running into is that the frames of reference for the different attitude variables are all over the place.

I'm currently struggling with keeping the ship aligned with the pro-grade velocity. For an orbit around Kerbin, I'm using vessel.orbit.vel to get the velocity vector. I've confirmed that this vector is given in the Kerbin-centred inertial (KCI) frame with the z-axis parallel to Kerbin's axis of rotation.

For my attitude I've tried vessel.ReferenceTransform.localRotation and vessel.ReferenceTransform.rotation however I do not think either of these have coordinates which are aligned with the KCI frame. I also tried extracting the rotation from vessel.GetFwdVector() but, again, this information is provided in a frame of reference which is not aligned with the KCI frame.

Does anyone know of any rotation information available to me which is in the KCI frame, or, any velocity information which is available in a frame also containing rotation information?:D

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...