2. GHA mit CMA-ES
This commit is contained in:
20
dashboard.py
20
dashboard.py
@@ -6,6 +6,7 @@ import numpy as np
|
||||
from GHA_triaxial.panou import gha1_ana
|
||||
from GHA_triaxial.panou import gha1_num
|
||||
from GHA_triaxial.panou_2013_2GHA_num import gha2_num
|
||||
from GHA_triaxial.ES_gha2 import gha2_ES
|
||||
from ellipsoide import EllipsoidTriaxial
|
||||
import winkelumrechnungen as wu
|
||||
import ausgaben as aus
|
||||
@@ -500,16 +501,27 @@ def calc_and_plot(n1, n2,
|
||||
)
|
||||
|
||||
if "stochastisch" in method2:
|
||||
# stoch
|
||||
a_stoch = "noch nicht implementiert.."
|
||||
beta0 = np.deg2rad(float(beta21))
|
||||
lamb0 = np.deg2rad(float(lamb21))
|
||||
beta1 = np.deg2rad(float(beta22))
|
||||
lamb1 = np.deg2rad(float(lamb22))
|
||||
alpha_1, alpha_2, s12, geo_line_es = gha2_ES(
|
||||
ell,
|
||||
ell.ell2cart(beta0, lamb0),
|
||||
ell.ell2cart(beta1, lamb1),
|
||||
all_points=True
|
||||
)
|
||||
|
||||
alpha_1 = 1
|
||||
alpha_2 = 2
|
||||
out2.append(
|
||||
html.Div([
|
||||
html.Strong("Stochastisch (ES): "),
|
||||
html.Span(f"{a_stoch}")
|
||||
html.Span(f"{aus.gms('α₁₂', alpha_1, 4)}, {aus.gms('α₂₁', alpha_2, 4)}, s = {s12:.4f} m"),
|
||||
])
|
||||
)
|
||||
|
||||
|
||||
if not method2:
|
||||
return html.Span("Bitte Berechnungsverfahren auswählen!", style={"color": "red"}), "", go.Figure()
|
||||
|
||||
@@ -517,6 +529,8 @@ def calc_and_plot(n1, n2,
|
||||
fig = figure_constant_lines(fig, ell, "ell")
|
||||
if "numerisch" in method2:
|
||||
fig = figure_lines(fig, geo_line_num, "#ff8c00")
|
||||
if "stochastisch" in method2:
|
||||
fig = figure_lines(fig, geo_line_es, "#ff8c00")
|
||||
fig = figure_points(fig, [("P1", p1, "black"), ("P2", p2, "red")])
|
||||
|
||||
return "", out2, fig
|
||||
|
||||
Reference in New Issue
Block a user