示例#1
0
文件: Loop.php 项目: guancio/Runalyze
 /**
  * Calculate distance of current step from latitude/longitude
  * @return double
  */
 public function calculatedStepDistance()
 {
     $LastGeohash = (new Geohash())->decode($this->Object->at($this->LastIndex, Entity::GEOHASHES))->getCoordinate();
     $IndexGeohash = (new Geohash())->decode($this->Object->at($this->Index, Entity::GEOHASHES))->getCoordinate();
     return Entity::gpsDistance($LastGeohash->getLatitude(), $LastGeohash->getLongitude(), $IndexGeohash->getLatitude(), $IndexGeohash->getLongitude());
 }