-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrun_OITS.m
65 lines (41 loc) · 1.52 KB
/
run_OITS.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
addpath Bodies;
addpath Transfers;
addpath Transfers/Gravity_Assist;
addpath Transfers/Gravity_Assist/With_Planetary_Encounter_Dynamics;
% Astronomical Unit in Metres
AU = 149597870700;
% Create Project to Work on in OITS
global This;
This = Project;
This.Body_Select=Body(This.Max_NBody);
This.NBody_List=0;
% Initialize NLopt Optimization Software
addpath('thirdparty/NLOPT/matlab');
addpath('thirdparty/NLOPT/');
mex -output thirdparty/NLOPT/nlopt_optimize -Lthirdparty/NLOPT -lnlopt-0 -Ithirdparty/NLOPT/ thirdparty/NLOPT/matlab/nlopt_optimize.c
% Use Default Name and BSP file (Binary SPK file from NASA)
This.name = 'Test';
This.BSP = 'thirdparty/SPICE/de430.bsp';
% Initialize Pointer to List of Bodies
global Body_pointer;
Body_pointer=1;
This.Body_Number=Body_pointer;
This = This.Initialize_SPICE;
This = This.Get_SPICE_List(This.BSP);
This = This.Add_Intermediate_Point;
This = This.Add_Fixed_Point;
This = This.Add_Custom_Body;
This = This.Get_SPICE_List('thirdparty/SPICE/1000012.bsp');
This = This.Get_SPICE_List('thirdparty/SPICE/lutetia.bsp');
This = This.Get_SPICE_List('thirdparty/SPICE/steins.bsp');
This = This.Get_SPICE_List('thirdparty/SPICE/extrasolar.bsp');
This = This.Get_SPICE_List('thirdparty/SPICE/101955.bsp');
This = This.Merge_Body_Data;
% Initialize Selected Body List to First of the Bodies Available
This.Body_Select(1)=This.Body_List(1);
global fOITS;
fOITS=figure(OITS);
% txt=uicontrol(f,'Style','text','Position', [150 10 250 40],'String',This.name);
uiwait(fOITS);
This
%f.Visible='on';