CLCmdGoGpsUpStreamData.from constructor
CLCmdGoGpsUpStreamData.from(
- PERIPHERAL_GOGPS_HEADER_V2 header,
- PERIPHERAL_GOGPS_SINGLE_ENTRY_PEAK_INDOOR entry,
- int timestamp,
- int type,
- double deltaDistance,
- double speed,
Implementation
factory CLCmdGoGpsUpStreamData.from(PERIPHERAL_GOGPS_HEADER_V2 header, PERIPHERAL_GOGPS_SINGLE_ENTRY_PEAK_INDOOR entry, int timestamp, int type, double deltaDistance, double speed) {
return CLCmdGoGpsUpStreamData(
timestamp: timestamp,
secondindex: entry.secIndex,
mSport_type: header.workoutType, //轨迹类型
speed: speed,
longitude: header.longitude / 1000000,
latitude: header.latitude / 1000000,
altitude: 0,
distance_km: entry.distance,
distance_km_max: 0,
heartrate: entry.heartrate,
stamina: 0,
stamina_aerobic: 0,
stamina_anerobic: 0,
kcal: header.calories,
kcal_max: 0,
cadance: 0,
deltadis: deltaDistance,
steps: entry.steps,
swimtimeonelap: 0,
swimstrokeonelap: 0,
swimtype: 0,
swimavgstrokefreqonelap: 0,
swimmaxstrokefreqonelap: 0,
swimswolfonelap: 0,
swimavgpaceonelap: 0,
swimlapindex: 0,
accuracy: 0,
);
}