Skip to content

Commit d5b2d2b

Browse files
committed
update README, change variables to match writeup
1 parent 332cfe4 commit d5b2d2b

File tree

2 files changed

+16
-25
lines changed

2 files changed

+16
-25
lines changed

README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ My thesis is about trajectory guidance for solar sail spacecraft in orbits aroun
88

99
* [See my one-pager description of the academic significance](https://github.com/itchono/SLyGA/files/12779364/Thesis_Proposal.pdf)
1010

11-
* [See my WIP notes for thesis here (late September 2023)](https://github.com/itchono/SLyGA/files/12779359/thesis_notes_sep_2023.pdf)
11+
* [See my interim writeup (late January 2024)](https://github.com/itchono/SLyGA/files/14046375/Thesis_Interim_Report_Shareable.pdf)
1212

1313
Below is an example of a trajectory I propagated which performs a three-dimensional orbital transfer using a Lyapunov steering law developed by me.
1414

15-
![trajectory plot](https://github.com/itchono/SLyGA/assets/54449457/661a9786-f4a2-41a4-b6e9-d3d812143e94)
16-
![trajectory_animation](https://github.com/itchono/SLyGA/assets/54449457/103718fc-53da-43e3-b131-8695ff5a3cca)
15+
![trajectory plot](https://github.com/itchono/SLyGA/assets/54449457/9bc673e4-95c4-481e-a812-39a11eaad1b4)
16+
![trajectory_animation](https://github.com/itchono/SLyGA/assets/54449457/ccc4bfdc-72cc-4612-a566-3d8ceb14f91c)
1717

1818

1919

@@ -29,27 +29,25 @@ Below is an example of a trajectory I propagated which performs a three-dimensio
2929
## Code Structure
3030
### `steering` - Steering Algorithms
3131
This code computes the LVLH steering angle in which to point the sail. There are currently two components to the steering algorithm:
32-
1. Lyapunov steering law - computes an optimal steering angle which decreases the control-Lyapunov potential function as quickly as possible
33-
2. NDF Heuristic - accounts for the position of the Sun, and adapts the steering angle proposed by the Lyapunov steering law to something a solar sail can achieve. e.g. Feathering the sail if the desired pointing direction is directly toward the Sun.
32+
1. Modified Q Law - computes an optimal steering angle which decreases the control-Lyapunov potential function as quickly as possible
33+
2. Steering Angle Regularization - accounts for the position of the Sun, and adapts the steering angle proposed by the Lyapunov steering law to something a solar sail can achieve. e.g. Feathering the sail if the desired pointing direction is directly toward the Sun.
3434

3535
### `sim` - Simulator
36-
This folder includes equations of motion, ephemerides, and propulsion models.
37-
38-
Currently, there are two propulsion models implemented:
39-
1. Constant thrust - thrusts in the direction of the sail normal vector with a constant magnitude
40-
2. Solar sail - thrusts in the direction of the sail normal vector with a magnitude dependent on cone angle
41-
42-
`run_mission.m` connects all of the low-level ODEs and guidance stack together.
36+
This folder includes equations of motion, ephemerides, and propulsion models used to "operate" the guidance law.
4337

4438
### `postprocess` - Postprocessing Functions
4539
Used to interpolate, plot, and summarize the results of the simulations.
4640

4741
### `utils` - Utility Functions
4842
This folder includes functions for converting between coordinate frames, computing orbital elements, and other miscellaneous functions.
4943

44+
### `scripts` - Case Files
45+
Various simulation cases to run.
46+
5047
## Usage
5148
1. Run one of the mission cases inside `scripts`.
5249
2. Wait for the sim to finish. Then, run `postprocess` to show plots.
50+
3. Data will be saved to the `outputs` folder.
5351

5452
## Code Formatting
5553
Code is formatted using [MBeautifier](https://github.com/davidvarga/MBeautifier).

steering/q_law/lyapunov_steering.m

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,16 @@
2020

2121
% Calculate penalty and "classic" components separately
2222
[P, dPdoe] = penalty(y, cfg.penalty_param, cfg.min_pe);
23-
Xi_penalty = dPdoe .* ((oe - oe_hat) ./ d_oe_max).^2;
24-
Xi_classic = 2 .* (oe - oe_hat) ./ d_oe_max;
23+
Xi_P = dPdoe .* ((oe - oe_hat) ./ d_oe_max).^2;
24+
Xi_E = 2 .* (oe - oe_hat) ./ d_oe_max;
2525
w_p = cfg.penalty_weight;
2626

2727
% Bring together the components
28-
d_oe_d_F = A(1:5, :);
29-
Xi = cfg.guidance_weights .* S .* (w_p * Xi_penalty + (1 + w_p * P) .* Xi_classic);
30-
31-
d_Gamma_d_F = d_oe_d_F.' * Xi;
32-
33-
% Be careful on ordering; GVEs are in r,t,n, but D1, D2, D3 are in t,r,n
34-
D1 = d_Gamma_d_F(2);
35-
D2 = d_Gamma_d_F(1);
36-
D3 = d_Gamma_d_F(3);
28+
A = A(1:5, :);
29+
D = A.' * (cfg.guidance_weights .* S .* (w_p * Xi_P + (1 + w_p * P) .* Xi_E));
3730

3831
% Optimal steering angles)
39-
alpha = atan2(-D2, -D1);
40-
beta = atan2(-D3, sqrt(D1.^2+D2.^2)); % atan2 for stability (0/0 case)
32+
alpha = atan2(-D(1), -D(2));
33+
beta = atan2(-D(3), norm(D(1:2))); % atan2 for stability (0/0 case)
4134

4235
end

0 commit comments

Comments
 (0)