Skip to content

Commit

Permalink
lot of changes, mainly python pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoireHENRY committed Sep 6, 2024
1 parent b96484c commit 524fed5
Show file tree
Hide file tree
Showing 55 changed files with 2,156 additions and 643 deletions.
210 changes: 184 additions & 26 deletions Cargo.lock

Large diffs are not rendered by default.

17 changes: 9 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spice = ["rust-spice"]

[dependencies]
# Core
itertools = "0.12"
itertools = "0.13"
snafu = "0.8"
strum = { version = "0.26", features = ["derive"] }
float_eq = "1.0"
Expand All @@ -42,16 +42,16 @@ console = "0.15"
color-eyre = "0.6"

# Maths / algebra
nalgebra = { version = "0.32", features = ["serde-serialize"] }
nalgebra-glm = "0.18"
nalgebra = { version = "0.33", features = ["serde-serialize"] }
nalgebra-glm = "0.19"
uom = "0.36"

# Features ++
reqwest = { version = "0.12", features = ["blocking", "json"] }
chrono = "0.4.24"
chrono = "0.4.38"
notify-rust = "4"
directories = "5.0"
fs_extra = "1.3.0"
fs_extra = "1.3"
regex = "1.10"
downcast-rs = "1.2"
dyn-clone = "1.0"
Expand All @@ -61,18 +61,19 @@ lazy_static = "1.0"
dunce = "1.0"

# GUI / GPU
gl = "0.14.0"
sdl2 = "0.36"
gl = "0.14"
sdl2 = "0.37"
stb_image = "0.3"
image = "0.25"
egui_sdl2_gl = "0.27"

# Kalast specials
rust-spice = { version = "0.7", features = ["download"], optional = true }
kalast_macros = { path = "macros", version = "0.4.0-beta" }


[dev-dependencies]
rstest = "0.19"
rstest = "0.21"
serial_test = "3.0"

[profile.release]
Expand Down
35 changes: 17 additions & 18 deletions cfg/cfg.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
[window]
ambient = [0.3, 0.3, 0.3]
width = 1600
height = 900
# fullscreen = true
wireframe = true

[scene]
sun.position.cartesian = [1, 0, 0]
camera.position.cartesian = [40, 0, 0]
camera.projection.perspective = 3

[window]
ambient = [0.3, 0.3, 0.3]
width = 1600
height = 900
# fullscreen = true
wireframe = true

[scene]
sun.position.cartesian = [1, 0, 0]
camera.position.cartesian = [40, 0, 0]
camera.projection.perspective = 3

[[bodies]]
name = "A"
color = "diffuse"
name = "A"
color = "diffuse"
material.albedo = 0.1

mesh.shape.shape = "icosphere_s4"

# faces_selected = [114, 124, 115, 123, 116, 499, 509, 508, 375, 369, 368, 252, 246, 245]
faces_selected = [114, 124, 115, 123, 116, 499, 509, 508, 375, 369, 368, 252, 246, 245]


[bodies.mesh]
shape.path = "/Users/gregoireh/data/meshes/sphere.obj"
85 changes: 85 additions & 0 deletions cfg/didymos-mutual-jb/first.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
[window]
export_frames = true
# high_dpi = true
# 1920 1200 400
width = 1024
# 1080 900 300
height = 768
# fullscreen = true

[window.colormap]
name = "inferno"
vmin = 150
vmax = 350
scalar = "temperature"

[spice]
kernel = "/Users/gregoireh/data/spice/hera/kernels/mk/hera_study_PO_EMA_2024.tm"
origin = "DIDYMOS"
frame = "HERA_TIRI"
# frame = "ECLIPJ2000"

[simulation]
routines = "thermal"
# start = "2026-12-02T02:00"
start = "2027-03-01"
step = 300
duration = 432000
# mutual_shadowing = true
init_spin_duration = 2188512

[simulation.export]
step = 300
duration = 432000
cooldown_start = 0

# 5 * 86400 = 432000
# 42912 * 51 = 2188512 ( 42912 * 51 / 8136 = 268.9911504424779 )

# 11.92 * 3600 = 42912
# 600s above: 72 * 600 = 43200
# 60s above: 716 * 60 = 42960

# 2.26 * 3600 = 8136
# 600s above: 14 * 600 = 8400
# 60s above: 136 * 60 = 8160

[scene]
sun.position = "spice"

[scene.camera]
name = "HERA_TIRI"
position = "spice"
projection.perspective = 10
up = [1, 0, 0]
direction.vector = [0, 0, 1]

[[bodies]]
name = "DIDYMOS"
frame = "DIDYMOS_FIXED"
# mesh.shape.path = "/Users/gregoireh/data/spice/hera/kernels/dsk/g_01165mm_spc_obj_didy_0000n00000_v003.obj"
mesh.shape.path = "/Users/gregoireh/data/DART/meshes/didymos-model-v002/9740mm/g_09740mm_spc_obj_didy_0000n00000_v002.obj"
# mesh = { shape.shape = "sphere_m1", factor = [0.4095, 0.4005, 0.3035] }
mesh_low = { shape.shape = "sphere_m1", factor = [0.4095, 0.4005, 0.3035] }
interior.grid1d.linear = { size = 40, a = 2e-2 }
spin = { period = 8136, obliquity = 0 }
state = "spice"
temperature.scalar = 150
material = { albedo = 0.1, emissivity = 0.9, thermal_inertia = 500, density = 2100, heat_capacity = 600 }
color = "data"
record = { rows = [0], columns = [0], mesh = true, depth = true }

[[bodies]]
name = "DIMORPHOS"
frame = "DIMORPHOS_FIXED"
# mesh.shape.path = "/Users/gregoireh/data/spice/hera/kernels/dsk/g_00243mm_spc_obj_dimo_0000n00000_v004.obj"
mesh.shape.path = "/Users/gregoireh/data/DART/meshes/dimorphos-model-v003/1960mm/g_01960mm_spc_obj_dimo_0000n00000_v003.obj"
# mesh = { shape.shape = "sphere_m1", factor = [0.0895165, 0.0825, 0.0575] }
mesh_low = { shape.shape = "sphere_m1", factor = [0.0895165, 0.0825, 0.0575] }
interior.grid1d.linear = { size = 40, a = 2e-2 }
spin = { period = 42912 }
state = "spice"
temperature.scalar = 150
material = { albedo = 0.1, emissivity = 0.9, thermal_inertia = 500, density = 2100, heat_capacity = 600 }
color = "data"
record = { rows = [0], columns = [0], mesh = true, depth = true }
8 changes: 8 additions & 0 deletions cfg/didymos-mutual-jb/restart.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[restart]
path = "/Users/gregoireh/data/kalast/runs/didymos thermal/mutual 4"

[simulation]
pause_first_it = true
elapsed = 300
cooldown_start = 0
mutual_shadowing = true
19 changes: 19 additions & 0 deletions cfg/didymos-mutual/restart-matthias.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[restart]
path = "/Users/gregoireh/data/kalast/runs/didymos thermal/init"
duration_more = 429120

[window]
colormap = { name = "inferno", vmin = 200, vmax = 340, scalar = "temperature" }

[scene]
camera.position.cartesian = [-19.9, -19.8, -3.7]

[simulation]
pause_first_it = true
elapsed = 66441600
export = { cooldown_start = 0, step = 180 }
mutual_shadowing = true

[[bodies]]
name = "Didymos"
# record = { rows = [0, 3], columns = [25533, 17341, 9917, 34621, 25489, 17159, 9867, 34579, 5910, 2214, 3299, 7123, 4411], mesh = true, depth = true }
30 changes: 30 additions & 0 deletions cfg/juventas-landing/apophis-gravity.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[window]
colormap = { name = "viridis", vmax = 2, scalar = "file" }

export_frames = true
high_dpi = true
width = 1512
height = 982

[simulation]
step = 1
duration = 999
read_file_data_only = true

[simulation.export]
step = 1
duration = 999
period = 999
cooldown_start = 0

[scene]
camera.position.cartesian = [0, 6, 0]
camera.projection.perspective = 4

[[bodies]]
name = "Apophis"
mesh = { shape.path = "/Users/gregoireh/data/kalast/runs/Apophis flyby Hakan/apophis_new.obj", factor = [1e-3, 1e-3, 1e-3] }
color = "data"
file_data = { path = "/Users/gregoireh/data/kalast/runs/Apophis Elisa/satis/for_plot2/delta slope °/results_slope_change3_35364_960_100801.csv" }
faces_selected = [2752, 2764, 2180, 1987, 2878, 1635, 2103, 2040, 2969, 1682, 3168, 1800]

50 changes: 50 additions & 0 deletions cfg/juventas-landing/apophis-thermal.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[window]
colormap = { name = "inferno", vmax = 400.0, scalar = "temperature" }
export_frames = true
high_dpi = true
width = 1512
height = 982

[simulation]
routines = "thermal"
step = 600
duration = 90720000
file = { path = "/Users/gregoireh/data/kalast/runs/Apophis flyby Hakan/tumbling/apophis_tumbling2.csv", behavior = "loop" }

[simulation.export]
step = 600
duration = 3024000
period = 3024000
cooldown_start = 87696000

# Duration file: 840h = 3024000s
# *29 = 87696000s
# *30 = 90720000s
#
# 109800 = 30.5h
# 439200 = 30.5h * 4
# 549000 = 30.5h * 5
# 1098000 = 30.5h * 10
# 13399200 = 30.5h * 4 + 3600h * 1
# 117079200 = 30.5h * 4 + 3600h * 9

[scene]
sun.position = "file"
camera.position.cartesian = [-10, 0, 0]
camera.projection.perspective = 3

[[bodies]]
name = "Apophis"
color = "data"
mesh = { shape.path = "/Users/gregoireh/data/kalast/runs/Apophis flyby Hakan/apophis_new.obj", factor = [1e-3, 1e-3, 1e-3] }
interior.grid1d.linear = { size = 40, a = 2e-2 }
state = "file"
record = { rows = [0], columns = [2288, 1556, 333, 907, 1188, 1169, 1235], mesh = true, depth = true }
temperature.scalar = 150

[bodies.material]
albedo = 0.3
emissivity = 0.9
thermal_inertia = 500.0
density = 2100.0
heat_capacity = 600.0
72 changes: 72 additions & 0 deletions cfg/juventas-landing/cfg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
[window]
ambient = [0.0, 0.0, 0.0]
width = 2048
height = 1536
# shadows = true
export_frames = true

[simulation]
step = 1

# duration = 26700
duration = 26754
# duration = 29990

[simulation.export]
step = 1

# duration = 26700
duration = 26754
# duration = 29990

[simulation.file]
# path = "/Users/gregoireh/projects/juventas-entry/view.csv"
path = "/Users/gregoireh/data/kalast/runs/juventas/gmv_landing.csv"

[scene]
sun.position = "file"

[scene.camera]
name = "Juventas Navcam"
position.cartesian = [0, 0, 0]
near = 0.01
far = 5

# up = [0, 0, 1]
# direction.vector = [1, 0, 0]

up = [0, 1, 0]
direction.vector = [0, 0, 1]

# up = [0, 0, 1]
# direction.vector = [0, -1, 0]

[scene.camera.projection]
# 38 x 28.5
perspective = 28.5

[[bodies]]
name = "Didymos"
state = "file"

[bodies.material]
albedo = 0.1

[bodies.mesh.shape]
# path = "/Users/gregoireh/data/meshes/didymos/didymos_g_9309mm_spc_obj_0000n00000_v003.obj"
# path = "/Users/gregoireh/data/meshes/didymos/didymos_g_9309mm_spc_obj_0000n00000_v003_decimated_3072.obj"
path = "/Users/gregoireh/data/meshes/didymos/didymos_g_1165mm_spc_obj_0000n00000_v003.obj"

[[bodies]]
name = "Dimorphos"
state = "file"
# state.cartesian.position = [-0.2, 0, 0]

[bodies.material]
albedo = 0.1

[bodies.mesh.shape]
# path = "/Users/gregoireh/data/meshes/dimorphos/dimorphos_g_1940mm_spc_obj_0000n00000_v004.obj"
# path = "/Users/gregoireh/data/meshes/dimorphos/dimorphos_g_1940mm_spc_obj_0000n00000_v004_decimated_3072.obj"
path = "/Users/gregoireh/data/meshes/dimorphos/dimorphos_g_0243mm_spc_obj_0000n00000_v004.obj"

Loading

0 comments on commit 524fed5

Please sign in to comment.