def calculate(source_coord, target_coord):
"""
Calculate the distance between provided coordinates and the direction from source coordinates to target coordinates.
Returns:
CoordinateRelationship object.
"""
dist = vincenty((source_coord.lat, source_coord.lng), (target_coord.lat, target_coord.lng)).km
deg = CoordinateRelationship._calculate_deg(source_coord, target_coord)
return CoordinateRelationship(dist, deg)
评论列表
文章目录