Gyroscope behavior when set by PB

Sebgol shared this bug 5 years ago
Outdated

I've recently tried to implement my own version of gravity aligner. But there seems to be problem with setting overrides in gyroscope from PB.


When the PB is turned on, and constantly manipulates the PYR, the gyroscope efficiency seems to be reduced greatly. But when I turn PB off, the gyro starts to turn with the overrides provided by PB.


Here's some code used by PB:

https://pastebin.com/yFF3KACu


It seems like the gyro is unable to provide any torque because the PB sets the values over and over (maybe there's some sort of inertia when applying torque).


There are also 2 helper gyroscopes, which have the same values as the main one (but the main one is sufficient to rotate the ship when the PB is turned off).

Replies (3)

photo
1

Hello, Engineer!


Thank you for your feedback! Your topic has been added between considered issues.Please keep voting for the issue as it will help us to identify the most serious bugs.


We really appreciate your patience.


Kind Regards

Keen Software House: QA Department

photo
1

Thanks for your quick response.


Here are steps to reproduce this weird behavior:

1. Create contraption like in this image:

b78b2ad0a7cdf1b38c8514139547d7f6

2. Put this code into PB:

https://pastebin.com/WDUB8Zc7

3. When the PB is enabled it should make the cockpit rotate - the Gyroscope overrides are visibly set.

4. However this doesn't produce any results as the gyro seems to ignore the setting.

5. Disable PB.

6. Gyro starts rotating the cockpit.

photo
1

I found the reason for this bug. Every time you set a new value to yaw, pitch or roll, it resets it's momentum to zero. So it never gets time to spin up.

So if you set the rpm of an axis every 10s tick, it will only spin up slightly. Where as if you set the rpm and leave it, it will spin up after a few seconds.

When a new rpm value is set, it should of course change the rpm from present rpm and not from zero.

Edit: When applying a new value to any one of the 3 axis. All 3 axis are set to zero momentum.

Please fix.

/Djelle

Leave a Comment
 
Attach a file