Aggressive tracking using forces

Please don't post Bullet support questions here, use the above forums instead.
Kludgy
Posts: 1
Joined: Tue Nov 30, 2010 8:19 am

Aggressive tracking using forces

Post by Kludgy »

Hi all,

I am a programmer tasked with developing a newtonian simulation of high performance spacecraft. For the sake of discussion, each craft is a rigid body with non uniform moments that must navigate its environment by applying only (central) forces and torques. Mass and acceleration can vary by a couple orders of magnitude. Linear and angular tracking are treated independently. The high order parameters are: max speed, max angular speed, max torque scalar (may be component-wise) and max force magnitude.

Here's what I have now:

The linear tracking code is very simple and attempts to minimize the difference between actual velocity and desired velocity using kinematic knowledge of motion to produce the desired velocity at each tick (accelerate to apogee, decelerate to target). This is comfortable territory.

Angular tracking is significantly more bloated and follows the same principals by trying to minimize local angular error component-wise. There is some hand-waving of the coupling of large angular terms that makes this even remotely acceptable. So it works alright if there is an abundance of turning power, but the big problem is that it is just a messy solution that I'm afraid might blow up in my face later.

Is there a better way to approach the angular tracking problem or is this just how it is done? I intend to start layering flight AI on top of this simulation.

(If there are flight sim devs out there in the crowd, what can I say, I would really appreciate your advice!) :)


Cheers
-Kludgy
bone
Posts: 231
Joined: Tue Feb 20, 2007 4:56 pm

Re: Aggressive tracking using forces

Post by bone »

Kludgy wrote: Angular tracking is significantly more bloated and follows the same principals by trying to minimize local angular error component-wise.
To clarify, you are trying to fix up actual vs. desired angular *velocity*? Or actual vs. desired orientation? Or both?

I don't know if I can help, I'm not a flight sim dev, but I have a little bit of experience with somewhat similar problems. If you are handling both angular velocity & orientation, then using apply a PD-like (spring/damper) algorithm directly on the angular components should work fine as long as the gyroscopic term isn't dominating (meaning the spacecraft isn't spinning out-of-control), and the orientation errors aren't approaching 180 degrees.

What does your hand-waving consist of?

EDITED: changed PID to PD