Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6829413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:29:51+00:00 2026-05-26T22:29:51+00:00

I’m trying to produce a boolean method that will return true if a point

  • 0

I’m trying to produce a boolean method that will return true if a point (lonc,latc) lies on a great circle arc starting at (lona,lata) and ending at (lonb,latb)

the point of the method returning true is so if you are in a location where you should be able to see this great circel the section you can see will be shown.

the jist is that you are at (lond,latd) with a small circle at 10degrees radius and I want to work out if the great circle and small circle will intersect. There will be multiple great circles but only one small circle.

I feel the simplest approach is to check any of the longitude and latitudes on the circumference of the small circle lie on a great circle line

any help will be most appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:29:52+00:00Added an answer on May 26, 2026 at 10:29 pm

    You have three latitude-longitude pairs (θa, φa), (θb, φb) and (θc, φc) and you want to determine whether point (θc, φc) lies on the great circle determined by (θa, φa) and (θb, φb). You can accomplish this for example using the following calculations:

    1. Convert all latitude-longitude pairs to (x, y, z) triples using the following formulae: x = sin(θ)*cos(φ), y = sin(θ)*sin(φ), z = cos(θ). This will give you three triples (xa, ya, za), (xb, yb, zb), (xc, yc, zc).

    2. Determine the formula in cartesian coordinates of the plane going through points (xa, ya, za), (xb, yb, zb) and the origin (0, 0, 0). The formula is x+b*y+c*z=0 and we seek b and c which can be determined from two simultaneous equations obtained by substituting coordinates of points A and B for x, y and z in the plane formula x+b*y+c*z=0.

    3. Calculate the distance between point (xc, yc, zc) and the plane determined in point 2 using the following formula: d=abs(xc+b*yc+c*zc)/sqrt(1+b*b+c*c).

    4. From the distance in cartesian coordinates you can find the angular distance between the point (xc, yc, zc) and the great circle determined by (θa, φa) and (θb, φb) using the following formula: α = asin(d).

    5. Since you should not compare floating point numbers exactly you should have an angular threshold which determines how far a point can be from the great circle for you to still consider the point to lie on the circle. You then compare α determined in point 4 with the threshold to come up with the boolean value you seek.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am trying to render a haml file in a javascript response like so:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.