PHP Class Location\Bearing\BearingSpherical

Author: Marcus Jaschen ([email protected])
Inheritance: implements Location\Bearing\BearingInterface
Afficher le fichier Open project: mjaschen/phpgeo Class Usage Examples

Méthodes publiques

Méthode Description
calculateBearing ( Coordinate $point1, Coordinate $point2 ) : float This method calculates the initial bearing between the two points.
calculateDestination ( Coordinate $point, float $bearing, float $distance ) : Coordinate Calculates a destination point for the given point, bearing angle, and distance.
calculateFinalBearing ( Coordinate $point1, Coordinate $point2 ) : float Calculates the final bearing between the two points.

Method Details

calculateBearing() public méthode

This method calculates the initial bearing between the two points.
public calculateBearing ( Coordinate $point1, Coordinate $point2 ) : float
$point1 Location\Coordinate
$point2 Location\Coordinate
Résultat float Bearing Angle

calculateDestination() public méthode

Calculates a destination point for the given point, bearing angle, and distance.
public calculateDestination ( Coordinate $point, float $bearing, float $distance ) : Coordinate
$point Location\Coordinate
$bearing float the bearing angle between 0 and 360 degrees
$distance float the distance to the destination point in meters
Résultat Location\Coordinate

calculateFinalBearing() public méthode

Calculates the final bearing between the two points.
public calculateFinalBearing ( Coordinate $point1, Coordinate $point2 ) : float
$point1 Location\Coordinate
$point2 Location\Coordinate
Résultat float