TMDActivity Class Reference
Inherits from | NSObject |
---|---|
Declared in | TMDActivity.h |
Overview
This class includes all information pertaining to the TMD activity collected from the Moprim Cloud.
activityId
The unique id of the activity when stored in the local cache
@property (assign) long long activityId
Declared In
TMDActivity.h
correctedActivity
The corrected label of the activity
@property (nonatomic, strong) NSString *correctedActivity
Declared In
TMDActivity.h
originalActivity
The original label of the activity
@property (nonatomic, strong) NSString *originalActivity
Declared In
TMDActivity.h
co2
The amount of CO2 (in grams) generated during the activity.
@property (assign) double co2
Declared In
TMDActivity.h
distance
The distance in meters covered in the activity
@property (assign) double distance
Declared In
TMDActivity.h
speed
The average speed (in kilometers per hours) during the activity
@property (assign) double speed
Declared In
TMDActivity.h
polyline
The encoded polyline of the GPS locations during the activity
@property (nonatomic, strong) NSString *polyline
Declared In
TMDActivity.h
destination
The destination of the activity, null for stationary
@property (nonatomic, strong) NSString *destination
Declared In
TMDActivity.h
verifiedByUser
Indicates whether the activity was either validated or corrected by the user
@property BOOL verifiedByUser
Declared In
TMDActivity.h
syncedWithCloud
Indicates whether change made manually on the activity have been synced with the cloud
@property BOOL syncedWithCloud
Declared In
TMDActivity.h
– initWithId:timestampDownload:timestampStart:timestampEnd:timestampUpdate:originalActivity:correctedActivity:co2:distance:speed:polyline:origin:destination:metadata:verifiedByUser:synced:
- (instancetype)initWithId:(long long)activityId timestampDownload:(long long)timestampDownload timestampStart:(long long)timestampStart timestampEnd:(long long)timestampEnd timestampUpdate:(long long)timestampUpdate originalActivity:(NSString *)originalActivity correctedActivity:(nullable NSString *)correctedActivity co2:(double)co2 distance:(double)distance speed:(double)speed polyline:(NSString *)polyline origin:(nullable NSString *)origin destination:(nullable NSString *)destination metadata:(nullable NSString *)metadata verifiedByUser:(BOOL)verifiedByUser synced:(BOOL)syncedWithCloud
– hasSameTimestampsThanActivity:
Returns TRUE if the activity has same start and stop timestamp than ‘other’
- (BOOL)hasSameTimestampsThanActivity:(TMDActivity *)other
Discussion
Activities are usually compared with their timestamps.
Declared In
TMDActivity.h
– hasSameDataThanActivity:
Compares 2 TMDActivity objects, ignoring activityId, timestampDownload, timestampUpdate and syncedWithCloud
- (BOOL)hasSameDataThanActivity:(TMDActivity *)other
Declared In
TMDActivity.h
– overlapsWithActivity:isInclusive:
Returns TRUE if the timestamps of both activities overlap
- (BOOL)overlapsWithActivity:(TMDActivity *)other isInclusive:(BOOL)isInclusive
Declared In
TMDActivity.h
– isCheckedByUser
Returns TRUE if the corrected label has been set by the user
- (BOOL)isCheckedByUser
Declared In
TMDActivity.h