Home > Backend Development > PHP Tutorial > Algorithm - How to use php to find the angle based on the longitude and latitude of two points

Algorithm - How to use php to find the angle based on the longitude and latitude of two points

WBOY
Release: 2016-08-04 09:19:15
Original
1925 people have browsed it

It has been several years since I graduated and I have even forgotten trigonometric functions

As shown in the figure, given the longitude and latitude of two points AC or BC, find the angle of α or β

How to implement it with php Thank you

Algorithm - How to use php to find the angle based on the longitude and latitude of two points

Reply content:

It has been several years since I graduated and I have even forgotten trigonometric functions

As shown in the figure, given the longitude and latitude of two points AC or BC, find the angle of α or β

How to implement it with php Thank you

Algorithm - How to use php to find the angle based on the longitude and latitude of two points

Calculate the length of a, b, c
Angle ACB = rad2deg(asin(a/b));

asin — arcsine, returns the radian corresponding to the sine value, a==sin(asin(a)).

rad2deg — Convert radians to corresponding degrees

Insufficient conditions to calculate.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template