# Angles and flight simulator ILS landing system?

This topic is 4012 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

##### Share on other sites
If I understand your description, I think you need to form the 3 points of your triangle, where (assuming angles in degrees)

p0 = {0,0}
p1 = {cos(runway angle - 45)*beam length, sin(runway angle - 45)*beam length}
p2 = {cos(runway angle + 45)*beam length, sin(runway angle + 45)*beam length}

Then make the aircraft position relative to the runway position

ap = {aircraft x - runway x, aircraft y - runway y}

Then the problem becomes is ap inside triangle p0,p1,p2, which you can test for by using methods in this forum's faq.

##### Share on other sites
Hello Tidy,

WOW, I am amazed that you not only understood what I am trying to do (given mt crazy explanation) but it seems that your suggestion should work perfectly. THANK YOU!

I draw your suggestions and it makes a lot of sense. The radio beam look like a piece of pie in front of the runaway (the point of the pie being set at the start point of the runway) I am going to code it and report here.

At this point I am just looking to figure out if the plane (a point in space) is inside the pie. Do you know how difficult it will be to figure out if the plane is facing the start of the runway if I know the plane heading and the runway bearing? I will probably need that so I can set the ILS vertical indicator on the instrument panel. For instance if the plane is facing the start of the runway then the the vertical line will at the center of HUD (heads up display) of the aircraft. If the plane is facing opposite to the center line of the runway then the ILS bar should not be available (like if the plane is not inside the pie)

I am not sure If I am making any sense but if you have an idea I will love to hear it. My fist thinking is just to calculate the difference between the plane heading and the runway bearing but somehow I find too easy solution!!!

Once again thank you so much for taking the time Tidy!

Mo.

ps: In airplane, the horizontal ILS bar is to indicate if the plane descending correctly toward the runway during landing (night or bad weather) the vertical I think provide azimuth info to see if the plane is on the center line of the runway. Here a link for people who are interested:

##### Share on other sites
Quote:
 Original post by momobHello Tidy,WOW, I am amazed that you not only understood what I am trying to do (given mt crazy explanation) but it seems that your suggestion should work perfectly. THANK YOU! I draw your suggestions and it makes a lot of sense. The radio beam look like a piece of pie in front of the runaway (the point of the pie being set at the start point of the runway) I am going to code it and report here.At this point I am just looking to figure out if the plane (a point in space) is inside the pie. Do you know how difficult it will be to figure out if the plane is facing the start of the runway if I know the plane heading and the runway bearing? I will probably need that so I can set the ILS vertical indicator on the instrument panel. For instance if the plane is facing the start of the runway then the the vertical line will at the center of HUD (heads up display) of the aircraft. If the plane is facing opposite to the center line of the runway then the ILS bar should not be available (like if the plane is not inside the pie)I am not sure If I am making any sense but if you have an idea I will love to hear it. My fist thinking is just to calculate the difference between the plane heading and the runway bearing but somehow I find too easy solution!!! Once again thank you so much for taking the time Tidy!Mo.ps: In airplane, the horizontal ILS bar is to indicate if the plane descending correctly toward the runway during landing (night or bad weather) the vertical I think provide azimuth info to see if the plane is on the center line of the runway. Here a link for people who are interested:http://www.navfltsm.addr.com/ils.htm

Glad to be of help. For your next step it sounds like you need to look into atan2 and angular differences. See this recent discussion on similar issues:

http://www.gamedev.net/community/forums/topic.asp?topic_id=469693

##### Share on other sites
Hello Tidy,

As always thank you so much! I have been working on this problem for weeks (so I do not ask stupid questions...) now and lost perspective it seems. I should have known about atn2! I will take a few days to reflect on the posts you suggested but it seems to make a lot of sense. I should also first learn on how to represent a direction of an object (I will assume it will be vector) in addition just its position (point)

In any event, thank you for taking the time in responding to my not always though out questions!! I really appreciate it.

Take care.

Mo.

1. 1
Rutin
37
2. 2
3. 3
4. 4
5. 5

• 12
• 10
• 13
• 104
• 11
• ### Forum Statistics

• Total Topics
632981
• Total Posts
3009687
• ### Who's Online (See full list)

There are no registered users currently online

×