The 'lock heading (vector)' statement seems to point towards a vector in PCI coordinates, but then, as the craft moves through it's orbit, it rotates. I assume this is because it internally converts from a PCI vector to a pitch and heading, but in my use case (a custom burn-node), I want to keep my craft facing towards that PCI vector, regardless of whether the pitch/heading changes. But I'm not sure how I can do that.
Tags
Question3 Comments
- Log in to leave a comment
-
As a partial answer to my own question; I found a very unsafe/risky workaround. I can use the broadcast system to trigger a new thread, passing it the vector I want to lock. On that new thread, I have it loop and repeatedly set the heading to the vector, waiting for 1 second between iterations. Each iteration, I have it check a 'unlockHeading' global variable. Elsewhere, once I no longer want to lock that heading, I set the 'unlockHeading' variable to true. Between 0 and 1 seconds later, the heading will be unlocked. This isn't threadsafe though, and is a really suboptimal solution.
Edit: @SamTheFox, could you elaborate? I'm not sure how I can use the circumference to fix this.
-
9,400 RudimentaryCheezit
find the circumference of your orbit and use that
equation: https://sciencing.com/calculate-area-oval-4760748.html
⁽ᵉᵛᵉʳʸᵗʰᶦⁿᵍ ʰᵉʳᵉ ᶦˢ ᵛᵃᵍᵘᵉ⁾
find a way to convert the circumference into a 3D vector (like your craft’s velocity)
then find a way to use that vector to convert it into pitch/yaw/roll
these are just suggestions because frankly i have no idea