-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
91 lines (59 loc) · 108 KB
/
index.html
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Orbital Parameters Visualization</title>
<LINK href='style.css' rel='stylesheet' type='text/css'>
<script type="text/javascript" src="https://cdn.bokeh.org/bokeh/release/bokeh-2.2.3.min.js" integrity="sha384-T2yuo9Oe71Cz/I4X9Ac5+gpEa5a8PpJCDlqKYO0CfAuEszu1JrXLl8YugMqYe3sM" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.2.3.min.js" integrity="sha384-98GDGJ0kOMCUMUePhksaQ/GYgB3+NH9h996V88sh3aOiUNX3N+fLXAtry6xctSZ6" crossorigin="anonymous"></script>
<script type="text/javascript">
Bokeh.set_log_level("info");
</script>
<script src="script.js"></script>
</head>
<body>
<div class="bk-root" id="c76ba1a9-3fc3-45ca-a6ea-5fd2ae8cd12b" data-root-id="1354"></div>
<script type="application/json" id="1679">
{"527ed65a-b75a-4347-819f-837373e3ac3e":{"roots":{"references":[{"attributes":{},"id":"1333","type":"BasicTickFormatter"},{"attributes":{"end_angle":{"field":"omega","units":"rad"},"fill_alpha":{"value":0.1},"fill_color":"rgb(60, 145, 230)","inner_radius":{"units":"data","value":8000},"line_alpha":{"value":0.1},"line_color":"rgb(60, 145, 230)","outer_radius":{"units":"data","value":10000},"start_angle":{"units":"rad","value":0},"x":{"value":0},"y":{"value":0}},"id":"1102","type":"AnnularWedge"},{"attributes":{"data_source":{"id":"1005"},"glyph":{"id":"1248"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1249"},"selection_glyph":null,"view":{"id":"1246"}},"id":"1250","type":"GlyphRenderer"},{"attributes":{},"id":"1335","type":"BasicTickFormatter"},{"attributes":{"base":{"field":"x","units":"data"},"fill_alpha":0.5,"fill_color":"silver","level":"underlay","line_color":"silver","lower":{"field":"lower","units":"data"},"source":{"id":"1008"},"upper":{"field":"upper","units":"data"}},"id":"1075","type":"Band"},{"attributes":{"data_source":{"id":"1006"},"glyph":{"id":"1151"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1152"},"selection_glyph":null,"view":{"id":"1154"}},"id":"1153","type":"GlyphRenderer"},{"attributes":{"logo":null,"toolbars":[{"id":"1195"},{"id":"1239"},{"id":"1058"},{"id":"1138"}]},"id":"1348","type":"ProxyToolbar"},{"attributes":{"base":{"field":"x","units":"data"},"fill_alpha":0.5,"fill_color":"silver","level":"underlay","line_color":"silver","lower":{"field":"lower","units":"data"},"source":{"id":"1008"},"upper":{"field":"upper","units":"data"}},"id":"1155","type":"Band"},{"attributes":{"fill_color":{"value":"lightgray"},"line_color":{"value":"lightgray"},"size":{"units":"screen","value":5},"x":{"field":"x"},"y":{"field":"z"}},"id":"1248","type":"Circle"},{"attributes":{},"id":"1287","type":"UnionRenderers"},{"attributes":{"fill_color":{"value":"lightgray"},"line_color":{"value":"lightgray"},"size":{"units":"screen","value":5},"x":{"field":"x"},"y":{"field":"y"}},"id":"1067","type":"Circle"},{"attributes":{"source":{"id":"1006"}},"id":"1154","type":"CDSView"},{"attributes":{"toolbar":{"id":"1348"},"toolbar_location":"above"},"id":"1349","type":"ToolbarBox"},{"attributes":{"data_source":{"id":"1007"},"glyph":{"id":"1101"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1102"},"selection_glyph":null,"view":{"id":"1104"}},"id":"1103","type":"GlyphRenderer"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"lightgray"},"line_alpha":{"value":0.1},"line_color":{"value":"lightgray"},"size":{"units":"screen","value":5},"x":{"field":"x"},"y":{"field":"z"}},"id":"1249","type":"Circle"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":"rgb(228, 17, 63)","line_alpha":{"value":0.1},"line_color":"rgb(228, 17, 63)","size":{"units":"screen","value":10},"x":{"field":"x"},"y":{"field":"y"}},"id":"1152","type":"Circle"},{"attributes":{"base":{"field":"x","units":"data"},"fill_alpha":0.5,"fill_color":"silver","level":"underlay","line_color":"silver","lower":{"field":"lower","units":"data"},"source":{"id":"1008"},"upper":{"field":"upper","units":"data"}},"id":"1256","type":"Band"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"lightgray"},"line_alpha":{"value":0.1},"line_color":{"value":"lightgray"},"size":{"units":"screen","value":5},"x":{"field":"x"},"y":{"field":"y"}},"id":"1068","type":"Circle"},{"attributes":{"children":[{"id":"1349"},{"id":"1347"}]},"id":"1350","type":"Column"},{"attributes":{"data_source":{"id":"1001"},"glyph":{"id":"1067"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1068"},"selection_glyph":null,"view":{"id":"1065"}},"id":"1069","type":"GlyphRenderer"},{"attributes":{"fill_color":"grey","line_color":"grey","size":10},"id":"1157","type":"VeeHead"},{"attributes":{"data":{"x":{"__ndarray__":"AAAAAAAAAAA=","dtype":"float64","order":"little","shape":[1]},"y":{"__ndarray__":"AAAAAAAAAAA=","dtype":"float64","order":"little","shape":[1]}},"selected":{"id":"1282"},"selection_policy":{"id":"1281"}},"id":"1002","type":"ColumnDataSource"},{"attributes":{"source":{"id":"1005"}},"id":"1200","type":"CDSView"},{"attributes":{"fill_color":"rgb(228, 17, 63)","line_color":"rgb(228, 17, 63)","size":{"units":"screen","value":10},"x":{"field":"x"},"y":{"field":"z"}},"id":"1252","type":"Circle"},{"attributes":{"sizing_mode":"stretch_width","text":"\n<h1>Orbit Visualization</h1>\n<p>A dashed line means the orbit is below the plane of the screen.</p>\n"},"id":"1351","type":"Div"},{"attributes":{"source":{"id":"1006"}},"id":"1255","type":"CDSView"},{"attributes":{"line_alpha":0.1,"line_color":"lightgray","line_dash":[6],"line_width":3,"x":{"field":"x"},"y":{"field":"y"}},"id":"1061","type":"Line"},{"attributes":{"css_classes":["update_button"],"height":1,"icon":null,"js_event_callbacks":{"button_click":[{"id":"1353"}]},"label":"Update","width":1},"id":"1352","type":"Button"},{"attributes":{"data_source":{"id":"1001"},"glyph":{"id":"1060"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1061"},"selection_glyph":null,"view":{"id":"1063"}},"id":"1062","type":"GlyphRenderer"},{"attributes":{"end":{"id":"1157"},"line_color":{"value":"grey"},"line_width":{"value":3},"source":null,"start":null,"x_end":{"value":80000},"x_start":{"value":0},"y_end":{"value":0},"y_start":{"value":0}},"id":"1158","type":"Arrow"},{"attributes":{"data_source":{"id":"1006"},"glyph":{"id":"1252"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1253"},"selection_glyph":null,"view":{"id":"1255"}},"id":"1254","type":"GlyphRenderer"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":"rgb(228, 17, 63)","line_alpha":{"value":0.1},"line_color":"rgb(228, 17, 63)","size":{"units":"screen","value":10},"x":{"field":"x"},"y":{"field":"z"}},"id":"1253","type":"Circle"},{"attributes":{"source":{"id":"1002"}},"id":"1074","type":"CDSView"},{"attributes":{"fill_color":"rgb(228, 17, 63)","line_color":"rgb(228, 17, 63)","size":{"units":"screen","value":10},"x":{"field":"x"},"y":{"field":"y"}},"id":"1071","type":"Circle"},{"attributes":{"args":{"N":360,"anomaly":{"id":"1034"},"aop":{"id":"1019"},"apsides_in_orbital_plane":{"id":"1003"},"eccentricity":{"id":"1014"},"inclination":{"id":"1024"},"nodes_in_equatorial_plane":{"id":"1004"},"orbit_3d":{"id":"1005"},"orbit_description_div":{"id":"1268"},"orbit_shape":{"id":"1001"},"orbital_parameters":{"id":"1007"},"position_3d":{"id":"1006"},"position_in_orbital_plane":{"id":"1002"},"raan":{"id":"1029"},"sma":{"id":"1009"}},"code":"const a = sma.value,\n e = eccentricity.value,\n p = a * (1 - e * e),\n omega = (aop.value * window.Math.PI) / 180,\n inc = (inclination.value * window.Math.PI) / 180,\n Gomega = (raan.value * window.Math.PI) / 180,\n true_anomaly = (anomaly.value * window.Math.PI) / 180,\n mu = 3.986004418e14,\n earth_radius = 6378,\n x_shape_array = orbit_shape.data[\"x\"],\n y_shape_array = orbit_shape.data[\"y\"],\n x_sat_in_orbital_plane = position_in_orbital_plane.data[\"x\"],\n y_sat_in_orbital_plane = position_in_orbital_plane.data[\"y\"],\n x_sat = position_3d.data[\"x\"],\n y_sat = position_3d.data[\"y\"],\n z_sat = position_3d.data[\"z\"],\n x_array = orbit_3d.data[\"x\"],\n y_array = orbit_3d.data[\"y\"],\n z_array = orbit_3d.data[\"z\"],\n x_apsides_in_orbital_plane = apsides_in_orbital_plane.data[\"x\"],\n y_apsides_in_orbital_plane = apsides_in_orbital_plane.data[\"y\"],\n x_nodes_in_equatorial_plane = nodes_in_equatorial_plane.data[\"x\"],\n y_nodes_in_equatorial_plane = nodes_in_equatorial_plane.data[\"y\"];\n\nlet cos_omega = window.Math.cos(omega);\nlet sin_omega = window.Math.sin(omega);\nlet cos_Gomega = window.Math.cos(Gomega);\nlet sin_Gomega = window.Math.sin(Gomega);\nlet cos_i = window.Math.cos(inc);\nlet sin_i = window.Math.sin(inc);\n\nfunction radius(cosinus_v) {\n return p / (1 + e * cosinus_v);\n}\n\nfunction compute_orbit(v) {\n let cos_v = window.Math.cos(v);\n let sin_v = window.Math.sin(v);\n let r = radius(cos_v);\n\n let x_shape = r * cos_omega * cos_v - r * sin_omega * sin_v;\n let y_shape = r * sin_omega * cos_v + r * cos_omega * sin_v;\n\n let x_incli_only = x_shape;\n let y_incli_only = y_shape * cos_i;\n let z_incli_only = y_shape * sin_i;\n\n let x = x_incli_only * cos_Gomega - y_incli_only * sin_Gomega;\n let y = x_incli_only * sin_Gomega + y_incli_only * cos_Gomega;\n let z = z_incli_only;\n return {\n x_shape,\n y_shape,\n x,\n y,\n z,\n };\n}\n\nfor (let i = 0; i < N; i++) {\n let v = (i / (N - 1)) * 2 * window.Math.PI;\n let results = compute_orbit(v);\n x_shape_array[i] = results.x_shape;\n y_shape_array[i] = results.y_shape;\n x_array[i] = results.x;\n y_array[i] = results.y;\n z_array[i] = results.z;\n}\n\nx_apsides_in_orbital_plane[0] = a * (1 - e) * cos_omega;\ny_apsides_in_orbital_plane[0] = a * (1 - e) * sin_omega;\nx_apsides_in_orbital_plane[1] = -a * (1 + e) * cos_omega;\ny_apsides_in_orbital_plane[1] = -a * (1 + e) * sin_omega;\n\nlet radius_ascending_node = radius(window.Math.cos(2 * window.Math.PI - omega));\nx_nodes_in_equatorial_plane[0] = radius_ascending_node * cos_Gomega;\ny_nodes_in_equatorial_plane[0] = radius_ascending_node * sin_Gomega;\nlet radius_descending_node = radius(window.Math.cos(window.Math.PI - omega));\nx_nodes_in_equatorial_plane[1] = -radius_descending_node * cos_Gomega;\ny_nodes_in_equatorial_plane[1] = -radius_descending_node * sin_Gomega;\n\nlet sat_results = compute_orbit(true_anomaly);\nx_sat_in_orbital_plane[0] = sat_results.x_shape;\ny_sat_in_orbital_plane[0] = sat_results.y_shape;\nx_sat[0] = sat_results.x;\ny_sat[0] = sat_results.y;\nz_sat[0] = sat_results.z;\n\norbit_shape.change.emit();\norbit_3d.change.emit();\nposition_in_orbital_plane.change.emit();\nposition_3d.change.emit();\napsides_in_orbital_plane.change.emit();\nnodes_in_equatorial_plane.change.emit();\n\nlet orbital_period_hours =\n (2 * window.Math.PI * window.Math.sqrt((a * 1000) ** 3 / mu)) / 3600;\nlet apogee_altitude = a * (1 + e) - earth_radius;\nlet perigee_altitude = a * (1 - e) - earth_radius;\n\norbit_description_div.text = `\n <h2>Orbital Data</h2>\n <ul>\n <li>Orbital period: ${orbital_period_hours.toFixed(3)} hours</li>\n <li>Apogee altitude: ${apogee_altitude.toFixed(0)} kilometers</li>\n <li>Perigee altitude: ${perigee_altitude.toFixed(0)} kilometers</li>\n </ul>`;\n\nlet x_center_in_orbital_plane =\n (x_apsides_in_orbital_plane[0] + x_apsides_in_orbital_plane[1]) / 2;\nlet y_center_in_orbital_plane =\n (y_apsides_in_orbital_plane[0] + y_apsides_in_orbital_plane[1]) / 2;\norbital_parameters.data[\"a_x_start\"][0] = x_center_in_orbital_plane;\norbital_parameters.data[\"a_x_end\"][0] = x_apsides_in_orbital_plane[1];\norbital_parameters.data[\"a_y_start\"][0] = y_center_in_orbital_plane;\norbital_parameters.data[\"a_y_end\"][0] = y_apsides_in_orbital_plane[1];\norbital_parameters.data[\"a_label_x\"][0] =\n (orbital_parameters.data[\"a_x_start\"][0] +\n orbital_parameters.data[\"a_x_end\"][0]) /\n 2;\norbital_parameters.data[\"a_label_y\"][0] =\n (orbital_parameters.data[\"a_y_start\"][0] +\n orbital_parameters.data[\"a_y_end\"][0]) /\n 2;\norbital_parameters.data[\"e\"][0] = e;\norbital_parameters.data[\"e_label_x\"][0] = x_center_in_orbital_plane / 2;\norbital_parameters.data[\"e_label_y\"][0] = y_center_in_orbital_plane / 2;\norbital_parameters.data[\"i\"][0] = inc;\norbital_parameters.data[\"omega\"][0] = omega;\norbital_parameters.data[\"omega_label_x\"][0] = 15e3 * window.Math.cos(omega / 2);\norbital_parameters.data[\"omega_label_y\"][0] = 15e3 * window.Math.sin(omega / 2);\norbital_parameters.data[\"Gomega\"][0] = Gomega;\norbital_parameters.data[\"Gomega_label_x\"][0] =\n 15e3 * window.Math.cos(Gomega / 2);\norbital_parameters.data[\"Gomega_label_y\"][0] =\n 15e3 * window.Math.sin(Gomega / 2);\norbital_parameters.data[\"v_start\"][0] = omega;\norbital_parameters.data[\"v_end\"][0] = omega + true_anomaly;\norbital_parameters.data[\"v_label_x\"][0] =\n 17e3 * window.Math.cos(omega + true_anomaly / 2);\norbital_parameters.data[\"v_label_y\"][0] =\n 17e3 * window.Math.sin(omega + true_anomaly / 2);\norbital_parameters.change.emit();\n"},"id":"1353","type":"CustomJS"},{"attributes":{"text":"Vernal Equinox","text_color":"grey","text_font_size":"8pt","x":40000.0,"y":-8000.0},"id":"1160","type":"Label"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":"rgb(228, 17, 63)","line_alpha":{"value":0.1},"line_color":"rgb(228, 17, 63)","size":{"units":"screen","value":10},"x":{"field":"x"},"y":{"field":"y"}},"id":"1072","type":"Circle"},{"attributes":{"data_source":{"id":"1002"},"glyph":{"id":"1071"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1072"},"selection_glyph":null,"view":{"id":"1074"}},"id":"1073","type":"GlyphRenderer"},{"attributes":{"line_alpha":0.1,"line_color":"lightgray","line_dash":[6],"line_width":3,"x":{"field":"y"},"y":{"field":"z"}},"id":"1198","type":"Line"},{"attributes":{"fill_color":"grey","line_color":"grey","size":10},"id":"1258","type":"VeeHead"},{"attributes":{"data":{"labels":["Asc. Node","Desc. Node"],"x":{"__ndarray__":"AAAAAAAAAAAAAAAAAAAAAA==","dtype":"float64","order":"little","shape":[2]},"y":{"__ndarray__":"AAAAAAAAAAAAAAAAAAAAAA==","dtype":"float64","order":"little","shape":[2]}},"selected":{"id":"1288"},"selection_policy":{"id":"1287"}},"id":"1004","type":"ColumnDataSource"},{"attributes":{},"id":"1286","type":"Selection"},{"attributes":{"data_source":{"id":"1007"},"glyph":{"id":"1162"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1163"},"selection_glyph":null,"view":{"id":"1165"}},"id":"1164","type":"GlyphRenderer"},{"attributes":{"fill_color":"rgb(240, 31, 255)","line_color":"rgb(240, 31, 255)","size":10},"id":"1077","type":"VeeHead"},{"attributes":{"end_angle":{"field":"Gomega","units":"rad"},"fill_alpha":{"value":0.1},"fill_color":"rgb(240, 31, 255)","inner_radius":{"units":"data","value":8000},"line_alpha":{"value":0.1},"line_color":"rgb(240, 31, 255)","outer_radius":{"units":"data","value":10000},"start_angle":{"units":"rad","value":0},"x":{"value":0},"y":{"value":0}},"id":"1163","type":"AnnularWedge"},{"attributes":{"end":{"id":"1258"},"line_color":{"value":"grey"},"line_width":{"value":3},"source":null,"start":null,"x_end":{"value":0},"x_start":{"value":0},"y_end":{"value":80000},"y_start":{"value":0}},"id":"1259","type":"Arrow"},{"attributes":{"active_drag":"auto","active_inspect":"auto","active_multi":null,"active_scroll":"auto","active_tap":"auto"},"id":"1195","type":"Toolbar"},{"attributes":{"text":"North","text_color":"grey","text_font_size":"8pt","x":4000.0,"y":64000.0},"id":"1261","type":"Label"},{"attributes":{"children":[{"id":"1351"},{"id":"1352"},{"id":"1350"}]},"id":"1354","type":"Column"},{"attributes":{"end":{"id":"1077"},"line_color":"rgb(240, 31, 255)","line_width":{"value":3},"source":null,"start":null,"x_end":{"value":80000},"x_start":{"value":0},"y_end":{"value":0},"y_start":{"value":0}},"id":"1078","type":"Arrow"},{"attributes":{"source":{"id":"1007"}},"id":"1165","type":"CDSView"},{"attributes":{"source":{"id":"1007"},"text":{"field":"Gomega_text"},"text_align":"center","text_baseline":"middle","text_color":"rgb(240, 31, 255)","x":{"field":"Gomega_label_x"},"y":{"field":"Gomega_label_y"}},"id":"1166","type":"LabelSet"},{"attributes":{"text":"Ascending Node","text_color":"rgb(240, 31, 255)","text_font_size":"8pt","x":40000.0,"y":-8000.0},"id":"1080","type":"Label"},{"attributes":{"fill_color":"grey","line_color":"grey","size":10},"id":"1262","type":"VeeHead"},{"attributes":{"end":{"id":"1262"},"line_color":{"value":"grey"},"line_width":{"value":3},"source":null,"start":null,"x_end":{"value":80000},"x_start":{"value":0},"y_end":{"value":0},"y_start":{"value":0}},"id":"1263","type":"Arrow"},{"attributes":{"end_angle":{"field":"Gomega","units":"rad"},"fill_color":"rgb(240, 31, 255)","inner_radius":{"units":"data","value":8000},"line_color":"rgb(240, 31, 255)","outer_radius":{"units":"data","value":10000},"start_angle":{"units":"rad","value":0},"x":{"value":0},"y":{"value":0}},"id":"1162","type":"AnnularWedge"},{"attributes":{"data":{"x":{"__ndarray__":"AAAAAAAAAAAAAAAAAAAAAA==","dtype":"float64","order":"little","shape":[2]},"y":{"__ndarray__":"AAAAAAAAAAAAAAAAAAAAAA==","dtype":"float64","order":"little","shape":[2]}},"selected":{"id":"1286"},"selection_policy":{"id":"1285"}},"id":"1003","type":"ColumnDataSource"},{"attributes":{"code":"\n var indices = [];\n\n for (var i = 0; i < source.get_length(); i++){\n if (source.data['x'][i] >= 0){\n indices.push(true);\n } else {\n indices.push(false);\n }\n }\n return indices;\n "},"id":"1201","type":"CustomJSFilter"},{"attributes":{"data_source":{"id":"1005"},"glyph":{"id":"1197"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1198"},"selection_glyph":null,"view":{"id":"1200"}},"id":"1199","type":"GlyphRenderer"},{"attributes":{"text":"Vernal Equinox","text_color":"grey","text_font_size":"8pt","x":40000.0,"y":-8000.0},"id":"1265","type":"Label"},{"attributes":{"source":{"id":"1007"},"text":{"field":"e_text"},"text_align":"center","text_baseline":"middle","text_color":"rgb(77, 238, 234)","x":{"field":"e_label_x"},"x_offset":{"value":10},"y":{"field":"e_label_y"},"y_offset":{"value":10}},"id":"1098","type":"LabelSet"},{"attributes":{"line_color":"rgb(116, 238, 21)","line_dash":[6],"location":0},"id":"1266","type":"Span"},{"attributes":{"data_source":{"id":"1003"},"glyph":{"id":"1082"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1083"},"selection_glyph":null,"view":{"id":"1085"}},"id":"1084","type":"GlyphRenderer"},{"attributes":{"text":"Equator","text_color":"rgb(116, 238, 21)","text_font_size":"8pt","x":-72000.0,"y":2400.0},"id":"1267","type":"Label"},{"attributes":{"data_source":{"id":"1004"},"glyph":{"id":"1169"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1170"},"selection_glyph":null,"view":{"id":"1172"}},"id":"1171","type":"GlyphRenderer"},{"attributes":{"line_alpha":0.1,"line_color":"rgb(60, 145, 230)","line_width":3,"x":{"field":"x"},"y":{"field":"y"}},"id":"1083","type":"Line"},{"attributes":{"source":{"id":"1003"}},"id":"1085","type":"CDSView"},{"attributes":{"line_alpha":0.1,"line_color":"rgb(240, 31, 255)","line_width":3,"x":{"field":"x"},"y":{"field":"y"}},"id":"1170","type":"Line"},{"attributes":{"line_alpha":0.3,"line_color":"rgb(60, 145, 230)","line_width":3,"x":{"field":"x"},"y":{"field":"y"}},"id":"1082","type":"Line"},{"attributes":{"source":{"id":"1004"}},"id":"1172","type":"CDSView"},{"attributes":{"css_classes":["orbit-description"],"text":"\n<h2>Orbital Data</h2>\n<p>Please manipulate the sliders to update this data.</p>\n"},"id":"1268","type":"Div"},{"attributes":{"line_alpha":0.3,"line_color":"rgb(240, 31, 255)","line_width":3,"x":{"field":"x"},"y":{"field":"y"}},"id":"1169","type":"Line"},{"attributes":{},"id":"1285","type":"UnionRenderers"},{"attributes":{"source":{"id":"1004"},"text":{"field":"labels"},"text_baseline":"middle","text_color":"rgb(240, 31, 255)","text_font_size":{"value":"8pt"},"x":{"field":"x"},"x_offset":{"value":10},"y":{"field":"y"}},"id":"1173","type":"LabelSet"},{"attributes":{"args":{"N":360,"anomaly":{"id":"1034"},"aop":{"id":"1019"},"apsides_in_orbital_plane":{"id":"1003"},"eccentricity":{"id":"1014"},"inclination":{"id":"1024"},"nodes_in_equatorial_plane":{"id":"1004"},"orbit_3d":{"id":"1005"},"orbit_description_div":{"id":"1268"},"orbit_shape":{"id":"1001"},"orbital_parameters":{"id":"1007"},"position_3d":{"id":"1006"},"position_in_orbital_plane":{"id":"1002"},"raan":{"id":"1029"},"sma":{"id":"1009"}},"code":"const a = sma.value,\n e = eccentricity.value,\n p = a * (1 - e * e),\n omega = (aop.value * window.Math.PI) / 180,\n inc = (inclination.value * window.Math.PI) / 180,\n Gomega = (raan.value * window.Math.PI) / 180,\n true_anomaly = (anomaly.value * window.Math.PI) / 180,\n mu = 3.986004418e14,\n earth_radius = 6378,\n x_shape_array = orbit_shape.data[\"x\"],\n y_shape_array = orbit_shape.data[\"y\"],\n x_sat_in_orbital_plane = position_in_orbital_plane.data[\"x\"],\n y_sat_in_orbital_plane = position_in_orbital_plane.data[\"y\"],\n x_sat = position_3d.data[\"x\"],\n y_sat = position_3d.data[\"y\"],\n z_sat = position_3d.data[\"z\"],\n x_array = orbit_3d.data[\"x\"],\n y_array = orbit_3d.data[\"y\"],\n z_array = orbit_3d.data[\"z\"],\n x_apsides_in_orbital_plane = apsides_in_orbital_plane.data[\"x\"],\n y_apsides_in_orbital_plane = apsides_in_orbital_plane.data[\"y\"],\n x_nodes_in_equatorial_plane = nodes_in_equatorial_plane.data[\"x\"],\n y_nodes_in_equatorial_plane = nodes_in_equatorial_plane.data[\"y\"];\n\nlet cos_omega = window.Math.cos(omega);\nlet sin_omega = window.Math.sin(omega);\nlet cos_Gomega = window.Math.cos(Gomega);\nlet sin_Gomega = window.Math.sin(Gomega);\nlet cos_i = window.Math.cos(inc);\nlet sin_i = window.Math.sin(inc);\n\nfunction radius(cosinus_v) {\n return p / (1 + e * cosinus_v);\n}\n\nfunction compute_orbit(v) {\n let cos_v = window.Math.cos(v);\n let sin_v = window.Math.sin(v);\n let r = radius(cos_v);\n\n let x_shape = r * cos_omega * cos_v - r * sin_omega * sin_v;\n let y_shape = r * sin_omega * cos_v + r * cos_omega * sin_v;\n\n let x_incli_only = x_shape;\n let y_incli_only = y_shape * cos_i;\n let z_incli_only = y_shape * sin_i;\n\n let x = x_incli_only * cos_Gomega - y_incli_only * sin_Gomega;\n let y = x_incli_only * sin_Gomega + y_incli_only * cos_Gomega;\n let z = z_incli_only;\n return {\n x_shape,\n y_shape,\n x,\n y,\n z,\n };\n}\n\nfor (let i = 0; i < N; i++) {\n let v = (i / (N - 1)) * 2 * window.Math.PI;\n let results = compute_orbit(v);\n x_shape_array[i] = results.x_shape;\n y_shape_array[i] = results.y_shape;\n x_array[i] = results.x;\n y_array[i] = results.y;\n z_array[i] = results.z;\n}\n\nx_apsides_in_orbital_plane[0] = a * (1 - e) * cos_omega;\ny_apsides_in_orbital_plane[0] = a * (1 - e) * sin_omega;\nx_apsides_in_orbital_plane[1] = -a * (1 + e) * cos_omega;\ny_apsides_in_orbital_plane[1] = -a * (1 + e) * sin_omega;\n\nlet radius_ascending_node = radius(window.Math.cos(2 * window.Math.PI - omega));\nx_nodes_in_equatorial_plane[0] = radius_ascending_node * cos_Gomega;\ny_nodes_in_equatorial_plane[0] = radius_ascending_node * sin_Gomega;\nlet radius_descending_node = radius(window.Math.cos(window.Math.PI - omega));\nx_nodes_in_equatorial_plane[1] = -radius_descending_node * cos_Gomega;\ny_nodes_in_equatorial_plane[1] = -radius_descending_node * sin_Gomega;\n\nlet sat_results = compute_orbit(true_anomaly);\nx_sat_in_orbital_plane[0] = sat_results.x_shape;\ny_sat_in_orbital_plane[0] = sat_results.y_shape;\nx_sat[0] = sat_results.x;\ny_sat[0] = sat_results.y;\nz_sat[0] = sat_results.z;\n\norbit_shape.change.emit();\norbit_3d.change.emit();\nposition_in_orbital_plane.change.emit();\nposition_3d.change.emit();\napsides_in_orbital_plane.change.emit();\nnodes_in_equatorial_plane.change.emit();\n\nlet orbital_period_hours =\n (2 * window.Math.PI * window.Math.sqrt((a * 1000) ** 3 / mu)) / 3600;\nlet apogee_altitude = a * (1 + e) - earth_radius;\nlet perigee_altitude = a * (1 - e) - earth_radius;\n\norbit_description_div.text = `\n <h2>Orbital Data</h2>\n <ul>\n <li>Orbital period: ${orbital_period_hours.toFixed(3)} hours</li>\n <li>Apogee altitude: ${apogee_altitude.toFixed(0)} kilometers</li>\n <li>Perigee altitude: ${perigee_altitude.toFixed(0)} kilometers</li>\n </ul>`;\n\nlet x_center_in_orbital_plane =\n (x_apsides_in_orbital_plane[0] + x_apsides_in_orbital_plane[1]) / 2;\nlet y_center_in_orbital_plane =\n (y_apsides_in_orbital_plane[0] + y_apsides_in_orbital_plane[1]) / 2;\norbital_parameters.data[\"a_x_start\"][0] = x_center_in_orbital_plane;\norbital_parameters.data[\"a_x_end\"][0] = x_apsides_in_orbital_plane[1];\norbital_parameters.data[\"a_y_start\"][0] = y_center_in_orbital_plane;\norbital_parameters.data[\"a_y_end\"][0] = y_apsides_in_orbital_plane[1];\norbital_parameters.data[\"a_label_x\"][0] =\n (orbital_parameters.data[\"a_x_start\"][0] +\n orbital_parameters.data[\"a_x_end\"][0]) /\n 2;\norbital_parameters.data[\"a_label_y\"][0] =\n (orbital_parameters.data[\"a_y_start\"][0] +\n orbital_parameters.data[\"a_y_end\"][0]) /\n 2;\norbital_parameters.data[\"e\"][0] = e;\norbital_parameters.data[\"e_label_x\"][0] = x_center_in_orbital_plane / 2;\norbital_parameters.data[\"e_label_y\"][0] = y_center_in_orbital_plane / 2;\norbital_parameters.data[\"i\"][0] = inc;\norbital_parameters.data[\"omega\"][0] = omega;\norbital_parameters.data[\"omega_label_x\"][0] = 15e3 * window.Math.cos(omega / 2);\norbital_parameters.data[\"omega_label_y\"][0] = 15e3 * window.Math.sin(omega / 2);\norbital_parameters.data[\"Gomega\"][0] = Gomega;\norbital_parameters.data[\"Gomega_label_x\"][0] =\n 15e3 * window.Math.cos(Gomega / 2);\norbital_parameters.data[\"Gomega_label_y\"][0] =\n 15e3 * window.Math.sin(Gomega / 2);\norbital_parameters.data[\"v_start\"][0] = omega;\norbital_parameters.data[\"v_end\"][0] = omega + true_anomaly;\norbital_parameters.data[\"v_label_x\"][0] =\n 17e3 * window.Math.cos(omega + true_anomaly / 2);\norbital_parameters.data[\"v_label_y\"][0] =\n 17e3 * window.Math.sin(omega + true_anomaly / 2);\norbital_parameters.change.emit();\n"},"id":"1269","type":"CustomJS"},{"attributes":{"data_source":{"id":"1007"},"glyph":{"id":"1087"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1088"},"selection_glyph":null,"view":{"id":"1090"}},"id":"1089","type":"GlyphRenderer"},{"attributes":{"angle":0.7853981633974483,"text":"Equatorial Plane","text_align":"center","text_color":"rgb(116, 238, 21)","text_font_size":"9pt","x":-56000.0,"y":56000.0},"id":"1175","type":"Label"},{"attributes":{},"id":"1282","type":"Selection"},{"attributes":{},"id":"1281","type":"UnionRenderers"},{"attributes":{"args":{"N":360,"anomaly":{"id":"1034"},"aop":{"id":"1019"},"apsides_in_orbital_plane":{"id":"1003"},"eccentricity":{"id":"1014"},"inclination":{"id":"1024"},"nodes_in_equatorial_plane":{"id":"1004"},"orbit_3d":{"id":"1005"},"orbit_description_div":{"id":"1268"},"orbit_shape":{"id":"1001"},"orbital_parameters":{"id":"1007"},"position_3d":{"id":"1006"},"position_in_orbital_plane":{"id":"1002"},"raan":{"id":"1029"},"sma":{"id":"1009"}},"code":"const a = sma.value,\n e = eccentricity.value,\n p = a * (1 - e * e),\n omega = (aop.value * window.Math.PI) / 180,\n inc = (inclination.value * window.Math.PI) / 180,\n Gomega = (raan.value * window.Math.PI) / 180,\n true_anomaly = (anomaly.value * window.Math.PI) / 180,\n mu = 3.986004418e14,\n earth_radius = 6378,\n x_shape_array = orbit_shape.data[\"x\"],\n y_shape_array = orbit_shape.data[\"y\"],\n x_sat_in_orbital_plane = position_in_orbital_plane.data[\"x\"],\n y_sat_in_orbital_plane = position_in_orbital_plane.data[\"y\"],\n x_sat = position_3d.data[\"x\"],\n y_sat = position_3d.data[\"y\"],\n z_sat = position_3d.data[\"z\"],\n x_array = orbit_3d.data[\"x\"],\n y_array = orbit_3d.data[\"y\"],\n z_array = orbit_3d.data[\"z\"],\n x_apsides_in_orbital_plane = apsides_in_orbital_plane.data[\"x\"],\n y_apsides_in_orbital_plane = apsides_in_orbital_plane.data[\"y\"],\n x_nodes_in_equatorial_plane = nodes_in_equatorial_plane.data[\"x\"],\n y_nodes_in_equatorial_plane = nodes_in_equatorial_plane.data[\"y\"];\n\nlet cos_omega = window.Math.cos(omega);\nlet sin_omega = window.Math.sin(omega);\nlet cos_Gomega = window.Math.cos(Gomega);\nlet sin_Gomega = window.Math.sin(Gomega);\nlet cos_i = window.Math.cos(inc);\nlet sin_i = window.Math.sin(inc);\n\nfunction radius(cosinus_v) {\n return p / (1 + e * cosinus_v);\n}\n\nfunction compute_orbit(v) {\n let cos_v = window.Math.cos(v);\n let sin_v = window.Math.sin(v);\n let r = radius(cos_v);\n\n let x_shape = r * cos_omega * cos_v - r * sin_omega * sin_v;\n let y_shape = r * sin_omega * cos_v + r * cos_omega * sin_v;\n\n let x_incli_only = x_shape;\n let y_incli_only = y_shape * cos_i;\n let z_incli_only = y_shape * sin_i;\n\n let x = x_incli_only * cos_Gomega - y_incli_only * sin_Gomega;\n let y = x_incli_only * sin_Gomega + y_incli_only * cos_Gomega;\n let z = z_incli_only;\n return {\n x_shape,\n y_shape,\n x,\n y,\n z,\n };\n}\n\nfor (let i = 0; i < N; i++) {\n let v = (i / (N - 1)) * 2 * window.Math.PI;\n let results = compute_orbit(v);\n x_shape_array[i] = results.x_shape;\n y_shape_array[i] = results.y_shape;\n x_array[i] = results.x;\n y_array[i] = results.y;\n z_array[i] = results.z;\n}\n\nx_apsides_in_orbital_plane[0] = a * (1 - e) * cos_omega;\ny_apsides_in_orbital_plane[0] = a * (1 - e) * sin_omega;\nx_apsides_in_orbital_plane[1] = -a * (1 + e) * cos_omega;\ny_apsides_in_orbital_plane[1] = -a * (1 + e) * sin_omega;\n\nlet radius_ascending_node = radius(window.Math.cos(2 * window.Math.PI - omega));\nx_nodes_in_equatorial_plane[0] = radius_ascending_node * cos_Gomega;\ny_nodes_in_equatorial_plane[0] = radius_ascending_node * sin_Gomega;\nlet radius_descending_node = radius(window.Math.cos(window.Math.PI - omega));\nx_nodes_in_equatorial_plane[1] = -radius_descending_node * cos_Gomega;\ny_nodes_in_equatorial_plane[1] = -radius_descending_node * sin_Gomega;\n\nlet sat_results = compute_orbit(true_anomaly);\nx_sat_in_orbital_plane[0] = sat_results.x_shape;\ny_sat_in_orbital_plane[0] = sat_results.y_shape;\nx_sat[0] = sat_results.x;\ny_sat[0] = sat_results.y;\nz_sat[0] = sat_results.z;\n\norbit_shape.change.emit();\norbit_3d.change.emit();\nposition_in_orbital_plane.change.emit();\nposition_3d.change.emit();\napsides_in_orbital_plane.change.emit();\nnodes_in_equatorial_plane.change.emit();\n\nlet orbital_period_hours =\n (2 * window.Math.PI * window.Math.sqrt((a * 1000) ** 3 / mu)) / 3600;\nlet apogee_altitude = a * (1 + e) - earth_radius;\nlet perigee_altitude = a * (1 - e) - earth_radius;\n\norbit_description_div.text = `\n <h2>Orbital Data</h2>\n <ul>\n <li>Orbital period: ${orbital_period_hours.toFixed(3)} hours</li>\n <li>Apogee altitude: ${apogee_altitude.toFixed(0)} kilometers</li>\n <li>Perigee altitude: ${perigee_altitude.toFixed(0)} kilometers</li>\n </ul>`;\n\nlet x_center_in_orbital_plane =\n (x_apsides_in_orbital_plane[0] + x_apsides_in_orbital_plane[1]) / 2;\nlet y_center_in_orbital_plane =\n (y_apsides_in_orbital_plane[0] + y_apsides_in_orbital_plane[1]) / 2;\norbital_parameters.data[\"a_x_start\"][0] = x_center_in_orbital_plane;\norbital_parameters.data[\"a_x_end\"][0] = x_apsides_in_orbital_plane[1];\norbital_parameters.data[\"a_y_start\"][0] = y_center_in_orbital_plane;\norbital_parameters.data[\"a_y_end\"][0] = y_apsides_in_orbital_plane[1];\norbital_parameters.data[\"a_label_x\"][0] =\n (orbital_parameters.data[\"a_x_start\"][0] +\n orbital_parameters.data[\"a_x_end\"][0]) /\n 2;\norbital_parameters.data[\"a_label_y\"][0] =\n (orbital_parameters.data[\"a_y_start\"][0] +\n orbital_parameters.data[\"a_y_end\"][0]) /\n 2;\norbital_parameters.data[\"e\"][0] = e;\norbital_parameters.data[\"e_label_x\"][0] = x_center_in_orbital_plane / 2;\norbital_parameters.data[\"e_label_y\"][0] = y_center_in_orbital_plane / 2;\norbital_parameters.data[\"i\"][0] = inc;\norbital_parameters.data[\"omega\"][0] = omega;\norbital_parameters.data[\"omega_label_x\"][0] = 15e3 * window.Math.cos(omega / 2);\norbital_parameters.data[\"omega_label_y\"][0] = 15e3 * window.Math.sin(omega / 2);\norbital_parameters.data[\"Gomega\"][0] = Gomega;\norbital_parameters.data[\"Gomega_label_x\"][0] =\n 15e3 * window.Math.cos(Gomega / 2);\norbital_parameters.data[\"Gomega_label_y\"][0] =\n 15e3 * window.Math.sin(Gomega / 2);\norbital_parameters.data[\"v_start\"][0] = omega;\norbital_parameters.data[\"v_end\"][0] = omega + true_anomaly;\norbital_parameters.data[\"v_label_x\"][0] =\n 17e3 * window.Math.cos(omega + true_anomaly / 2);\norbital_parameters.data[\"v_label_y\"][0] =\n 17e3 * window.Math.sin(omega + true_anomaly / 2);\norbital_parameters.change.emit();\n"},"id":"1270","type":"CustomJS"},{"attributes":{"line_alpha":{"value":0.1},"line_color":"rgb(255, 231, 0)","line_width":{"value":3},"x0":{"field":"a_x_start"},"x1":{"field":"a_x_end"},"y0":{"field":"a_y_start"},"y1":{"field":"a_y_end"}},"id":"1088","type":"Segment"},{"attributes":{"background_fill_color":"rgb(40, 40, 40)","below":[{"id":"1187"}],"border_fill_color":"rgb(72, 72, 72)","center":[{"id":"1190"},{"id":"1194"},{"id":"1212"},{"id":"1215"},{"id":"1217"},{"id":"1218"},{"id":"1219"}],"left":[{"id":"1191"}],"match_aspect":true,"outline_line_alpha":0,"plot_height":400,"plot_width":400,"renderers":[{"id":"1199"},{"id":"1206"},{"id":"1210"}],"title":{"id":"1177"},"toolbar":{"id":"1195"},"toolbar_location":null,"x_range":{"id":"1179"},"x_scale":{"id":"1183"},"y_range":{"id":"1181"},"y_scale":{"id":"1185"}},"id":"1176","subtype":"Figure","type":"Plot"},{"attributes":{"args":{"N":360,"anomaly":{"id":"1034"},"aop":{"id":"1019"},"apsides_in_orbital_plane":{"id":"1003"},"eccentricity":{"id":"1014"},"inclination":{"id":"1024"},"nodes_in_equatorial_plane":{"id":"1004"},"orbit_3d":{"id":"1005"},"orbit_description_div":{"id":"1268"},"orbit_shape":{"id":"1001"},"orbital_parameters":{"id":"1007"},"position_3d":{"id":"1006"},"position_in_orbital_plane":{"id":"1002"},"raan":{"id":"1029"},"sma":{"id":"1009"}},"code":"const a = sma.value,\n e = eccentricity.value,\n p = a * (1 - e * e),\n omega = (aop.value * window.Math.PI) / 180,\n inc = (inclination.value * window.Math.PI) / 180,\n Gomega = (raan.value * window.Math.PI) / 180,\n true_anomaly = (anomaly.value * window.Math.PI) / 180,\n mu = 3.986004418e14,\n earth_radius = 6378,\n x_shape_array = orbit_shape.data[\"x\"],\n y_shape_array = orbit_shape.data[\"y\"],\n x_sat_in_orbital_plane = position_in_orbital_plane.data[\"x\"],\n y_sat_in_orbital_plane = position_in_orbital_plane.data[\"y\"],\n x_sat = position_3d.data[\"x\"],\n y_sat = position_3d.data[\"y\"],\n z_sat = position_3d.data[\"z\"],\n x_array = orbit_3d.data[\"x\"],\n y_array = orbit_3d.data[\"y\"],\n z_array = orbit_3d.data[\"z\"],\n x_apsides_in_orbital_plane = apsides_in_orbital_plane.data[\"x\"],\n y_apsides_in_orbital_plane = apsides_in_orbital_plane.data[\"y\"],\n x_nodes_in_equatorial_plane = nodes_in_equatorial_plane.data[\"x\"],\n y_nodes_in_equatorial_plane = nodes_in_equatorial_plane.data[\"y\"];\n\nlet cos_omega = window.Math.cos(omega);\nlet sin_omega = window.Math.sin(omega);\nlet cos_Gomega = window.Math.cos(Gomega);\nlet sin_Gomega = window.Math.sin(Gomega);\nlet cos_i = window.Math.cos(inc);\nlet sin_i = window.Math.sin(inc);\n\nfunction radius(cosinus_v) {\n return p / (1 + e * cosinus_v);\n}\n\nfunction compute_orbit(v) {\n let cos_v = window.Math.cos(v);\n let sin_v = window.Math.sin(v);\n let r = radius(cos_v);\n\n let x_shape = r * cos_omega * cos_v - r * sin_omega * sin_v;\n let y_shape = r * sin_omega * cos_v + r * cos_omega * sin_v;\n\n let x_incli_only = x_shape;\n let y_incli_only = y_shape * cos_i;\n let z_incli_only = y_shape * sin_i;\n\n let x = x_incli_only * cos_Gomega - y_incli_only * sin_Gomega;\n let y = x_incli_only * sin_Gomega + y_incli_only * cos_Gomega;\n let z = z_incli_only;\n return {\n x_shape,\n y_shape,\n x,\n y,\n z,\n };\n}\n\nfor (let i = 0; i < N; i++) {\n let v = (i / (N - 1)) * 2 * window.Math.PI;\n let results = compute_orbit(v);\n x_shape_array[i] = results.x_shape;\n y_shape_array[i] = results.y_shape;\n x_array[i] = results.x;\n y_array[i] = results.y;\n z_array[i] = results.z;\n}\n\nx_apsides_in_orbital_plane[0] = a * (1 - e) * cos_omega;\ny_apsides_in_orbital_plane[0] = a * (1 - e) * sin_omega;\nx_apsides_in_orbital_plane[1] = -a * (1 + e) * cos_omega;\ny_apsides_in_orbital_plane[1] = -a * (1 + e) * sin_omega;\n\nlet radius_ascending_node = radius(window.Math.cos(2 * window.Math.PI - omega));\nx_nodes_in_equatorial_plane[0] = radius_ascending_node * cos_Gomega;\ny_nodes_in_equatorial_plane[0] = radius_ascending_node * sin_Gomega;\nlet radius_descending_node = radius(window.Math.cos(window.Math.PI - omega));\nx_nodes_in_equatorial_plane[1] = -radius_descending_node * cos_Gomega;\ny_nodes_in_equatorial_plane[1] = -radius_descending_node * sin_Gomega;\n\nlet sat_results = compute_orbit(true_anomaly);\nx_sat_in_orbital_plane[0] = sat_results.x_shape;\ny_sat_in_orbital_plane[0] = sat_results.y_shape;\nx_sat[0] = sat_results.x;\ny_sat[0] = sat_results.y;\nz_sat[0] = sat_results.z;\n\norbit_shape.change.emit();\norbit_3d.change.emit();\nposition_in_orbital_plane.change.emit();\nposition_3d.change.emit();\napsides_in_orbital_plane.change.emit();\nnodes_in_equatorial_plane.change.emit();\n\nlet orbital_period_hours =\n (2 * window.Math.PI * window.Math.sqrt((a * 1000) ** 3 / mu)) / 3600;\nlet apogee_altitude = a * (1 + e) - earth_radius;\nlet perigee_altitude = a * (1 - e) - earth_radius;\n\norbit_description_div.text = `\n <h2>Orbital Data</h2>\n <ul>\n <li>Orbital period: ${orbital_period_hours.toFixed(3)} hours</li>\n <li>Apogee altitude: ${apogee_altitude.toFixed(0)} kilometers</li>\n <li>Perigee altitude: ${perigee_altitude.toFixed(0)} kilometers</li>\n </ul>`;\n\nlet x_center_in_orbital_plane =\n (x_apsides_in_orbital_plane[0] + x_apsides_in_orbital_plane[1]) / 2;\nlet y_center_in_orbital_plane =\n (y_apsides_in_orbital_plane[0] + y_apsides_in_orbital_plane[1]) / 2;\norbital_parameters.data[\"a_x_start\"][0] = x_center_in_orbital_plane;\norbital_parameters.data[\"a_x_end\"][0] = x_apsides_in_orbital_plane[1];\norbital_parameters.data[\"a_y_start\"][0] = y_center_in_orbital_plane;\norbital_parameters.data[\"a_y_end\"][0] = y_apsides_in_orbital_plane[1];\norbital_parameters.data[\"a_label_x\"][0] =\n (orbital_parameters.data[\"a_x_start\"][0] +\n orbital_parameters.data[\"a_x_end\"][0]) /\n 2;\norbital_parameters.data[\"a_label_y\"][0] =\n (orbital_parameters.data[\"a_y_start\"][0] +\n orbital_parameters.data[\"a_y_end\"][0]) /\n 2;\norbital_parameters.data[\"e\"][0] = e;\norbital_parameters.data[\"e_label_x\"][0] = x_center_in_orbital_plane / 2;\norbital_parameters.data[\"e_label_y\"][0] = y_center_in_orbital_plane / 2;\norbital_parameters.data[\"i\"][0] = inc;\norbital_parameters.data[\"omega\"][0] = omega;\norbital_parameters.data[\"omega_label_x\"][0] = 15e3 * window.Math.cos(omega / 2);\norbital_parameters.data[\"omega_label_y\"][0] = 15e3 * window.Math.sin(omega / 2);\norbital_parameters.data[\"Gomega\"][0] = Gomega;\norbital_parameters.data[\"Gomega_label_x\"][0] =\n 15e3 * window.Math.cos(Gomega / 2);\norbital_parameters.data[\"Gomega_label_y\"][0] =\n 15e3 * window.Math.sin(Gomega / 2);\norbital_parameters.data[\"v_start\"][0] = omega;\norbital_parameters.data[\"v_end\"][0] = omega + true_anomaly;\norbital_parameters.data[\"v_label_x\"][0] =\n 17e3 * window.Math.cos(omega + true_anomaly / 2);\norbital_parameters.data[\"v_label_y\"][0] =\n 17e3 * window.Math.sin(omega + true_anomaly / 2);\norbital_parameters.change.emit();\n"},"id":"1271","type":"CustomJS"},{"attributes":{"source":{"id":"1007"}},"id":"1090","type":"CDSView"},{"attributes":{"line_alpha":{"value":0.8},"line_color":"rgb(255, 231, 0)","line_width":{"value":3},"x0":{"field":"a_x_start"},"x1":{"field":"a_x_end"},"y0":{"field":"a_y_start"},"y1":{"field":"a_y_end"}},"id":"1087","type":"Segment"},{"attributes":{},"id":"1288","type":"Selection"},{"attributes":{"text":"orbit seen from Vernal equinox","text_color":{"value":"silver"}},"id":"1177","type":"Title"},{"attributes":{"source":{"id":"1007"},"text":{"field":"a_text"},"text_align":"center","text_baseline":"middle","text_color":"rgb(255, 231, 0)","x":{"field":"a_label_x"},"x_offset":{"value":10},"y":{"field":"a_label_y"},"y_offset":{"value":10}},"id":"1091","type":"LabelSet"},{"attributes":{},"id":"1284","type":"Selection"},{"attributes":{},"id":"1289","type":"UnionRenderers"},{"attributes":{"line_color":"lightgray","line_dash":[6],"line_width":3,"x":{"field":"y"},"y":{"field":"z"}},"id":"1197","type":"Line"},{"attributes":{},"id":"1290","type":"Selection"},{"attributes":{"filters":[{"id":"1201"}],"source":{"id":"1005"}},"id":"1202","type":"CDSView"},{"attributes":{},"id":"1293","type":"BasicTickFormatter"},{"attributes":{"source":{"id":"1007"}},"id":"1104","type":"CDSView"},{"attributes":{"source":{"id":"1007"},"text":{"field":"omega_text"},"text_align":"center","text_baseline":"middle","text_color":"rgb(60, 145, 230)","x":{"field":"omega_label_x"},"y":{"field":"omega_label_y"}},"id":"1105","type":"LabelSet"},{"attributes":{},"id":"1280","type":"Selection"},{"attributes":{},"id":"1295","type":"BasicTickFormatter"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":"rgb(228, 17, 63)","line_alpha":{"value":0.1},"line_color":"rgb(228, 17, 63)","size":{"units":"screen","value":10},"x":{"field":"y"},"y":{"field":"z"}},"id":"1209","type":"Circle"},{"attributes":{"end_angle":{"field":"omega","units":"rad"},"fill_color":"rgb(60, 145, 230)","inner_radius":{"units":"data","value":8000},"line_color":"rgb(60, 145, 230)","outer_radius":{"units":"data","value":10000},"start_angle":{"units":"rad","value":0},"x":{"value":0},"y":{"value":0}},"id":"1101","type":"AnnularWedge"},{"attributes":{},"id":"1296","type":"UnionRenderers"},{"attributes":{"fill_color":{"value":"lightgray"},"line_color":{"value":"lightgray"},"size":{"units":"screen","value":5},"x":{"field":"y"},"y":{"field":"z"}},"id":"1204","type":"Circle"},{"attributes":{},"id":"1283","type":"UnionRenderers"},{"attributes":{},"id":"1297","type":"Selection"},{"attributes":{},"id":"1279","type":"UnionRenderers"},{"attributes":{"axis":{"id":"1191"},"dimension":1,"ticker":null,"visible":false},"id":"1194","type":"Grid"},{"attributes":{"data_source":{"id":"1007"},"glyph":{"id":"1108"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1109"},"selection_glyph":null,"view":{"id":"1111"}},"id":"1110","type":"GlyphRenderer"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"lightgray"},"line_alpha":{"value":0.1},"line_color":{"value":"lightgray"},"size":{"units":"screen","value":5},"x":{"field":"y"},"y":{"field":"z"}},"id":"1205","type":"Circle"},{"attributes":{},"id":"1305","type":"BasicTickFormatter"},{"attributes":{"data_source":{"id":"1005"},"glyph":{"id":"1204"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1205"},"selection_glyph":null,"view":{"id":"1202"}},"id":"1206","type":"GlyphRenderer"},{"attributes":{"source":{"id":"1007"}},"id":"1111","type":"CDSView"},{"attributes":{},"id":"1307","type":"BasicTickFormatter"},{"attributes":{"end_angle":{"field":"v_end","units":"rad"},"fill_alpha":{"value":0.1},"fill_color":"rgb(228, 17, 63)","inner_radius":{"units":"data","value":10000},"line_alpha":{"value":0.1},"line_color":"rgb(228, 17, 63)","outer_radius":{"units":"data","value":12000},"start_angle":{"field":"v_start","units":"rad"},"x":{"value":0},"y":{"value":0}},"id":"1109","type":"AnnularWedge"},{"attributes":{},"id":"1317","type":"BasicTickFormatter"},{"attributes":{"fill_color":"rgb(228, 17, 63)","line_color":"rgb(228, 17, 63)","size":{"units":"screen","value":10},"x":{"field":"y"},"y":{"field":"z"}},"id":"1208","type":"Circle"},{"attributes":{},"id":"1319","type":"BasicTickFormatter"},{"attributes":{"data_source":{"id":"1006"},"glyph":{"id":"1208"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1209"},"selection_glyph":null,"view":{"id":"1211"}},"id":"1210","type":"GlyphRenderer"},{"attributes":{"css_classes":["slider","sma_slider"],"end":50000,"format":"0[.]00","js_property_callbacks":{"change:value":[{"id":"1012"},{"id":"1269"}]},"start":0,"title":"a: semi-major axis (km)","value":42164},"id":"1009","type":"Slider"},{"attributes":{"end_angle":{"field":"v_end","units":"rad"},"fill_color":"rgb(228, 17, 63)","inner_radius":{"units":"data","value":10000},"line_color":"rgb(228, 17, 63)","outer_radius":{"units":"data","value":12000},"start_angle":{"field":"v_start","units":"rad"},"x":{"value":0},"y":{"value":0}},"id":"1108","type":"AnnularWedge"},{"attributes":{"source":{"id":"1007"},"text":{"field":"v_text"},"text_align":"center","text_baseline":"middle","text_color":"rgb(228, 17, 63)","x":{"field":"v_label_x"},"y":{"field":"v_label_y"}},"id":"1112","type":"LabelSet"},{"attributes":{"children":[{"id":"1024"},{"id":"1025"}],"css_classes":["inc_layout"],"sizing_mode":"stretch_width"},"id":"1028","type":"Row"},{"attributes":{"source":{"id":"1006"}},"id":"1211","type":"CDSView"},{"attributes":{"css_classes":["slider","Gomega_slider"],"end":360,"format":"0[.]00","js_property_callbacks":{"change:value":[{"id":"1032"},{"id":"1273"}]},"start":0,"title":"\u03a9: right ascension of ascending node (deg)","value":95},"id":"1029","type":"Slider"},{"attributes":{"base":{"field":"x","units":"data"},"fill_alpha":0.5,"fill_color":"silver","level":"underlay","line_color":"silver","lower":{"field":"lower","units":"data"},"source":{"id":"1008"},"upper":{"field":"upper","units":"data"}},"id":"1212","type":"Band"},{"attributes":{},"id":"1192","type":"BasicTicker"},{"attributes":{"formatter":{"id":"1295"},"ticker":{"id":"1192"},"visible":false},"id":"1191","type":"LinearAxis"},{"attributes":{"css_classes":["spinner","Gomega_spinner"],"format":null,"high":360,"js_property_callbacks":{"change:value":[{"id":"1031"}]},"low":0,"value":95,"width":80},"id":"1030","type":"Spinner"},{"attributes":{"fill_color":"grey","line_color":"grey","size":10},"id":"1214","type":"VeeHead"},{"attributes":{"background_fill_color":"rgb(40, 40, 40)","below":[{"id":"1130"}],"border_fill_color":"rgb(72, 72, 72)","center":[{"id":"1133"},{"id":"1137"},{"id":"1155"},{"id":"1158"},{"id":"1160"},{"id":"1166"},{"id":"1173"},{"id":"1175"}],"left":[{"id":"1134"}],"match_aspect":true,"outline_line_alpha":0,"plot_height":400,"plot_width":400,"renderers":[{"id":"1142"},{"id":"1149"},{"id":"1153"},{"id":"1164"},{"id":"1171"}],"title":{"id":"1120"},"toolbar":{"id":"1138"},"toolbar_location":null,"x_range":{"id":"1122"},"x_scale":{"id":"1126"},"y_range":{"id":"1124"},"y_scale":{"id":"1128"}},"id":"1119","subtype":"Figure","type":"Plot"},{"attributes":{},"id":"1277","type":"UnionRenderers"},{"attributes":{"args":{"other":{"id":"1029"}},"code":"other.value = this.value"},"id":"1031","type":"CustomJS"},{"attributes":{"data_source":{"id":"1002"},"glyph":{"id":"1115"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1116"},"selection_glyph":null,"view":{"id":"1118"}},"id":"1117","type":"GlyphRenderer"},{"attributes":{"args":{"other":{"id":"1030"}},"code":"other.value = this.value"},"id":"1032","type":"CustomJS"},{"attributes":{"end":{"id":"1214"},"line_color":{"value":"grey"},"line_width":{"value":3},"source":null,"start":null,"x_end":{"value":0},"x_start":{"value":0},"y_end":{"value":80000},"y_start":{"value":0}},"id":"1215","type":"Arrow"},{"attributes":{"line_alpha":{"value":0.1},"line_color":"rgb(228, 17, 63)","line_width":{"value":3},"x0":{"value":0},"x1":{"field":"x"},"y0":{"value":0},"y1":{"field":"y"}},"id":"1116","type":"Segment"},{"attributes":{"children":[{"id":"1029"},{"id":"1030"}],"css_classes":["Gomega_layout"],"sizing_mode":"stretch_width"},"id":"1033","type":"Row"},{"attributes":{"text":"North","text_color":"grey","text_font_size":"8pt","x":4000.0,"y":64000.0},"id":"1217","type":"Label"},{"attributes":{"source":{"id":"1002"}},"id":"1118","type":"CDSView"},{"attributes":{"css_classes":["slider","anomaly_slider"],"end":359,"format":"0[.]00","js_property_callbacks":{"change:value":[{"id":"1037"},{"id":"1274"}]},"start":0,"title":"\ud835\udf08: true anomaly (deg)","value":70},"id":"1034","type":"Slider"},{"attributes":{"line_color":"rgb(116, 238, 21)","line_dash":[6],"location":0},"id":"1218","type":"Span"},{"attributes":{"line_alpha":{"value":0.3},"line_color":"rgb(228, 17, 63)","line_width":{"value":3},"x0":{"value":0},"x1":{"field":"x"},"y0":{"value":0},"y1":{"field":"y"}},"id":"1115","type":"Segment"},{"attributes":{"text":"Equator","text_color":"rgb(116, 238, 21)","text_font_size":"8pt","x":-72000.0,"y":2400.0},"id":"1219","type":"Label"},{"attributes":{"css_classes":["spinner","anomaly_spinner"],"format":null,"high":359,"js_property_callbacks":{"change:value":[{"id":"1036"}]},"low":0,"value":70,"width":80},"id":"1035","type":"Spinner"},{"attributes":{},"id":"1183","type":"LinearScale"},{"attributes":{"background_fill_color":"rgb(40, 40, 40)","below":[{"id":"1231"}],"border_fill_color":"rgb(72, 72, 72)","center":[{"id":"1234"},{"id":"1238"},{"id":"1256"},{"id":"1259"},{"id":"1261"},{"id":"1263"},{"id":"1265"},{"id":"1266"},{"id":"1267"}],"left":[{"id":"1235"}],"match_aspect":true,"outline_line_alpha":0,"plot_height":400,"plot_width":400,"renderers":[{"id":"1243"},{"id":"1250"},{"id":"1254"}],"title":{"id":"1221"},"toolbar":{"id":"1239"},"toolbar_location":null,"x_range":{"id":"1223"},"x_scale":{"id":"1227"},"y_range":{"id":"1225"},"y_scale":{"id":"1229"}},"id":"1220","subtype":"Figure","type":"Plot"},{"attributes":{"text":"orbit seen from North direction","text_color":{"value":"silver"}},"id":"1120","type":"Title"},{"attributes":{"args":{"other":{"id":"1034"}},"code":"other.value = this.value"},"id":"1036","type":"CustomJS"},{"attributes":{"data":{"x":{"__ndarray__":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","dtype":"float64","order":"little","shape":[360]}},"selected":{"id":"1278"},"selection_policy":{"id":"1277"}},"id":"1001","type":"ColumnDataSource"},{"attributes":{"args":{"N":360,"anomaly":{"id":"1034"},"aop":{"id":"1019"},"apsides_in_orbital_plane":{"id":"1003"},"eccentricity":{"id":"1014"},"inclination":{"id":"1024"},"nodes_in_equatorial_plane":{"id":"1004"},"orbit_3d":{"id":"1005"},"orbit_description_div":{"id":"1268"},"orbit_shape":{"id":"1001"},"orbital_parameters":{"id":"1007"},"position_3d":{"id":"1006"},"position_in_orbital_plane":{"id":"1002"},"raan":{"id":"1029"},"sma":{"id":"1009"}},"code":"const a = sma.value,\n e = eccentricity.value,\n p = a * (1 - e * e),\n omega = (aop.value * window.Math.PI) / 180,\n inc = (inclination.value * window.Math.PI) / 180,\n Gomega = (raan.value * window.Math.PI) / 180,\n true_anomaly = (anomaly.value * window.Math.PI) / 180,\n mu = 3.986004418e14,\n earth_radius = 6378,\n x_shape_array = orbit_shape.data[\"x\"],\n y_shape_array = orbit_shape.data[\"y\"],\n x_sat_in_orbital_plane = position_in_orbital_plane.data[\"x\"],\n y_sat_in_orbital_plane = position_in_orbital_plane.data[\"y\"],\n x_sat = position_3d.data[\"x\"],\n y_sat = position_3d.data[\"y\"],\n z_sat = position_3d.data[\"z\"],\n x_array = orbit_3d.data[\"x\"],\n y_array = orbit_3d.data[\"y\"],\n z_array = orbit_3d.data[\"z\"],\n x_apsides_in_orbital_plane = apsides_in_orbital_plane.data[\"x\"],\n y_apsides_in_orbital_plane = apsides_in_orbital_plane.data[\"y\"],\n x_nodes_in_equatorial_plane = nodes_in_equatorial_plane.data[\"x\"],\n y_nodes_in_equatorial_plane = nodes_in_equatorial_plane.data[\"y\"];\n\nlet cos_omega = window.Math.cos(omega);\nlet sin_omega = window.Math.sin(omega);\nlet cos_Gomega = window.Math.cos(Gomega);\nlet sin_Gomega = window.Math.sin(Gomega);\nlet cos_i = window.Math.cos(inc);\nlet sin_i = window.Math.sin(inc);\n\nfunction radius(cosinus_v) {\n return p / (1 + e * cosinus_v);\n}\n\nfunction compute_orbit(v) {\n let cos_v = window.Math.cos(v);\n let sin_v = window.Math.sin(v);\n let r = radius(cos_v);\n\n let x_shape = r * cos_omega * cos_v - r * sin_omega * sin_v;\n let y_shape = r * sin_omega * cos_v + r * cos_omega * sin_v;\n\n let x_incli_only = x_shape;\n let y_incli_only = y_shape * cos_i;\n let z_incli_only = y_shape * sin_i;\n\n let x = x_incli_only * cos_Gomega - y_incli_only * sin_Gomega;\n let y = x_incli_only * sin_Gomega + y_incli_only * cos_Gomega;\n let z = z_incli_only;\n return {\n x_shape,\n y_shape,\n x,\n y,\n z,\n };\n}\n\nfor (let i = 0; i < N; i++) {\n let v = (i / (N - 1)) * 2 * window.Math.PI;\n let results = compute_orbit(v);\n x_shape_array[i] = results.x_shape;\n y_shape_array[i] = results.y_shape;\n x_array[i] = results.x;\n y_array[i] = results.y;\n z_array[i] = results.z;\n}\n\nx_apsides_in_orbital_plane[0] = a * (1 - e) * cos_omega;\ny_apsides_in_orbital_plane[0] = a * (1 - e) * sin_omega;\nx_apsides_in_orbital_plane[1] = -a * (1 + e) * cos_omega;\ny_apsides_in_orbital_plane[1] = -a * (1 + e) * sin_omega;\n\nlet radius_ascending_node = radius(window.Math.cos(2 * window.Math.PI - omega));\nx_nodes_in_equatorial_plane[0] = radius_ascending_node * cos_Gomega;\ny_nodes_in_equatorial_plane[0] = radius_ascending_node * sin_Gomega;\nlet radius_descending_node = radius(window.Math.cos(window.Math.PI - omega));\nx_nodes_in_equatorial_plane[1] = -radius_descending_node * cos_Gomega;\ny_nodes_in_equatorial_plane[1] = -radius_descending_node * sin_Gomega;\n\nlet sat_results = compute_orbit(true_anomaly);\nx_sat_in_orbital_plane[0] = sat_results.x_shape;\ny_sat_in_orbital_plane[0] = sat_results.y_shape;\nx_sat[0] = sat_results.x;\ny_sat[0] = sat_results.y;\nz_sat[0] = sat_results.z;\n\norbit_shape.change.emit();\norbit_3d.change.emit();\nposition_in_orbital_plane.change.emit();\nposition_3d.change.emit();\napsides_in_orbital_plane.change.emit();\nnodes_in_equatorial_plane.change.emit();\n\nlet orbital_period_hours =\n (2 * window.Math.PI * window.Math.sqrt((a * 1000) ** 3 / mu)) / 3600;\nlet apogee_altitude = a * (1 + e) - earth_radius;\nlet perigee_altitude = a * (1 - e) - earth_radius;\n\norbit_description_div.text = `\n <h2>Orbital Data</h2>\n <ul>\n <li>Orbital period: ${orbital_period_hours.toFixed(3)} hours</li>\n <li>Apogee altitude: ${apogee_altitude.toFixed(0)} kilometers</li>\n <li>Perigee altitude: ${perigee_altitude.toFixed(0)} kilometers</li>\n </ul>`;\n\nlet x_center_in_orbital_plane =\n (x_apsides_in_orbital_plane[0] + x_apsides_in_orbital_plane[1]) / 2;\nlet y_center_in_orbital_plane =\n (y_apsides_in_orbital_plane[0] + y_apsides_in_orbital_plane[1]) / 2;\norbital_parameters.data[\"a_x_start\"][0] = x_center_in_orbital_plane;\norbital_parameters.data[\"a_x_end\"][0] = x_apsides_in_orbital_plane[1];\norbital_parameters.data[\"a_y_start\"][0] = y_center_in_orbital_plane;\norbital_parameters.data[\"a_y_end\"][0] = y_apsides_in_orbital_plane[1];\norbital_parameters.data[\"a_label_x\"][0] =\n (orbital_parameters.data[\"a_x_start\"][0] +\n orbital_parameters.data[\"a_x_end\"][0]) /\n 2;\norbital_parameters.data[\"a_label_y\"][0] =\n (orbital_parameters.data[\"a_y_start\"][0] +\n orbital_parameters.data[\"a_y_end\"][0]) /\n 2;\norbital_parameters.data[\"e\"][0] = e;\norbital_parameters.data[\"e_label_x\"][0] = x_center_in_orbital_plane / 2;\norbital_parameters.data[\"e_label_y\"][0] = y_center_in_orbital_plane / 2;\norbital_parameters.data[\"i\"][0] = inc;\norbital_parameters.data[\"omega\"][0] = omega;\norbital_parameters.data[\"omega_label_x\"][0] = 15e3 * window.Math.cos(omega / 2);\norbital_parameters.data[\"omega_label_y\"][0] = 15e3 * window.Math.sin(omega / 2);\norbital_parameters.data[\"Gomega\"][0] = Gomega;\norbital_parameters.data[\"Gomega_label_x\"][0] =\n 15e3 * window.Math.cos(Gomega / 2);\norbital_parameters.data[\"Gomega_label_y\"][0] =\n 15e3 * window.Math.sin(Gomega / 2);\norbital_parameters.data[\"v_start\"][0] = omega;\norbital_parameters.data[\"v_end\"][0] = omega + true_anomaly;\norbital_parameters.data[\"v_label_x\"][0] =\n 17e3 * window.Math.cos(omega + true_anomaly / 2);\norbital_parameters.data[\"v_label_y\"][0] =\n 17e3 * window.Math.sin(omega + true_anomaly / 2);\norbital_parameters.change.emit();\n"},"id":"1273","type":"CustomJS"},{"attributes":{"args":{"other":{"id":"1035"}},"code":"other.value = this.value"},"id":"1037","type":"CustomJS"},{"attributes":{"end":80000,"start":-80000},"id":"1122","type":"Range1d"},{"attributes":{"text":"","text_color":{"value":"silver"}},"id":"1221","type":"Title"},{"attributes":{"children":[{"id":"1034"},{"id":"1035"}],"css_classes":["anomaly_layout"],"sizing_mode":"stretch_width"},"id":"1038","type":"Row"},{"attributes":{"end":80000,"start":-80000},"id":"1124","type":"Range1d"},{"attributes":{"end":80000,"start":-80000},"id":"1223","type":"Range1d"},{"attributes":{"background_fill_color":"rgb(40, 40, 40)","below":[{"id":"1050"}],"border_fill_color":"rgb(72, 72, 72)","center":[{"id":"1053"},{"id":"1057"},{"id":"1075"},{"id":"1078"},{"id":"1080"},{"id":"1091"},{"id":"1098"},{"id":"1105"},{"id":"1112"}],"left":[{"id":"1054"}],"match_aspect":true,"outline_line_alpha":0,"plot_height":400,"plot_width":400,"renderers":[{"id":"1062"},{"id":"1069"},{"id":"1073"},{"id":"1084"},{"id":"1089"},{"id":"1096"},{"id":"1103"},{"id":"1110"},{"id":"1117"}],"title":{"id":"1040"},"toolbar":{"id":"1058"},"toolbar_location":null,"x_range":{"id":"1042"},"x_scale":{"id":"1046"},"y_range":{"id":"1044"},"y_scale":{"id":"1048"}},"id":"1039","subtype":"Figure","type":"Plot"},{"attributes":{},"id":"1126","type":"LinearScale"},{"attributes":{"end":80000,"start":-80000},"id":"1225","type":"Range1d"},{"attributes":{},"id":"1278","type":"Selection"},{"attributes":{},"id":"1128","type":"LinearScale"},{"attributes":{},"id":"1227","type":"LinearScale"},{"attributes":{"text":"orbit shape in orbital plane","text_color":{"value":"silver"}},"id":"1040","type":"Title"},{"attributes":{"formatter":{"id":"1333"},"ticker":{"id":"1131"},"visible":false},"id":"1130","type":"LinearAxis"},{"attributes":{"data":{"x":{"__ndarray__":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAA","dtype":"float64","order":"little","shape":[360]}},"selected":{"id":"1280"},"selection_policy":{"id":"1279"}},"id":"1005","type":"ColumnDataSource"},{"attributes":{},"id":"1229","type":"LinearScale"},{"attributes":{},"id":"1131","type":"BasicTicker"},{"attributes":{"data":{"x":{"__ndarray__":"AAAAAAAAAAA=","dtype":"float64","order":"little","shape":[1]},"y":{"__ndarray__":"AAAAAAAAAAA=","dtype":"float64","order":"little","shape":[1]},"z":{"__ndarray__":"AAAAAAAAAAA=","dtype":"float64","order":"little","shape":[1]}},"selected":{"id":"1284"},"selection_policy":{"id":"1283"}},"id":"1006","type":"ColumnDataSource"},{"attributes":{"formatter":{"id":"1305"},"ticker":{"id":"1232"},"visible":false},"id":"1231","type":"LinearAxis"},{"attributes":{"end":80000,"start":-80000},"id":"1044","type":"Range1d"},{"attributes":{"axis":{"id":"1130"},"ticker":null,"visible":false},"id":"1133","type":"Grid"},{"attributes":{"data":{"Gomega":{"__ndarray__":"AAAAAAAAAAA=","dtype":"float64","order":"little","shape":[1]},"Gomega_label_x":{"__ndarray__":"AAAAAAAAAAA=","dtype":"float64","order":"little","shape":[1]},"Gomega_label_y":{"__ndarray__":"AAAAAAAAAAA=","dtype":"float64","order":"little","shape":[1]},"Gomega_text":["\u03a9"],"a_label_x":{"__ndarray__":"AAAAAAAAAAA=","dtype":"float64","order":"little","shape":[1]},"a_label_y":{"__ndarray__":"AAAAAAAAAAA=","dtype":"float64","order":"little","shape":[1]},"a_text":["a"],"a_x_end":{"__ndarray__":"AAAAAAAAAAA=","dtype":"float64","order":"little","shape":[1]},"a_x_start":{"__ndarray__":"AAAAAAAAAAA=","dtype":"float64","order":"little","shape":[1]},"a_y_end":{"__ndarray__":"AAAAAAAAAAA=","dtype":"float64","order":"little","shape":[1]},"a_y_start":{"__ndarray__":"AAAAAAAAAAA=","dtype":"float64","order":"little","shape":[1]},"e":{"__ndarray__":"AAAAAAAAAAA=","dtype":"float64","order":"little","shape":[1]},"e_label_x":{"__ndarray__":"AAAAAAAAAAA=","dtype":"float64","order":"little","shape":[1]},"e_label_y":{"__ndarray__":"AAAAAAAAAAA=","dtype":"float64","order":"little","shape":[1]},"e_text":["e*a"],"i":{"__ndarray__":"AAAAAAAAAAA=","dtype":"float64","order":"little","shape":[1]},"omega":{"__ndarray__":"AAAAAAAAAAA=","dtype":"float64","order":"little","shape":[1]},"omega_label_x":{"__ndarray__":"AAAAAAAAAAA=","dtype":"float64","order":"little","shape":[1]},"omega_label_y":{"__ndarray__":"AAAAAAAAAAA=","dtype":"float64","order":"little","shape":[1]},"omega_text":["\u03c9"],"v_end":{"__ndarray__":"AAAAAAAAAAA=","dtype":"float64","order":"little","shape":[1]},"v_label_x":{"__ndarray__":"AAAAAAAAAAA=","dtype":"float64","order":"little","shape":[1]},"v_label_y":{"__ndarray__":"AAAAAAAAAAA=","dtype":"float64","order":"little","shape":[1]},"v_start":{"__ndarray__":"AAAAAAAAAAA=","dtype":"float64","order":"little","shape":[1]},"v_text":["\ud835\udf08"]},"selected":{"id":"1290"},"selection_policy":{"id":"1289"}},"id":"1007","type":"ColumnDataSource"},{"attributes":{},"id":"1232","type":"BasicTicker"},{"attributes":{},"id":"1046","type":"LinearScale"},{"attributes":{"formatter":{"id":"1335"},"ticker":{"id":"1135"},"visible":false},"id":"1134","type":"LinearAxis"},{"attributes":{"axis":{"id":"1231"},"ticker":null,"visible":false},"id":"1234","type":"Grid"},{"attributes":{"data":{"lower":{"__ndarray__":"AAAAAAAAAIBvujsXzwqhwPdnNgqzA7DAMD8FkYKTtcAvRdSVGom4wC9F1JUaibjAMT8FkYKTtcD4ZzYKswOwwHK6OxfPCqHAzJNJO1d7a70=","dtype":"float64","order":"little","shape":[10]},"upper":{"__ndarray__":"AAAAAAAAAABvujsXzwqhQPdnNgqzA7BAMD8FkYKTtUAvRdSVGom4QC9F1JUaibhAMT8FkYKTtUD4ZzYKswOwQHK6OxfPCqFAzJNJO1d7az0=","dtype":"float64","order":"little","shape":[10]},"x":{"__ndarray__":"AAAAAADquEC/moIKXGm3QCUIctrUFbNAAgAAAADqqEBmSkLAHE6RQGNKQsAcTpHA/f/////pqMAlCHLa1BWzwL6aggpcabfAAAAAAADquMA=","dtype":"float64","order":"little","shape":[10]}},"selected":{"id":"1297"},"selection_policy":{"id":"1296"}},"id":"1008","type":"ColumnDataSource"},{"attributes":{},"id":"1048","type":"LinearScale"},{"attributes":{},"id":"1135","type":"BasicTicker"},{"attributes":{"formatter":{"id":"1307"},"ticker":{"id":"1236"},"visible":false},"id":"1235","type":"LinearAxis"},{"attributes":{"formatter":{"id":"1317"},"ticker":{"id":"1051"},"visible":false},"id":"1050","type":"LinearAxis"},{"attributes":{"axis":{"id":"1134"},"dimension":1,"ticker":null,"visible":false},"id":"1137","type":"Grid"},{"attributes":{},"id":"1236","type":"BasicTicker"},{"attributes":{},"id":"1188","type":"BasicTicker"},{"attributes":{},"id":"1051","type":"BasicTicker"},{"attributes":{"args":{"other":{"id":"1009"}},"code":"other.value = this.value"},"id":"1011","type":"CustomJS"},{"attributes":{"axis":{"id":"1187"},"ticker":null,"visible":false},"id":"1190","type":"Grid"},{"attributes":{"axis":{"id":"1235"},"dimension":1,"ticker":null,"visible":false},"id":"1238","type":"Grid"},{"attributes":{"filters":[{"id":"1064"}],"source":{"id":"1001"}},"id":"1065","type":"CDSView"},{"attributes":{"args":{"other":{"id":"1010"}},"code":"other.value = this.value"},"id":"1012","type":"CustomJS"},{"attributes":{"active_drag":"auto","active_inspect":"auto","active_multi":null,"active_scroll":"auto","active_tap":"auto"},"id":"1138","type":"Toolbar"},{"attributes":{"axis":{"id":"1050"},"ticker":null,"visible":false},"id":"1053","type":"Grid"},{"attributes":{"children":[[{"id":"1276"},0,0],[{"id":"1176"},0,1],[{"id":"1220"},0,2],[{"id":"1039"},1,0],[{"id":"1268"},1,1],[{"id":"1119"},1,2]]},"id":"1347","type":"GridBox"},{"attributes":{"children":[{"id":"1009"},{"id":"1010"}],"css_classes":["sma_layout"],"sizing_mode":"stretch_width"},"id":"1013","type":"Row"},{"attributes":{"formatter":{"id":"1319"},"ticker":{"id":"1055"},"visible":false},"id":"1054","type":"LinearAxis"},{"attributes":{"active_drag":"auto","active_inspect":"auto","active_multi":null,"active_scroll":"auto","active_tap":"auto"},"id":"1239","type":"Toolbar"},{"attributes":{"formatter":{"id":"1293"},"ticker":{"id":"1188"},"visible":false},"id":"1187","type":"LinearAxis"},{"attributes":{"css_classes":["slider","ecc_slider"],"end":1,"format":"0[.]00","js_property_callbacks":{"change:value":[{"id":"1017"},{"id":"1270"}]},"start":0,"step":0.01,"title":"e: eccentricity (-)","value":0.7},"id":"1014","type":"Slider"},{"attributes":{},"id":"1055","type":"BasicTicker"},{"attributes":{},"id":"1185","type":"LinearScale"},{"attributes":{"sizing_mode":"stretch_width","text":"<h2>Orbital Parameters</h2>"},"id":"1275","type":"Div"},{"attributes":{"axis":{"id":"1054"},"dimension":1,"ticker":null,"visible":false},"id":"1057","type":"Grid"},{"attributes":{"css_classes":["spinner","ecc_spinner"],"format":null,"high":1,"js_property_callbacks":{"change:value":[{"id":"1016"}]},"low":0,"step":0.01,"value":0.7,"width":80},"id":"1015","type":"Spinner"},{"attributes":{"line_alpha":{"value":0.1},"line_color":"rgb(77, 238, 234)","line_width":{"value":3},"x0":{"field":"a_x_start"},"x1":{"value":0},"y0":{"field":"a_y_start"},"y1":{"value":0}},"id":"1095","type":"Segment"},{"attributes":{"args":{"other":{"id":"1014"}},"code":"other.value = this.value"},"id":"1016","type":"CustomJS"},{"attributes":{"code":"\n var indices = [];\n\n for (var i = 0; i < source.get_length(); i++){\n if (source.data['z'][i] >= 0){\n indices.push(true);\n } else {\n indices.push(false);\n }\n }\n return indices;\n "},"id":"1144","type":"CustomJSFilter"},{"attributes":{"line_alpha":{"value":0.8},"line_color":"rgb(77, 238, 234)","line_width":{"value":3},"x0":{"field":"a_x_start"},"x1":{"value":0},"y0":{"field":"a_y_start"},"y1":{"value":0}},"id":"1094","type":"Segment"},{"attributes":{"args":{"other":{"id":"1015"}},"code":"other.value = this.value"},"id":"1017","type":"CustomJS"},{"attributes":{"active_drag":"auto","active_inspect":"auto","active_multi":null,"active_scroll":"auto","active_tap":"auto"},"id":"1058","type":"Toolbar"},{"attributes":{"data_source":{"id":"1005"},"glyph":{"id":"1140"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1141"},"selection_glyph":null,"view":{"id":"1143"}},"id":"1142","type":"GlyphRenderer"},{"attributes":{"children":[{"id":"1275"},{"id":"1013"},{"id":"1018"},{"id":"1028"},{"id":"1023"},{"id":"1033"},{"id":"1038"}],"css_classes":["inputs"],"height":400,"sizing_mode":"stretch_width"},"id":"1276","type":"Column"},{"attributes":{"children":[{"id":"1014"},{"id":"1015"}],"css_classes":["ecc_layout"],"sizing_mode":"stretch_width"},"id":"1018","type":"Row"},{"attributes":{"data_source":{"id":"1007"},"glyph":{"id":"1094"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1095"},"selection_glyph":null,"view":{"id":"1097"}},"id":"1096","type":"GlyphRenderer"},{"attributes":{"line_alpha":0.1,"line_color":"lightgray","line_dash":[6],"line_width":3,"x":{"field":"x"},"y":{"field":"y"}},"id":"1141","type":"Line"},{"attributes":{"css_classes":["slider","omega_slider"],"end":360,"format":"0[.]00","js_property_callbacks":{"change:value":[{"id":"1022"},{"id":"1271"}]},"start":0,"title":"\u03c9: argument of perigee (deg)","value":195},"id":"1019","type":"Slider"},{"attributes":{"args":{"N":360,"anomaly":{"id":"1034"},"aop":{"id":"1019"},"apsides_in_orbital_plane":{"id":"1003"},"eccentricity":{"id":"1014"},"inclination":{"id":"1024"},"nodes_in_equatorial_plane":{"id":"1004"},"orbit_3d":{"id":"1005"},"orbit_description_div":{"id":"1268"},"orbit_shape":{"id":"1001"},"orbital_parameters":{"id":"1007"},"position_3d":{"id":"1006"},"position_in_orbital_plane":{"id":"1002"},"raan":{"id":"1029"},"sma":{"id":"1009"}},"code":"const a = sma.value,\n e = eccentricity.value,\n p = a * (1 - e * e),\n omega = (aop.value * window.Math.PI) / 180,\n inc = (inclination.value * window.Math.PI) / 180,\n Gomega = (raan.value * window.Math.PI) / 180,\n true_anomaly = (anomaly.value * window.Math.PI) / 180,\n mu = 3.986004418e14,\n earth_radius = 6378,\n x_shape_array = orbit_shape.data[\"x\"],\n y_shape_array = orbit_shape.data[\"y\"],\n x_sat_in_orbital_plane = position_in_orbital_plane.data[\"x\"],\n y_sat_in_orbital_plane = position_in_orbital_plane.data[\"y\"],\n x_sat = position_3d.data[\"x\"],\n y_sat = position_3d.data[\"y\"],\n z_sat = position_3d.data[\"z\"],\n x_array = orbit_3d.data[\"x\"],\n y_array = orbit_3d.data[\"y\"],\n z_array = orbit_3d.data[\"z\"],\n x_apsides_in_orbital_plane = apsides_in_orbital_plane.data[\"x\"],\n y_apsides_in_orbital_plane = apsides_in_orbital_plane.data[\"y\"],\n x_nodes_in_equatorial_plane = nodes_in_equatorial_plane.data[\"x\"],\n y_nodes_in_equatorial_plane = nodes_in_equatorial_plane.data[\"y\"];\n\nlet cos_omega = window.Math.cos(omega);\nlet sin_omega = window.Math.sin(omega);\nlet cos_Gomega = window.Math.cos(Gomega);\nlet sin_Gomega = window.Math.sin(Gomega);\nlet cos_i = window.Math.cos(inc);\nlet sin_i = window.Math.sin(inc);\n\nfunction radius(cosinus_v) {\n return p / (1 + e * cosinus_v);\n}\n\nfunction compute_orbit(v) {\n let cos_v = window.Math.cos(v);\n let sin_v = window.Math.sin(v);\n let r = radius(cos_v);\n\n let x_shape = r * cos_omega * cos_v - r * sin_omega * sin_v;\n let y_shape = r * sin_omega * cos_v + r * cos_omega * sin_v;\n\n let x_incli_only = x_shape;\n let y_incli_only = y_shape * cos_i;\n let z_incli_only = y_shape * sin_i;\n\n let x = x_incli_only * cos_Gomega - y_incli_only * sin_Gomega;\n let y = x_incli_only * sin_Gomega + y_incli_only * cos_Gomega;\n let z = z_incli_only;\n return {\n x_shape,\n y_shape,\n x,\n y,\n z,\n };\n}\n\nfor (let i = 0; i < N; i++) {\n let v = (i / (N - 1)) * 2 * window.Math.PI;\n let results = compute_orbit(v);\n x_shape_array[i] = results.x_shape;\n y_shape_array[i] = results.y_shape;\n x_array[i] = results.x;\n y_array[i] = results.y;\n z_array[i] = results.z;\n}\n\nx_apsides_in_orbital_plane[0] = a * (1 - e) * cos_omega;\ny_apsides_in_orbital_plane[0] = a * (1 - e) * sin_omega;\nx_apsides_in_orbital_plane[1] = -a * (1 + e) * cos_omega;\ny_apsides_in_orbital_plane[1] = -a * (1 + e) * sin_omega;\n\nlet radius_ascending_node = radius(window.Math.cos(2 * window.Math.PI - omega));\nx_nodes_in_equatorial_plane[0] = radius_ascending_node * cos_Gomega;\ny_nodes_in_equatorial_plane[0] = radius_ascending_node * sin_Gomega;\nlet radius_descending_node = radius(window.Math.cos(window.Math.PI - omega));\nx_nodes_in_equatorial_plane[1] = -radius_descending_node * cos_Gomega;\ny_nodes_in_equatorial_plane[1] = -radius_descending_node * sin_Gomega;\n\nlet sat_results = compute_orbit(true_anomaly);\nx_sat_in_orbital_plane[0] = sat_results.x_shape;\ny_sat_in_orbital_plane[0] = sat_results.y_shape;\nx_sat[0] = sat_results.x;\ny_sat[0] = sat_results.y;\nz_sat[0] = sat_results.z;\n\norbit_shape.change.emit();\norbit_3d.change.emit();\nposition_in_orbital_plane.change.emit();\nposition_3d.change.emit();\napsides_in_orbital_plane.change.emit();\nnodes_in_equatorial_plane.change.emit();\n\nlet orbital_period_hours =\n (2 * window.Math.PI * window.Math.sqrt((a * 1000) ** 3 / mu)) / 3600;\nlet apogee_altitude = a * (1 + e) - earth_radius;\nlet perigee_altitude = a * (1 - e) - earth_radius;\n\norbit_description_div.text = `\n <h2>Orbital Data</h2>\n <ul>\n <li>Orbital period: ${orbital_period_hours.toFixed(3)} hours</li>\n <li>Apogee altitude: ${apogee_altitude.toFixed(0)} kilometers</li>\n <li>Perigee altitude: ${perigee_altitude.toFixed(0)} kilometers</li>\n </ul>`;\n\nlet x_center_in_orbital_plane =\n (x_apsides_in_orbital_plane[0] + x_apsides_in_orbital_plane[1]) / 2;\nlet y_center_in_orbital_plane =\n (y_apsides_in_orbital_plane[0] + y_apsides_in_orbital_plane[1]) / 2;\norbital_parameters.data[\"a_x_start\"][0] = x_center_in_orbital_plane;\norbital_parameters.data[\"a_x_end\"][0] = x_apsides_in_orbital_plane[1];\norbital_parameters.data[\"a_y_start\"][0] = y_center_in_orbital_plane;\norbital_parameters.data[\"a_y_end\"][0] = y_apsides_in_orbital_plane[1];\norbital_parameters.data[\"a_label_x\"][0] =\n (orbital_parameters.data[\"a_x_start\"][0] +\n orbital_parameters.data[\"a_x_end\"][0]) /\n 2;\norbital_parameters.data[\"a_label_y\"][0] =\n (orbital_parameters.data[\"a_y_start\"][0] +\n orbital_parameters.data[\"a_y_end\"][0]) /\n 2;\norbital_parameters.data[\"e\"][0] = e;\norbital_parameters.data[\"e_label_x\"][0] = x_center_in_orbital_plane / 2;\norbital_parameters.data[\"e_label_y\"][0] = y_center_in_orbital_plane / 2;\norbital_parameters.data[\"i\"][0] = inc;\norbital_parameters.data[\"omega\"][0] = omega;\norbital_parameters.data[\"omega_label_x\"][0] = 15e3 * window.Math.cos(omega / 2);\norbital_parameters.data[\"omega_label_y\"][0] = 15e3 * window.Math.sin(omega / 2);\norbital_parameters.data[\"Gomega\"][0] = Gomega;\norbital_parameters.data[\"Gomega_label_x\"][0] =\n 15e3 * window.Math.cos(Gomega / 2);\norbital_parameters.data[\"Gomega_label_y\"][0] =\n 15e3 * window.Math.sin(Gomega / 2);\norbital_parameters.data[\"v_start\"][0] = omega;\norbital_parameters.data[\"v_end\"][0] = omega + true_anomaly;\norbital_parameters.data[\"v_label_x\"][0] =\n 17e3 * window.Math.cos(omega + true_anomaly / 2);\norbital_parameters.data[\"v_label_y\"][0] =\n 17e3 * window.Math.sin(omega + true_anomaly / 2);\norbital_parameters.change.emit();\n"},"id":"1274","type":"CustomJS"},{"attributes":{"source":{"id":"1005"}},"id":"1143","type":"CDSView"},{"attributes":{"end":80000,"start":-80000},"id":"1042","type":"Range1d"},{"attributes":{"css_classes":["spinner","sma_spinner"],"format":null,"high":50000,"js_property_callbacks":{"change:value":[{"id":"1011"}]},"low":0,"value":42164,"width":80},"id":"1010","type":"Spinner"},{"attributes":{"source":{"id":"1007"}},"id":"1097","type":"CDSView"},{"attributes":{"css_classes":["spinner","omega_spinner"],"format":null,"high":360,"js_property_callbacks":{"change:value":[{"id":"1021"}]},"low":0,"value":195,"width":80},"id":"1020","type":"Spinner"},{"attributes":{"line_color":"lightgray","line_dash":[6],"line_width":3,"x":{"field":"x"},"y":{"field":"y"}},"id":"1140","type":"Line"},{"attributes":{"code":"\n var indices = [];\n\n for (var i = 0; i < source.get_length(); i++){\n if (source.data['y'][i] <= 0){\n indices.push(true);\n } else {\n indices.push(false);\n }\n }\n return indices;\n "},"id":"1245","type":"CustomJSFilter"},{"attributes":{"filters":[{"id":"1144"}],"source":{"id":"1005"}},"id":"1145","type":"CDSView"},{"attributes":{"args":{"other":{"id":"1019"}},"code":"other.value = this.value"},"id":"1021","type":"CustomJS"},{"attributes":{"data_source":{"id":"1005"},"glyph":{"id":"1241"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1242"},"selection_glyph":null,"view":{"id":"1244"}},"id":"1243","type":"GlyphRenderer"},{"attributes":{"args":{"other":{"id":"1020"}},"code":"other.value = this.value"},"id":"1022","type":"CustomJS"},{"attributes":{"end":80000,"start":-80000},"id":"1181","type":"Range1d"},{"attributes":{"line_alpha":0.1,"line_color":"lightgray","line_dash":[6],"line_width":3,"x":{"field":"x"},"y":{"field":"z"}},"id":"1242","type":"Line"},{"attributes":{"children":[{"id":"1019"},{"id":"1020"}],"css_classes":["omega_layout"],"sizing_mode":"stretch_width"},"id":"1023","type":"Row"},{"attributes":{"fill_color":"rgb(228, 17, 63)","line_color":"rgb(228, 17, 63)","size":{"units":"screen","value":10},"x":{"field":"x"},"y":{"field":"y"}},"id":"1151","type":"Circle"},{"attributes":{"source":{"id":"1005"}},"id":"1244","type":"CDSView"},{"attributes":{"css_classes":["slider","inc_slider"],"end":180,"format":"0[.]00","js_property_callbacks":{"change:value":[{"id":"1027"},{"id":"1272"}]},"start":0,"title":"i: inclination (deg)","value":10},"id":"1024","type":"Slider"},{"attributes":{"line_color":"lightgray","line_dash":[6],"line_width":3,"x":{"field":"x"},"y":{"field":"y"}},"id":"1060","type":"Line"},{"attributes":{"fill_color":{"value":"lightgray"},"line_color":{"value":"lightgray"},"size":{"units":"screen","value":5},"x":{"field":"x"},"y":{"field":"y"}},"id":"1147","type":"Circle"},{"attributes":{"end":80000,"start":-80000},"id":"1179","type":"Range1d"},{"attributes":{"line_color":"lightgray","line_dash":[6],"line_width":3,"x":{"field":"x"},"y":{"field":"z"}},"id":"1241","type":"Line"},{"attributes":{"source":{"id":"1001"}},"id":"1063","type":"CDSView"},{"attributes":{"css_classes":["spinner","inc_spinner"],"format":null,"high":180,"js_property_callbacks":{"change:value":[{"id":"1026"}]},"low":0,"value":10,"width":80},"id":"1025","type":"Spinner"},{"attributes":{"filters":[{"id":"1245"}],"source":{"id":"1005"}},"id":"1246","type":"CDSView"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"lightgray"},"line_alpha":{"value":0.1},"line_color":{"value":"lightgray"},"size":{"units":"screen","value":5},"x":{"field":"x"},"y":{"field":"y"}},"id":"1148","type":"Circle"},{"attributes":{"data_source":{"id":"1005"},"glyph":{"id":"1147"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1148"},"selection_glyph":null,"view":{"id":"1145"}},"id":"1149","type":"GlyphRenderer"},{"attributes":{"args":{"other":{"id":"1024"}},"code":"other.value = this.value"},"id":"1026","type":"CustomJS"},{"attributes":{"code":"\n var indices = [];\n\n for (var i = 0; i < source.get_length(); i++){\n if (source.data['z'][i] >= 0){\n indices.push(true);\n } else {\n indices.push(false);\n }\n }\n return indices;\n "},"id":"1064","type":"CustomJSFilter"},{"attributes":{"args":{"N":360,"anomaly":{"id":"1034"},"aop":{"id":"1019"},"apsides_in_orbital_plane":{"id":"1003"},"eccentricity":{"id":"1014"},"inclination":{"id":"1024"},"nodes_in_equatorial_plane":{"id":"1004"},"orbit_3d":{"id":"1005"},"orbit_description_div":{"id":"1268"},"orbit_shape":{"id":"1001"},"orbital_parameters":{"id":"1007"},"position_3d":{"id":"1006"},"position_in_orbital_plane":{"id":"1002"},"raan":{"id":"1029"},"sma":{"id":"1009"}},"code":"const a = sma.value,\n e = eccentricity.value,\n p = a * (1 - e * e),\n omega = (aop.value * window.Math.PI) / 180,\n inc = (inclination.value * window.Math.PI) / 180,\n Gomega = (raan.value * window.Math.PI) / 180,\n true_anomaly = (anomaly.value * window.Math.PI) / 180,\n mu = 3.986004418e14,\n earth_radius = 6378,\n x_shape_array = orbit_shape.data[\"x\"],\n y_shape_array = orbit_shape.data[\"y\"],\n x_sat_in_orbital_plane = position_in_orbital_plane.data[\"x\"],\n y_sat_in_orbital_plane = position_in_orbital_plane.data[\"y\"],\n x_sat = position_3d.data[\"x\"],\n y_sat = position_3d.data[\"y\"],\n z_sat = position_3d.data[\"z\"],\n x_array = orbit_3d.data[\"x\"],\n y_array = orbit_3d.data[\"y\"],\n z_array = orbit_3d.data[\"z\"],\n x_apsides_in_orbital_plane = apsides_in_orbital_plane.data[\"x\"],\n y_apsides_in_orbital_plane = apsides_in_orbital_plane.data[\"y\"],\n x_nodes_in_equatorial_plane = nodes_in_equatorial_plane.data[\"x\"],\n y_nodes_in_equatorial_plane = nodes_in_equatorial_plane.data[\"y\"];\n\nlet cos_omega = window.Math.cos(omega);\nlet sin_omega = window.Math.sin(omega);\nlet cos_Gomega = window.Math.cos(Gomega);\nlet sin_Gomega = window.Math.sin(Gomega);\nlet cos_i = window.Math.cos(inc);\nlet sin_i = window.Math.sin(inc);\n\nfunction radius(cosinus_v) {\n return p / (1 + e * cosinus_v);\n}\n\nfunction compute_orbit(v) {\n let cos_v = window.Math.cos(v);\n let sin_v = window.Math.sin(v);\n let r = radius(cos_v);\n\n let x_shape = r * cos_omega * cos_v - r * sin_omega * sin_v;\n let y_shape = r * sin_omega * cos_v + r * cos_omega * sin_v;\n\n let x_incli_only = x_shape;\n let y_incli_only = y_shape * cos_i;\n let z_incli_only = y_shape * sin_i;\n\n let x = x_incli_only * cos_Gomega - y_incli_only * sin_Gomega;\n let y = x_incli_only * sin_Gomega + y_incli_only * cos_Gomega;\n let z = z_incli_only;\n return {\n x_shape,\n y_shape,\n x,\n y,\n z,\n };\n}\n\nfor (let i = 0; i < N; i++) {\n let v = (i / (N - 1)) * 2 * window.Math.PI;\n let results = compute_orbit(v);\n x_shape_array[i] = results.x_shape;\n y_shape_array[i] = results.y_shape;\n x_array[i] = results.x;\n y_array[i] = results.y;\n z_array[i] = results.z;\n}\n\nx_apsides_in_orbital_plane[0] = a * (1 - e) * cos_omega;\ny_apsides_in_orbital_plane[0] = a * (1 - e) * sin_omega;\nx_apsides_in_orbital_plane[1] = -a * (1 + e) * cos_omega;\ny_apsides_in_orbital_plane[1] = -a * (1 + e) * sin_omega;\n\nlet radius_ascending_node = radius(window.Math.cos(2 * window.Math.PI - omega));\nx_nodes_in_equatorial_plane[0] = radius_ascending_node * cos_Gomega;\ny_nodes_in_equatorial_plane[0] = radius_ascending_node * sin_Gomega;\nlet radius_descending_node = radius(window.Math.cos(window.Math.PI - omega));\nx_nodes_in_equatorial_plane[1] = -radius_descending_node * cos_Gomega;\ny_nodes_in_equatorial_plane[1] = -radius_descending_node * sin_Gomega;\n\nlet sat_results = compute_orbit(true_anomaly);\nx_sat_in_orbital_plane[0] = sat_results.x_shape;\ny_sat_in_orbital_plane[0] = sat_results.y_shape;\nx_sat[0] = sat_results.x;\ny_sat[0] = sat_results.y;\nz_sat[0] = sat_results.z;\n\norbit_shape.change.emit();\norbit_3d.change.emit();\nposition_in_orbital_plane.change.emit();\nposition_3d.change.emit();\napsides_in_orbital_plane.change.emit();\nnodes_in_equatorial_plane.change.emit();\n\nlet orbital_period_hours =\n (2 * window.Math.PI * window.Math.sqrt((a * 1000) ** 3 / mu)) / 3600;\nlet apogee_altitude = a * (1 + e) - earth_radius;\nlet perigee_altitude = a * (1 - e) - earth_radius;\n\norbit_description_div.text = `\n <h2>Orbital Data</h2>\n <ul>\n <li>Orbital period: ${orbital_period_hours.toFixed(3)} hours</li>\n <li>Apogee altitude: ${apogee_altitude.toFixed(0)} kilometers</li>\n <li>Perigee altitude: ${perigee_altitude.toFixed(0)} kilometers</li>\n </ul>`;\n\nlet x_center_in_orbital_plane =\n (x_apsides_in_orbital_plane[0] + x_apsides_in_orbital_plane[1]) / 2;\nlet y_center_in_orbital_plane =\n (y_apsides_in_orbital_plane[0] + y_apsides_in_orbital_plane[1]) / 2;\norbital_parameters.data[\"a_x_start\"][0] = x_center_in_orbital_plane;\norbital_parameters.data[\"a_x_end\"][0] = x_apsides_in_orbital_plane[1];\norbital_parameters.data[\"a_y_start\"][0] = y_center_in_orbital_plane;\norbital_parameters.data[\"a_y_end\"][0] = y_apsides_in_orbital_plane[1];\norbital_parameters.data[\"a_label_x\"][0] =\n (orbital_parameters.data[\"a_x_start\"][0] +\n orbital_parameters.data[\"a_x_end\"][0]) /\n 2;\norbital_parameters.data[\"a_label_y\"][0] =\n (orbital_parameters.data[\"a_y_start\"][0] +\n orbital_parameters.data[\"a_y_end\"][0]) /\n 2;\norbital_parameters.data[\"e\"][0] = e;\norbital_parameters.data[\"e_label_x\"][0] = x_center_in_orbital_plane / 2;\norbital_parameters.data[\"e_label_y\"][0] = y_center_in_orbital_plane / 2;\norbital_parameters.data[\"i\"][0] = inc;\norbital_parameters.data[\"omega\"][0] = omega;\norbital_parameters.data[\"omega_label_x\"][0] = 15e3 * window.Math.cos(omega / 2);\norbital_parameters.data[\"omega_label_y\"][0] = 15e3 * window.Math.sin(omega / 2);\norbital_parameters.data[\"Gomega\"][0] = Gomega;\norbital_parameters.data[\"Gomega_label_x\"][0] =\n 15e3 * window.Math.cos(Gomega / 2);\norbital_parameters.data[\"Gomega_label_y\"][0] =\n 15e3 * window.Math.sin(Gomega / 2);\norbital_parameters.data[\"v_start\"][0] = omega;\norbital_parameters.data[\"v_end\"][0] = omega + true_anomaly;\norbital_parameters.data[\"v_label_x\"][0] =\n 17e3 * window.Math.cos(omega + true_anomaly / 2);\norbital_parameters.data[\"v_label_y\"][0] =\n 17e3 * window.Math.sin(omega + true_anomaly / 2);\norbital_parameters.change.emit();\n"},"id":"1272","type":"CustomJS"},{"attributes":{"args":{"other":{"id":"1025"}},"code":"other.value = this.value"},"id":"1027","type":"CustomJS"}],"root_ids":["1354"]},"title":"Bokeh Application","version":"2.2.3"}}
</script>
<script type="text/javascript">
(function() {
var fn = function() {
Bokeh.safely(function() {
(function(root) {
function embed_document(root) {
var docs_json = document.getElementById('1679').textContent;
var render_items = [{"docid":"527ed65a-b75a-4347-819f-837373e3ac3e","root_ids":["1354"],"roots":{"1354":"c76ba1a9-3fc3-45ca-a6ea-5fd2ae8cd12b"}}];
root.Bokeh.embed.embed_items(docs_json, render_items);
}
if (root.Bokeh !== undefined) {
embed_document(root);
} else {
var attempts = 0;
var timer = setInterval(function(root) {
if (root.Bokeh !== undefined) {
clearInterval(timer);
embed_document(root);
} else {
attempts++;
if (attempts > 100) {
clearInterval(timer);
console.log("Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing");
}
}
}, 10, root)
}
})(window);
});
};
if (document.readyState != "loading") fn();
else document.addEventListener("DOMContentLoaded", fn);
})();
</script>
</body>
<div class="footnote">
<a href="https://github.com/jyannick/orbital-parameters">
View project page on GitHub
</a>
</div>
</html>