Jump to content
  • Advertisement
Sign in to follow this  
momob

Angles and flight simulator ILS landing system?

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello guys, I am working on a flight simulator and I am stuck with the ILS instument (Instrument Landing System) due to my lack of understanding of math. Here what I am working on right now. The simulated plane needs to land using ILS which is basically a radio signal that point out from the start of the runway (center line) and spread out 45 degree s on each of the runway (opposite to where the runway is facing). The signal can be detected from about 20 miles away. Now the plane needs to flight toward the runway starting point(start). Forgetting the slope info from the ILS (that allow the pilot to descent correctly) so to make the problem a 2D problem for now. What I am trying to do is figure out, given the runway bearing, whether or not the plane can actually see (detect) the ILS signal (if distance is lower than 20 miles) For instance let say the runway heading is 90 degrees (facing East) and the plane is heading North West (300 degrees). How I can figure out if the plane is inside the area when the ILS system is transmiting +- 45 degrees radio spread > Start---------End (runway) \ plane heading North West (300 degrees) Assuming the plane is within the 20 miles radio signal, how can tell if the plane is inside the triangular area made by the +/- 45 degrees radio signal spreading behind the runway? I am aware of the Dot Product and tried that but it does not seems to work correctly. My understanding is that dot product calculate angle between two vectors which meet at the orign (0,0) In my problem, the runway can be seen as a vector and the plane heading as another. The problem is that I cannot see how these two vectors (runway and plane headings) do not meet at the origin. As you can see, I am not even sure what question to ask! I will love to have some help on this. I have read tons of related questions/answers here but most have to do with how to figure out angles calculation between vectors that meet at the origin. I am not sure if that appply to my problem. Again thank you for any pointers! Mo.

Share this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
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:

http://www.navfltsm.addr.com/ils.htm

Share this post


Link to post
Share on other sites
Quote:
Original post by momob
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:

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 this post


Link to post
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!