TOC | | |
gpswk - Date Conversion to/from the GPS Week
gpswk yr mon day or
gpswk yr DOY or
gpswk GPSWK
where DOY = day-of-year and GPSWK is the GPS week number.
DESCRIPTION
gpswk takes a user input date, given as year, month and day or
year and day-of-year, converts to the GPS week number and writes the result
to stdout. Conversely, gpswk will convert a GPS week number to the
year, month and day of the Sunday of that week.
NOTE: GPS week 0 started on January 6, 1980.
gpswk recognizes three input forms
- gpswk yr mon day -> GPSWK
- gpswk yr DOY -> GPSWK
- gpswk GPSWK -> yr mon day
EXAMPLES
Values returned by the program will be shown in fixed width font
.
- Generate the GPS week number of the week containing a given year, month
and day.
- gpswk 97 12 1
0934
- Generate the GPS week number of the week containing a given year
and day-of-year.
- gpswk 97 335
0934
- Find the GPS week number of the current system date (shell dependent).
- gpswk $(date +"%y %m %d")
TOC | | |
gpswk.html
January 14, 2000