Skip to main content

A library for space-related calculations

Project description

space_utils

space_utils is a Python library that provides functionality for space-related calculations and conversions. It offers convenient methods for gravitational force calculation, escape velocity calculation, and orbital period calculation.

Installation:

You can install space_utils using pip

"pip install space_utils"

Usage:

Gravitational Force Calculation:

from space_utils.gravitational_force import calculate_gravitational_force

mass1 = 5.972e24 # Mass of Earth in kilograms mass2 = 7.348e22 # Mass of Moon in kilograms distance = 3.844e8 # Distance between Earth and Moon in meters

force = calculate_gravitational_force(mass1, mass2, distance) print(f"The gravitational force between Earth and Moon is: {force} N")

Escape Velocity Calculation:

from space_utils.escape_velocity import calculate_escape_velocity

mass_earth = 5.972e24 # Mass of Earth in kilograms radius_earth = 6.371e6 # Radius of Earth in meters

escape_velocity_earth = calculate_escape_velocity(mass_earth, radius_earth) print(f"The escape velocity of Earth is: {escape_velocity_earth} m/s")

Orbital Period Calculation:

from space_utils.orbital_period import calculate_orbital_period

semimajor_axis = 42164000 # Semimajor axis of the Moon's orbit around Earth in meters mass_earth = 5.972e24 # Mass of Earth in kilograms mass_moon = 7.348e22 # Mass of Moon in kilograms

orbital_period_moon = calculate_orbital_period(semimajor_axis, mass_earth, mass_moon) print(f"The orbital period of the Moon around Earth is: {orbital_period_moon} seconds")

Contributing:

Contributions to space_utils are welcome! If you have any ideas, bug reports, or feature requests, please submit them through the issue tracker on GitHub.

License This project is licensed under the MIT License - see the LICENSE file for details.

Feel free to modify the content and structure of the README file to fit your specific library and its features. Make sure to update the installation instructions, usage examples, contribution guidelines, and license information accordingly.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

space_utils-0.1.0.tar.gz (2.0 kB view details)

Uploaded Source

File details

Details for the file space_utils-0.1.0.tar.gz.

File metadata

  • Download URL: space_utils-0.1.0.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for space_utils-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7b6a92a8b32907f6726dd93ee4bcbd952ec388690be882d229bdd1777c15b14b
MD5 0da2984b53203f10365bcb644c1502da
BLAKE2b-256 a2227c73221734c799553f14a7774741f0d09595219762ee89120d8fc0569c7a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page