You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Feature/improve spacecraft attitude computation by introducing GetBodyFront method and updating attitude classes to use it
* Feature/add validation for orbital normal computation in attitude classes
@@ -1240,6 +1240,12 @@ Represents a spacecraft with components.
1240
1240
|`SolarRadiationCoeff`| Solar radiation pressure coefficient Cr (default 1.0, range 1.0–2.0) |
1241
1241
|`InitialOrbitalParameters`| Initial orbit |
1242
1242
|`StateVectorsRelativeToICRF`| Propagated states |
1243
+
|`BodyFront`| Instance body front axis (default: +Y, same as `Spacecraft.Front`) |
1244
+
|`BodyRight`| Instance body right axis (default: +X, same as `Spacecraft.Right`) |
1245
+
|`BodyUp`| Instance body up axis (default: +Z, same as `Spacecraft.Up`) |
1246
+
|`BodyBack` / `BodyLeft` / `BodyDown`| Computed inverses of body axes |
1247
+
1248
+
**Configurable body axes**: Pass `bodyFront`, `bodyRight`, `bodyUp` to the constructor to override the default body frame. Custom axes must be orthogonal and right-handed (`bodyRight.Cross(bodyFront) == bodyUp`). All attitude maneuvers automatically use per-instance body axes via `GetBodyFront()`.
1243
1249
1244
1250
| Method | Description |
1245
1251
|--------|-------------|
@@ -1385,9 +1391,13 @@ Base class for orbital maneuvers.
1385
1391
-`RetrogradeAttitude`: Orient opposite to velocity
1386
1392
-`ZenithAttitude`: Orient away from central body
1387
1393
-`NadirAttitude`: Orient toward central body
1394
+
-`NormalAttitude`: Orient along orbital normal (h = r × v)
1395
+
-`AntiNormalAttitude`: Orient opposite to orbital normal (−h)
1388
1396
-`InstrumentPointingAttitude`: Point instrument at target (single-vector, roll unconstrained)
1389
1397
-`TriadAttitude`: Fully-constrained 3-DOF attitude using TRIAD algorithm (eliminates roll ambiguity)
1390
1398
1399
+
All attitude maneuvers support configurable body axes via `GetBodyFront()`, which reads per-instance axes from `Spacecraft.BodyFront` with fallback to the static default `Spacecraft.Front` (+Y).
1400
+
1391
1401
**TRIAD Attitude Determination**
1392
1402
1393
1403
The `TriadAttitude` class uses two non-collinear observation vectors to fully constrain spacecraft attitude. Unlike single-vector pointing, TRIAD eliminates roll ambiguity by constraining all three degrees of freedom.
@@ -1406,12 +1416,29 @@ var attitude = new TriadAttitude(
1406
1416
camera, // Uses camera boresight (primary) and refVector (secondary)
1407
1417
earth, sun, // Primary target, secondary target
1408
1418
engine);
1419
+
1420
+
// Using IAttitudeTarget (orbital directions and/or celestial bodies)
**IAttitudeTarget system**: The `IAttitudeTarget` interface enables orbital directions and celestial bodies to be used interchangeably as TRIAD targets:
@@ -602,9 +670,14 @@ Test data files are in `Data/SolarSystem/` and copied to output directory.
602
670
- User-defined parameters support custom mission-specific data
603
671
9.**Attitude Maneuvers**: When implementing attitude control:
604
672
- Use `TriadAttitude` for fully-constrained orientation (eliminates roll ambiguity)
605
-
- Use single-vector attitudes (`NadirAttitude`, `InstrumentPointingToAttitude`) only when roll is unconstrained
673
+
- Use single-vector attitudes (`NadirAttitude`, `ProgradeAttitude`, `NormalAttitude`, etc.) only when roll is unconstrained
674
+
- Use `NormalAttitude` / `AntiNormalAttitude` for plane-change burns (h = r × v)
606
675
- Ensure body vectors and reference vectors are not collinear (minimum 5 degrees separation)
607
-
- Use `Spacecraft.Front`, `Spacecraft.Up`, etc. for standard body frame directions
676
+
- Use `Spacecraft.Front`, `Spacecraft.Up`, etc. for standard body frame directions; use instance `BodyFront`, `BodyRight`, `BodyUp` for non-standard frames
677
+
- Custom body axes must be orthogonal and right-handed (`BodyRight.Cross(BodyFront) == BodyUp`)
678
+
- All attitude maneuvers use `GetBodyFront()` which reads per-instance axes with static fallback
679
+
- Use `IAttitudeTarget` with `TriadAttitude` to mix orbital directions (`OrbitalDirectionTarget.Prograde`, etc.) and celestial targets (`CelestialAttitudeTarget`)
680
+
- Use factory methods `TriadAttitude.CreateLVLH()` and `CreateProgradeWithSunTracking()` for common operational attitudes
608
681
- Use `Instrument.GetBoresightInSpacecraftFrame()` and `GetRefVectorInSpacecraftFrame()` for instrument-based pointing
609
682
10.**Geopotential Gravity**: When working with spherical harmonic gravity models:
610
683
- Pass `GeopotentialModelParameters` to `CelestialBody` constructor to enable geopotential
0 commit comments