Extended datetime for the gnss analysis.
Project description
gnsstime is an extended datetime for the gnss analysis.
Requirements
Python 3.3 or later (not support 2.x)
History
0.0.3 (2014-12-04)
first release
0.0.4 (2014-12-07)
bug fix
0.0.5 (2014-12-09)
added ‘gpscal’ to the module function.
0.0.6 (2015-12-01)
added a new leapsec.
modified julian day (mjd) support. added ‘mjd2date’, ‘from_mjd’, and a property ‘mjd’.
0.0.8 (2015-12-03)
fixed bug of ‘gpst’. The plus-minus sign was incorrect.
0.0.9 (2021-04-25)
fixed timezone problem.
Example
>>> import gnsstime as gt
>>> gt1 = gt.gnsstime(2011, 1, 1)
>>> print("gpscal: show gps calendar (doy, gpsw, gpswd)")
>>> print("gpscal() -> ", gt1.gpscal())
>>> print("gpscal(2013,12,31) -> ", gt1.gpscal(2013, 12, 31))
>>> print("gpscal(ymd='2013/12/31') -> ", gt1.gpscal(ymd="2013/12/31"))
>>> print("gpscal(dt.datetime(2013,12,31)) -> ", gt1.gpscal(dt.datetime(2013, 12, 31)))
>>> print("gpscal(year=2013, month=12, day=31) -> ", gt.gpscal(year=2013, month=12, day=31))
gpscal() -> (1, 1616, 6)
gpscal(2013,12,31) -> (365, 1773, 2)
gpscal(ymd='2013/12/31') -> (365, 1773, 2)
gpscal(dt.datetime(2013,12,31)) -> (365, 1773, 2)
gpscal(year=2013, month=12, day=31) -> (365, 1773, 2)
gpscal(mjd=56657) -> (365, 1773, 2)
>>> print("date :", gt1.isoformat())
>>> print("doy :", gt1.doy)
>>> print("gpsw :", gt1.gpsw)
>>> print("gpswd :", gt1.gpswd)
>>> print("gpst :", gt1.gpst.isoformat())
>>> print("leapsec :", gt1.leapsec)
>>> print("mjd :", gt1.mjd)
date : 2011-01-01T00:00:00
doy : 1
gpsw : 1616
gpswd : 6
gpst : 2011-01-01T00:00:15
leapsec : -15
mjd : 55562.0
>>> import datetime as dt
>>> print("gt1 + dt.timedelta(days=2) :", (gt1 + dt.timedelta(days=2)).isoformat())
>>> print("gt1 - dt.timedelta(days=2) :", (gt1 - dt.timedelta(days=2)).isoformat())
gt1 + dt.timedelta(days=2) : 2011-01-03T00:00:00
gt1 - dt.timedelta(days=2) : 2010-12-30T00:00:00
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gnsstime-0.0.9.tar.gz.
File metadata
- Download URL: gnsstime-0.0.9.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/0.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66e8e0dd0dc554d925e327ad7962052d6f7444a3e6482e5c020d64af16b9b0dd
|
|
| MD5 |
26551c4c72be4f0c0528665bb603c5ca
|
|
| BLAKE2b-256 |
c6ff82ecde1703d2e96a5d3ace024c22f6dc7f9701d4a2e351b96b2a8275a161
|
File details
Details for the file gnsstime-0.0.9-py3-none-any.whl.
File metadata
- Download URL: gnsstime-0.0.9-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/0.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3bed06cc2f662bd45a1c3a9f0b2e54f0dab5572a1e0cca4b4667ed0454a9947c
|
|
| MD5 |
7a3ce78f5b1acaf0359ccffe97b796f7
|
|
| BLAKE2b-256 |
503f218edd253099cc3e3750fddccd757479f59a9168e9944da7414e1baee09b
|