CLCmdGoGpsUpStreamData.fromLeap constructor

CLCmdGoGpsUpStreamData.fromLeap(
  1. CLCmdGogpsBodyLeap bodyItem,
  2. int workoutType,
  3. double speed,
  4. int currentDist,
  5. double dDistance,
  6. double lat,
  7. double lon,
  8. int entryindex,
)

Implementation

factory CLCmdGoGpsUpStreamData.fromLeap(CLCmdGogpsBodyLeap bodyItem,int workoutType,double speed, int currentDist, double dDistance,double lat,double lon, int entryindex  ){
  return CLCmdGoGpsUpStreamData(
    timestamp: bodyItem.timestamp + bodyItem.gpsData.elementAt(entryindex).secIndex,
    secondindex:bodyItem.gpsData.elementAt(entryindex).secIndex,
    mSport_type:workoutType, //轨迹类型
    speed:speed,
    longitude:lon,
    latitude:lat,
    distance_km:currentDist,
    heartrate:bodyItem.gpsData.elementAt(entryindex).heartrate,
    deltadis:dDistance,
  );

}