-
Notifications
You must be signed in to change notification settings - Fork 0
/
Initial.m
35 lines (33 loc) · 885 Bytes
/
Initial.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
classdef Initial < handle
properties
lb
ub
xfunc
% these are APIs for the Guess() function to pull data out
r0_guess
v0_guess
lat
incT
end
methods
function x = LatLng_xfunc(obj, r0, v0)
x = [ r0 v0 ];
end
end
methods(Static)
function initial = LatLng(launcher, lat, lng);
body = launcher.body;
scales = launcher.scales;
auxdata = launcher.auxdata;
initial = Initial();
initial.lat = lat;
initial.incT = lat;
initial.r0_guess = auxdata.rbody * [ cos(lat)*cos(lng); cos(lat)*sin(lng); sin(lat) ];
initial.v0_guess = [ auxdata.omegaMatrix * initial.r0_guess ];
initial.lb = [ initial.r0_guess' initial.v0_guess' ];
initial.ub = [ initial.r0_guess' initial.v0_guess' ];
initial.xfunc = @initial.LatLng_xfunc;
launcher.initial = initial;
end
end
end