CLCmdGoGpsUpStreamData.fromNewProtocol constructor
CLCmdGoGpsUpStreamData.fromNewProtocol()
Implementation
factory CLCmdGoGpsUpStreamData.fromNewProtocol(CLCmdGogpsBodyPeakNew bodyItem,int workoutType,double speed, int currentDist, double dDistance,double lat,double lon, int cal ){
return CLCmdGoGpsUpStreamData(
timestamp: bodyItem.timestamp + bodyItem.secIndex,
secondindex:bodyItem.secIndex,
mSport_type:workoutType, //轨迹类型
speed:speed,
longitude:bodyItem.lon / 1000000,
latitude:bodyItem.lat / 1000000,
altitude:bodyItem.altitude.toDouble(),
distance_km:currentDist,
heartrate:bodyItem.heartrate,
deltadis:dDistance,
accuracy:bodyItem.accuracy,
kcal: cal
);
}