![]() |
Gravity Engine 2 9.0
|
Booster External Acceleration. More...
Classes | |
| class | Stage |
| Utility class to bundle together the attributes for a rocket stage. More... | |
Static Public Member Functions | |
| static int | ActiveStageReadback (double3[] data) |
| static double3[] | Allocate (Guidance guidance, int numStages, GEBodyState bodyStateSI, double dtSec, double mu_SI, double tStartSec, int pitchTableSize=0) |
| static void | AutoStageSet (double3[] data, bool enabled) |
| Set the auto-stage control bit in the booster data block to indicated the value of the enabled parameter. | |
| static double | BurnTimeForStage (double3[] data, int stage) |
| static void | EnabledSet (double3[] data, bool enabled) |
| Set the ENABLED flag in the data block. | |
| static int double3 double3 v | EvolveSelfIntegrated (ref ExternalAccel.EAStateData eaState, int extAccelId, double tGE, double dt, ref GEPhysicsCore.GEPhysicsJob gePhysJob) |
| static double | FuelReadout (double3[] data, int stageReq=-1) |
| Get fuel for the designated stage. If the stage is -1, this is a request for the active stage. | |
| static double3[] | GravityTurnSetup (double3[] data, double vStart, double pitchKickDeg, double pitchRateDegPerSec) |
| static void | LinearTangentECSetup (double3[] data, double linTan_a, double linTan_b, double tStartSec, double tEndSec) |
| Create data[] array for a linear tangent steering law of the form tan(theta) = (1-t/t_f) tan(theta0) as found in (6.59) of "Design of Rockets and Launch Vehicles", Edberg & Cpsta, AIAA Press. | |
| static void | ManualPitchSetup (double pitchRad, double3[] data) |
| Allocate a data block with numStages that will use a manual pitch value for ascent guidance. | |
| static void | ManualVecSetThrustDir (double3[] data, double3 thrustDir) |
| Full manual control with acceleration explicitly specified. | |
| static double | MassAtTime (double3[] data, double t) |
| static void | PayloadCompute (double3[] data) |
| Compute and configure the per stage payload values for each stage in a multi-stage booster. e.g. 3 stages: 0, 1, 2 Stage 2 has a payload mass of payloadMassKg. Stage 1 has a payload mass of playloadMassKg + stage2 (fuel + dry mass) Stage 0 has a payload mass of stage 1 payload mass + stage1 (fuel + dry mass) | |
| static double | PayloadReadout (double3[] data, int stageNum) |
| static void | Peg2DSetup (double3[] data, PEG2DMode pegMode, double gt_at_vel, double gt_pitch_kick, double pitch_rate, double target_altitude, double target_vz, double burnTimeSec) |
| Setup PEG2D params. Call after Booster.Allocate() and Booster.StageSetup(). | |
| static double | PitchFromTable (NativeArray< double3 > data, double t, int guid_base) |
| Look up the entry in the pitch table. Assume the pitch table might not be regular and that since we're integrating time will advance forward monotonically. Just walk the table to find an entry but keep track of where we were. | |
| static double | PitchReadback (double3[] data) |
| static void | PitchTableSetup (double3[] data, double tStartSec, double tEndSec, double3[] pitchTable) |
| static bool bool stopSelfIntegrating | SelfIntegratingStatusActions (int status) |
| static int double fuel_used | StageNumFuelAtTime (double3[] data, double t) |
| static void | StageSetup (double3[] data, int stageNum, Stage stage) |
| Add a stage to the Booster. This assumes data[] has been created with the correct number of total stages, prior to using this method to fill in the details. | |
| static string | StatusString (int status) |
| static void | SteeringPlaneSet (double3[] data, double3 orbitCenter, double3 orbitNormal) |
| static void | ThrottleSet (double3[] data, double throttle) |
| static double | ThrustAtTime (double3[] data, double t) |
| static double | TotalBurnTime (double3[] data) |
| Total burn time for the booster extracted from a copy of the data[] block with 0 offset. | |
Static Public Attributes | |
| const int | AUTO_STAGE = 1 << 1 |
| const int | COPY_FROM_BODY = 1 << 3 |
| const int | ENABLED = 1 << 0 |
| const int | FUEL_OUT = 1 << 0 |
| static int double3 | r |
| static bool | remove |
| const int | SEND_EVENTS = 1 << 2 |
| static int | stage |
| const int | STAGED = 1 << 1 |
| static int | status |
| Dedicated history-dependent evolution of the booster. This is called by RunStep() in GEPhysicsCore. Typically the timescale of NBody evolution is much larger than the typical timescale of a rocket launch or powered descent. This routine does simple integration using a guidance model with updates typically on the order of 0.1 seconds. This is an appropriate timestep for e.g. a gravity turn. | |
| const int | STATUS_CUTOFF = 3 |
| const int | STATUS_FUEL_OUT = 1 |
| const int | STATUS_STAGED = 2 |
Booster External Acceleration.
This class provides the external acceleration of a multi-stage booster. It will be called for each timestep in the numerical integration. Booster also provides a set of methods to assist in determining the launch trajewctory and end state without being used as part of GEPhysicsCore. This allows tuning of booster parameters ahead of launch.
This implementation supports:
Booster setup allocates a block of double3[] to hold the state information required for the stages and guidance. This ensures it can be run within the Job system and can be Burst compiled.
|
static |
Set the auto-stage control bit in the booster data block to indicated the value of the enabled parameter.
| data | |
| enabled |
|
static |
Set the ENABLED flag in the data block.
| data | |
| enabled |
|
static |
Get fuel for the designated stage. If the stage is -1, this is a request for the active stage.
| data | |
| stage | 0 based stage number |
|
static |
Create data[] array for a linear tangent steering law of the form tan(theta) = (1-t/t_f) tan(theta0) as found in (6.59) of "Design of Rockets and Launch Vehicles", Edberg & Cpsta, AIAA Press.
This uses a standard rocket equation data block but note that if the engine is throttled down the algorithm will still assume the same t_burn and compute the guidance accordingly.
SB = Steering Base [SB0] (law, t_start, t_end) start/end are for overall flight path for steering laws that use this [SB1] center [SB2] plane [SB3] (linTan_a, linTan_b, 0)
| theta0Deg | |
| t_final |
|
static |
Allocate a data block with numStages that will use a manual pitch value for ascent guidance.
This adds a single double3 to the standard header + stages that contains: (SE = end of stage block + 1) data[SE+0].x = manual pitch value
| pitchRad | |
| numStages |
|
static |
Full manual control with acceleration explicitly specified.
Atypical since does not have any stages or standard steering plane info. [SB0] (law, 0, 0) [SB1] thrustDir
| thrustDir | thrust direction vector (normalized) |
|
static |
Compute and configure the per stage payload values for each stage in a multi-stage booster. e.g. 3 stages: 0, 1, 2 Stage 2 has a payload mass of payloadMassKg. Stage 1 has a payload mass of playloadMassKg + stage2 (fuel + dry mass) Stage 0 has a payload mass of stage 1 payload mass + stage1 (fuel + dry mass)
| data | |
| payloadMassKg |
|
static |
Setup PEG2D params. Call after Booster.Allocate() and Booster.StageSetup().
data[guid_base] = new double3((int)Guidance.PEG_2D, 0, 0); data[guid_base + PEG2D_MODE_OFFSET] = new double3((int)pegMode, gt_at_vel, gt_pitch_kick); data[guid_base + PEG2D_TARGET_ALTITUDE_OFFSET] = new double3(pitch_rate, target_altitude, target_vz); data[guid_base + PEG2D_PEG_A_OFFSET] = double3.zero; data[guid_base + PEG2D_PEG_T_OFFSET] = double3.zero; data[guid_base + PEG2D_PITCH_LOCK_OFFSET] = new double3(0, 0, math.radians(90.0));
| data | |
| pegMode | |
| gt_at_vel | |
| gt_pitch_kick | |
| pitch_rate | |
| target_altitude | |
| target_vz |
|
static |
Look up the entry in the pitch table. Assume the pitch table might not be regular and that since we're integrating time will advance forward monotonically. Just walk the table to find an entry but keep track of where we were.
Angles in the pitch table are angles from the horizontal in radians. Need to convert to angle from the vertical in radians.
(Public so Unit tests can find it)
| data | |
| t | |
| b |
|
static |
Add a stage to the Booster. This assumes data[] has been created with the correct number of total stages, prior to using this method to fill in the details.
The shadow_ea_desc_index is used to indicate that this stage is shadowed by a GSBody that will track its motion once it has burned out. When staging occurs the current R, V, t values are copied to the shadow GSBody. Otherwise these values are updated at the end of the self-integrating evolution.
| data | |
| stageNum | |
| stage | |
| shadow_ea_desc_index |
|
static |
Total burn time for the booster extracted from a copy of the data[] block with 0 offset.
| data |
|
static |
Dedicated history-dependent evolution of the booster. This is called by RunStep() in GEPhysicsCore. Typically the timescale of NBody evolution is much larger than the typical timescale of a rocket launch or powered descent. This routine does simple integration using a guidance model with updates typically on the order of 0.1 seconds. This is an appropriate timestep for e.g. a gravity turn.
A copy of (r, v, t) state is maintained in the EAStateData block to reduce conversion inaccuracy.
Time is the time since launch start in seconds.
| eaState | |
| eaDesc | |
| t_until | time to integrate to |
| dt | GEPhysicsCore dt (in GE units) |
| data | |
| scaleTtoSec | |
| scaleLtoKm |