Ok, I've been beating my head against this problem for 5 days no and it's time to ask for help.
I'm working on modeling blunt body reentry vehicle. To do this I have defined the capsule's heatshield as a airfoil in orbiter using a similar method to FrancisDrake's here.
Now as my capsule slows down from super sonic to subsonic it wants to tumble.
That's ok it's supposed to do that.
The problem is what comes next. To prevent the capsule from tumbling, and keep the heatshield oriented towards the direction of travel/airflow the capsule deploys a drogue chute. This chute should pull the nose of the capsule towards the vector of drag but it does not.
Initially I had the drogue defined as a variable drag element. This worked to slow the capsule down but did nothing to stabilize the capsule's orientation.
As such I decided to try using the "Addforce" function, but rather than decreasing the tumble it has exacerbated it.
^ NOT SUPPOSED TO HAPPEN ^
What I need is some why something similar to the Pitch and Yaw moments of the legacy flight models that will allow me to but I can't use those without invalidating my existing flight model.
Ideally I want the capsule to naturally settle into an attitude where it is "Hanging" from it's chutes with the line between the CoM and Chute attachment point parallel to the vector of drag, but so far I have been at a loss to do this without cheating (SetRotationMatrix()).
My current addforce function is shown below.
I'm working on modeling blunt body reentry vehicle. To do this I have defined the capsule's heatshield as a airfoil in orbiter using a similar method to FrancisDrake's here.
Now as my capsule slows down from super sonic to subsonic it wants to tumble.
That's ok it's supposed to do that.
The problem is what comes next. To prevent the capsule from tumbling, and keep the heatshield oriented towards the direction of travel/airflow the capsule deploys a drogue chute. This chute should pull the nose of the capsule towards the vector of drag but it does not.
Initially I had the drogue defined as a variable drag element. This worked to slow the capsule down but did nothing to stabilize the capsule's orientation.
As such I decided to try using the "Addforce" function, but rather than decreasing the tumble it has exacerbated it.
^ NOT SUPPOSED TO HAPPEN ^
What I need is some why something similar to the Pitch and Yaw moments of the legacy flight models that will allow me to but I can't use those without invalidating my existing flight model.
Ideally I want the capsule to naturally settle into an attitude where it is "Hanging" from it's chutes with the line between the CoM and Chute attachment point parallel to the vector of drag, but so far I have been at a loss to do this without cheating (SetRotationMatrix()).
My current addforce function is shown below.
Code:
if (Drogue_Deployed)
{
VECTOR3 airstream;
GetShipAirspeedVector (airstream);
double rho = GetAtmDensity (); // density of air = [kg/m3]
double v = GetAirspeed (); // velocity [m/s]
double Cd = 1.5; // drag coefficient of chute *estimated*
double A = CHUTE_DROGUE_CS; // cross section of chute [m^2]
double Drag = 0.5 * rho * pow (v, 2) * Cd * A; // force exerted by chute [n]
VECTOR3 chuteforce = -airstream;
normalise (chuteforce);
chuteforce = chuteforce * Drag;
AddForce (chuteforce, CHUTE_ATTACHPOINT);
}