diff --git a/Manifest.toml b/code/Manifest.toml
similarity index 98%
rename from Manifest.toml
rename to code/Manifest.toml
index 9eb85aefbba4b6c7602f9c9f11f449cfcbf5242d..637eb85df91e68d5f15158ec444f78178bba9420 100644
--- a/Manifest.toml
+++ b/code/Manifest.toml
@@ -1,7 +1,8 @@
 # This file is machine-generated - editing it directly is not advised
 
-julia_version = "1.7.3"
+julia_version = "1.8.2"
 manifest_format = "2.0"
+project_hash = "e387be0c4d44d4d58f06a3ce2e2529d92e457a4a"
 
 [[deps.Adapt]]
 deps = ["LinearAlgebra"]
@@ -11,6 +12,7 @@ version = "3.3.3"
 
 [[deps.ArgTools]]
 uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
+version = "1.1.1"
 
 [[deps.ArnoldiMethod]]
 deps = ["LinearAlgebra", "Random", "StaticArrays"]
@@ -181,6 +183,7 @@ version = "3.45.0"
 [[deps.CompilerSupportLibraries_jll]]
 deps = ["Artifacts", "Libdl"]
 uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
+version = "0.5.2+0"
 
 [[deps.Conda]]
 deps = ["Downloads", "JSON", "VersionParsing"]
@@ -302,6 +305,7 @@ version = "0.9.0"
 [[deps.Downloads]]
 deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"]
 uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
+version = "1.6.0"
 
 [[deps.DualNumbers]]
 deps = ["Calculus", "NaNMath", "SpecialFunctions"]
@@ -334,10 +338,10 @@ uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a"
 version = "0.4.1"
 
 [[deps.FFMPEG_jll]]
-deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "Pkg", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"]
-git-tree-sha1 = "ccd479984c7838684b3ac204b716c89955c76623"
+deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "PCRE2_jll", "Pkg", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"]
+git-tree-sha1 = "74faea50c1d007c85837327f6775bea60b5492dd"
 uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5"
-version = "4.4.2+0"
+version = "4.4.2+2"
 
 [[deps.FastBroadcast]]
 deps = ["ArrayInterface", "ArrayInterfaceCore", "LinearAlgebra", "Polyester", "Static", "StrideArraysCore"]
@@ -643,10 +647,12 @@ version = "1.0.0"
 [[deps.LibCURL]]
 deps = ["LibCURL_jll", "MozillaCACerts_jll"]
 uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"
+version = "0.6.3"
 
 [[deps.LibCURL_jll]]
 deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"]
 uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0"
+version = "7.84.0+0"
 
 [[deps.LibGit2]]
 deps = ["Base64", "NetworkOptions", "Printf", "SHA"]
@@ -655,6 +661,7 @@ uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
 [[deps.LibSSH2_jll]]
 deps = ["Artifacts", "Libdl", "MbedTLS_jll"]
 uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8"
+version = "1.10.2+0"
 
 [[deps.Libdl]]
 uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
@@ -685,9 +692,9 @@ version = "1.42.0+0"
 
 [[deps.Libiconv_jll]]
 deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
-git-tree-sha1 = "42b62845d70a619f063a7da093d995ec8e15e778"
+git-tree-sha1 = "c7cb1f5d892775ba13767a87c7ada0b980ea0a71"
 uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531"
-version = "1.16.1+1"
+version = "1.16.1+2"
 
 [[deps.Libmount_jll]]
 deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
@@ -774,6 +781,7 @@ version = "1.1.1"
 [[deps.MbedTLS_jll]]
 deps = ["Artifacts", "Libdl"]
 uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
+version = "2.28.0+0"
 
 [[deps.Measures]]
 git-tree-sha1 = "e498ddeee6f9fdb4551ce855a46f54dbd900245f"
@@ -791,6 +799,7 @@ uuid = "a63ad114-7e13-5084-954f-fe012c677804"
 
 [[deps.MozillaCACerts_jll]]
 uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
+version = "2022.2.1"
 
 [[deps.MuladdMacro]]
 git-tree-sha1 = "c6190f9a7fc5d9d5915ab29f2134421b12d24a68"
@@ -816,6 +825,7 @@ version = "0.3.7"
 
 [[deps.NetworkOptions]]
 uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
+version = "1.2.0"
 
 [[deps.NonlinearSolve]]
 deps = ["ArrayInterfaceCore", "FiniteDiff", "ForwardDiff", "IterativeSolvers", "LinearAlgebra", "RecursiveArrayTools", "RecursiveFactorization", "Reexport", "SciMLBase", "Setfield", "StaticArrays", "UnPack"]
@@ -838,10 +848,12 @@ version = "1.3.5+1"
 [[deps.OpenBLAS_jll]]
 deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"]
 uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
+version = "0.3.20+0"
 
 [[deps.OpenLibm_jll]]
 deps = ["Artifacts", "Libdl"]
 uuid = "05823500-19ac-5b8b-9628-191a04bc5112"
+version = "0.8.1+0"
 
 [[deps.OpenSSL_jll]]
 deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
@@ -878,6 +890,11 @@ git-tree-sha1 = "81f6e310263da7de9ec048d0a40a2a71c9bd97fb"
 uuid = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
 version = "6.19.0"
 
+[[deps.PCRE2_jll]]
+deps = ["Artifacts", "Libdl"]
+uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15"
+version = "10.40.0+0"
+
 [[deps.PCRE_jll]]
 deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
 git-tree-sha1 = "b2a7af664e098055a7529ad1a900ded962bca488"
@@ -911,6 +928,7 @@ version = "0.40.1+0"
 [[deps.Pkg]]
 deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
 uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
+version = "1.8.0"
 
 [[deps.PlotThemes]]
 deps = ["PlotUtils", "Statistics"]
@@ -972,9 +990,9 @@ uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"
 
 [[deps.Qt5Base_jll]]
 deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "xkbcommon_jll"]
-git-tree-sha1 = "c6c0f690d0cc7caddb74cef7aa847b824a16b256"
+git-tree-sha1 = "0c03844e2231e12fda4d0086fd7cbe4098ee8dc5"
 uuid = "ea2cea3b-5b76-57ae-a6ef-0a8af62496e1"
-version = "5.15.3+1"
+version = "5.15.3+2"
 
 [[deps.QuadGK]]
 deps = ["DataStructures", "LinearAlgebra"]
@@ -1062,6 +1080,7 @@ version = "0.3.0+0"
 
 [[deps.SHA]]
 uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
+version = "0.7.0"
 
 [[deps.SIMDDualNumbers]]
 deps = ["ForwardDiff", "IfElse", "SLEEFPirates", "VectorizationBase"]
@@ -1223,6 +1242,7 @@ uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9"
 [[deps.SuiteSparse_jll]]
 deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"]
 uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c"
+version = "5.10.1+0"
 
 [[deps.Sundials]]
 deps = ["CEnum", "DataStructures", "DiffEqBase", "Libdl", "LinearAlgebra", "Logging", "Reexport", "SparseArrays", "Sundials_jll"]
@@ -1239,6 +1259,7 @@ version = "5.2.1+0"
 [[deps.TOML]]
 deps = ["Dates"]
 uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
+version = "1.0.0"
 
 [[deps.TableTraits]]
 deps = ["IteratorInterfaceExtensions"]
@@ -1255,6 +1276,7 @@ version = "1.7.0"
 [[deps.Tar]]
 deps = ["ArgTools", "SHA"]
 uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
+version = "1.10.1"
 
 [[deps.TensorCore]]
 deps = ["LinearAlgebra"]
@@ -1500,6 +1522,7 @@ version = "4.3.4+0"
 [[deps.Zlib_jll]]
 deps = ["Libdl"]
 uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
+version = "1.2.12+3"
 
 [[deps.Zstd_jll]]
 deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
@@ -1528,6 +1551,7 @@ version = "0.15.1+0"
 [[deps.libblastrampoline_jll]]
 deps = ["Artifacts", "Libdl", "OpenBLAS_jll"]
 uuid = "8e850b90-86db-534c-a0d3-1478176c7d93"
+version = "5.1.1+0"
 
 [[deps.libfdk_aac_jll]]
 deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
@@ -1556,10 +1580,12 @@ version = "1.3.7+1"
 [[deps.nghttp2_jll]]
 deps = ["Artifacts", "Libdl"]
 uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"
+version = "1.48.0+0"
 
 [[deps.p7zip_jll]]
 deps = ["Artifacts", "Libdl"]
 uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"
+version = "17.4.0+0"
 
 [[deps.x264_jll]]
 deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
diff --git a/Project.toml b/code/Project.toml
similarity index 89%
rename from Project.toml
rename to code/Project.toml
index 13b54f66e6443f35a2ca82501bd7082e3fe1d759..8e64d59551684470fdfe70c62d60e9d1b6eb4ab1 100644
--- a/Project.toml
+++ b/code/Project.toml
@@ -1,3 +1,5 @@
+authors = ["Olivier Cots <olivier.cots@toulouse-inp.fr>"]
+
 [deps]
 DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
 ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
diff --git a/flows.jl b/code/commun/flows.jl
similarity index 100%
rename from flows.jl
rename to code/commun/flows.jl
diff --git a/homotopy.jl b/code/commun/homotopy.jl
similarity index 100%
rename from homotopy.jl
rename to code/commun/homotopy.jl
diff --git a/plottings.jl b/code/commun/plottings.jl
similarity index 100%
rename from plottings.jl
rename to code/commun/plottings.jl
diff --git a/minimum-consumption-orbital-transfer.ipynb b/code/conso-min/transfert-conso-min.ipynb
similarity index 100%
rename from minimum-consumption-orbital-transfer.ipynb
rename to code/conso-min/transfert-conso-min.ipynb
diff --git a/minimum-time-orbital-transfer.ipynb b/code/temps-min/transfert-temps-min.ipynb
similarity index 99%
rename from minimum-time-orbital-transfer.ipynb
rename to code/temps-min/transfert-temps-min.ipynb
index 79f685c0cfee305c8e028496bfc24b5045f78c77..2bea8024c3e701634364ab727d5ea6831f29e28b 100644
--- a/minimum-time-orbital-transfer.ipynb
+++ b/code/temps-min/transfert-temps-min.ipynb
@@ -61,7 +61,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 48,
+   "execution_count": 1,
    "id": "104fc457-beaa-4783-8ce2-bb32ff0ab9e3",
    "metadata": {},
    "outputs": [],
@@ -72,13 +72,116 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 49,
+   "execution_count": 2,
    "id": "0995cf52-227b-4c1f-88cd-ec3f6bcde259",
    "metadata": {},
-   "outputs": [],
+   "outputs": [
+    {
+     "name": "stderr",
+     "output_type": "stream",
+     "text": [
+      "┌ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]\n",
+      "└ @ Base loading.jl:1423\n",
+      "\u001b[91m\u001b[1mERROR: \u001b[22m\u001b[39mLoadError: InitError: could not load library \"/Users/ocots/.julia/artifacts/1e28bb4254c27b51008f9e1839edee3406036044/lib/libavdevice.58.13.100.dylib\"\n",
+      "dlopen(/Users/ocots/.julia/artifacts/1e28bb4254c27b51008f9e1839edee3406036044/lib/libavdevice.58.13.100.dylib, 1): Library not loaded: @rpath/libglib-2.0.0.dylib\n",
+      "  Referenced from: /Users/ocots/.julia/artifacts/1e28bb4254c27b51008f9e1839edee3406036044/lib/libavdevice.58.13.100.dylib\n",
+      "  Reason: Incompatible library version: libavdevice.58.13.100.dylib requires version 7401.0.0 or later, but libglib-2.0.0.dylib provides version 6801.0.0\n",
+      "Stacktrace:\n",
+      "  [1] \u001b[0m\u001b[1mdlopen\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90ms\u001b[39m::\u001b[0mString, \u001b[90mflags\u001b[39m::\u001b[0mUInt32; \u001b[90mthrow_error\u001b[39m::\u001b[0mBool\u001b[0m\u001b[1m)\u001b[22m\n",
+      "\u001b[90m    @ \u001b[39m\u001b[90mBase.Libc.Libdl\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mlibdl.jl:117\u001b[24m\u001b[39m\n",
+      "  [2] \u001b[0m\u001b[1mdlopen\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90ms\u001b[39m::\u001b[0mString, \u001b[90mflags\u001b[39m::\u001b[0mUInt32\u001b[0m\u001b[1m)\u001b[22m\n",
+      "\u001b[90m    @ \u001b[39m\u001b[90mBase.Libc.Libdl\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mlibdl.jl:117\u001b[24m\u001b[39m\n",
+      "  [3] \u001b[0m\u001b[1mmacro expansion\u001b[22m\n",
+      "\u001b[90m    @ \u001b[39m\u001b[90m~/.julia/packages/JLLWrappers/QpMQW/src/products/\u001b[39m\u001b[90m\u001b[4mlibrary_generators.jl:54\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n",
+      "  [4] \u001b[0m\u001b[1m__init__\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[0m\u001b[1m)\u001b[22m\n",
+      "\u001b[90m    @ \u001b[39m\u001b[35mFFMPEG_jll\u001b[39m \u001b[90m~/.julia/packages/FFMPEG_jll/OCtN5/src/wrappers/\u001b[39m\u001b[90m\u001b[4mx86_64-apple-darwin.jl:39\u001b[24m\u001b[39m\n",
+      "  [5] \u001b[0m\u001b[1m_include_from_serialized\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mpath\u001b[39m::\u001b[0mString, \u001b[90mdepmods\u001b[39m::\u001b[0mVector\u001b[90m{Any}\u001b[39m\u001b[0m\u001b[1m)\u001b[22m\n",
+      "\u001b[90m    @ \u001b[39m\u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:768\u001b[24m\u001b[39m\n",
+      "  [6] \u001b[0m\u001b[1m_require_search_from_serialized\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mpkg\u001b[39m::\u001b[0mBase.PkgId, \u001b[90msourcepath\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n",
+      "\u001b[90m    @ \u001b[39m\u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:854\u001b[24m\u001b[39m\n",
+      "  [7] \u001b[0m\u001b[1m_require\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mpkg\u001b[39m::\u001b[0mBase.PkgId\u001b[0m\u001b[1m)\u001b[22m\n",
+      "\u001b[90m    @ \u001b[39m\u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1097\u001b[24m\u001b[39m\n",
+      "  [8] \u001b[0m\u001b[1mrequire\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90muuidkey\u001b[39m::\u001b[0mBase.PkgId\u001b[0m\u001b[1m)\u001b[22m\n",
+      "\u001b[90m    @ \u001b[39m\u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1013\u001b[24m\u001b[39m\n",
+      "  [9] \u001b[0m\u001b[1mrequire\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90minto\u001b[39m::\u001b[0mModule, \u001b[90mmod\u001b[39m::\u001b[0mSymbol\u001b[0m\u001b[1m)\u001b[22m\n",
+      "\u001b[90m    @ \u001b[39m\u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:997\u001b[24m\u001b[39m\n",
+      " [10] \u001b[0m\u001b[1minclude\u001b[22m\n",
+      "\u001b[90m    @ \u001b[39m\u001b[90m./\u001b[39m\u001b[90m\u001b[4mBase.jl:418\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n",
+      " [11] \u001b[0m\u001b[1minclude_package_for_output\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mpkg\u001b[39m::\u001b[0mBase.PkgId, \u001b[90minput\u001b[39m::\u001b[0mString, \u001b[90mdepot_path\u001b[39m::\u001b[0mVector\u001b[90m{String}\u001b[39m, \u001b[90mdl_load_path\u001b[39m::\u001b[0mVector\u001b[90m{String}\u001b[39m, \u001b[90mload_path\u001b[39m::\u001b[0mVector\u001b[90m{String}\u001b[39m, \u001b[90mconcrete_deps\u001b[39m::\u001b[0mVector\u001b[90m{Pair{Base.PkgId, UInt64}}\u001b[39m, \u001b[90msource\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n",
+      "\u001b[90m    @ \u001b[39m\u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1318\u001b[24m\u001b[39m\n",
+      " [12] top-level scope\n",
+      "\u001b[90m    @ \u001b[39m\u001b[90m\u001b[4mnone:1\u001b[24m\u001b[39m\n",
+      " [13] \u001b[0m\u001b[1meval\u001b[22m\n",
+      "\u001b[90m    @ \u001b[39m\u001b[90m./\u001b[39m\u001b[90m\u001b[4mboot.jl:373\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n",
+      " [14] \u001b[0m\u001b[1meval\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mx\u001b[39m::\u001b[0mExpr\u001b[0m\u001b[1m)\u001b[22m\n",
+      "\u001b[90m    @ \u001b[39m\u001b[90mBase.MainInclude\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mclient.jl:453\u001b[24m\u001b[39m\n",
+      " [15] top-level scope\n",
+      "\u001b[90m    @ \u001b[39m\u001b[90m\u001b[4mnone:1\u001b[24m\u001b[39m\n",
+      "during initialization of module FFMPEG_jll\n",
+      "in expression starting at /Users/ocots/.julia/packages/FFMPEG/OUpap/src/FFMPEG.jl:1\n",
+      "\u001b[91m\u001b[1mERROR: \u001b[22m\u001b[39mLoadError: Failed to precompile FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a] to /Users/ocots/.julia/compiled/v1.7/FFMPEG/jl_DGN9Ic.\n",
+      "Stacktrace:\n",
+      "  [1] \u001b[0m\u001b[1merror\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90ms\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n",
+      "\u001b[90m    @ \u001b[39m\u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4merror.jl:33\u001b[24m\u001b[39m\n",
+      "  [2] \u001b[0m\u001b[1mcompilecache\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mpkg\u001b[39m::\u001b[0mBase.PkgId, \u001b[90mpath\u001b[39m::\u001b[0mString, \u001b[90minternal_stderr\u001b[39m::\u001b[0mIO, \u001b[90minternal_stdout\u001b[39m::\u001b[0mIO, \u001b[90mignore_loaded_modules\u001b[39m::\u001b[0mBool\u001b[0m\u001b[1m)\u001b[22m\n",
+      "\u001b[90m    @ \u001b[39m\u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1466\u001b[24m\u001b[39m\n",
+      "  [3] \u001b[0m\u001b[1mcompilecache\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mpkg\u001b[39m::\u001b[0mBase.PkgId, \u001b[90mpath\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n",
+      "\u001b[90m    @ \u001b[39m\u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1410\u001b[24m\u001b[39m\n",
+      "  [4] \u001b[0m\u001b[1m_require\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mpkg\u001b[39m::\u001b[0mBase.PkgId\u001b[0m\u001b[1m)\u001b[22m\n",
+      "\u001b[90m    @ \u001b[39m\u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1120\u001b[24m\u001b[39m\n",
+      "  [5] \u001b[0m\u001b[1mrequire\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90muuidkey\u001b[39m::\u001b[0mBase.PkgId\u001b[0m\u001b[1m)\u001b[22m\n",
+      "\u001b[90m    @ \u001b[39m\u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1013\u001b[24m\u001b[39m\n",
+      "  [6] \u001b[0m\u001b[1mrequire\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90minto\u001b[39m::\u001b[0mModule, \u001b[90mmod\u001b[39m::\u001b[0mSymbol\u001b[0m\u001b[1m)\u001b[22m\n",
+      "\u001b[90m    @ \u001b[39m\u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:997\u001b[24m\u001b[39m\n",
+      "  [7] \u001b[0m\u001b[1minclude\u001b[22m\n",
+      "\u001b[90m    @ \u001b[39m\u001b[90m./\u001b[39m\u001b[90m\u001b[4mBase.jl:418\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n",
+      "  [8] \u001b[0m\u001b[1minclude_package_for_output\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mpkg\u001b[39m::\u001b[0mBase.PkgId, \u001b[90minput\u001b[39m::\u001b[0mString, \u001b[90mdepot_path\u001b[39m::\u001b[0mVector\u001b[90m{String}\u001b[39m, \u001b[90mdl_load_path\u001b[39m::\u001b[0mVector\u001b[90m{String}\u001b[39m, \u001b[90mload_path\u001b[39m::\u001b[0mVector\u001b[90m{String}\u001b[39m, \u001b[90mconcrete_deps\u001b[39m::\u001b[0mVector\u001b[90m{Pair{Base.PkgId, UInt64}}\u001b[39m, \u001b[90msource\u001b[39m::\u001b[0mString\u001b[0m\u001b[1m)\u001b[22m\n",
+      "\u001b[90m    @ \u001b[39m\u001b[90mBase\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mloading.jl:1318\u001b[24m\u001b[39m\n",
+      "  [9] top-level scope\n",
+      "\u001b[90m    @ \u001b[39m\u001b[90m\u001b[4mnone:1\u001b[24m\u001b[39m\n",
+      " [10] \u001b[0m\u001b[1meval\u001b[22m\n",
+      "\u001b[90m    @ \u001b[39m\u001b[90m./\u001b[39m\u001b[90m\u001b[4mboot.jl:373\u001b[24m\u001b[39m\u001b[90m [inlined]\u001b[39m\n",
+      " [11] \u001b[0m\u001b[1meval\u001b[22m\u001b[0m\u001b[1m(\u001b[22m\u001b[90mx\u001b[39m::\u001b[0mExpr\u001b[0m\u001b[1m)\u001b[22m\n",
+      "\u001b[90m    @ \u001b[39m\u001b[90mBase.MainInclude\u001b[39m \u001b[90m./\u001b[39m\u001b[90m\u001b[4mclient.jl:453\u001b[24m\u001b[39m\n",
+      " [12] top-level scope\n",
+      "\u001b[90m    @ \u001b[39m\u001b[90m\u001b[4mnone:1\u001b[24m\u001b[39m\n",
+      "in expression starting at /Users/ocots/.julia/packages/Plots/GGa6i/src/Plots.jl:1\n"
+     ]
+    },
+    {
+     "ename": "LoadError",
+     "evalue": "LoadError: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to /Users/ocots/.julia/compiled/v1.7/Plots/jl_cgHPbF.\nin expression starting at /Users/ocots/Boulot/documents/projets/2022/maison-de-fermat/code/commun/plottings.jl:1",
+     "output_type": "error",
+     "traceback": [
+      "LoadError: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to /Users/ocots/.julia/compiled/v1.7/Plots/jl_cgHPbF.\nin expression starting at /Users/ocots/Boulot/documents/projets/2022/maison-de-fermat/code/commun/plottings.jl:1",
+      "",
+      "Stacktrace:",
+      "  [1] error(s::String)",
+      "    @ Base ./error.jl:33",
+      "  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)",
+      "    @ Base ./loading.jl:1466",
+      "  [3] compilecache(pkg::Base.PkgId, path::String)",
+      "    @ Base ./loading.jl:1410",
+      "  [4] _require(pkg::Base.PkgId)",
+      "    @ Base ./loading.jl:1120",
+      "  [5] require(uuidkey::Base.PkgId)",
+      "    @ Base ./loading.jl:1013",
+      "  [6] require(into::Module, mod::Symbol)",
+      "    @ Base ./loading.jl:997",
+      "  [7] include(fname::String)",
+      "    @ Base.MainInclude ./client.jl:451",
+      "  [8] top-level scope",
+      "    @ In[2]:2",
+      "  [9] eval",
+      "    @ ./boot.jl:373 [inlined]",
+      " [10] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)",
+      "    @ Base ./loading.jl:1196"
+     ]
+    }
+   ],
    "source": [
-    "include(\"flows.jl\");\n",
-    "include(\"plottings.jl\");"
+    "include(\"../commun/flows.jl\");\n",
+    "include(\"../commun/plottings.jl\");"
    ]
   },
   {
diff --git a/transfert-temps-min-avec-audio.mp4 b/media/conso-min/transfert-conso-min.aup3
similarity index 53%
rename from transfert-temps-min-avec-audio.mp4
rename to media/conso-min/transfert-conso-min.aup3
index e60ed3f4af47c61cb9289452315f523598dc52d9..af3b49a652682872c4c988393538e0c41537e620 100644
Binary files a/transfert-temps-min-avec-audio.mp4 and b/media/conso-min/transfert-conso-min.aup3 differ
diff --git a/transfert-conso-min.gif b/media/conso-min/transfert-conso-min.gif
similarity index 100%
rename from transfert-conso-min.gif
rename to media/conso-min/transfert-conso-min.gif
diff --git a/media/conso-min/transfert-conso-min.mp3 b/media/conso-min/transfert-conso-min.mp3
new file mode 100644
index 0000000000000000000000000000000000000000..37ad8ff80851088bccec5f1467d018f5563d7b49
Binary files /dev/null and b/media/conso-min/transfert-conso-min.mp3 differ
diff --git a/transfert-conso-min.mp4 b/media/conso-min/transfert-conso-min.mp4
similarity index 100%
rename from transfert-conso-min.mp4
rename to media/conso-min/transfert-conso-min.mp4
diff --git a/media/conso-min/transfert-conso-min.srt b/media/conso-min/transfert-conso-min.srt
new file mode 100644
index 0000000000000000000000000000000000000000..1dcd56dba43f36db696427bf009851cd94cc45da
--- /dev/null
+++ b/media/conso-min/transfert-conso-min.srt
@@ -0,0 +1,73 @@
+1
+00:00:00,200 --> 00:00:04,500
+Le satellite suit dans un premier temps l'orbite elliptique verte.
+
+2
+00:00:05,100 --> 00:00:9,200
+Au plus loin de la Terre, le transfert commence et les moteurs s'allument.
+
+3
+00:00:10,000 --> 00:00:15,200
+Le satellite a pour objectif de rejoindre l'orbite circulaire qui apparait en bleu à l'écran,
+
+4
+00:00:15,500 --> 00:00:21,600
+en un temps fixé à 1,5 fois le temps minimal, c'est-à-dire environ 90 heures, 
+
+5
+00:00:21,800 --> 00:00:24,300
+en consommant le moins de carburant possible.
+
+6
+00:00:25,000 --> 00:00:29,100
+Ce temps minimal de transfert dépend de la poussée maximale des moteurs 
+
+7
+00:00:29,200 --> 00:00:33,500
+que l'on peut voir à gauche de l'écran être fixée à 20N.
+
+8
+00:00:35,000 --> 00:00:39,500
+Revenons sur le satellite. Nous pouvons remarquer que sa stratégie alterne
+
+9
+00:00:39,700 --> 00:00:44,100
+entre des phases de poussée à pleine puissance et des phases à moteurs éteints.
+
+10
+00:00:45,000 --> 00:00:51,300
+La flèche rouge ancrée sur le satellite nous indique la direction de poussée
+quand les moteurs sont allumés.
+
+11
+00:00:52,500 --> 00:00:58,100
+Le satellite profite de la vitesse que lui procure l'attraction terrestre 
+lorsqu'il est proche de la Terre
+
+12
+00:00:58,500 --> 00:01:06,100
+et profite d'une plus faible attraction pour allumer ses moteurs et 
+régler sa vitesse lorsqu'il est loin de celle-ci.
+
+13
+00:01:09,900 --> 00:01:14,600
+Le satellite fait un dernier ajustement avant de rejoindre l'orbite finale
+
+14
+00:01:15,000 --> 00:01:18,200
+pour être à la bonne distance de la Terre et avoir la bonne vitesse, 
+
+15
+00:01:18,800 --> 00:01:23,500
+ce qui lui permet ensuite de maintenir son orbite malgré les moteurs éteints.
+
+16
+00:01:25,700 --> 00:01:28,800
+Nous pouvons finalement remarquer, comme indiqué en bas à gauche de l'écran, 
+
+17
+00:01:29,200 --> 00:01:36,000
+que malgré une durée de transfert plus grande que celle du problème à temps minimal, 
+le satellite a consommé moins de carburant.
+
+
diff --git a/media/temps-min/transfert-temps-min.aup3 b/media/temps-min/transfert-temps-min.aup3
new file mode 100644
index 0000000000000000000000000000000000000000..6f29836e57a5e4dbfc5d78e97144b9bc3d11b49a
Binary files /dev/null and b/media/temps-min/transfert-temps-min.aup3 differ
diff --git a/transfert-temps-min.gif b/media/temps-min/transfert-temps-min.gif
similarity index 100%
rename from transfert-temps-min.gif
rename to media/temps-min/transfert-temps-min.gif
diff --git a/media/temps-min/transfert-temps-min.mp3 b/media/temps-min/transfert-temps-min.mp3
new file mode 100644
index 0000000000000000000000000000000000000000..cb2fc315953d030290f034008a85b806da23b91c
Binary files /dev/null and b/media/temps-min/transfert-temps-min.mp3 differ
diff --git a/transfert-temps-min.mp4 b/media/temps-min/transfert-temps-min.mp4
similarity index 100%
rename from transfert-temps-min.mp4
rename to media/temps-min/transfert-temps-min.mp4
diff --git a/media/temps-min/transfert-temps-min.srt b/media/temps-min/transfert-temps-min.srt
new file mode 100644
index 0000000000000000000000000000000000000000..ed3b828d8a379d2f87cb584b2e97c525793804dc
--- /dev/null
+++ b/media/temps-min/transfert-temps-min.srt
@@ -0,0 +1,70 @@
+1
+00:00:00,200 --> 00:00:04,500
+Le satellite suit dans un premier temps l'orbite elliptique verte.
+
+2
+00:00:05,100 --> 00:00:9,200
+Au plus loin de la Terre, le transfert commence 
+et les moteurs s'allument.
+
+3
+00:00:10,000 --> 00:00:14,600
+Le satellite a pour objectif de rejoindre l'orbite
+circulaire qui apparait en bleu,
+
+4
+00:00:15,200 --> 00:00:17,300
+le plus rapidement possible.
+
+5
+00:00:18,000 --> 00:00:23,850
+La stratégie consiste donc à manoeuvrer tout en
+gardant une poussée maximale à chaque instant.
+
+6
+00:00:24,500 --> 00:00:28,100
+Cette poussée étant fixée ici à 20N.
+
+7
+00:00:29,700 --> 00:00:34,600
+La flèche rouge ancrée sur le satellite 
+indique la direction de poussée.
+
+8
+00:00:35,000 --> 00:00:38,800
+Nous pouvons voir ces deux coordonnées 
+en haut à gauche de l'écran.
+
+9
+00:00:39,700 --> 00:00:43,200
+Revenons sur le satellite et remarquons sur le dernier tour
+
+10
+00:00:43,300 --> 00:00:46,300
+du transfert qu'il a changé le sens de rotation de
+
+11
+00:00:46,400 --> 00:00:49,200
+son attitude pour amorcer la phase finale.
+
+12
+00:00:49,800 --> 00:00:53,200
+Nous pouvons voir en bas à gauche de l'écran que la vitesse
+
+13
+00:00:53,300 --> 00:00:57,100
+du satellite diminue légèrement à l'approche de l'orbite cible :
+
+14
+00:00:57,400 --> 00:00:58,800
+le satellite freine.
+
+15
+00:00:59,500 --> 00:01:04,050
+Ca y'est, le transfert est maintenant fini après près de 60 heures.
+
+15
+00:01:04,600 --> 00:01:13,200
+Le satellite se trouve à la bonne distance de la Terre et 
+se déplace à la bonne vitesse, ce qui lui permet de maintenir
+cet orbite malgré les moteurs éteints.
diff --git a/readme.md b/readme.md
index 374d4074486844503355940d1d933879a802a847..04d99851a4570ddacbf9b8259e7eada4730ecfd2 100644
--- a/readme.md
+++ b/readme.md
@@ -1,9 +1,12 @@
 # Transfert orbital autour de la Terre d'un satellite 
 
-## Temps minimal
+Vous trouverez dans les répertoires `media/temps-min` et `media/conso-min` les fichiers 
+aux extensions suivantes :
 
-![transfert-temps-min.mp4](transfert-temps-min.mp4)
+* `.aup3` : le fichier audio `Audacity` que l'on peut modifier, qui contient la description audio
+du transfert orbital ;
+* `mp3` : le fichier audio `.aup3` converti ;
+* `.gif` : le fichier `GIF` du transfert orbital ;
+* `.mp4` : la vidéo du transfert orbital ;
+* `.srt` : les sous-titres du transfert orbital, que l'on peut donc joindre à la vidéo.
 
-## Consommation minimale
-
-![transfert-conso-min.mp4](transfert-conso-min.mp4)
diff --git a/transfert-conso-min-original.mp4 b/transfert-conso-min-original.mp4
deleted file mode 100644
index f7a348013ccf9e036a0f26018a6a7517df66fb30..0000000000000000000000000000000000000000
Binary files a/transfert-conso-min-original.mp4 and /dev/null differ
diff --git a/transfert-temps-min-original.mp4 b/transfert-temps-min-original.mp4
deleted file mode 100644
index e241b82d95e171b0c0ba25d7e3cc06ddf9ec7265..0000000000000000000000000000000000000000
Binary files a/transfert-temps-min-original.mp4 and /dev/null differ
diff --git a/transfert-temps-min.ipynb b/transfert-temps-min.ipynb
deleted file mode 100644
index cbf9553ed4f8c5f0a0e657642950b6b08b233a6b..0000000000000000000000000000000000000000
--- a/transfert-temps-min.ipynb
+++ /dev/null
@@ -1,1461 +0,0 @@
-{
- "cells": [
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "# Transfert orbital en temps minimal\n",
-    "\n",
-    "* Pour la maison de Fermat.\n",
-    "* Auteur : Olivier Cots\n",
-    "* Date : 05/06/2022\n",
-    "\n",
-    "----\n",
-    "\n",
-    "On considère le problème de transfert orbital en temps minimal d'un satellite partant d'une orbite initiale elliptique et devant rejoindre une orbite finale circulaire.\n",
-    "Ce problème s'écrit comme un problème de contrôle optimal sous la forme\n",
-    "\n",
-    "$$\n",
-    "\\left\\lbrace\n",
-    "\\begin{array}{l}\n",
-    "    \\min J(x, u, t_f) = t_f \\\\[1.0em]\n",
-    "    \\ \\ \\dot{x}_{1}(t) = ~ x_{3}(t)  \\\\\n",
-    "    \\ \\ \\dot{x}_{2}(t) = ~ x_{4}(t)  \\\\\n",
-    "    \\ \\ \\dot{x}_{3}(t) =  -\\dfrac{\\mu\\, x_{1}(t)}{r^{3}(t)} + u_{1}(t)  \\\\\n",
-    "    \\ \\ \\dot{x}_{4}(t) =  -\\dfrac{\\mu\\, x_{2}(t)}{r^{3}(t)}+u_{2}(t), ~~ ||u(t)|| \\leq \\gamma_\\mathrm{max}, ~~ t \\in [0,t_f] ~~ \\text{p. p}, ~~ u(t) = (u_1(t),u_2(t)),  \\\\[1.0em]\n",
-    "    \\ \\ x_{1}(0)=x_{0,1}, ~~ x_{2}(0)=x_{0,2}, ~~ x_{3}(0)=x_{0,3}, ~~ x_{4}(0)=x_{0,4}, \\\\\n",
-    "    \\ \\ r^2(t_f) = r_{f}^2, ~~ x_{3}(t_f)=-\\sqrt{\\dfrac{\\mu}{r_{f}^{3}}}x_{2}(t_f), ~~ x_{4}           (t_f)= \\sqrt{\\dfrac{\\mu}{r_{f}^{3}}}x_{1}(t_f), \\\\\n",
-    "\\end{array}\n",
-    "\\right.\n",
-    "$$\n",
-    "\n",
-    "avec $r(t)=\\sqrt{x_{1}^{2}(t)+x_{2}^{2}(t)}$.\n",
-    "Les unités choisies sont le kilomètre pour les distances et l'heure pour les  temps. On donne les paramètres suivants :\n",
-    " \n",
-    "$$\n",
-    "\\mu=5.1658620912 \\times 10^{12} \\ \\mathrm{km}^{3}.\\mathrm{h}^{-2}, \\quad r_{f} = 42165 \\ \\mathrm{km}.\n",
-    "$$\n",
-    "\n",
-    "Le paramètre $\\gamma_\\mathrm{max}$ dépend de la poussée maximale $F_\\mathrm{max}$ suivant la relation :\n",
-    "\n",
-    "$$\n",
-    "\\gamma_\\mathrm{max} = \\frac{F_\\mathrm{max}\\times 3600^2}{m} \n",
-    "$$\n",
-    "\n",
-    "où m est la masse du satellite qu'on fixe à $m=2000\\ \\mathrm{kg}$."
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "## Préliminaires"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "### Packages"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 19,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "using DifferentialEquations, NLsolve, ForwardDiff, Plots, LinearAlgebra\n",
-    "using Plots.PlotMeasures\n",
-    "using SparseArrays\n",
-    "using Printf\n",
-    "int(x) = floor(Int, x);"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "### Les constantes du problème"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 20,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "x0     = [-42272.67, 0, 0, -5796.72] # état initial\n",
-    "μ      = 5.1658620912*1e12\n",
-    "rf     = 42165.0 ;\n",
-    "F_max  = 20.0 #100.0\n",
-    "γ_max  = F_max*3600.0^2/(2000.0*10^3)\n",
-    "t0     = 0.0\n",
-    "rf3    = rf^3  ;\n",
-    "α      = sqrt(μ/rf3);"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 21,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "rayon_Terre = 6371;\n",
-    "sc_sat = 1000;"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "### Flots de champs de vecteurs"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 22,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "# Hamiltonian Vector field\n",
-    "mutable struct HV\n",
-    "    fun :: Function\n",
-    "end\n",
-    "\n",
-    "# Fonction permettant de calculer le flot d'un système hamiltonien\n",
-    "function Flow(hv::HV)\n",
-    "\n",
-    "    function rhs!(dz, z, dummy, t)\n",
-    "        n = size(z, 1)÷2\n",
-    "        dz[:] = hv.fun(z[1:n], z[n+1:2*n])\n",
-    "    end\n",
-    "    \n",
-    "    function f(tspan, x0, p0; abstol=1e-12, reltol=1e-12, saveat=0.05)\n",
-    "        z0 = [ x0 ; p0 ]\n",
-    "        ode = ODEProblem(rhs!, z0, tspan)\n",
-    "        sol = DifferentialEquations.solve(ode, Tsit5(), abstol=abstol, reltol=reltol, saveat=saveat)\n",
-    "        return sol\n",
-    "    end\n",
-    "    \n",
-    "    function f(t0, x0, p0, t; abstol=1e-12, reltol=1e-12, saveat=[])\n",
-    "        sol = f((t0, t), x0, p0; abstol=abstol, reltol=reltol, saveat=saveat)\n",
-    "        n = size(x0, 1)\n",
-    "        return sol[1:n, end], sol[n+1:2*n, end]\n",
-    "    end\n",
-    "    \n",
-    "    return f\n",
-    "\n",
-    "end;\n",
-    "\n",
-    "# Vector field\n",
-    "mutable struct VF\n",
-    "    fun :: Function\n",
-    "end\n",
-    "\n",
-    "# Fonction permettant de calculer le flot d'un champ de vecteurs\n",
-    "function Flow(vf::VF)\n",
-    "\n",
-    "    function rhs!(dx, x, dummy, t)\n",
-    "        dx[:] = vf.fun(x)\n",
-    "    end\n",
-    "    \n",
-    "    function f(tspan, x0; abstol=1e-12, reltol=1e-12, saveat=0.05)\n",
-    "        ode = ODEProblem(rhs!, x0, tspan)\n",
-    "        sol = DifferentialEquations.solve(ode, Tsit5(), abstol=abstol, reltol=reltol, saveat=saveat)\n",
-    "        return sol\n",
-    "    end\n",
-    "    \n",
-    "    function f(t0, x0, t; abstol=1e-12, reltol=1e-12, saveat=[])\n",
-    "        sol = f((t0, t), x0; abstol=abstol, reltol=reltol, saveat=saveat)\n",
-    "        n = size(x0, 1)\n",
-    "        return sol[1:n, end]\n",
-    "    end\n",
-    "    \n",
-    "    return f\n",
-    "\n",
-    "end;"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "## Fonctions d'affichage"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "### Satellite"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 23,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "# Corps du satellite\n",
-    "@userplot SatBody\n",
-    "@recipe function f(cp::SatBody)\n",
-    "    x, y = cp.args\n",
-    "    seriestype --> :shape\n",
-    "    fillcolor  --> :goldenrod1\n",
-    "    linecolor  --> :goldenrod1\n",
-    "    x, y\n",
-    "end\n",
-    "\n",
-    "@userplot SatLine\n",
-    "@recipe function f(cp::SatLine)\n",
-    "    x, y = cp.args\n",
-    "    linecolor  --> :black\n",
-    "    x, y\n",
-    "end\n",
-    "\n",
-    "# Bras du satellite\n",
-    "@userplot SatBras\n",
-    "@recipe function f(cp::SatBras)\n",
-    "    x, y = cp.args\n",
-    "    seriestype --> :shape\n",
-    "    fillcolor  --> :goldenrod1\n",
-    "    linecolor  --> :white\n",
-    "    x, y\n",
-    "end\n",
-    "\n",
-    "# panneau\n",
-    "@userplot PanBody\n",
-    "@recipe function f(cp::PanBody)\n",
-    "    x, y = cp.args\n",
-    "    seriestype --> :shape\n",
-    "    fillcolor  --> :dodgerblue4\n",
-    "    linecolor  --> :black\n",
-    "    x, y\n",
-    "end\n",
-    "\n",
-    "# flamme\n",
-    "@userplot Flamme\n",
-    "@recipe function f(cp::Flamme)\n",
-    "    x, y = cp.args\n",
-    "    seriestype --> :shape\n",
-    "    fillcolor  --> :darkorange1\n",
-    "    linecolor  --> false\n",
-    "    x, y\n",
-    "end\n",
-    "\n",
-    "function satellite!(pl; subplot=1, thrust=false, position=[0;0], scale=1, rotate=0)\n",
-    "    \n",
-    "    # Fonctions utiles\n",
-    "    R(θ) = [ cos(θ) -sin(θ)\n",
-    "             sin(θ)  cos(θ)] # rotation\n",
-    "    T(x, v) = x.+v # translation\n",
-    "    H(λ, x) = λ.*x # homotéthie\n",
-    "    SA(x, θ, c) = c .+ 2*[cos(θ);sin(θ)]'*(x.-c).*[cos(θ);sin(θ)]-(x.-c) # symétrie axiale\n",
-    "    \n",
-    "    #\n",
-    "    O  = position\n",
-    "    Rθ = R(rotate)\n",
-    "    \n",
-    "    # Paramètres\n",
-    "    α  = π/10.0     # angle du tube, par rapport à l'horizontal\n",
-    "    β  = π/2-π/40   # angle des bras, par rapport à l'horizontal\n",
-    "    Lp = scale.*1.4*cos(α) # longueur d'un panneau\n",
-    "    lp = scale.*2.6*sin(α) # largueur d'un panneau\n",
-    "    \n",
-    "    # Param bras du satellite\n",
-    "    lb = scale.*3*cos(α)   # longueur des bras\n",
-    "    eb = scale.*cos(α)/30  # demi largeur des bras\n",
-    "    xb = 0.0\n",
-    "    yb = scale.*sin(α)\n",
-    "\n",
-    "    # Paramètres corps du satellite\n",
-    "    t  = range(-α, α, length = 50)\n",
-    "    x  = scale.*cos.(t);\n",
-    "    y  = scale.*sin.(t);\n",
-    "    Δx = scale.*cos(α)\n",
-    "    Δy = scale.*sin(α)\n",
-    "    \n",
-    "    # Paramètres flamme\n",
-    "    hF = yb # petite hauteur\n",
-    "    HF = 2*hF # grande hauteur\n",
-    "    LF = 5.5*Δx # longueur\n",
-    "    \n",
-    "    # Dessin bras du satellite\n",
-    "    M = T(Rθ*[ [xb-eb, xb+eb, xb+eb+lb*cos(β), xb-eb+lb*cos(β), xb-eb]';\n",
-    "             [yb, yb, yb+lb*sin(β), yb+lb*sin(β), yb]'], O); \n",
-    "    satbras!(pl, M[1,:], M[2,:], subplot=subplot)\n",
-    "    M = T(Rθ*[ [xb-eb, xb+eb, xb+eb+lb*cos(β), xb-eb+lb*cos(β), xb-eb]';\n",
-    "             -[yb, yb, yb+lb*sin(β), yb+lb*sin(β), yb']'], O); \n",
-    "    satbras!(pl, M[1,:], M[2,:], subplot=subplot)\n",
-    "    \n",
-    "    # Dessin corps du satellite\n",
-    "    M = T(Rθ*[ x'; y'], O); satbody!(pl, M[1,:], M[2,:], subplot=subplot)  # bord droit\n",
-    "    M = T(Rθ*[-x'; y'], O); satbody!(pl, M[1,:], M[2,:], subplot=subplot)  # bord gauche\n",
-    "    M = T(Rθ*[scale.*[-cos(α), cos(α), cos(α), -cos(α)]'\n",
-    "              scale.*[-sin(α), -sin(α), sin(α), sin(α)]'], O); \n",
-    "    satbody!(pl, M[1,:], M[2,:], subplot=subplot) # interieur\n",
-    "\n",
-    "    M = T(Rθ*[ x'; y'], O); satline!(pl, M[1,:], M[2,:], subplot=subplot)  # bord droit\n",
-    "    M = T(Rθ*[-x'; y'], O); satline!(pl, M[1,:], M[2,:], subplot=subplot)  # bord gauche\n",
-    "    M = T(Rθ*[ x'.-2*Δx; y'], O); satline!(pl, M[1,:], M[2,:], subplot=subplot) # bord gauche (droite)\n",
-    "    M = T(Rθ*[ scale.*[-cos(α), cos(α)]'; \n",
-    "               scale.*[ sin(α), sin(α)]'], O);\n",
-    "    satline!(pl, M[1,:], M[2,:], subplot=subplot) # haut\n",
-    "    M = T(Rθ*[  scale.*[-cos(α), cos(α)]'; \n",
-    "               -scale.*[ sin(α), sin(α)]'], O);\n",
-    "    satline!(pl, M[1,:], M[2,:], subplot=subplot) # bas\n",
-    "\n",
-    "    # Panneau\n",
-    "    ep = (lb-3*lp)/6\n",
-    "    panneau = [0 Lp Lp 0\n",
-    "               0 0 lp lp]\n",
-    "\n",
-    "    ey = 3*eb # eloignement des panneaux au bras\n",
-    "    vy = [cos(β-π/2); sin(β-π/2)] .* ey\n",
-    "    v0 = [0; yb]\n",
-    "    v1 = 2*ep*[cos(β); sin(β)]\n",
-    "    v2 = (3*ep+lp)*[cos(β); sin(β)]\n",
-    "    v3 = (4*ep+2*lp)*[cos(β); sin(β)]\n",
-    "\n",
-    "    pa1 = T(R(β-π/2)*panneau, v0+v1+vy); pa = T(Rθ*pa1, O); panbody!(pl, pa[1,:], pa[2,:], subplot=subplot)\n",
-    "    pa2 = T(R(β-π/2)*panneau, v0+v2+vy); pa = T(Rθ*pa2, O); panbody!(pl, pa[1,:], pa[2,:], subplot=subplot)\n",
-    "    pa3 = T(R(β-π/2)*panneau, v0+v3+vy); pa = T(Rθ*pa3, O); panbody!(pl, pa[1,:], pa[2,:], subplot=subplot)\n",
-    "\n",
-    "    pa4 = SA(pa1, β, [xb; yb]); pa = T(Rθ*pa4, O); panbody!(pl, pa[1,:], pa[2,:], subplot=subplot)\n",
-    "    pa5 = SA(pa2, β, [xb; yb]); pa = T(Rθ*pa5, O); panbody!(pl, pa[1,:], pa[2,:], subplot=subplot)\n",
-    "    pa6 = SA(pa3, β, [xb; yb]); pa = T(Rθ*pa6, O); panbody!(pl, pa[1,:], pa[2,:], subplot=subplot)\n",
-    "\n",
-    "    pa7 = SA(pa1, 0, [0; 0]); pa = T(Rθ*pa7, O); panbody!(pl, pa[1,:], pa[2,:], subplot=subplot)\n",
-    "    pa8 = SA(pa2, 0, [0; 0]); pa = T(Rθ*pa8, O); panbody!(pl, pa[1,:], pa[2,:], subplot=subplot)\n",
-    "    pa9 = SA(pa3, 0, [0; 0]); pa = T(Rθ*pa9, O); panbody!(pl, pa[1,:], pa[2,:], subplot=subplot)\n",
-    "\n",
-    "    pa10 = SA(pa7, -β, [xb; -yb]); pa = T(Rθ*pa10, O); panbody!(pl, pa[1,:], pa[2,:], subplot=subplot)\n",
-    "    pa11 = SA(pa8, -β, [xb; -yb]); pa = T(Rθ*pa11, O); panbody!(pl, pa[1,:], pa[2,:], subplot=subplot)\n",
-    "    pa12 = SA(pa9, -β, [xb; -yb]); pa = T(Rθ*pa12, O); panbody!(pl, pa[1,:], pa[2,:], subplot=subplot)\n",
-    "\n",
-    "    # Dessin flamme\n",
-    "    if thrust\n",
-    "        origin = T(Rθ*[Δx, 0.0], O)\n",
-    "        thrust = Rθ*[8000, 0.0]\n",
-    "        quiver!(pl, [origin[1]], [origin[2]], color=:red, \n",
-    "                quiver=([thrust[1]], [thrust[2]]), linewidth=1, subplot=subplot)\n",
-    "    end\n",
-    "    \n",
-    "end;"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "### Etoiles"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 24,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "@userplot StarsPlot\n",
-    "@recipe function f(cp::StarsPlot)\n",
-    "    xo, yo, Δx, Δy, I, A, m, n = cp.args\n",
-    "    seriestype --> :scatter\n",
-    "    seriescolor  --> :white\n",
-    "    seriesalpha --> A\n",
-    "    markerstrokewidth --> 0\n",
-    "    markersize --> 2*I[3]\n",
-    "    xo.+I[2].*Δx./n, yo.+I[1].*Δy./m\n",
-    "end\n",
-    "\n",
-    "mutable struct Stars\n",
-    "    s\n",
-    "    i\n",
-    "    m\n",
-    "    n\n",
-    "    a\n",
-    "end\n",
-    "\n",
-    "# Etoiles\n",
-    "function stars(ρ)\n",
-    "    n = 200       # nombre de colonnes\n",
-    "    m = int(ρ*n) # nombre de lignes\n",
-    "    d = 0.03\n",
-    "    s = sprand(m, n, d)\n",
-    "    i = findnz(s)\n",
-    "    s = dropzeros(s)\n",
-    "    # alpha\n",
-    "    amin = 0.6\n",
-    "    amax = 1.0\n",
-    "    Δa = amax-amin\n",
-    "    a  = amin.+rand(length(i[3])).*Δa\n",
-    "    return Stars(s, i, m, n, a)\n",
-    "end;"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "### Trajectoire"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 25,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "@userplot TrajectoryPlot\n",
-    "@recipe function f(cp::TrajectoryPlot)\n",
-    "    t, x, y, tf = cp.args\n",
-    "    n = argmin(abs.(t.-tf))\n",
-    "    inds = 1:n\n",
-    "    seriescolor  --> :white\n",
-    "    linewidth --> range(0, 3, length = n)\n",
-    "    seriesalpha --> range(0, 1.0, length = n)\n",
-    "    aspect_ratio --> 1\n",
-    "    label --> false\n",
-    "    x[inds], y[inds]\n",
-    "end"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "### Décor"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 26,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "# Décor\n",
-    "function background(w, h, xmin, xmax, ymin, ymax, \n",
-    "        X1_orb_init, X2_orb_init, X1_orb_arr, X2_orb_arr,\n",
-    "        cx, cy, S, Δx, Δy, cam_x, cam_y, cam_zoom, opi, opf, times, time_current)\n",
-    "\n",
-    "    # Fond\n",
-    "    px = plot(background_color=:gray8, legend = false, aspect_ratio=:equal, \n",
-    "            size = (w, h), framestyle = :none, \n",
-    "            left_margin=-25mm, bottom_margin=-10mm, top_margin=-10mm, right_margin=-10mm,\n",
-    "            xlims=(xmin, xmax), ylims=(ymin, ymax) #, \n",
-    "            #camera=(0, 90), xlabel = \"x\", ylabel= \"y\", zlabel = \"z\", right_margin=25mm\n",
-    "    )\n",
-    "    \n",
-    "    # Etoiles\n",
-    "    starsplot!(px, xmin, ymin, Δx, Δy, S.i, S.a, S.m, S.n)\n",
-    "    \n",
-    "    starsplot!(px, xmin-Δx, ymin-Δy, Δx, Δy, S.i, S.a, S.m, S.n)\n",
-    "    starsplot!(px, xmin, ymin-Δy, Δx, Δy, S.i, S.a, S.m, S.n)\n",
-    "    starsplot!(px, xmin, ymin+Δy, Δx, Δy, S.i, S.a, S.m, S.n)\n",
-    "    starsplot!(px, xmin-Δx, ymin, Δx, Δy, S.i, S.a, S.m, S.n)\n",
-    "    starsplot!(px, xmin+Δx, ymin, Δx, Δy, S.i, S.a, S.m, S.n)\n",
-    "    starsplot!(px, xmin-Δx, ymin+Δy, Δx, Δy, S.i, S.a, S.m, S.n)\n",
-    "    starsplot!(px, xmin, ymin+Δy, Δx, Δy, S.i, S.a, S.m, S.n)\n",
-    "    starsplot!(px, xmin+Δx, ymin+Δy, Δx, Δy, S.i, S.a, S.m, S.n)\n",
-    "\n",
-    "    # Orbite initiale\n",
-    "    nn = length(X2_orb_init)\n",
-    "    plot!(px, cx.+X1_orb_init, cy.+X2_orb_init, color = :olivedrab1, linewidth=2, alpha=opi)\n",
-    "    \n",
-    "    # Orbite finale\n",
-    "    nn = length(X2_orb_init)\n",
-    "    plot!(px, cx.+X1_orb_arr, cy.+X2_orb_arr, color = :turquoise1, linewidth=2, alpha=opf)\n",
-    "    \n",
-    "    # Terre\n",
-    "    θ = range(0, 2π, 100)\n",
-    "    rT = rayon_Terre #- 1000\n",
-    "    xT = cx .+ rT .* cos.(θ)\n",
-    "    yT = cy .+ rT .* sin.(θ)\n",
-    "    nn = length(xT)\n",
-    "    plot!(px, xT, yT, color = :dodgerblue1, seriestype=:shape, linewidth=0)    \n",
-    "    \n",
-    "    # Soleil\n",
-    "    i_current = argmin(abs.(times.-time_current))\n",
-    "    e = π/6\n",
-    "    β = range(π/4+e, π/4-e, length(times))\n",
-    "    ρ = sqrt((0.8*xmax-cx)^2+(0.8*ymax-cy)^2)\n",
-    "    cxS = cx + ρ * cos(β[i_current])\n",
-    "    cyS = cy + ρ * sin(β[i_current])    \n",
-    "    θ = range(0, 2π, 100)\n",
-    "    rS = 2000\n",
-    "    xS = cxS .+ rS .* cos.(θ)\n",
-    "    yS = cyS .+ rS .* sin.(θ)\n",
-    "    plot!(px, xS, yS, color = :gold, seriestype=:shape, linewidth=0)    \n",
-    "    \n",
-    "    # Point de départ\n",
-    "    #plot!(px, [cx+x0[1]], [cy+x0[2]], seriestype=:scatter, color = :white, markerstrokewidth=0)  \n",
-    "    \n",
-    "    # Cadre\n",
-    "    #plot!(px, [xmin, xmax, xmax, xmin, xmin], [ymin, ymin, ymax, ymax, ymin], color=:white)\n",
-    "\n",
-    "    # Angle\n",
-    "    #plot!(px, camera=(30,90))\n",
-    "    \n",
-    "    return px\n",
-    "    \n",
-    "end;"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 27,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "function panneau_control!(px, time_current, times, u, F_max, γ_max, subplot_current)\n",
-    "    \n",
-    "    # We set the (optional) position relative to top-left of the 1st subplot.\n",
-    "    # The call is `bbox(x, y, width, height, origin...)`,\n",
-    "    # where numbers are treated as \"percent of parent\".\n",
-    "    Δt_control = 2 #0.1*times[end]\n",
-    "\n",
-    "    xx = 0.08\n",
-    "    yy = 0.1\n",
-    "    plot!(px, times, F_max.*u[1,:]./γ_max,\n",
-    "        inset = (1, bbox(xx, yy, 0.2, 0.15, :top, :left)),\n",
-    "        subplot = subplot_current,\n",
-    "        bg_inside = nothing,\n",
-    "        color=:red, legend=:true, yguidefontrotation=-90, yguidefonthalign = :right,\n",
-    "        xguidefontsize=14, legendfontsize=14,\n",
-    "        ylims=(-F_max,F_max), \n",
-    "        xlims=(time_current-Δt_control, time_current+1.0*Δt_control),\n",
-    "        ylabel=\"u₁ [N]\", label=\"\"\n",
-    "    )\n",
-    "\n",
-    "    plot!(px, \n",
-    "        [time_current, time_current], [-γ_max,γ_max], \n",
-    "        subplot = subplot_current, label=\"\")\n",
-    "\n",
-    "    plot!(px, times, F_max.*u[2,:]./γ_max,\n",
-    "        inset = (1, bbox(xx, yy+0.2, 0.2, 0.15, :top, :left)),\n",
-    "        #ticks = nothing,\n",
-    "        subplot = subplot_current+1,\n",
-    "        bg_inside = nothing,\n",
-    "        color=:red, legend=:true, yguidefontrotation=-90, yguidefonthalign = :right,\n",
-    "        xguidefontsize=14, legendfontsize=14,\n",
-    "        ylims=(-F_max,F_max), \n",
-    "        xlims=(time_current-Δt_control, time_current+1.0*Δt_control),\n",
-    "        ylabel=\"u₂ [N]\", xlabel=\"temps [h]\", label=\"\"\n",
-    "    )\n",
-    "\n",
-    "    plot!(px, \n",
-    "        [time_current, time_current], [-γ_max,γ_max], \n",
-    "        subplot = subplot_current+1, label=\"\")\n",
-    "    \n",
-    "    return subplot_current+2\n",
-    "end;\n",
-    "\n",
-    "\n",
-    "function panneau_information!(px, subplot_current, time_current, i_current, \n",
-    "        x1, x2, v1, v2, θ, F_max, tf_transfert, X1_orb_init, X2_orb_init, X1_orb_arr, X2_orb_arr)\n",
-    "    \n",
-    "    # panneaux information\n",
-    "    xx = 0.06\n",
-    "    yy = 0.3\n",
-    "    plot!(px,\n",
-    "        inset = (1, bbox(xx, yy, 0.2, 0.15, :bottom, :left)),\n",
-    "        subplot = subplot_current, \n",
-    "        bg_inside = nothing, legend=:false,\n",
-    "        framestyle=:none\n",
-    "    ) \n",
-    "\n",
-    "    a = 0.0\n",
-    "    b = 0.0\n",
-    "    Δtxt = 0.3\n",
-    "\n",
-    "    txt = @sprintf(\"Temps depuis départ [h]  = %3.2f\", time_current)\n",
-    "    annotate!(px, subplot = subplot_current, a, b+2*Δtxt, txt, \n",
-    "        annotationcolor=:white, annotationfontsize=14,\n",
-    "        annotationhalign=:left)\n",
-    "\n",
-    "    txt = @sprintf(\"Vitesse satellite [km/h]    = %5.2f\", sqrt(v1[i_current]^2+v2[i_current]^2))\n",
-    "    annotate!(px, subplot = subplot_current, a, b+Δtxt, txt, \n",
-    "        annotationcolor=:white, annotationfontsize=14,\n",
-    "        annotationhalign=:left)\n",
-    "\n",
-    "    txt = @sprintf(\"Distance à la Terre [km]   = %5.2f\", sqrt(x1[i_current]^2+x2[i_current]^2)-rayon_Terre)\n",
-    "    annotate!(px, subplot = subplot_current, a, b, txt, \n",
-    "        annotationcolor=:white, annotationfontsize=14,\n",
-    "        annotationhalign=:left)\n",
-    "\n",
-    "    txt = @sprintf(\"Poussée maximale [N]     = %5.2f\", F_max)\n",
-    "    annotate!(px, subplot = subplot_current, a, b-2*Δtxt, txt, \n",
-    "        annotationcolor=:white, annotationfontsize=14,\n",
-    "        annotationhalign=:left)\n",
-    "\n",
-    "    txt = @sprintf(\"Durée du transfert [h]     = %5.2f\", tf_transfert)\n",
-    "    annotate!(px, subplot = subplot_current, a, b-3*Δtxt, txt, \n",
-    "        annotationcolor=:white, annotationfontsize=14,\n",
-    "        annotationhalign=:left)\n",
-    "\n",
-    "    subplot_current = subplot_current+1\n",
-    "    plot!(px,\n",
-    "        inset = (1, bbox(0.3, 0.03, 0.5, 0.1, :top, :left)),\n",
-    "        subplot = subplot_current, \n",
-    "        bg_inside = nothing, legend=:false, aspect_ratio=:equal,\n",
-    "        xlims=(-4, 4),\n",
-    "        framestyle=:none\n",
-    "    ) \n",
-    "\n",
-    "    s1 = \"Transfert orbital du satellite        autour de la Terre\\n\"\n",
-    "    s2 = \"de l'orbite elliptique       vers l'orbite circulaire\\n\"\n",
-    "    s3 = \"en temps minimal\"\n",
-    "    txt = s1 * s2 * s3\n",
-    "    annotate!(px, subplot = subplot_current, 0, 0, txt, \n",
-    "        annotationcolor=:white, annotationfontsize=18,\n",
-    "        annotationhalign=:center)\n",
-    "\n",
-    "    rmax = 3*maximum(sqrt.(X1_orb_init.^2+X2_orb_init.^2))\n",
-    "    plot!(px, subplot = subplot_current, \n",
-    "        0.04.+X1_orb_init./rmax, X2_orb_init./rmax.-0.03, \n",
-    "        color = :olivedrab1, linewidth=2)\n",
-    "\n",
-    "    rmax = 7*maximum(sqrt.(X1_orb_arr.^2+X2_orb_arr.^2))\n",
-    "    plot!(px, subplot = subplot_current, \n",
-    "        3.3.+X1_orb_arr./rmax, X2_orb_arr./rmax.-0.03, \n",
-    "        color = :turquoise1, linewidth=2)    \n",
-    "    \n",
-    "    satellite!(px, subplot=subplot_current,\n",
-    "        position=[0.67; 0.28], scale=0.08, \n",
-    "        rotate=π/2)\n",
-    "    \n",
-    "    # Terre\n",
-    "    θ = range(0, 2π, 100)\n",
-    "    rT = 0.1\n",
-    "    xT = 3.55 .+ rT .* cos.(θ)\n",
-    "    yT = 0.28 .+ rT .* sin.(θ)\n",
-    "    plot!(px, subplot=subplot_current, xT, yT, color = :dodgerblue1, seriestype=:shape, linewidth=0) \n",
-    "    \n",
-    "    subplot_current = subplot_current+1\n",
-    "    xx = 0.0\n",
-    "    yy = 0.02\n",
-    "    plot!(px,\n",
-    "        inset = (1, bbox(xx, yy, 0.12, 0.05, :bottom, :right)),\n",
-    "        subplot = subplot_current, \n",
-    "        bg_inside = nothing, legend=:false,\n",
-    "        framestyle=:none\n",
-    "    )  \n",
-    "    \n",
-    "    s1 = \"Réalisation : Olivier Cots (2022)\"\n",
-    "    txt = s1\n",
-    "    annotate!(px, subplot = subplot_current, 0, 0, txt, \n",
-    "        annotationcolor=:gray, annotationfontsize=8, annotationhalign=:left)\n",
-    "    \n",
-    "    return subplot_current+1\n",
-    "\n",
-    "end;"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "### Trajectoire du satellite"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 28,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "function trajectoire!(px, times, x1, x2, θ, thrust, t_current, cx, cy, pt)\n",
-    "    \n",
-    "    i_current = argmin(abs.(times.-t_current))\n",
-    "    \n",
-    "    # Trajectoire \n",
-    "    if t_current>0 && pt[i_current]\n",
-    "        trajectoryplot!(px, times, cx.+x1, cy.+x2, t_current)\n",
-    "    end\n",
-    "    \n",
-    "    # Satellite\n",
-    "    satellite!(px, position=[cx+x1[i_current]; cy+x2[i_current]], scale=sc_sat, \n",
-    "        rotate=θ[i_current], thrust=thrust[i_current])\n",
-    "    \n",
-    "end;"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "## Animation"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 29,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "function animation(pre_transfert_data, transfert_data, post_transfert_data; fps=10, nFrame=200)\n",
-    "    \n",
-    "    # pré-transfert\n",
-    "    t_pre_transfert = pre_transfert_data.duration\n",
-    "    x_pre_transfert = pre_transfert_data.initial_point\n",
-    "    \n",
-    "    # transfert\n",
-    "    p0_transfert = transfert_data.initial_adjoint\n",
-    "    tf_transfert = transfert_data.duration\n",
-    "    \n",
-    "    # post-trasfert\n",
-    "    t_post_transfert = post_transfert_data.duration\n",
-    "    \n",
-    "    # On calcule les orbites initiale et finale\n",
-    "    r0        = norm(x0[1:2])\n",
-    "    v0        = norm(x0[3:4])\n",
-    "    a         = 1.0/(2.0/r0-v0*v0/μ)\n",
-    "    t1        = r0*v0*v0/μ - 1.0;\n",
-    "    t2        = (x0[1:2]'*x0[3:4])/sqrt(a*μ);\n",
-    "    e_ellipse = norm([t1 t2])\n",
-    "    p_orb     = a*(1-e_ellipse^2);\n",
-    "    n_theta   = 151\n",
-    "    Theta     = range(0, stop=2*pi, length=n_theta)\n",
-    "    X1_orb_init = zeros(n_theta)\n",
-    "    X2_orb_init = zeros(n_theta)\n",
-    "    X1_orb_arr  = zeros(n_theta)\n",
-    "    X2_orb_arr  = zeros(n_theta)\n",
-    "\n",
-    "    for  i in 1:n_theta\n",
-    "        theta = Theta[i]\n",
-    "        r_orb = p_orb/(1+e_ellipse*cos(theta));\n",
-    "        # Orbite initiale\n",
-    "        X1_orb_init[i] = r_orb*cos(theta);\n",
-    "        X2_orb_init[i] = r_orb*sin(theta);\n",
-    "        # Orbite finale\n",
-    "        X1_orb_arr[i] = rf*cos(theta) ;\n",
-    "        X2_orb_arr[i] = rf*sin(theta);\n",
-    "    end\n",
-    "    \n",
-    "    # Centre de la fenêtre\n",
-    "    cx = 40000\n",
-    "    cy = -7000\n",
-    "\n",
-    "    # Taille de la fenêtre\n",
-    "    w = 1600\n",
-    "    h = 900\n",
-    "    ρ = h/w\n",
-    "    \n",
-    "    # Limites de la fenêtre\n",
-    "    ee = 0.5\n",
-    "    xmin = minimum([X1_orb_init; X1_orb_arr]); xmin = xmin - ee * abs(xmin);\n",
-    "    xmax = maximum([X1_orb_init; X1_orb_arr]); xmax = xmax + ee * abs(xmax);\n",
-    "    ymin = minimum([X2_orb_init; X2_orb_arr]); ymin = ymin - ee * abs(ymin);\n",
-    "    ymax = maximum([X2_orb_init; X2_orb_arr]); ymax = ymax + ee * abs(ymax);\n",
-    "    \n",
-    "    Δy = ymax-ymin\n",
-    "    Δx = Δy/ρ\n",
-    "    Δn = Δx - (xmax-xmin)\n",
-    "    xmin = xmin - Δn/2\n",
-    "    xmax = xmax + Δn/2\n",
-    "    \n",
-    "    # Trajectoire pré-transfert\n",
-    "    traj_pre_transfert  = f0((0.0, t_pre_transfert), x_pre_transfert)\n",
-    "    times_pre_transfert  = traj_pre_transfert.t\n",
-    "    n_pre_transfert  = size(times_pre_transfert, 1)\n",
-    "    x1_pre_transfert = [traj_pre_transfert[1, j] for j in 1:n_pre_transfert ]\n",
-    "    x2_pre_transfert = [traj_pre_transfert[2, j] for j in 1:n_pre_transfert ]\n",
-    "    v1_pre_transfert = [traj_pre_transfert[3, j] for j in 1:n_pre_transfert ]\n",
-    "    v2_pre_transfert = [traj_pre_transfert[4, j] for j in 1:n_pre_transfert ]  \n",
-    "    \n",
-    "    # Trajectoire pendant le transfert\n",
-    "    traj_transfert  = f((t0, tf_transfert), x0, p0_transfert)\n",
-    "    times_transfert  = traj_transfert.t\n",
-    "    n_transfert  = size(times_transfert, 1)\n",
-    "    x1_transfert = [traj_transfert[1, j] for j in 1:n_transfert ]\n",
-    "    x2_transfert = [traj_transfert[2, j] for j in 1:n_transfert ]\n",
-    "    v1_transfert = [traj_transfert[3, j] for j in 1:n_transfert ]\n",
-    "    v2_transfert = [traj_transfert[4, j] for j in 1:n_transfert ]\n",
-    "    u_transfert  = zeros(2, length(times_transfert))\n",
-    "    for j in 1:n_transfert\n",
-    "        u_transfert[:,j] = control(traj_transfert[5:8, j])\n",
-    "    end\n",
-    "\n",
-    "    # post-transfert\n",
-    "    x_post_transfert = traj_transfert[:,end]\n",
-    "\n",
-    "    # Trajectoire post-transfert\n",
-    "    traj_post_transfert  = f0((0.0, t_post_transfert), x_post_transfert)\n",
-    "    times_post_transfert  = traj_post_transfert.t\n",
-    "    n_post_transfert  = size(times_post_transfert, 1)\n",
-    "    x1_post_transfert = [traj_post_transfert[1, j] for j in 1:n_post_transfert ]\n",
-    "    x2_post_transfert = [traj_post_transfert[2, j] for j in 1:n_post_transfert ]\n",
-    "    v1_post_transfert = [traj_post_transfert[3, j] for j in 1:n_post_transfert ]\n",
-    "    v2_post_transfert = [traj_post_transfert[4, j] for j in 1:n_post_transfert ] \n",
-    "\n",
-    "    # Angles de rotation du satellite pendant le pré-transfert\n",
-    "    θ0 = atan(u_transfert[2, 1], u_transfert[1, 1])\n",
-    "    θ_pre_transfert = range(π/2, mod(θ0, 2*π), n_pre_transfert)\n",
-    "\n",
-    "    # Angles de rotation du satellite pendant le transfert\n",
-    "    θ_transfert = atan.(u_transfert[2, :], u_transfert[1, :])\n",
-    "\n",
-    "    # Angles de rotation du satellite pendant le post-transfert\n",
-    "    θ1 = atan(u_transfert[2, end], u_transfert[1, end])\n",
-    "    θ2 = atan(-x2_post_transfert[end], -x1_post_transfert[end])\n",
-    "    θ_post_transfert = range(mod(θ1, 2*π), mod(θ2, 2*π), n_post_transfert)\n",
-    "\n",
-    "    # Etoiles\n",
-    "    Δx = xmax-xmin\n",
-    "    Δy = ymax-ymin \n",
-    "    ρ  = Δy/Δx\n",
-    "    S = stars(ρ)\n",
-    "\n",
-    "    # nombre total d'images\n",
-    "    nFrame = min(nFrame, n_pre_transfert+n_transfert+n_post_transfert);\n",
-    "    \n",
-    "    # Pour l'affichage de la trajectoire globale\n",
-    "    times = [times_pre_transfert[1:end-1];\n",
-    "        times_pre_transfert[end].+times_transfert[1:end-1];\n",
-    "        times_pre_transfert[end].+times_transfert[end].+times_post_transfert[1:end]]\n",
-    "    x1 = [x1_pre_transfert[1:end-1]; x1_transfert[1:end-1]; x1_post_transfert[:]]\n",
-    "    x2 = [x2_pre_transfert[1:end-1]; x2_transfert[1:end-1]; x2_post_transfert[:]]\n",
-    "    v1 = [v1_pre_transfert[1:end-1]; v1_transfert[1:end-1]; v1_post_transfert[:]]\n",
-    "    v2 = [v2_pre_transfert[1:end-1]; v2_transfert[1:end-1]; v2_post_transfert[:]]\n",
-    "    θ  = [ θ_pre_transfert[1:end-1];  θ_transfert[1:end-1];  θ_post_transfert[:]]\n",
-    "\n",
-    "    # plot thrust on/off\n",
-    "    th = [BitArray(zeros(n_pre_transfert-1)); \n",
-    "        BitArray(ones(n_transfert-1));\n",
-    "        BitArray(zeros(n_post_transfert))]\n",
-    "    \n",
-    "    # plot trajectory\n",
-    "    pt = [BitArray(ones(n_pre_transfert-1)); \n",
-    "        BitArray(ones(n_transfert-1));\n",
-    "        BitArray(zeros(n_post_transfert))]\n",
-    "    \n",
-    "    # Contrôle sur la trajectoire totale\n",
-    "    u_total = hcat([zeros(2, n_pre_transfert-1), \n",
-    "        u_transfert[:, 1:n_transfert-1],\n",
-    "        zeros(2, n_post_transfert)]...)\n",
-    "\n",
-    "    # temps total\n",
-    "    temps_transfert_global = times[end]\n",
-    "\n",
-    "    # pas de temps pour le transfert global\n",
-    "    if nFrame>1\n",
-    "        Δt = temps_transfert_global/(nFrame-1)\n",
-    "    else\n",
-    "        Δt = 0.0\n",
-    "    end\n",
-    "    \n",
-    "    # opacités des orbites initiale et finale\n",
-    "    op_initi = [range(0.0, 1.0, length = n_pre_transfert-1);\n",
-    "        range(1.0, 0.0, length = n_transfert-1);\n",
-    "        zeros(n_post_transfert)]\n",
-    "    op_final = [zeros(n_pre_transfert-1);\n",
-    "        range(0.0, 1.0, length = n_transfert-1);\n",
-    "        range(1.0, 0.0, length = int(n_post_transfert/4));\n",
-    "        zeros(n_post_transfert-int(n_post_transfert/4))]\n",
-    "    \n",
-    "    # animation\n",
-    "    anim = @animate for i ∈ 1:nFrame\n",
-    "        \n",
-    "        # Δt : pas de temps\n",
-    "        # time_current : temps courant de la mission totale à l'itération i\n",
-    "        # i_current : indice tel que times[i_current] = time_current\n",
-    "        # w, h : width, height de la fenêtre\n",
-    "        # xmin, xmax, ymin, ymax : limites des axes du plot principal\n",
-    "        # X1_orb_init, X2_orb_init : coordonnées de l'orbite initiale\n",
-    "        # X1_orb_arr, X2_orb_arr :  coordonnées de l'orbite finale\n",
-    "        # cx, cy : coordonées du centre de l'affichage du tranfert\n",
-    "        # S : data pour les étoiles\n",
-    "        # Δx, Δy : xmax-xmin, ymax-ymin\n",
-    "        # times : tous les temps de la mission complète, ie pre-transfert, transfert et post-transfert\n",
-    "        # x1, x2 : vecteur de positions du satellite\n",
-    "        # θ : vecteur d'orientations du satellite\n",
-    "        # th : vecteur de booléens - thrust on/off\n",
-    "        # u_total : vecteur de contrôles pour toute la mission\n",
-    "        # F_max, γ_max : poussée max\n",
-    "        # subplot_current : valeur du subplot courant\n",
-    "        # cam_x, cam_y : position de la caméra\n",
-    "        # cam_zoom : zoom de la caméra\n",
-    "        \n",
-    "        cam_x    = cx\n",
-    "        cam_y    = cy\n",
-    "        cam_zoom = 1\n",
-    "        \n",
-    "        time_current = (i-1)*Δt\n",
-    "        i_current = argmin(abs.(times.-time_current))\n",
-    "        \n",
-    "        px = background(w, h, xmin, xmax, ymin, ymax, \n",
-    "        X1_orb_init, X2_orb_init, X1_orb_arr, X2_orb_arr,\n",
-    "        cx, cy, S, Δx, Δy, cam_x, cam_y, cam_zoom, \n",
-    "        op_initi[i_current], op_final[i_current], times, time_current)\n",
-    "\n",
-    "        trajectoire!(px, times, x1, x2, θ, th, time_current, cx, cy, pt)        \n",
-    "    \n",
-    "        subplot_current = 2\n",
-    "        subplot_current = panneau_control!(px, time_current, times, u_total, \n",
-    "            F_max, γ_max, subplot_current)\n",
-    "        \n",
-    "        subplot_current = panneau_information!(px, subplot_current, time_current, \n",
-    "            i_current, x1, x2, v1, v2, θ, F_max, tf_transfert, X1_orb_init, \n",
-    "            X2_orb_init, X1_orb_arr, X2_orb_arr)\n",
-    "        \n",
-    "    end\n",
-    "\n",
-    "    # enregistrement\n",
-    "    nom = \"transfert-temps-min-original.mp4\"\n",
-    "    gif(anim, nom, fps=fps);\n",
-    "    gif(anim, \"transfert-temps-min.gif\", fps=fps);\n",
-    "\n",
-    "    #return nom\n",
-    "    \n",
-    "end;"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "## Calculs"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "### Pré-transfert"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 30,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "# Système non contrôlé : les lois de Kepler\n",
-    "function kepler(x)\n",
-    "    n     = size(x, 1)\n",
-    "    dx    = zeros(eltype(x), n)\n",
-    "    x1    = x[1]\n",
-    "    x2    = x[2]\n",
-    "    x3    = x[3]\n",
-    "    x4    = x[4]\n",
-    "    dsat  = norm(x[1:2]); r3 = dsat^3;\n",
-    "    dx[1] =  x3\n",
-    "    dx[2] =  x4\n",
-    "    dx[3] = -μ*x1/r3\n",
-    "    dx[4] = -μ*x2/r3\n",
-    "    return dx\n",
-    "end\n",
-    "\n",
-    "f0 = Flow(VF(kepler));"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 31,
-   "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "Iter     f(x) inf-norm    Step 2-norm \n",
-      "------   --------------   --------------\n",
-      "     0     8.710000e+01              NaN\n",
-      "     1     4.664840e+01     2.860952e+02\n",
-      "     2     3.948627e-02     1.733579e+00\n",
-      "     3     1.210757e-05     1.418640e-01\n",
-      "     4     3.710738e-10     3.830941e-07\n",
-      "\n",
-      "Final solution:\n",
-      "[6738.200652737065, 1.5644718641515079e-24, 1.1947020276724434e-9, 36366.21173381801, 5.302395297764675]\n"
-     ]
-    }
-   ],
-   "source": [
-    "# On cherche le point le plus proche de la Terre sur l'orbite initiale\n",
-    "# Ce sera le point de départ de la pré-mission\n",
-    "# On cherche aussi le temps\n",
-    "\n",
-    "# données pour la trajectoire pré-transfert\n",
-    "mutable struct PreTransfert\n",
-    "    duration\n",
-    "    initial_point\n",
-    "end\n",
-    "\n",
-    "# Fonction de tir\n",
-    "function depart(xp, tp)\n",
-    "    \n",
-    "    # Integration\n",
-    "    x0_ = f0(0.0, xp, tp)\n",
-    "    \n",
-    "    # Conditions\n",
-    "    s = zeros(eltype(xp), 5)\n",
-    "    s[1] = xp[2]\n",
-    "    s[2] = x0_[1] - x0[1]\n",
-    "    s[3] = x0_[2] - x0[2]\n",
-    "    s[4] = x0_[3] - x0[3]\n",
-    "    s[5] = x0_[4] - x0[4]\n",
-    "    \n",
-    "    return s\n",
-    "\n",
-    "end;\n",
-    "\n",
-    "# Itéré initial\n",
-    "y_guess = [6737.87, -87.10, 272.51, 36364.45, 5.3]\n",
-    "\n",
-    "# Jacobienne de la fonction de tir\n",
-    "foo(y)  = depart(y[1:4], y[5])\n",
-    "#jfoo(y) = ForwardDiff.jacobian(foo, y)\n",
-    "\n",
-    "# Résolution de shoot(p0, tf) = 0\n",
-    "nl_sol = nlsolve(foo, y_guess; xtol=1e-8, method=:trust_region, show_trace=true);\n",
-    "\n",
-    "# On récupère la solution si convergence\n",
-    "if converged(nl_sol)\n",
-    "    x_pre_transfert = x0 #nl_sol.zero[1:4]\n",
-    "    t_pre_transfert = 2.0*nl_sol.zero[5]\n",
-    "    pre_transfert_data = PreTransfert(t_pre_transfert, x_pre_transfert)\n",
-    "    println(\"\\nFinal solution:\\n\", nl_sol.zero)\n",
-    "else\n",
-    "    error(\"Not converged\")\n",
-    "end"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "### Transfert"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "Le pseudo-hamiltonien est donné par\n",
-    "\n",
-    "$$\n",
-    "H(x, p, u) = p_{1}x_3 + p_{2}x_4 + p_{3}\\left(-\\dfrac{\\mu\\, x_{1}}{r^{3}} + u_{1}\\right) + p_{4}\\left(-\\dfrac{\\mu\\, x_{2}}{r^{3}} + u_{2}\\right)\n",
-    "$$\n",
-    "\n",
-    "et le pseudo système hamiltonien s'écrit\n",
-    "\n",
-    "$$\n",
-    "    \\vec{H}(x, p, u) = \\left(\\frac{\\partial H}{\\partial p}(x, p, u), \n",
-    "    -\\frac{\\partial H}{\\partial x}(x, p, u) \\right)\n",
-    "$$\n",
-    "\n",
-    "avec \n",
-    "\n",
-    "$$\n",
-    "\\begin{aligned}\n",
-    "\\frac{\\partial H}{\\partial p}(x, p, u) &= \\left( x_3, x_4, -\\dfrac{\\mu\\, x_{1}}{r^{3}} + u_{1}, -\\dfrac{\\mu\\, x_{2}}{r^{3}} + u_{2}\\right) \\\\\n",
-    "\\frac{\\partial H}{\\partial x}(x, p, u) &= \\left(\\left(\\frac{\\mu}{r^3} - \\frac{3\\mu x_1^2}{r^5}\\right)p_3 + \\frac{3\\mu x_1x_2}{r^5}p_4, \\frac{3\\mu x_1x_2}{r^5}p_3 + \\left(\\frac{\\mu}{r^3} + \\frac{3\\mu x_2^2}{r^5}\\right)p_4, p_1, p_2\\right)\n",
-    "\\end{aligned}\n",
-    "$$\n",
-    "\n",
-    "La maximisation du hamiltonien nous permet d'obtenir le contrôle maximisant\n",
-    "(on suppose que $(p_3,p_4) \\neq (0,0)$) :\n",
-    "\n",
-    "$$\n",
-    "    u(x(t),p(t)) = \\frac{\\gamma_\\mathrm{max}}{\\sqrt{p_3^2(t)+p_4^2(t)}}(p_3(t),p_4(t)).\n",
-    "$$\n"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 32,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "# Contrôle maximisant\n",
-    "function control(p)\n",
-    "    u    = zeros(eltype(p),2)\n",
-    "    u[1] = p[3]*γ_max/norm(p[3:4])\n",
-    "    u[2] = p[4]*γ_max/norm(p[3:4])\n",
-    "    return u\n",
-    "end;\n",
-    "\n",
-    "# Hamiltonien maximisé\n",
-    "function hfun(x, p)\n",
-    "    u   = control(p)\n",
-    "    nor = norm(x[1:2]); nor3 = nor^3\n",
-    "    h   = p[1]*x[3] + p[2]*x[4] + p[3]*(-μ*x[1]/nor3 + u[1]) + p[4]*(-μ*x[2]/nor^3 + u[2])\n",
-    "    return h\n",
-    "end;\n",
-    "\n",
-    "# Système hamiltonien\n",
-    "function hv(x, p)\n",
-    "    n     = size(x, 1)\n",
-    "    hv    = zeros(eltype(x), 2*n)\n",
-    "    x_1   = x[1]; x_2 = x[2]; x_3 = x[3]; x_4 = x[4]\n",
-    "    p_1   = p[1]; p_2 = p[2]; p_3 = p[3]; p_4 = p[4]\n",
-    "    norme = norm(x[1:2]); r3 = norme^3; r5 = norme^5\n",
-    "    u     = control(p)\n",
-    "    hv[1] =  x_3;\n",
-    "    hv[2] =  x_4\n",
-    "    hv[3] = -μ*x_1/r3 + u[1]\n",
-    "    hv[4] = -μ*x_2/r3 + u[2]\n",
-    "    hv[5] =  μ*((1/r3 - (3*x_1^2)/r5)*p_3 - ((3*x_1*x_2)/r5)*p_4)\n",
-    "    hv[6] =  μ*(-((3*x_1*x_2)/r5)*p_3 + (1/r3 - (3*x_2^2)/r5)*p_4)\n",
-    "    hv[7] = -p_1\n",
-    "    hv[8] = -p_2\n",
-    "    return hv\n",
-    "end;\n",
-    "\n",
-    "f = Flow(HV(hv));"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "On note \n",
-    "$\n",
-    "    \\alpha := \\sqrt{\\frac{\\mu}{r_f^3}}.\n",
-    "$\n",
-    "La condition terminale peut se mettre sous la forme $c(x(t_f)) = 0$, avec $c \\colon \\mathbb{R}^4 \\to \\mathbb{R}^3$\n",
-    "donné par\n",
-    "\n",
-    "$$\n",
-    "    c(x) := (r^2(x) - r_f^2, ~~ x_{3} + \\alpha\\, x_{2}, ~~ x_{4} - \\alpha\\, x_{1}).\n",
-    "$$\n",
-    "\n",
-    "Le temps final étant libre, on a la condition au temps final \n",
-    "\n",
-    "$$\n",
-    "    H(x(t_f), p(t_f), u(t_f)) = -p^0 = 1. \\quad \\text{(cas normal)}\n",
-    "$$\n",
-    "\n",
-    "De plus, la condition de transversalité \n",
-    "\n",
-    "$$\n",
-    "p(t_f) = c'(x(t_f))^T \\lambda, ~~ \\lambda \\in \\mathbb{R}^3,\n",
-    "$$\n",
-    "\n",
-    "conduit à \n",
-    "\n",
-    "$$\n",
-    "\\Phi(x(t_f), p(t_f)) := x_2(t_f) \\Big( p_1(t_f) + \\alpha\\, p_4(t_f) \\Big) - x_1(t_f) \\Big( p_2(t_f) - \\alpha\\, p_3(t_f) \\Big) = 0.\n",
-    "$$\n",
-    "\n",
-    "En considérant les conditions aux limites, la condition finale sur le pseudo-hamiltonien et la condition de transversalité, la fonction de tir simple est donnée par \n",
-    "\n",
-    "\\begin{equation*}\n",
-    "    \\begin{array}{rlll}\n",
-    "        S \\colon    & \\mathbb{R}^5          & \\longrightarrow   & \\mathbb{R}^5 \\\\\n",
-    "        & (p_0, t_f)      & \\longmapsto       &\n",
-    "        S(p_0, t_f) := \\begin{pmatrix}\n",
-    "            c(x(t_f, x_0, p_0)) \\\\[0.5em]\n",
-    "            \\Phi(z(t_f, x_0, p_0)) \\\\[0.5em]\n",
-    "            H(z(t_f, x_0, p_0), u(z(t_f, x_0, p_0))) - 1\n",
-    "        \\end{pmatrix}\n",
-    "    \\end{array}\n",
-    "\\end{equation*}\n",
-    "\n",
-    "où $z(t_f, x_0, p_0)$ est la solution au temps de $t_f$ du pseudo système hamiltonien bouclé par\n",
-    "le contrôle maximisant, partant au temps $t_0$ du point $(x_0, p_0)$. On rappelle que l'on note\n",
-    "$z=(x, p)$."
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 33,
-   "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "Iter     f(x) inf-norm    Step 2-norm \n",
-      "------   --------------   --------------\n",
-      "     0     7.026523e+00              NaN\n",
-      "     1     7.334383e-03     6.609950e-06\n",
-      "     2     1.068202e-08     6.699837e-06\n",
-      "     3     6.846676e-09     1.949020e-11\n",
-      "\n",
-      "Final solution:\n",
-      "[-0.0013615711124372242, -7.349896979829465e-6, -5.359923708254862e-5, -0.008582713096395626, 59.85516689032128]\n"
-     ]
-    }
-   ],
-   "source": [
-    "# Données pour la trajectoire durant le transfert\n",
-    "mutable struct Transfert\n",
-    "    duration\n",
-    "    initial_adjoint\n",
-    "end\n",
-    "\n",
-    "# Fonction de tir\n",
-    "function shoot(p0, tf)\n",
-    "    \n",
-    "    # Integration\n",
-    "    xf, pf = f(t0, x0, p0, tf)\n",
-    "    \n",
-    "    # Conditions\n",
-    "    s = zeros(eltype(p0), 5)\n",
-    "    s[1] = norm(xf[1:2]) - rf\n",
-    "    s[2] = xf[3] + α*xf[2]\n",
-    "    s[3] = xf[4] - α*xf[1]\n",
-    "    s[4] = xf[2]*(pf[1] + α*pf[4]) - xf[1]*(pf[2] - α*pf[3])\n",
-    "    s[5] = hfun(xf, pf) - 1\n",
-    "    \n",
-    "    return s\n",
-    "\n",
-    "end;\n",
-    "\n",
-    "# Itéré initial\n",
-    "#y_guess = [1.0323e-4, 4.915e-5, 3.568e-4, -1.554e-4, 13.4]   # pour F_max = 100N\n",
-    "y_guess = [-0.0013615, -7.34989e-6, -5.359923e-5, -0.00858271, 59.8551668] # pour F_max = 20N\n",
-    "\n",
-    "# Jacobienne de la fonction de tir\n",
-    "foo(y)  = shoot(y[1:4], y[5])\n",
-    "jfoo(y) = ForwardDiff.jacobian(foo, y)\n",
-    "\n",
-    "# Résolution de shoot(p0, tf) = 0\n",
-    "nl_sol = nlsolve(foo, jfoo, y_guess; xtol=1e-8, method=:trust_region, show_trace=true);\n",
-    "\n",
-    "# On récupère la solution si convergence\n",
-    "if converged(nl_sol)\n",
-    "    p0_sol = nl_sol.zero[1:4]\n",
-    "    tf_sol = nl_sol.zero[5]\n",
-    "    transfert_data = Transfert(tf_sol, p0_sol)\n",
-    "    println(\"\\nFinal solution:\\n\", nl_sol.zero)\n",
-    "else\n",
-    "    error(\"Not converged\")\n",
-    "end"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "### Post-transfert"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 34,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "# données pour la trajectoire post-transfert\n",
-    "mutable struct PostTransfert\n",
-    "    duration\n",
-    "end\n",
-    "\n",
-    "t_post_transfert = 20.0\n",
-    "\n",
-    "post_transfert_data = PostTransfert(t_post_transfert);"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "## Création de l'animation"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 35,
-   "metadata": {},
-   "outputs": [
-    {
-     "ename": "LoadError",
-     "evalue": "MethodError: no method matching process_annotation(::Plots.Subplot{Plots.GRBackend}, ::Float64)\n\u001b[0mClosest candidates are:\n\u001b[0m  process_annotation(::Plots.Subplot, ::Any, \u001b[91m::Any\u001b[39m, \u001b[91m::Any\u001b[39m) at ~/opt/miniconda3/envs/julia/share/julia/packages/Plots/GGa6i/src/components.jl:618\n\u001b[0m  process_annotation(::Plots.Subplot, ::Any, \u001b[91m::Any\u001b[39m, \u001b[91m::Any\u001b[39m, \u001b[91m::Any\u001b[39m) at ~/opt/miniconda3/envs/julia/share/julia/packages/Plots/GGa6i/src/components.jl:618\n\u001b[0m  process_annotation(::Plots.Subplot, \u001b[91m::Union{Symbol, Tuple, AbstractVector{Symbol}}\u001b[39m, \u001b[91m::Any\u001b[39m) at ~/opt/miniconda3/envs/julia/share/julia/packages/Plots/GGa6i/src/components.jl:632\n\u001b[0m  ...",
-     "output_type": "error",
-     "traceback": [
-      "MethodError: no method matching process_annotation(::Plots.Subplot{Plots.GRBackend}, ::Float64)\n\u001b[0mClosest candidates are:\n\u001b[0m  process_annotation(::Plots.Subplot, ::Any, \u001b[91m::Any\u001b[39m, \u001b[91m::Any\u001b[39m) at ~/opt/miniconda3/envs/julia/share/julia/packages/Plots/GGa6i/src/components.jl:618\n\u001b[0m  process_annotation(::Plots.Subplot, ::Any, \u001b[91m::Any\u001b[39m, \u001b[91m::Any\u001b[39m, \u001b[91m::Any\u001b[39m) at ~/opt/miniconda3/envs/julia/share/julia/packages/Plots/GGa6i/src/components.jl:618\n\u001b[0m  process_annotation(::Plots.Subplot, \u001b[91m::Union{Symbol, Tuple, AbstractVector{Symbol}}\u001b[39m, \u001b[91m::Any\u001b[39m) at ~/opt/miniconda3/envs/julia/share/julia/packages/Plots/GGa6i/src/components.jl:632\n\u001b[0m  ...",
-      "",
-      "Stacktrace:",
-      "  [1] _update_subplot_periphery(sp::Plots.Subplot{Plots.GRBackend}, anns::Vector{Any})",
-      "    @ Plots ~/opt/miniconda3/envs/julia/share/julia/packages/Plots/GGa6i/src/args.jl:1928",
-      "  [2] _update_subplot_args(plt::Plots.Plot{Plots.GRBackend}, sp::Plots.Subplot{Plots.GRBackend}, plotattributes_in::Dict{Symbol, Any}, subplot_index::Int64, remove_pair::Bool)",
-      "    @ Plots ~/opt/miniconda3/envs/julia/share/julia/packages/Plots/GGa6i/src/args.jl:2061",
-      "  [3] _subplot_setup(plt::Plots.Plot{Plots.GRBackend}, plotattributes::Dict{Symbol, Any}, kw_list::Vector{Dict{Symbol, Any}})",
-      "    @ Plots ~/opt/miniconda3/envs/julia/share/julia/packages/Plots/GGa6i/src/pipeline.jl:290",
-      "  [4] plot_setup!(plt::Plots.Plot{Plots.GRBackend}, plotattributes::Dict{Symbol, Any}, kw_list::Vector{Dict{Symbol, Any}})",
-      "    @ Plots ~/opt/miniconda3/envs/julia/share/julia/packages/Plots/GGa6i/src/pipeline.jl:151",
-      "  [5] recipe_pipeline!(plt::Any, plotattributes::Any, args::Any)",
-      "    @ RecipesPipeline ~/opt/miniconda3/envs/julia/share/julia/packages/RecipesPipeline/kJPXU/src/RecipesPipeline.jl:87",
-      "  [6] _plot!(plt::Plots.Plot, plotattributes::Any, args::Any)",
-      "    @ Plots ~/opt/miniconda3/envs/julia/share/julia/packages/Plots/GGa6i/src/plot.jl:208",
-      "  [7] #plot!#152",
-      "    @ ~/opt/miniconda3/envs/julia/share/julia/packages/Plots/GGa6i/src/plot.jl:198 [inlined]",
-      "  [8] #annotate!#525",
-      "    @ ~/opt/miniconda3/envs/julia/share/julia/packages/Plots/GGa6i/src/Plots.jl:249 [inlined]",
-      "  [9] panneau_information!(px::Plots.Plot{Plots.GRBackend}, subplot_current::Int64, time_current::Float64, i_current::Int64, x1::Vector{Float64}, x2::Vector{Float64}, v1::Vector{Float64}, v2::Vector{Float64}, θ::Vector{Float64}, F_max::Float64, tf_transfert::Float64, X1_orb_init::Vector{Float64}, X2_orb_init::Vector{Float64}, X1_orb_arr::Vector{Float64}, X2_orb_arr::Vector{Float64})",
-      "    @ Main ./In[27]:63",
-      " [10] macro expansion",
-      "    @ ./In[29]:202 [inlined]",
-      " [11] macro expansion",
-      "    @ ~/opt/miniconda3/envs/julia/share/julia/packages/Plots/GGa6i/src/animation.jl:208 [inlined]",
-      " [12] animation(pre_transfert_data::PreTransfert, transfert_data::Transfert, post_transfert_data::PostTransfert; fps::Int64, nFrame::Int64)",
-      "    @ Main ./In[29]:162",
-      " [13] top-level scope",
-      "    @ In[35]:3",
-      " [14] eval",
-      "    @ ./boot.jl:373 [inlined]",
-      " [15] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)",
-      "    @ Base ./loading.jl:1196"
-     ]
-    }
-   ],
-   "source": [
-    "#nFrame = 10; fps = 1\n",
-    "nFrame = 2000; fps = 20\n",
-    "animation(pre_transfert_data, transfert_data, post_transfert_data, nFrame=nFrame, fps=fps)"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 36,
-   "metadata": {},
-   "outputs": [
-    {
-     "name": "stderr",
-     "output_type": "stream",
-     "text": [
-      "ffmpeg version 5.0.1 Copyright (c) 2000-2022 the FFmpeg developers\n",
-      "  built with Apple clang version 13.0.0 (clang-1300.0.29.30)\n",
-      "  configuration: --prefix=/usr/local/Cellar/ffmpeg/5.0.1_3 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox\n",
-      "  libavutil      57. 17.100 / 57. 17.100\n",
-      "  libavcodec     59. 18.100 / 59. 18.100\n",
-      "  libavformat    59. 16.100 / 59. 16.100\n",
-      "  libavdevice    59.  4.100 / 59.  4.100\n",
-      "  libavfilter     8. 24.100 /  8. 24.100\n",
-      "  libswscale      6.  4.100 /  6.  4.100\n",
-      "  libswresample   4.  3.100 /  4.  3.100\n",
-      "  libpostproc    56.  3.100 / 56.  3.100\n",
-      "Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'transfert-temps-min-original.mp4':\n",
-      "  Metadata:\n",
-      "    major_brand     : isom\n",
-      "    minor_version   : 512\n",
-      "    compatible_brands: isomiso2avc1mp41\n",
-      "    encoder         : Lavf58.76.100\n",
-      "  Duration: 00:01:30.70, start: 0.000000, bitrate: 284 kb/s\n",
-      "  Stream #0:0[0x1](und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv444p(progressive), 1600x900, 283 kb/s, 20 fps, 20 tbr, 10240 tbn (default)\n",
-      "    Metadata:\n",
-      "      handler_name    : VideoHandler\n",
-      "      vendor_id       : [0][0][0][0]\n",
-      "Stream mapping:\n",
-      "  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))\n",
-      "Press [q] to stop, [?] for help\n",
-      "[libx264 @ 0x7fde1b529080] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2\n",
-      "[libx264 @ 0x7fde1b529080] profile High, level 4.0, 4:2:0, 8-bit\n",
-      "[libx264 @ 0x7fde1b529080] 264 - core 164 r3095 baee400 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=20 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00\n",
-      "Output #0, mp4, to 'transfert-temps-min.mp4':\n",
-      "  Metadata:\n",
-      "    major_brand     : isom\n",
-      "    minor_version   : 512\n",
-      "    compatible_brands: isomiso2avc1mp41\n",
-      "    encoder         : Lavf59.16.100\n",
-      "  Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(tv, progressive), 1600x900, q=2-31, 20 fps, 10240 tbn (default)\n",
-      "    Metadata:\n",
-      "      handler_name    : VideoHandler\n",
-      "      vendor_id       : [0][0][0][0]\n",
-      "      encoder         : Lavc59.18.100 libx264\n",
-      "    Side data:\n",
-      "      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A\n",
-      "frame= 1814 fps= 66 q=-1.0 Lsize=    3013kB time=00:01:30.55 bitrate= 272.6kbits/s speed=3.31x    \n",
-      "video:2991kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.723257%\n",
-      "[libx264 @ 0x7fde1b529080] frame I:8     Avg QP:15.52  size: 64104\n",
-      "[libx264 @ 0x7fde1b529080] frame P:544   Avg QP:20.28  size:  2445\n",
-      "[libx264 @ 0x7fde1b529080] frame B:1262  Avg QP:26.77  size:   966\n",
-      "[libx264 @ 0x7fde1b529080] consecutive B-frames:  4.1%  6.6%  8.1% 81.1%\n",
-      "[libx264 @ 0x7fde1b529080] mb I  I16..4:  7.9% 64.6% 27.5%\n",
-      "[libx264 @ 0x7fde1b529080] mb P  I16..4:  0.3%  0.4%  0.2%  P16..4:  3.5%  0.7%  0.5%  0.0%  0.0%    skip:94.4%\n",
-      "[libx264 @ 0x7fde1b529080] mb B  I16..4:  0.0%  0.1%  0.0%  B16..8:  4.0%  0.5%  0.1%  direct: 0.1%  skip:95.1%  L0:46.8% L1:51.5% BI: 1.7%\n",
-      "[libx264 @ 0x7fde1b529080] 8x8 transform intra:56.6% inter:26.6%\n",
-      "[libx264 @ 0x7fde1b529080] coded y,uvDC,uvAC intra: 15.0% 5.8% 4.9% inter: 0.5% 0.3% 0.2%\n",
-      "[libx264 @ 0x7fde1b529080] i16 v,h,dc,p: 58% 39%  3%  0%\n",
-      "[libx264 @ 0x7fde1b529080] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 56%  5% 39%  0%  0%  0%  0%  0%  0%\n",
-      "[libx264 @ 0x7fde1b529080] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 48% 19% 16%  3%  3%  3%  3%  3%  3%\n",
-      "[libx264 @ 0x7fde1b529080] i8c dc,h,v,p: 91%  6%  3%  0%\n",
-      "[libx264 @ 0x7fde1b529080] Weighted P-Frames: Y:0.0% UV:0.0%\n",
-      "[libx264 @ 0x7fde1b529080] ref P L0: 67.7%  2.4% 19.2% 10.8%\n",
-      "[libx264 @ 0x7fde1b529080] ref B L0: 78.1% 17.9%  4.0%\n",
-      "[libx264 @ 0x7fde1b529080] ref B L1: 94.6%  5.4%\n",
-      "[libx264 @ 0x7fde1b529080] kb/s:270.10\n"
-     ]
-    },
-    {
-     "data": {
-      "text/plain": [
-       "Process(`\u001b[4mffmpeg\u001b[24m \u001b[4m-y\u001b[24m \u001b[4m-i\u001b[24m \u001b[4mtransfert-temps-min-original.mp4\u001b[24m \u001b[4m-vf\u001b[24m \u001b[4mformat=yuv420p\u001b[24m \u001b[4mtransfert-temps-min.mp4\u001b[24m`, ProcessExited(0))"
-      ]
-     },
-     "execution_count": 36,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "convert = `ffmpeg -y -i transfert-temps-min-original.mp4 -vf format=yuv420p transfert-temps-min.mp4`\n",
-    "if nFrame > 1\n",
-    "    run(convert)\n",
-    "end"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "[video](./transfert-temps-min.mp4)"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "## Annexes"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "pl = plot(legend = false, framestyle = :none, aspect_ratio=:equal, size = (400, 400))\n",
-    "\n",
-    "scsa = 2000\n",
-    "\n",
-    "t  = range(0, 2*π, length = 150)\n",
-    "r = 3*scsa\n",
-    "x  = r.*cos.(t);\n",
-    "y  = r.*sin.(t);\n",
-    "\n",
-    "plot!(pl, x, y)\n",
-    "\n",
-    "θ = 1*π/4\n",
-    "satellite!(pl; position=0*[3*scsa;0], scale=scsa, rotate=θ, thrust=true)"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": []
-  }
- ],
- "metadata": {
-  "kernelspec": {
-   "display_name": "Julia 1.7.3",
-   "language": "julia",
-   "name": "julia-1.7"
-  },
-  "language_info": {
-   "file_extension": ".jl",
-   "mimetype": "application/julia",
-   "name": "julia",
-   "version": "1.7.3"
-  },
-  "toc-autonumbering": true
- },
- "nbformat": 4,
- "nbformat_minor": 4
-}
diff --git a/transfert-temps-min.mp3 b/transfert-temps-min.mp3
deleted file mode 100644
index 8dc94df0787a7a92aa3e2ea05988a4fbd33ed3d4..0000000000000000000000000000000000000000
Binary files a/transfert-temps-min.mp3 and /dev/null differ