I have released a kind of ILS calculation 3 months ago, but I found there's some problem when I was at "summer camp" because I learned something of "Formula of Lines and Circles" which mentioned "the slope of the lines" and made me realized the old ILS cannot work in some certain situations.

The slope of the line is the tangent of the angle that formed by the line and the x-axis(0* ~180* ). You can found that the slope of the line is not always rise while the angle rises through the diagram of tangent formula.

That makes the slope doesn't exist while the line is perpendicular to the x-axis and make it more difficult to compare the angle through comparing the slopes, which is the way my old ILS uses.

To avoid comparing slopes and solve the problem, I tried a new method which turned the Latitude and Longitude related to the ground coordinate system to the distances related to the runway coordinate system. That is actually a change of the coordinate system.

The derivation process in Bilibili(yes it is in Chinese)

The GeoGebra diagram

The final formula of the horizontal direction(the vertical has no problem till now) is:

(Lo-Longitude)* cos(HDG)-(La-Latitude)* sin(HDG)

La is the Latitude of the touchdown point,

Lo is the Longitude of the touchdown point,

HDG is the runway heading.

(Looks like it becomes simpler)

Example: SK161 Airflow Carver by SARACONIK Aviation Industry

@PlaneFlightX Hope you haven't find the problem XD