mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-25 18:38:39 +00:00
Merge branch 'physics/basic_orbital_capture' of https://github.com/FatAnorexic/Python into physics/basic_orbital_capture
This commit is contained in:
commit
e968e14aa5
@ -16,17 +16,20 @@ This algorithm does not account for an N-body problem.
|
||||
"""
|
||||
|
||||
|
||||
|
||||
def capture_radii(
|
||||
target_body_radius: float, target_body_mass: float,
|
||||
projectile_velocity: float
|
||||
target_body_radius: float, target_body_mass: float, projectile_velocity: float
|
||||
) -> float:
|
||||
|
||||
#Gravitational constant to four significant figures as of 7/8/2023|
|
||||
# Gravitational constant to four signifigant figures as of 7/8/2023|
|
||||
# Source google: gravitational constant
|
||||
g = 6.6743e-11 # SI units (N*m**2)/kg**2
|
||||
|
||||
<<<<<<< HEAD
|
||||
#Gravitational constant to four significant figures as of 7/8/2023|
|
||||
#Source google: gravitational constant
|
||||
g=6.6743e-11 #SI units (N*m**2)/kg**2
|
||||
=======
|
||||
escape_velocity_squared = (2 * g * target_body_mass) / target_body_radius
|
||||
>>>>>>> 3b6df7598ead9eeffd0f53ad6bf8ae27039469c0
|
||||
|
||||
capture_radius = target_body_radius * math.sqrt(
|
||||
1 + escape_velocity_squared / math.pow(projectile_velocity, 2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user