Code covered by the BSD License  

Highlights from
Keplerian State Transition Matrix

4.0

4.0 | 1 rating Rate this file 6 Downloads (last 30 days) File Size: 2.74 KB File ID: #20042

Keplerian State Transition Matrix

by Dmitry Savransky

 

23 May 2008 (Updated 15 Dec 2008)

Given initial positions and velocities, calculate the keplerian state transition matrix for an orbit

| Watch this File

File Information
Description

Phi = keplerSTM(x0,dt,mu) will return the state transition matrix Phi
  for a set of objects described by initial positions and velocities (x0)
  with gravitational parameters mu, propogated along Keplerian orbits for
  time dt. The positions and velocities at time dt is then given by Phi*x0.

  x0 must be a row vector of length 6n where n is the number of planets.
  For each planet, x0 must include the 3 position and 3 velocity values
  in the order [r1,r2,r3,v1,v2,v3].' These positions and velocities are
  measured in a cartesian coordinate system with the central object
  (i.e. star) at the origin. For multiple planets, simply stack
  several of these vectors on top of each other. mu must contain n
  values equal to G(m+ms) where G is the gravitational constant, m is the
  mass of the orbiting object, and ms is the mass of the central object.
  dt is a scalar value of time to propogate.
  NOTE: All units should be consistent. If the positions are in AU and
  velocities are in AU/day, then dt must be in days, and mu must be in
  AU^3/day^2.

  This is calculated using the algorithm described in Shepperd, 1984
  which employs Goodyear's universal variables and solves the Kepler
  problem using continued fractions.

  Example:
      %propogate a planet 10 days along its orbit:
      x0 = [-0.8684, -0.6637, 0.7207, 0.0039, 0.0056, 0.0120].';
      x1 = keplerSTM(x0,10,2.6935e-04)*x0;

MATLAB release MATLAB 7.0.1 (R14SP1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
04 Mar 2009 Rody Oldenhuis

Well documented, understandibly written. Thanks!
There is a potential problem tough on lines 57-59: SUM and DOT by default work along the first dimension (down the columns) while you intend them to work along the second dimension (along the rows). A simple SUM(r0.^2, 2) will do.

Please login to add a comment or rating.
Updates
15 Dec 2008

Fixed multiple bugs associated with calculations for more than one body planet at a time.

Tag Activity for this File
Tag Applied By Date/Time
aerospace Dmitry Savransky 22 Oct 2008 10:03:25
orbits Dmitry Savransky 22 Oct 2008 10:03:26
aerodef Dmitry Savransky 22 Oct 2008 10:03:26
kepler Dmitry Savransky 22 Oct 2008 10:03:26
aeronautics Dmitry Savransky 22 Oct 2008 10:03:26
keplerian Dmitry Savransky 22 Oct 2008 10:03:26
state Dmitry Savransky 22 Oct 2008 10:03:26
transition Dmitry Savransky 22 Oct 2008 10:03:26
matrix Dmitry Savransky 22 Oct 2008 10:03:26

Contact us at files@mathworks.com