Created
April 24, 2021 19:30
-
-
Save YannBerthelot/1e8edbeef50db4f48f50cfcfdabbd021 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from numba import njit | |
@njit(nogil=True) | |
def compute_gamma(vz, norm_V): | |
""" | |
Compute gamma (the angle between ground and the speed vector) using trigonometry. | |
sin(gamma) = V_z / V -> gamma = arcsin(V_z/V) | |
""" | |
if norm_V > 0: | |
return asin(vz / norm_V) | |
if norm_V == 0: | |
return 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment