Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slip/skip angle ? #6

Open
PhiJu5 opened this issue Feb 21, 2023 · 1 comment
Open

slip/skip angle ? #6

PhiJu5 opened this issue Feb 21, 2023 · 1 comment

Comments

@PhiJu5
Copy link

PhiJu5 commented Feb 21, 2023

Hello,

No issue here, just a question.

I have a 2021 USFSMAX module and use your 2021 library in a RC glider to have telemetry
data pitch/roll/yaw/Gz with a Teensy . Works great thanks to your library (the code to read the data is below).
I would like to add a slip/skip angle telemetry data but have no idea how to compute it.

There was an RC 3D gyro having and "Automatic Turn Coordination", the Eagle tree Guardian 2D/3D Stabilizer (discontinued):
"Automatic Turn Coordination will cause the Guardian to employ the “step on the ball” method of actuating
your Rudder for you. As you enter a banked turn, the Guardian will assert a coordinating response on the Rudder automatically.
This deflection is completely based on the side-to-side g-force measured by the Guardian and does not introduce any movement on
the Ailerons. This mode is great for models that skid easily.
Expected behavior here is that on the bench, the Guardian will introduce a Rudder movement that will yaw the model towards the
direction it is being rolled. For instance, if a stationary plane is rolled to the right, the Rudder should assert a right yaw
moment to follow the detected turn. Since this is based on horizontal g-force, the Guardian may exhibit different behavior in
the air in a “skid” condition where the model is moving one"

Do you know how to compute this slip/skip angle with the USFSMAX (if possible) ?

(From a French forum https://f3news.1fr1.net/t15586-derive-assistee, hard to translate correctly:
drift is the "Y" of the 3 XYZ force sensors of the gyro, X in fuselage axis, Y perpendicular to X and parallel to the wing)

Currently, my teensy code loop to catch data is:

if (usfsmax.quaternionReady()) {
usfsmax.readQuat(q);
qw = q[0];
qx = q[1];
qy = q[2];
qz = q[3];
gravityZ = qw * qw - qx * qx - qy * qy + qz * qz;
roll = atan2f(2.0f * (qw * qx + qy * qz), qw * qw - qx * qx - qy * qy + qz * qz);
pitch = -asinf(2.0f * (qx * qz - qw * qy));
yaw = atan2f(2.0f * (qx * qy + qw * qz), qw * qw + qx * qx - qy * qy - qz * qz);
roll *= 180.0f / PI;
pitch *= (180.0f) / PI;
yaw *= 180.0f / PI;
roll = -roll; // fix position
yaw += getEepromCfgFloat((int)EepromData::YawFix);
yaw = fmodf(yaw + 360.0f, 360.0f);

Thanks.

Regards.

@gregtomasch
Copy link
Owner

gregtomasch commented Feb 23, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants