This solution explores attitude/translation control for reaction control systems (RCS) with multiple thrusters. It focuses on mapping a desired force/torque command to per‑thruster power levels bounded to [0,1], and compares two solver implementations.
As of v2.0.0, all core projects are consolidated into a single RCS NuGet package supporting .NET Framework 4.7.1 and higher:
<PackageReference Include="RCS" Version="2.0.0" />Supported Frameworks:
- .NET Framework 4.7.1
- .NET Framework 4.7.2
- .NET Framework 4.8
This single package includes:
LinearSolver– solver interfaces and utilitiesLinearSolver.Custom.GoalProgramming– goal programming solver implementationRCS– core domain types and engine optimizer
Breaking Change: Previous separate packages (LinearSolver v1.0.0, LinearSolver.Custom v1.0.0) are no longer published. See Migration Guide below.
RCS.MSF– Uses Microsoft Solver Foundation (separate package, requires additional setup)
RCS– core domain types (vectors, thrusters, engine, command) plus the genericRcsEngineOptimiserthat builds the coefficient matrix and desired vector from a fleet of thrusters.RCS.Custom– optimiser wired to a custom linear solver that searches bounded thrust levels without MSF.RCS.MSF– optimiser wired to the Microsoft Solver Foundation goal-based solver (MsfGoalLinearSolver) as the reference implementation.LinearSolver– shared solver interface and progress type.LinearSolver.Custom.GoalProgramming– goal programming solver implementation (now bundled in RCS v2.0.0+).LinearSolver.MSF– MSF-based solver implementation (optional dependency).RCS.Test– MSTest suite that validates solver behaviour across several thruster layouts (12 thrusters, 3Fx, 3Opposite, 4Fx) and all force/torque directions, including soft-goal scenarios.
RcsEngineOptimiserorders thrusters, builds a 6×N coefficient matrix (Fx/Fy/Fz/Tx/Ty/Tz rows), and derives desired row targets from anRcsCommand.RcsCommandcan request forces/torques and optionally allow non-commanded axes to be treated as soft goals (encoded asdouble.NaNin the desired vector).- The linear solver streams progress snapshots of per‑thruster outputs; the optimiser maps each snapshot to resultant force/torque.
- Tests assert that the custom and MSF optimisers agree on outputs and resultant vectors for each scenario, across multiple thruster layouts.
dotnet test RCS.Test/RCS.Test.csproj- Max/Min force and torque in all axes for the 12‑thruster rig.
- Degenerate layouts (3Fx, 4Fx) to probe feasibility and soft-goal handling.
- Soft non-commanded axes (
AllowNonCommandedForces/AllowNonCommandedTorques) to allow the solver to prefer, but not require, zero on unrequested axes.
What Changed:
LinearSolverandLinearSolver.Customare no longer published as separate packages- All solver implementations consolidated into single
RCSpackage - Framework updated to .NET Framework 4.7.1
- MSF dependency removed from core RCS package
For Consumers Using RCS v1.x:
- No Action Required: Simply update your package reference:
<!-- Before --> <PackageReference Include="RCS" Version="1.0.0" /> <!-- After --> <PackageReference Include="RCS" Version="2.0.0" />
- All functionality remains the same; the v2.0.0 package is a drop-in replacement
For Consumers Using LinearSolver or LinearSolver.Custom Separately:
- Remove old references:
<!-- Remove these --> <PackageReference Include="LinearSolver" Version="1.0.0" /> <PackageReference Include="LinearSolver.Custom" Version="1.0.0" />
- Replace with unified package:
<!-- Add this --> <PackageReference Include="RCS" Version="2.0.0" />
- Update usings (if required): Most code should work unchanged since namespaces are preserved:
LinearSolvernamespace still availableLinearSolver.Customnamespace still availableRCSnamespace still available
Breaking Changes:
- If you directly referenced
LinearSolverorLinearSolver.CustomNuGet packages, you must switch to the unifiedRCSpackage - .NET Framework requirement: v4.7.1 or higher (updated from v4.7.2, but still compatible)
No API Changes:
- Class/interface signatures unchanged
- Namespace structure preserved
- All public APIs remain backward compatible
- Just bundled into a single package