-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LVD: Added SoI transition capability to LVD.
- Loading branch information
Showing
17 changed files
with
271 additions
and
25 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
...nts/termCauses/@AbstractIntegrationTerminationCause/AbstractIntegrationTerminationCause.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
classdef(Abstract) AbstractIntegrationTerminationCause < matlab.mixin.SetGet & matlab.mixin.Heterogeneous | ||
%AbstractIntegrationTerminationCause Summary of this class goes here | ||
% Detailed explanation goes here | ||
|
||
properties | ||
|
||
end | ||
|
||
methods | ||
tf = shouldRestartIntegration(obj) | ||
|
||
newStateLogEntry = getRestartInitialState(obj, stateLogEntry) | ||
end | ||
end |
22 changes: 22 additions & 0 deletions
22
...designer/classes/Events/termCauses/@EventTermCondIntTermCause/EventTermCondIntTermCause.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
classdef EventTermCondIntTermCause < AbstractIntegrationTerminationCause | ||
%EventTermCondIntTermCause Summary of this class goes here | ||
% Detailed explanation goes here | ||
|
||
properties | ||
|
||
end | ||
|
||
methods | ||
function obj = EventTermCondIntTermCause() | ||
|
||
end | ||
|
||
function tf = shouldRestartIntegration(obj) | ||
tf = false; | ||
end | ||
|
||
function newStateLogEntry = getRestartInitialState(obj, stateLogEntry) | ||
newStateLogEntry = stateLogEntry; %should probably never be called | ||
end | ||
end | ||
end |
22 changes: 22 additions & 0 deletions
22
...gner/classes/Events/termCauses/@MaxEventSimTimeIntTermCause/MaxEventSimTimeIntTermCause.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
classdef MaxEventSimTimeIntTermCause < AbstractIntegrationTerminationCause | ||
%MaxEventSimTimeIntTermCause Summary of this class goes here | ||
% Detailed explanation goes here | ||
|
||
properties | ||
|
||
end | ||
|
||
methods | ||
function obj = MaxEventSimTimeIntTermCause() | ||
|
||
end | ||
|
||
function tf = shouldRestartIntegration(obj) | ||
tf = false; | ||
end | ||
|
||
function newStateLogEntry = getRestartInitialState(obj, stateLogEntry) | ||
newStateLogEntry = stateLogEntry; %should probably never be called | ||
end | ||
end | ||
end |
22 changes: 22 additions & 0 deletions
22
...cle_designer/classes/Events/termCauses/@MinAltitudeIntTermCause/MinAltitudeIntTermCause.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
classdef MinAltitudeIntTermCause < AbstractIntegrationTerminationCause | ||
%MinAltitudeIntTermCause Summary of this class goes here | ||
% Detailed explanation goes here | ||
|
||
properties | ||
|
||
end | ||
|
||
methods | ||
function obj = MinAltitudeIntTermCause() | ||
|
||
end | ||
|
||
function tf = shouldRestartIntegration(obj) | ||
tf = false; | ||
end | ||
|
||
function newStateLogEntry = getRestartInitialState(obj, stateLogEntry) | ||
newStateLogEntry = stateLogEntry; %should probably never be called | ||
end | ||
end | ||
end |
43 changes: 43 additions & 0 deletions
43
.../classes/Events/termCauses/@SoITransitionDownIntTermCause/SoITransitionDownIntTermCause.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
classdef SoITransitionDownIntTermCause < AbstractIntegrationTerminationCause | ||
%SoITransitionDownIntTermCause Summary of this class goes here | ||
% Detailed explanation goes here | ||
|
||
properties | ||
fromBody(1,1) KSPTOT_BodyInfo | ||
toBody(1,1) KSPTOT_BodyInfo | ||
celBodyData struct | ||
end | ||
|
||
methods | ||
function obj = SoITransitionDownIntTermCause(fromBody, toBody, celBodyData) | ||
obj.fromBody = fromBody; | ||
obj.toBody = toBody; | ||
obj.celBodyData = celBodyData; | ||
end | ||
|
||
function tf = shouldRestartIntegration(obj) | ||
tf = true; | ||
end | ||
|
||
function newStateLogEntry = getRestartInitialState(obj, stateLogEntry) | ||
% bodyInfo = stateLogEntry.centralBody; | ||
ut = stateLogEntry.time; | ||
rVect = reshape(stateLogEntry.position,1,3); | ||
vVect = reshape(stateLogEntry.velocity,1,3); | ||
|
||
[rVectDown, vVectDown] = convertRVVectOnDownwardsSoITransition(obj.toBody, obj.celBodyData, ut, rVect, vVect); | ||
|
||
dcm = stateLogEntry.attitude.dcm; | ||
|
||
newStateLogEntry = stateLogEntry.deepCopy(); | ||
newStateLogEntry.position = rVectDown; | ||
newStateLogEntry.velocity = vVectDown; | ||
newStateLogEntry.centralBody = obj.toBody; | ||
newStateLogEntry.steeringModel = stateLogEntry.steeringModel.deepCopy(); | ||
|
||
newStateLogEntry.steeringModel.setContinuityTerms(true, true, true); | ||
newStateLogEntry.steeringModel.setConstsFromDcmAndContinuitySettings(dcm, ut, rVectDown, vVectDown, obj.toBody); | ||
newStateLogEntry.steeringModel.setT0(ut); | ||
end | ||
end | ||
end |
43 changes: 43 additions & 0 deletions
43
...gner/classes/Events/termCauses/@SoITransitionUpIntTermCause/SoITransitionUpIntTermCause.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
classdef SoITransitionUpIntTermCause < AbstractIntegrationTerminationCause | ||
%SoITransitionUpIntTermCause Summary of this class goes here | ||
% Detailed explanation goes here | ||
|
||
properties | ||
fromBody(1,1) KSPTOT_BodyInfo | ||
toBody KSPTOT_BodyInfo | ||
celBodyData struct | ||
end | ||
|
||
methods | ||
function obj = SoITransitionUpIntTermCause(fromBody, toBody, celBodyData) | ||
obj.fromBody = fromBody; | ||
obj.toBody = toBody; | ||
obj.celBodyData = celBodyData; | ||
end | ||
|
||
function tf = shouldRestartIntegration(obj) | ||
tf = true; | ||
end | ||
|
||
function newStateLogEntry = getRestartInitialState(obj, stateLogEntry) | ||
bodyInfo = stateLogEntry.centralBody; | ||
ut = stateLogEntry.time; | ||
rVect = reshape(stateLogEntry.position,1,3); | ||
vVect = reshape(stateLogEntry.velocity,1,3); | ||
|
||
[rVectUp, vVectUp] = convertRVVectOnUpwardsSoITransition(bodyInfo, obj.celBodyData, ut, rVect, vVect); | ||
|
||
dcm = stateLogEntry.attitude.dcm; | ||
|
||
newStateLogEntry = stateLogEntry.deepCopy(); | ||
newStateLogEntry.position = rVectUp; | ||
newStateLogEntry.velocity = vVectUp; | ||
newStateLogEntry.centralBody = obj.toBody; | ||
newStateLogEntry.steeringModel = stateLogEntry.steeringModel.deepCopy(); | ||
|
||
newStateLogEntry.steeringModel.setContinuityTerms(true, true, true); | ||
newStateLogEntry.steeringModel.setConstsFromDcmAndContinuitySettings(dcm, ut, rVectUp, vVectUp, obj.toBody); | ||
newStateLogEntry.steeringModel.setT0(ut); | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.