Skip to content

Commit

Permalink
More Updates to README.
Browse files Browse the repository at this point in the history
  • Loading branch information
shashwatak committed Dec 9, 2013
1 parent b65ccfa commit 2a1bac0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,33 +160,33 @@ longstr1 and longstr2 are the two lines of the TLE, properly formatted by NASA a


###Propogation
Both propagation functions return position_velocity as a dictionary:
Both propagate() and sgp4() functions return position_velocity as a dictionary of the form:

```
{
position : { x : 1, y : 1, z : 1 },
velocity : { x : 1, y : 1, z : 1 }
"position" : { "x" : 1, "y" : 1, "z" : 1 },
"velocity" : { "x" : 1, "y" : 1, "z" : 1 }
}
```
position is in km, velocity is in km/s, both the ECI coordinate frame.

```javascript
var position_velocity = satellite.propagate(satrec, year, month, day, hour, minute, second)
```
Returns position and velocity, given a satrec and the calendar date. Is merely a wrapper for sgp4(), converts the calendar day to julian time since satellite epoch. Sometimes it's better to ask for position and velocity given a specific date.
Returns position and velocity, given a satrec and the calendar date. Is merely a wrapper for sgp4(), converts the calendar day to Julian time since satellite epoch. Sometimes it's better to ask for position and velocity given a specific date.

```javascript
var position_velocity = satellite.sgp4(satrec, time_since_epoch_minutes)
```
Returns position and velocity, given a satrec and the time in minutes since epoch. Sometimes it's better to ask for position and velocity given the time elapsed since epoch.

###Doppler
You can get the satellites current Doppler factor, relative to your position, using:

You can get the satellites current Doppler factor, relative to your position, using the doppler_factor() function. Use either ECI or ECF coordinates, but don't mix them.
```javascript
var doppler_factor = satellite.doppler_factor (observer_ecf, position_ecf, velocity_ecf);
var doppler_factor = satellite.doppler_factor (observer, position, velocity);
```


See the section on Coordinate Transforms to see how to get ECF/ECI/Geodetic coordinates.

###Coordinate Transforms
Expand Down
4 changes: 2 additions & 2 deletions src/doppler.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ function doppler_factor (my_location, position, velocity) {
Math.pow(position["x"] - my_location["x"], 2) +
Math.pow(position["y"] - my_location["y"], 2) +
Math.pow(position["z"] - my_location["z"], 2));
var next_pos = {
var next_pos = {
x : position["x"] + velocity["x"],
y : position["y"] + velocity["y"],
z : position["z"] + velocity["z"]
z : position["z"] + velocity["z"]
};
var next_range = Math.sqrt(
Math.pow(next_pos["x"] - my_location["x"], 2) +
Expand Down

0 comments on commit 2a1bac0

Please sign in to comment.