# Formula to compute Graveyard Orbit - Minimum Perigee Altitude
# Minimum Perigree Alititude = 235 + (100*Solar Radiation Pressure Coefficient) + (Aspect Area/Mass)
import math
print ("Formula to compute Minimum Perigee Altitude - Graveyard Orbit")
print ("The formula is: ")
print ("Minimum Perigree Alititude = 235 + (100*Solar Radiation Pressure Coefficient) + (Aspect Area/Mass)")
# Input the data
# Check to make sure the entered solar radiation pressure coefficient is between 1.2 and 1.5
EnteredSolarRadiationPressureCoefficient = 0
while (EnteredSolarRadiationPressureCoefficient==0):
EnteredSolarRadiationPressureCoefficient = input ("Enter the Solar Radiation Pressure Coefficient (bet 1.2 & 1.5): ")
SolarRadiationPressureCoefficient = float(EnteredSolarRadiationPressureCoefficient)
if SolarRadiationPressureCoefficient<1.2 or SolarRadiationPressureCoefficient>1.5:
EnteredSolarRadiationPressureCoefficient = 0
print ("Please enter a number between 1.2 and 1.5.")
EnteredAspectArea = input ("Enter the Aspect Area in square meters: ")
EnteredMass = input ("Enter the Mass in kg: ")
# Convert entered numbers to float
AspectArea = float(EnteredAspectArea)
Mass = float(EnteredMass)
# Calculate the Minimum Perigee Altitude
# Minimum Perigree Alititude = 235 + (100*Solar Radiation Pressure Coefficient) + (Aspect Area/Mass)
MinimumPerigreeAlititude = (235 + (1000*SolarRadiationPressureCoefficient) * (AspectArea/Mass) )
print ("The Minimum Perigree Alititude is: ", MinimumPerigreeAlititude)