Skip to content

Commit

Permalink
week is int
Browse files Browse the repository at this point in the history
  • Loading branch information
YassineYousfi committed Aug 6, 2024
1 parent d3e4117 commit 9c6a0d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions laika/gps_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class GPSTime:
GPS time class to add and subtract [week, tow]
"""
def __init__(self, week, tow):
self.week = week
self.week = int(week)
self.tow = tow
self.seconds_in_week = 604800

Expand Down Expand Up @@ -168,15 +168,15 @@ def as_unix_timestamp(self):

@property
def year(self):
return self.as_datetime().year
return int(self.as_datetime().year)

@property
def dow(self):
return int(self.tow/(24*3600))

@property
def doy(self):
return self.as_datetime().timetuple().tm_yday
return int(self.as_datetime().timetuple().tm_yday)

def __repr__(self):
return f"GPSTime(week={self.week}, tow={self.tow})"
Expand Down

0 comments on commit 9c6a0d4

Please sign in to comment.