示例#1
0
文件: tcx.py 项目: imclab/tcx2kmz
 def __init__(self):
     ObjectBuilder.__init__(
         self, Trackpoint, {
             'Time':
             SetAttrBuilder(
                 'time',
                 lambda s: datetime.strptime(s, '%Y-%m-%dT%H:%M:%SZ')),
             'Position':
             Builder({
                 'LatitudeDegrees':
                 SetAttrBuilder('latitude_degrees', float),
                 'LongitudeDegrees':
                 SetAttrBuilder('longitude_degrees', float)
             }),
             'AltitudeMeters':
             SetAttrBuilder('altitude_meters', float),
             'DistanceMeters':
             SetAttrBuilder('distance_meters', float),
             'HeartRateBpm':
             Builder({'Value': SetAttrBuilder('heart_rate_bpm', int)}),
             'Cadence':
             SetAttrBuilder('cadence', int),
             'SensorState':
             SetAttrBuilder('sensor_state', lambda s: s == 'Present')
         })
示例#2
0
文件: tcx.py 项目: imclab/tcx2kmz
 def __init__(self):
     ObjectBuilder.__init__(self, Creator, {
         'Name': SetAttrBuilder('name'),
         'UnitId': SetAttrBuilder('unit_id', int),
         'ProductId': SetAttrBuilder('product_id', int),
         'Version': Builder({
             'VersionMajor': SetAttrBuilder('version_major', int),
             'VersionMinor': SetAttrBuilder('version_minor', int),
             'BuildMajor': SetAttrBuilder('build_major', int),
             'BuildMinor': SetAttrBuilder('build_minor', int)})})
示例#3
0
文件: tcx.py 项目: imclab/tcx2kmz
 def __init__(self):
     ObjectBuilder.__init__(self, Trackpoint, {
         'Time': SetAttrBuilder('time', lambda s: datetime.strptime(s, '%Y-%m-%dT%H:%M:%SZ')),
         'Position': Builder({
             'LatitudeDegrees': SetAttrBuilder('latitude_degrees', float),
             'LongitudeDegrees': SetAttrBuilder('longitude_degrees', float)}),
         'AltitudeMeters': SetAttrBuilder('altitude_meters', float),
         'DistanceMeters': SetAttrBuilder('distance_meters', float),
         'HeartRateBpm': Builder({
             'Value': SetAttrBuilder('heart_rate_bpm', int)}),
         'Cadence': SetAttrBuilder('cadence', int),
         'SensorState': SetAttrBuilder('sensor_state', lambda s: s == 'Present')})
示例#4
0
文件: tcx.py 项目: imclab/tcx2kmz
 def __init__(self):
     ObjectBuilder.__init__(
         self, Creator, {
             'Name':
             SetAttrBuilder('name'),
             'UnitId':
             SetAttrBuilder('unit_id', int),
             'ProductId':
             SetAttrBuilder('product_id', int),
             'Version':
             Builder({
                 'VersionMajor': SetAttrBuilder('version_major', int),
                 'VersionMinor': SetAttrBuilder('version_minor', int),
                 'BuildMajor': SetAttrBuilder('build_major', int),
                 'BuildMinor': SetAttrBuilder('build_minor', int)
             })
         })
示例#5
0
文件: tcx.py 项目: imclab/tcx2kmz
 def __init__(self):
     ObjectBuilder.__init__(self, TCX, {'Activities': ActivitiesBuilder()})
示例#6
0
文件: tcx.py 项目: imclab/tcx2kmz
 def __init__(self):
     ObjectBuilder.__init__(self, list, {'Activity': ActivityBuilder()})
示例#7
0
文件: tcx.py 项目: imclab/tcx2kmz
 def __init__(self):
     ObjectBuilder.__init__(self, list, {'Trackpoint': TrackpointBuilder()})
示例#8
0
文件: tcx.py 项目: imclab/tcx2kmz
 def __init__(self):
     ObjectBuilder.__init__(self, TCX, {'Activities': ActivitiesBuilder()})
示例#9
0
文件: tcx.py 项目: imclab/tcx2kmz
 def __init__(self):
     ObjectBuilder.__init__(self, list, {'Activity': ActivityBuilder()})
示例#10
0
文件: tcx.py 项目: imclab/tcx2kmz
 def __init__(self):
     ObjectBuilder.__init__(self, list, {'Trackpoint': TrackpointBuilder()})