-
Notifications
You must be signed in to change notification settings - Fork 4
celestial.Kepler
The celestial.Kepler package contains basic functions for treating the two-body problem in solving the Kepler equation.
More complete set of functions to solve the Kepler equations, manipulate orbotal elemnts, and to generate ephemeris are available in the celestial.OrbitalEl class.
The package contains several functions for solving the Kepler equation for elliptic, parabolic, and hyperbolic orbits. By default, these functions use the Gaussian gravitational constant and are designed for Solar System objects. In order to adapt these functions for other systems, the user must provide the Gaussian gravitational constant of the system (see functions help).
The functions are solving the Kepler equation simultaneously for multiple values of the eccentricity, time, and semi-major axis, and can solve the Kepler equation for about
The output are the true anomaly (Nu), radius vector (R), and eccentric anomaly (E). A few examples
% Solving the Kepler equation for a single value:
T = 2451545.5;
q = 0.5;
e = 0.2;
[Nu,R,E]=celestial.Kepler.kepler_elliptic(T,q,e);
% For multiple values
T = rand(1e7);
[Nu,R,E]=celestial.Kepler.kepler_elliptic(T,q,e);
% or T, q, and e are vectors...
e = rand(1e7,1);
q = rand(1e7,1).*5;
[Nu,R,E]=celestial.Kepler.kepler_elliptic(T,q,e);
For parabolic orbits:
[Nu,R,S]=celestial.Kepler.kepler_parabolic([7.0;7.8],0.1);
or hyperbolic orbits:
[Nu,R,H,Vel]=celestial.Kepler.kepler_hyperbolic(1,1,1.1);
For very low eccentricity you can also use:
[Nu,R]=celestial.Kepler.kepler_lowecc(1,0.01,1);
In order to apply these functions to other systems, you need to calculate the Gaussian gravitational constant. This can be done using the celestial.Kepler.gauss_grav_const function.
Additional related functions include:
- celestial.Kepler.dnu_dt - Calculate dnu/dt and dr/dt for an elliptical orbit.
- celestial.Kepler.eccentric2true_anomaly - Convert Eccentric anomaly to true anomaly.
- celestial.Kepler.true2eccentric_anomaly - True anomaly to eccentric anomaly.
- celestial.Kepler.lightTimeCorrection - Calculate the c\tau' parameters required for light time convergence.
- celestial.Kepler.trueanom2pos - True anomaly, radius vector and orbital elements to a cartesian position.
- celestial.Kepler.trueanom2vel - True anomaly, radius vector and orbital elements to position and velocity.
Several functions for the manipulation of orbital elements are available:
- celestial.Kepler.thiele_innes2el - Convert Thiele-Innes elements to regular orbital elements.
- celestial.Kepler.thiele_innes - Convert regular orbital elements to the Thiele-Innes elements.
- celestial.Kepler.elements_1950to2000 - B1950.0 FK4 orbital elements to J2000.0 FK5
To convert orbital elements to initial position:
celestial.Kepler.elements2position(2451545,[1 0.1 2451545 0 0 0])
``
## Kepler 3rd law
celestial.Kepler.kepler3law is a simple function for applying the Kepler 3rd law.
This function is using the cgs units.
```matlab
% To calculate the period and velocity from the semi-major axis
Res=celestial.Kepler.kepler3law(constant.SunM,'a',1e13)
% or to calculate the period and semi-major axis from the velocity
Res=celestial.Kepler.kepler3law(constant.SunM,'v',1e5)
AstroPack/MAATv2 - MATLAB Astronomy & Astrophysics Toolbox
- AstroPack/MAATv2 content
- Install
- Coding conventions
- Getting Started
- List of all functions, classes, and methods
- startup file
- configuration files
- New functions and changes log
- Pipeline tasks
- Requested Functionality
- unitTest
- [Introduction to image processing]
- The imUtil package
- The imProc package
- [The lcUtil package]
- [Spectra processing]
- AstroSpec class
- [imProc.spec]
- [pipelines]
- Generate a calibrated source catalog from an image
- Forced photometry
- [Astrometry-related topics]
- Registration and coaddition
- [Image subtraction and transient detection]
- Asteroids ephemeris and matching to sources
- Quering an AstroDb database
- [The celestial package - coordinates and epehemerides]
- [celestial.coo]
- celestial.time
- celestial.map
- celestial.Kepler
- celestial.SolarSys
- celestial.INPOP
- [celestial.ephem]
- celestial.OrbitalEl
- celestial.conjunctions
- [celestial.Targets]
- [celestial.scheduling]
- celestial.earth
- [celestial.htm]
- [celestial.pm]
- [celestial.meterors]
- [celestial.rigidBody]
- celestial.search
- [celestial.stars]
- celestial.proj
- celestial.grid
- [The astro package]
- [Cosmology]
- [Spectra]
- [Gravitational Lensing]
- [binary]
- extinction
- [occultation]
- stars
- [supernova]
- constant - physical constants
- convert - physical units conversions
- [timeSeries - Time series analysis tools]
- [arma]
- [bin]
- [detrend]
- [fit]
- [fold]
- [interp]
- [period]
- [rand]
- [stat]
- [time]
- [xcorr]
- [timeDelay]
- [Virtual observatory and catalogs]
- [Plotting tools]
- [General tools]
- tools package
- www package
- [io package]
- [Database]
- [Low-level classes]
- [Base and Component]
- [Msg loggers and syslog]
- [Developers]