botec | |||||||||
---|---|---|---|---|---|---|---|---|---|
SummaryBOTEC is a simple astrophysical and orbital mechanics calculator, including a database of all named Solar System objects. OverviewBOTEC is intended as a simple but useful calculator to assist with making astrophysical, orbital mechanics, and space navigation calculations. As the origin of the acronym applies, BOTEC is more of a "back-of-the-envelope calculator" rather than an industrial-strength calculator, although this may change in the future. BOTEC is primarily intended for people familiar with physics and Python, and as such is unlikely to be useful to the average enduser. BOTEC really consists of two parts: The BOTEC software, which knows what to do with the data, and the Solar System data itself, which is represented in a large data file (a Python pickle, actually). This is deliberately modularized so that the Solar System data BOTEC uses can be updated independently of thet software, and also that alternative data files (e.g., hypothetical stellar systems for fictional purposes) can be supported. All values are strictly in SI units. Getting the softwareThe current version of botec is 0.3.4. The latest version of the software is available in a tarball here: http://www.alcyone.com/software/botec/botec-latest.tar.gz. The official URL for this Web site is http://www.alcyone.com/software/botec/. RequirementsBOTEC requires Python 2.3 or greater. In its present state, BOTEC will also not be of much use to endusers not familiar with Python, or people without some basic working knowledge of physics, astrophysics, orbital mechanics, and space navigation. LicenseThis code is released under the GPL. LimitationsIt is very important to emphasize that BOTEC is intended as a simple calculator, and as such is not up to the task of industrial-strength calculations of the calibre that would be required for actually planning true space missions, although this may well change in the future. BOTEC was originally intended as a data-generating tool for a computer roleplaying game system (which may or may not come to fruition), but was always intended to be able to exist as a standalone entity. However, this means that as a result of its primary goal, it incurs the same limitations that are present in that particular game design. In particular, these are:
Although many of these limitations involving treating certain
orbital parameters as trivial (i.e., coplanar, circular orbits
implies setting the inclination and eccentricity both to zero),
for the most part that actual physical data is contained within
the file. So although BOTEC itself will not treat Mars' orbit as
eccentric, What is missingNote that this release contains almost no documentation whatsoever. As such, you are pretty much on your own. However, a fair number of docstrings are included in the BOTEC code so it should be possible for someone experienced in Python to wind their way through it. Look at the module documentation located in the doc subdirectory for information on the API. There are some major pieces of functionality missing from BOTEC, even for the original purpose it was intended. A few of them are enumerated here:
ContentsThe basic package consists of five things:
Sample usageFamiliarity with Python and physics is assumed. Start BOTEC with: ./botex.py or if that doesn't work: python -i ./botex.py If you use an IDE, you can invoke BOTEC by starting up the interpreter and executing the Python command: execfile("/path/to/your/botex.py") You are now presented with a debugging string indicating the
database that BOTEC is using and a standard Python prompt. The
>>> dir() ['AU', 'AltitudeLocation', 'BiellipticTransfer', 'BiparabolicTransfer', 'C', 'COMPRESSED_EXTENSION', 'CosinesTransfer', 'Course', 'DAY', 'DEBUG', 'DEFAULT_FILENAME', 'DEGREES_TO_RADIANS', 'ExtractionTransfer', 'FOUR_PI', 'FOUR_PI_SQUARED', 'FOUR_THIRDS_PI', 'G', 'GEE', 'HOUR', 'HohmannTransfer', 'INFINITY', 'ImpulsiveTransfer', 'InsertionTransfer', 'LEGAL_KEYS', 'LagrangeLocation', 'LandTransfer', 'LateralTransfer', 'LaunchTransfer', 'LibrationLocation', 'Location', 'MINUTE', 'MONTH', 'Maneuver', 'NUMERIC_KEYS', 'ONE_THIRD', 'OberthManeuver', 'Opportunity', 'Orbit', 'OrbitalLocation', 'PI', 'PI_OVER_THREE', 'PI_OVER_TWELVE', 'PI_OVER_TWO', 'PI_SQUARED_OVER_SIX', 'PartialTransferManeuver', 'PhaseLocation', 'PhaseTransfer', 'PlaneChangeTransfer', 'RADIANS_TO_DEGREES', 'ReprMixin', 'ReturnTransfer', 'SI', 'SIGMA', 'STRING_KEYS', 'SYSTEM', 'SendTransfer', 'SurfaceLocation', 'System', 'THREE_FIFTHS', 'TURN', 'TWO_FIFTHS', 'TWO_G', 'TWO_PI', 'Transfer', 'TransferManeuver', 'VectorTransfer', 'WEEK', 'World', 'YEAR', '__builtins__', '__doc__', '__file__', '__name__', '__package__', 'atmosphericJupiterOrbit', 'ceres', 'charon', 'charonSurface', 'chiron', 'earth', 'earthMoonL1', 'earthMoonL2', 'earthMoonL3', 'earthMoonL4', 'earthSurface', 'europa', 'filename', 'gzip', 'highEarthOrbit', 'highMoonOrbit', 'highTritonOrbit', 'iapetus', 'icarus', 'info', 'init', 'io', 'jupiter', 'load', 'lowEarthOrbit', 'lowIapetusOrbit', 'lowJupiterOrbit', 'lowMarsOrbit', 'lowMoonOrbit', 'mars', 'marsSurface', 'math', 'mediumIoOrbit', 'mercury', 'moon', 'moonSurface', 'neptune', 'operator', 'os', 'phobos', 'pickle', 'plot', 'pluto', 're', 'saturn', 'save', 'stationaryEarthOrbit', 'stationaryJupiterOrbit', 'stationarySunOrbit', 'sun', 'sunEarthL1', 'sunEarthL3', 'sunEarthL4', 'sunJupiterL4', 'sunMercuryL2', 'sys', 'time', 'triton', 'types', 'uranus', 'venus', 'vesta'] Most important, however, is the >>> SYSTEM['Antigone'] <World @ 0x403b928c (Antigone)> Use >>> dir(earth) ['_Location__distance', '_Location__primary', '_World__secondaries', '__doc__', '__getitem__', '__init__', '__module__', '__repr__', '__str__', 'albedo', 'alternateNames', 'altitude', 'altitudeAtPressure', 'angularRadiusFromDistance', 'angularRadiusFromPrimary', 'angularRadiusOfPrimary', 'angularRadiusOfSecondary', 'apoapsis', 'apostationaryAltitude', 'apostationaryDistance', 'areicAtmosphereMass', 'asteroids', 'atmosphereMass', 'barycenterDistanceWithSecondary', 'biozone', 'centripetalAccelerationAtSurface', 'circumference', 'class_', 'closingSpeeds', 'crossSectionalArea', 'data', 'density', 'diameter', 'distance', 'distanceAndPhaseAtCentralAngle', 'distanceForIntensity', 'distanceFrom', 'distanceToSecondary', 'eccentricity', 'effectiveDeltaveeDifference', 'ellipticity', 'emissivity', 'ensure', 'equatorialRadius', 'escapeSpeedExcess', 'escapeSpeedFromDistance', 'escapeSpeedFromPrimary', 'escapeSpeedFromSurface', 'findCommonPrimary', 'get', 'gravitationalBindingEnergy', 'gravityAtDistance', 'gravityAtSurface', 'had', 'has', 'hasRetrogradeRevolution', 'hasRetrogradeRotation', 'hasSurface', 'hierarchy', 'hillRadius', 'idealTemperature', 'inclination', 'indirectIntensityAtDistance', 'instability', 'intensityAtDistance', 'intensityFromPrimary', 'intensityFromRoot', 'interceptedPower', 'irradianceAt', 'isAncestorOf', 'isDescendentOf', 'isInclined', 'isLuminous', 'isNonSpherical', 'isOblate', 'isOblique', 'isRoot', 'isSynchronous', 'luminosity', 'mass', 'massEnergy', 'massRatio', 'massicAngularMomentum', 'massicKineticEnergy', 'massicPotentialEnergy', 'massicTotalEnergy', 'maximumTidalStrengthFromSibling', 'name', 'netAccelerationAtSurface', 'normalizedMomentOfInertia', 'number', 'obliquity', 'opportunitiesPeriodWith', 'opportunityAngleWith', 'opticalDepth', 'orbitalAngularMomentum', 'orbitalAngularSpeedAroundPrimary', 'orbitalAngularSpeedAtDistance', 'orbitalArea', 'orbitalKineticEnergy', 'orbitalMomentOfInertia', 'orbitalPeriodAroundPrimary', 'orbitalPeriodAtDistance', 'orbitalPeriodAtSurface', 'orbitalPotentialEnergy', 'orbitalSpeedAroundPrimary', 'orbitalSpeedAroundPrimaryAtDistance', 'orbitalSpeedAtDistance', 'orbitalSpeedAtSurface', 'orbitalTotalEnergy', 'periapsis', 'period', 'phaseAngle', 'planets', 'polarRadius', 'portionOfOrbitInShadow', 'pressure', 'pressureAt', 'pressureAtAltitude', 'primaries', 'primary', 'radius', 'rawData', 'reflectedPower', 'relativeOrbitalAngularSpeedWith', 'rings', 'rocheLimitForDensity', 'rotationSpeed', 'rotationalAngularMomentum', 'rotationalAngularSpeed', 'rotationalKineticEnergy', 'rotationalMomentOfInertia', 'roundTripTimeWith', 'roundTripWaitTimeWith', 'satellites', 'scaleHeight', 'secondaries', 'select', 'solidAngleFromDistance', 'solidAngleFromPrimary', 'solidAngleOfPrimary', 'solidAngleOfSecondary', 'sphereOfInfluence', 'stationKeeping', 'surfaceArea', 'surfaceBrightness', 'temperature', 'tidalStrengthAtDistance', 'tidalStrengthFromPrimary', 'tidalStrengthFromSecondary', 'tidalStrengthFromSelfAtSurface', 'tidalStrengthRangeFromSibling', 'tisserandParameter', 'totalAngularMomentum', 'type', 'volume', 'zone'] Here is a sample transcript of a BOTEC session to give you the idea of what can be done: >>> jupiter.satellites() [<World @ 0x402f590c (Io)>, <World @ 0x402f5a8c (Europa)>, <World @ 0x402f5c0c (Ganymede)>, <World @ 0x402f5d8c (Callisto)>, <World @ 0x402f5f0c (Metis)>, <World @ 0x402f80ac (Adrastea)>, <World @ 0x402f822c (Amalthea)>, <World @ 0x402f83cc (Thebe)>, <World @ 0x402f854c (Themisto)>, <World @ 0x402f868c (Leda)>, <World @ 0x402f880c (Himalia)>, <World @ 0x402f89cc (Lysithea)>, <World @ 0x402f8b4c (Elara)>, <World @ 0x402f8d0c (Harpalyke)>, <World @ 0x402f8e2c (Praxidike)>, <World @ 0x402f8f4c (Iocaste)>, <World @ 0x402fc0ac (Ananke)>, <World @ 0x402fc22c (Chaldene)>, <World @ 0x402fc36c (Isonoe)>, <World @ 0x402fc4ac (Erinome)>, <World @ 0x402fc5ec (Taygete)>, <World @ 0x402fc72c (Carme)>, <World @ 0x402fc8ac (Kalyke)>, <World @ 0x402fc9ec (Pasiphae)>, <World @ 0x402fcb6c (Megaclite)>, <World @ 0x402fcc8c (Sinope)>, <World @ 0x402fce0c (Callirrhoe)>, <World @ 0x402fcf2c (Autonoe)>, <World @ 0x402ff04c (Thyone)>, <World @ 0x402ff14c (Hermippe)>, <World @ 0x402ff24c (Eurydome)>, <World @ 0x402ff34c (Sponde)>, <World @ 0x402ff44c (Pasithee)>, <World @ 0x402ff54c (Euanthe)>, <World @ 0x402ff64c (Kale)>, <World @ 0x402ff74c (Orthosie)>, <World @ 0x402ff84c (Euporie)>, <World @ 0x402ff94c (Aitne)>] >>> info(stationaryEarthOrbit) Object: stationary orbit around `Earth' Primary: Earth Distance: 4.22e+07 m Phase angle: 0.00e+00 rad >>> info(io) Object: Io Name: Io Alternate names: JI Number: 0 Type: satellite Class: unspecified Zone: Jupiter Primary: Jupiter Distance: 4.22e+08 m Eccentricity: 4.00e-03 Inclination: 6.98e-04 rad Obliquity: 0.00e+00 rad Mass: 8.93e+22 kg Radius: 1.82e+06 m Ellipticity: 0.00e+00 Period: 1.53e+05 s = 1.77 d Temperature: 0.00e+00 K Pressure: 0.00e+00 Pa Scale height: 0.00e+00 m Optical depth: 0.00e+00 Albedo: 6.20e-01 Luminosity: 0.00e+00 W >>> lowEarthOrbit.orbitalPeriodAroundPrimary() 5181.5057206353176 # s >>> earth.rocheLimitForDensity(1e3) # 1e3 kg/m^3 for water 14181619.914894238 # m >>> pluto.intensityFromPrimary()/earth.intensityFromPrimary() 0.00064958695692894674 # Sun is that much dimmer from Pluto than # from Earth >>> triton.angularRadiusOfPrimary()/earth.angularRadiusOfSecondary(moon) 15.335201130577547 # from Triton, Neptune looks 15 times bigger than # the Moon does from Earth >>> pluto.atmosphereMass() 92207637091168.484 # kg, computed from surface gravity and pressure >>> io.tidalStrengthFromPrimary()/earth.tidalStrengthFromSecondary(moon) 19581.842788149675 # Jupiter's tides on Io are this much stronger than # the Moon's from Earth >>> info(SYSTEM['Yamatotakeru']) Object: Yamatotakeru Name: Yamatotakeru Alternate names: Number: 5282 Type: asteroid Class: unspecified Zone: main belt IIb Primary: Sun Distance: 4.09e+11 m = 2.73 au Eccentricity: 1.21e-01 Inclination: 2.13e-01 rad = 12.2 deg Obliquity: 0.00e+00 rad Mass: 0.00e+00 kg Radius: 0.00e+00 m Ellipticity: 0.00e+00 Period: 0.00e+00 s Temperature: 0.00e+00 K Pressure: 0.00e+00 Pa Scale height: 0.00e+00 m Optical depth: 0.00e+00 Albedo: 0.00e+00 Luminosity: 0.00e+00 W >>> Course(earth, SYSTEM['Yamatotakeru']).deltavee() 11080.157152067533 # m/s >>> plot(lowEarthOrbit, lowMarsOrbit) Course: from `low orbit around `Earth'' to `low orbit around `Mars'' Source: low orbit around `Earth' Destination: low orbit around `Mars' Opportunities: Opportunity: opportunity from `Earth' to `Mars' Angle: 7.74e-01 rad = 44.3 deg Period: 6.74e+07 s = 2.14 y Transfers: Transfer: out of `low orbit around `Earth'' Transfer: Hohmann from `Earth' to `Mars' Transfer: into `low orbit around `Mars'' Maneuvers: Maneuver: Oberth from `low orbit around `Earth'' to `Earth' with 2.94e+03 m/s = 2.94 km/s excess Burns: 3.63e+03 m/s = 3.63 km/s Involving: Transfer: out of `low orbit around `Earth'' Maneuver: Oberth from `Mars' to `low orbit around `Mars'' with 2.65e+03 m/s = 2.65 km/s excess Burns: 2.11e+03 m/s = 2.11 km/s Involving: Transfer: into `low orbit around `Mars'' Duration: 2.24e+07 s = 8.63 mo Deltavee: 5.75e+03 m/s = 5.75 km/s >>> plot(stationaryEarthOrbit, highTritonOrbit) Course: from `stationary orbit around `Earth'' to `high orbit around `Triton'' Source: stationary orbit around `Earth' Destination: high orbit around `Triton' Opportunities: Opportunity: opportunity from `Earth' to `Neptune' Angle: 1.97e+00 rad = 113 deg Period: 3.18e+07 s = 1.01 y Transfers: Transfer: out of `stationary orbit around `Earth'' Transfer: Hohmann from `Earth' to `Neptune' Transfer: into `Triton' Transfer: into `high orbit around `Triton'' Maneuvers: Maneuver: Oberth from `stationary orbit around `Earth'' to `Earth' with 1.17e+04 m/s = 11.7 km/s excess Burns: 9.36e+03 m/s = 9.36 km/s Involving: Transfer: out of `stationary orbit around `Earth'' Maneuver: Oberth from `Neptune' to `high orbit around `Triton'' with 4.05e+03 m/s = 4.05 km/s excess Burns: 2.71e+03 m/s = 2.71 km/s Involving: Transfer: into `Triton' Transfer: into `high orbit around `Triton'' Duration: 9.65e+08 s = 30.6 y Deltavee: 1.21e+04 m/s = 12.1 km/s ReferencesRelease history
Wish list
AuthorThis module was written by Erik Max Francis. If you use this software, have suggestions for future releases, or bug reports, I'd love to hear about it. VersionVersion 0.3.4 $Date: 2006/08/26 $ $Author: max $
|