There a varietry of useful properties of orbits that can be used to understand the characteristics of an orbit, such as its period, velocity, and more. Brahe provides a convenient way to compute these properties from the orbital elements.
importbraheasbhimportnumpyasnp# Initialize EOPbh.initialize_eop()# Initialize a Keplerian state# Define orbital elements [a, e, i, Ω, ω, M] in meters and degrees# LEO satellite: 500 km altitude, 97.8° inclination (approx sun-synchronous)oe_deg=np.array([bh.R_EARTH+500e3,# Semi-major axis (m)0.01,# Eccentricity97.8,# Inclination (deg)15.0,# Right ascension of ascending node (deg)30.0,# Argument of periapsis (deg)45.0,# Mean anomaly (deg)])# Calculate Orbital periodperiod=bh.orbital_period(oe_deg[0])print(f"Orbital period: {period/60:.3f} minutes")
usebraheasbh;usenalgebraasna;fnmain(){// Initialize EOPbh::initialize_eop().unwrap();// Initialize a Keplerian state// Define orbital elements [a, e, i, Ω, ω, M] in meters and degrees// LEO satellite: 500 km altitude, 97.8° inclination (approx sun-synchronous)letoe_deg=na::vector![bh::R_EARTH+500e3,// Semi-major axis (m)0.01,// Eccentricity97.8,// Inclination (deg)15.0,// Right ascension of ascending node (deg)30.0,// Argument of periapsis (deg)45.0,// Mean anomaly (deg)];// Orbital periodletperiod=bh::orbital_period(oe_deg[0]);println!("Orbital period: {:.3} minutes",period/60.0);}
importbraheasbhimportnumpyasnp# Initialize EOPbh.initialize_eop()# Initialize a Keplerian state# Define orbital elements [a, e, i, Ω, ω, M] in meters and degrees# LEO satellite: 500 km altitude, 97.8° inclination (approx sun-synchronous)oe_deg=np.array([bh.R_EARTH+500e3,# Semi-major axis (m)0.01,# Eccentricity97.8,# Inclination (deg)15.0,# Right ascension of ascending node (deg)30.0,# Argument of periapsis (deg)45.0,# Mean anomaly (deg)])# Calculate perigee velocityv_perigee=bh.perigee_velocity(oe_deg[0],oe_deg[1])print(f"Perigee velocity: {v_perigee:.3f} m/s")# Calculate apogee velocityv_apogee=bh.apogee_velocity(oe_deg[0],oe_deg[1])print(f"Apogee velocity: {v_apogee:.3f} m/s")
usebraheasbh;usenalgebraasna;fnmain(){// Initialize EOPbh::initialize_eop().unwrap();// Initialize a Keplerian state// Define orbital elements [a, e, i, Ω, ω, M] in meters and degrees// LEO satellite: 500 km altitude, 97.8° inclination (approx sun-synchronous)letoe_deg=na::vector![bh::R_EARTH+500e3,// Semi-major axis (m)0.01,// Eccentricity97.8,// Inclination (deg)15.0,// Right ascension of ascending node (deg)30.0,// Argument of periapsis (deg)45.0,// Mean anomaly (deg)];// Calculate perigee velocityletv_perigee=bh::perigee_velocity(oe_deg[0],oe_deg[1]);println!("Perigee velocity: {:.3} m/s",v_perigee);// Calculate apogee velocityletv_apogee=bh::apogee_velocity(oe_deg[0],oe_deg[1]);println!("Apogee velocity: {:.3} m/s",v_apogee);}