Skip to content

Commit

Permalink
Merge pull request cbassa#19 from kerel-fs/pr/satmap_help
Browse files Browse the repository at this point in the history
satmap: Add usage & interactive usage help
  • Loading branch information
cbassa authored Nov 7, 2019
2 parents 045af09 + 01b0253 commit 812d2b3
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ Tools
- Append `-P` in order to invoke `skymap` to plot a skymap and the
sky track for each predicted pass
* `satmap`: Visualize satellite tracks on a map of Earth
Example usage:
- Show the ground track of all satellites in `ST_TLEDIR/classfd.tle` (for roughly 1.3 orbits from now on)
```
satmap
```
* `satorbit`: Show a 3D representation of the earth, the current position,
footprint and orbit of the selected object
Example usage:
Expand Down
26 changes: 25 additions & 1 deletion satmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ double nfd2mjd(char *date);
double date2mjd(int year,int month,double day);
void mjd2date(double mjd,char *date,int length);
void usage();
void interactive_usage();
void nfd_now(char *s);
double gmst(double);
double dgmst(double);
Expand Down Expand Up @@ -490,6 +491,13 @@ void plot_map(void)
// Get cursor
cpgcurs(&x,&y,&c);

// Help
if (c=='h') {
interactive_usage();

continue;
}

// Redraw
if (c=='r') {
m.mjd=-1.0;
Expand Down Expand Up @@ -695,7 +703,23 @@ double nfd2mjd(char *date)

void usage()
{
return;
printf("usage: satmap -c TLEFILE [-t TIMESTAMP] [-s COSPARID] [-i SATNO]\n");
printf(" [-l LENGTH] [-h]\n");
}

void interactive_usage()
{
printf("Interactive help:");
printf("r Redraw\n");
printf("\n");
printf("< Divide the integration length by a facor of 2\n");
printf("> Multiply the integration length by a facor of 2\n");
printf("\n");
printf(", Increase time (+integration_length in seconds /(1 day))\n");
printf(". Roll back the time\n");
printf("\n");
printf("h this interactive help\n");
printf("q/Q Exit\n");
}

// Compute Date from Julian Day
Expand Down

0 comments on commit 812d2b3

Please sign in to comment.