Did I find the right examples for you? yes no

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)
convert GPS week and TOW to a time in seconds since 1970

        def gpsTimeToTime(week, sec):
    '''convert GPS week and TOW to a time in seconds since 1970'''
    epoch = 86400*(10*365 + (1980-1969)/4 + 1 + 6 - 2)
    return epoch + 86400*7*week + sec
        


src/p/y/pyUblox-HEAD/satelliteData.py   pyUblox(Download)
    def __init__(self, gps_week, time_of_week):
        # time of week in seconds, including fractions of a second
        self.time_of_week = time_of_week
        self.gps_week     = gps_week
        self.gps_time     = util.gpsTimeToTime(gps_week, time_of_week)

src/p/y/pyUblox-HEAD/RTCMv2.py   pyUblox(Download)
    def RTCMType1_step(self, throttle=True):
        gpssec = util.gpsTimeToTime(self.gps_week, self.time_of_week)
        if gpssec < self.last_type1_time + self.type1_send_time and throttle:
            return ''
 
    def RTCMType3_step(self, throttle=True):
        gpssec = util.gpsTimeToTime(self.gps_week, self.time_of_week)
        if gpssec < self.last_type3_time + self.type3_send_time and throttle:
            return ''
 

src/p/y/pyUblox-HEAD/positionEstimate.py   pyUblox(Download)
        transmitTime = raw.time_of_week - tof
 
        timesec = util.gpsTimeToTime(raw.gps_week, raw.time_of_week)
 
        # calculate the satellite position at the transmitTime