Comment convertir une accélération de g en m/s² en Python avec UliEngineering
Vous pouvez facilement convertir une accélération de g (gravité standard) en m/s² avec la bibliothèque Python UliEngineering :
g_to_ms2.py
from UliEngineering.Physics.Acceleration import *
from UliEngineering.EngineerIO import *
# Convertir 1g en m/s²
acceleration = g_to_ms2("1g")
print(f"1g = {format_value(acceleration, 'm/s²')}")
# Convertir 2.5g en m/s²
acceleration = g_to_ms2("2.5g")
print(f"2.5g = {format_value(acceleration, 'm/s²')}")Exemple de sortie
g_to_ms2_output.txt
1g = 9.81 m/s²
2.5g = 24.5 m/s²La conversion utilise la valeur de gravité standard g₀ = 9.80665 m/s².
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow