Envelope: pin each side as the sum of its thrusters; drop the unused ManoeuvreEnvelope operator +; document Column(Thrust) against the allocator's Column(NominalThrust)
Builds not verified yet at this commit; verification follows on Yggdrasil. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
7437b13a5b
commit
ab80aa8f73
3 changed files with 38 additions and 8 deletions
|
|
@ -2089,8 +2089,9 @@ public struct FireControlDiagnostic
|
|||
}
|
||||
|
||||
// What a ship can do at this instant, in its own frame: acceleration along each body axis (m/s^2) and the kinematic
|
||||
// turn rate each way (rad/s; turning toward the ship's right is Clockwise). Each propulsor reports its share with
|
||||
// its own Execute arithmetic and Ship sums them; nothing stores it. Zero is the envelope of anything that is not a Ship.
|
||||
// turn rate each way (rad/s; turning toward the ship's right is Clockwise). Ship derives it each update as the box
|
||||
// extremes of its thrusters' columns (Ship.RecalculateEnvelope); nothing stores it. Zero is the envelope of anything
|
||||
// that is not a Ship.
|
||||
public readonly struct ManoeuvreEnvelope
|
||||
{
|
||||
public readonly float Forward, Reverse, Left, Right, Clockwise, CounterClockwise;
|
||||
|
|
@ -2104,10 +2105,6 @@ public readonly struct ManoeuvreEnvelope
|
|||
Clockwise = clockwise;
|
||||
CounterClockwise = counterClockwise;
|
||||
}
|
||||
|
||||
public static ManoeuvreEnvelope operator +(ManoeuvreEnvelope a, ManoeuvreEnvelope b) => new ManoeuvreEnvelope(
|
||||
a.Forward + b.Forward, a.Reverse + b.Reverse, a.Left + b.Left, a.Right + b.Right,
|
||||
a.Clockwise + b.Clockwise, a.CounterClockwise + b.CounterClockwise);
|
||||
}
|
||||
|
||||
// How unpredictably an entity is changing its motion, observed from its measured acceleration. The trend is an
|
||||
|
|
|
|||
|
|
@ -85,8 +85,10 @@ public class Ship : Entity
|
|||
#region ThrustCalculation
|
||||
|
||||
// What this ship can do at this instant (see ManoeuvreEnvelope): the box extremes of the thrusters' columns at their
|
||||
// live, granted thrust (zero when unpowered or not Active), the same columns the allocator solves with. Derived each
|
||||
// update, never saved.
|
||||
// live thrust (zero when unpowered or not Active), because it reports what the ship can do now. The allocator solves
|
||||
// with Column(NominalThrust), the full-grant column, because a column promises what a thruster does at a full grant
|
||||
// and the allocator must not reshape its answer as the grant moves. Same geometry (Thruster.Column), different thrust.
|
||||
// Derived each update, never saved.
|
||||
public ManoeuvreEnvelope Envelope { get; private set; }
|
||||
|
||||
private void RecalculateEnvelope()
|
||||
|
|
|
|||
Loading…
Reference in a new issue