* Returns the great circle distance to another * target on the globe. * @param target Pointer to other target. * @returns Distance in radian. */
| 151 | * @returns Distance in radian. |
| 152 | */ |
| 153 | double Target::getDistance(const Target *target) const |
| 154 | { |
| 155 | return acos(cos(_lat) * cos(target->getLatitude()) * cos(target->getLongitude() - _lon) + sin(_lat) * sin(target->getLatitude())); |
| 156 | } |
| 157 | |
| 158 | } |
no test coverage detected