Skip to content
Snippets Groups Projects
Commit 8f414f9c authored by Petrus Hyvönen's avatar Petrus Hyvönen Committed by petrush
Browse files

Updated absolutedate conversions from incorrect millisecond conversoins

parent fe41c120
No related branches found
No related tags found
No related merge requests found
Changelog python orekit package Changelog python orekit package
2016-11-13 Version 8.0 Build 1
- Corrected the datetime to absolute conversions, microseconds was incorrectly converted
2016-07-03 Version 8.0 Build 0 2016-07-03 Version 8.0 Build 0
- Updated to orekit 8.0 version with fixes as of 3rd July - Updated to orekit 8.0 version with fixes as of 3rd July
- Changed from apache common maths3 to hipparhcus - Changed from apache common maths3 to hipparhcus
......
...@@ -6,7 +6,7 @@ build: ...@@ -6,7 +6,7 @@ build:
# If this is a new build for the same version, increment the build # If this is a new build for the same version, increment the build
# number. If you do not include this key, it defaults to 0. # number. If you do not include this key, it defaults to 0.
number: 0 number: 1
# Builds: # Builds:
# 1 - orekit 7.1dev0 version from git 2015-10-05 # 1 - orekit 7.1dev0 version from git 2015-10-05
# 2 - orekit 7.1dev0 version from git 2015-12-17 # 2 - orekit 7.1dev0 version from git 2015-12-17
......
...@@ -67,7 +67,26 @@ def absolutedate_to_datetime(orekit_absolutedate): ...@@ -67,7 +67,26 @@ def absolutedate_to_datetime(orekit_absolutedate):
or_time.getHour(), or_time.getHour(),
or_time.getMinute(), or_time.getMinute(),
int(math.floor(seconds)), int(math.floor(seconds)),
int(1000.0 * (seconds - math.floor(seconds)))) int(1000000.0 * (seconds - math.floor(seconds))))
def datetime_to_absolutedate(dt_date):
''' Converts between orekit.AbsoluteDate objects
and python datetime objects (utc)
Args:
dt_date (datetime): python datetime object to convert
Returns:
AbsoluteDate: time in orekit format'''
utc = TimeScalesFactory.getUTC()
return AbsoluteDate(dt_date.year,
dt_date.month,
dt_date.day,
dt_date.hour,
dt_date.minute,
dt_date.second + dt_date.microsecond / 1000000.,
utc)
def to_elevationmask(az, el): def to_elevationmask(az, el):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment