Coming soon - Get a detailed view of why an account is flagged as spam!
view details
5
AI Breadboard - Is it possible to figure out whether the ship is moving backwards or forwards in relation to its own front?
Post Body

Basically, I want the ships I have to hold position at nearly exactly 0 m/s once they have reached a certain target.

Using a PID and propulsion or drive components doesn't necessarily work, because even if the PID is finely tuned, it will still overshoot and overcorrect to the point of the speed increasing again, sometimes drastically.

However, conversely, the breadboard component speed output for some god forsaken reason is absolute speed of the vessel with absolutely no relation as far as I can tell for whether it is going forward or backward seeing as it is always positive.

If the speed output component is a vector/velocity, how would I get its direction using the maths components and vector commands?

And, if the speed output is simply a perpetually positive scalar, how can I get it turned into a vector for backwards and forwards in relation to the ship's front?

It would be simplest to just take a position at two different times and calculate it based on that, but it's not possible to have the AI breadboard hold a dynamic input for 1second or less while it gets the next input and does the math for the vector.

If I am over-complicating this, a simpler solution would be much appreciated.

If I'm correct and I do need to find the direction of the movement in relation to the front of the vessel, how would I go about doing that?

I'm aware that it would be a largely mathematical thing, probably related to the yaw, roll, and pitch of the vessel along with vector calculus. My issue with it is that I know just enough calculus and other TriangleScience(tm) to get myself hopelessly lost, but not enough to actually do anything useful, so if anyone is willing to explain in as much detail as possible how I could use those, and/or the timer thingy to get the forward and backward velocities I would really love it.

Thank you. :)

Author
Account Strength
100%
Account Age
11 years
Verified Email
Yes
Verified Flair
No
Total Karma
103,790
Link Karma
4,754
Comment Karma
98,695
Profile updated: 2 days ago
Posts updated: 1 month ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
4 years ago