Skip to content
This repository was archived by the owner on Jan 6, 2022. It is now read-only.

Reaction control system - #82

Closed
Knsgf wants to merge 42 commits into
KeenSoftwareHouse:masterfrom
Knsgf:RCS
Closed

Reaction control system#82
Knsgf wants to merge 42 commits into
KeenSoftwareHouse:masterfrom
Knsgf:RCS

Conversation

@Knsgf

@Knsgf Knsgf commented May 18, 2015

Copy link
Copy Markdown

This is an implementation of automatic off-centre thrust compensation for gyroscopes, thruster-induced torque and thruster-based ship rotation controls.

All these features are optional. Disabling thruster damage in world settings switches them off.

Notes/caveats:
a) Both gyroscope stabilisation and RCS require an operational remote control block with "Fly-by-wire" switch turned on. Without it controls revert to "gyros turn; thrusters move and couldn't care less about torque" scheme,
b) By default, all engines have their linear movement mode enabled and rotational assist mode disabled. Use thrusters' switches in the control panel to change that,
c) Turning inertia dampeners off and then trying to rotate a ship using thrusters also produces linear movement unless all rotational thrusters are balanced perfectly,
d) Turning while accelerating/braking is often (but not always) slower than at standstill. This is caused by engines trying to accelerate and turn simultaneously.

An implementation of automatic off-centre thrust compensation for
gyroscopes and thruster-based ship rotation system.
@Geneticus

Copy link
Copy Markdown
Contributor

Could RCS thrusters be split off as a different type that isn't affected by dampers? Then Normal Thrusters are for Linear motion only and have damping as-is while RCS replace Gyros for turning and make them modify rotational dampers instead like an upgrade block.

@RossM

RossM commented May 19, 2015

Copy link
Copy Markdown
Contributor

Nice idea, but it needs some more work. Continuous forward thrust without touching the mouse caused my ship to start rolling. Even when thrust stopped, it kept rolling in place. (I was using the constructor ship from easy start A.)

I also think the controls are a bit weird - turns end too abruptly, and it's difficult to turn some ships while moving. The fighter from easy start A can't pitch upward at all while moving forward.

Summary of changes:
a) Thruster torque is now optional -- disabling thruster damage also
turns off the torque,
b) Now compatible with gyroscope override -- thrusters operate in linear
mode when gyros are overridden,
c) Graduated thrust change -- no more flickering with less than
perfectly balanced ships.
@liorabel

Copy link
Copy Markdown

This is incredible. Exactly what I'm missing in Space Engineers!
For ages now I've wanted more realistic physics and the ability to have asymmetrical ships behave less like a block.

I will add these points though:

  1. RCS thrusters are a great idea but I don't think they should be separate blocks. Instead there should be a setting on thrusters for whether they should participate in RCS behaviour or not.
  2. Ships need a logical/realistic way of "sensing" when RCS adjustments are required. Today that is both "sensed" and adjusted by gyros. With thrusters being able to make adjustments as well, I think we could possibly have a second type of passive gyro that will only "sense" the ship's movement but not be able to correct it. This will be much cheaper to build and would be a requirement for RCS motion.

Knsgf added 2 commits May 19, 2015 19:34
A few tweaks:
* Fixed (hacked, really) an issue, which caused small ships to veer off
course,
* Improved general RCS usability on small ships.
Fixed gyroscope rotational damping being disabled when thruster damage
was turned off.
@RossM

RossM commented May 21, 2015

Copy link
Copy Markdown
Contributor

Very nice! This version seems quite playable. Just some notes from a few minutes of playing with it.

The controls seem very springy, particularly turning. Understandable, it's an RCS system. Weirdly, moving the mouse just slightly at the end of a turn keeps the ship pointed in the final direction of the turn, while releasing the mouse entirely results in springing back towards the direction you turned from.

You can almost control a ship with no gyros at all. However, unless the thrust is perfectly balanced, it will tend to fly in circles. It's possible to correct it using the mouse - the RCS is very good at turning using only thrusters it seems - but it would be nice if it could hold a course even without gyros.

It would be nice if turning large ships had more inertia. This is a problem in the base game too. It's kind of annoying to be trying to turn a large ship, reach the end of the mousepad, pick up the mouse to move it, and have the ship's thrusters fire and completely stop the turning momentum you managed to get going.

@PassivePicasso

Copy link
Copy Markdown

A way to make it easier to balance the RCS thrust would be to make it so thrusters can have their Max Thrust set. I could see this getting pretty involved but it would allow you to slam a bunch of rear thrusts in an Asymmetrical setup, and still achieve stable forward thrust

@rglx

rglx commented May 21, 2015

Copy link
Copy Markdown

I like this idea. Maybe have it usable as a per-ship option?

Knsgf added 2 commits May 22, 2015 00:49
* Fixed a subtle but very serious bug, which was generating phantom
braking forces,
* Gyroscopes no longer cause ship to spring back after performing sharp
turns,
* When rotating a ship, thrusters consider a centre of thrust instead of
centre of mass. This allows for more efficient turning,
* A general code clean-up.
@Knsgf

Knsgf commented May 21, 2015

Copy link
Copy Markdown
Author

RossM,
The version 3 was "quite playable" solely due to a subtle but serious bug, which produced phantom braking forces. With this bug squished, all stock small ships -- none of which are balanced very well -- cannot fly properly without gyroscopes, especially when drifting with dampeners on.

Knsgf added 8 commits May 22, 2015 13:50
* Fixed another silly phantom-force-generating bug,
* Added a weak stabiliser to thruster system,
* Added rotation vs linear priority threshold (in UpdateThrusts()).
Commit of MAX_THRUST_CHANGE value.
@Knsgf Knsgf closed this May 28, 2015
Knsgf added 4 commits June 3, 2015 18:46
* Gyroscope stabilisation is no longer available when thruster damage &
torque setting is turned off,
* Both gyroscope stabilisation and RCS now require a functional remote
control block to be present on the ship,
* Added 2 control panel switches for thrusters. These select whether a
thruster should perform linear acceleration, rotational assist or both.
@Knsgf Knsgf reopened this Jun 4, 2015
Knsgf added 16 commits June 5, 2015 14:00
* In non-precision mode, the autopilot will start movement immediately
using reverse and lateral thrusters if necessary,
* The autopilot now attempts to keep the ship on exact course between 2
waypoints,
* An approach cone handling has been added. The approach cone is 120 /
20 degrees wide in non-precision / precision mode respectively.
* Added a switch to remote control block to disable fly-by-wire (useful
for remotely controlled ground vehicles),
* Remote control block is now much more expensive as it became a
full-blown flight computer,
* Inertia dampeners and autopilot take gravity into account.
* When aligning with a target in precision mode, the autopilot will fire
linear thrusters so that the ship will rotate around the remote control
block instead of CoM,
* Improved course hold routine in non-precision mode,
* Various tweaks to improve autopilot performance in a gravity
environment.
@Knsgf Knsgf closed this Aug 20, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants