How do you find the intersection between a sphere and a cone? Particularly the outline. The problem I'm having is generating satellite footprints. Given a sensor with boresight(direction you are pointing) pointing some direction and a given half-angle, what's the footprint on the ground? I've worked through it already a couple of ways but I'm not happy with any of them.
If you assume the Earth is a sphere, which it ain't, and you point your 'cone' consisting of lines emanating from your boresight, the intersection of those lines with a sphere can be found with a simple quadratic. Link these lines together and boom, there's your footprint. I've done this and it works very well for sensor footprints that lie *entirely *on the Earth's surface. However, for glancing angles in which only part of the cone intersects the surface it gets dicey. There's all sorts of conditions and I keep running into corner cases of altitude, boresight, and half-angle that give me problems.
Now there are a couple of things that are always true in what I've described above. First, the amount of the Earth that is visible from the satellite is dependent on altitude. If you are really high, you can see almost half of the planet. As you get lower, the hemisphere shrinks until you're standing on the ground and you can only see a few miles if the horizon were completely flat. In fact, the edge of what you can see approximates a circle. Standing on the surface with a flat horizon, like at sea, that circle has a radius of about 3 miles if you are two meters tall. Not much! For a satellite in Geosynchronous orbit, the radius is close to the radius of the Earth. Point being, if you know your height and assume the horizon is flat, as it is approximately from orbit, and assume you are at the center of your local coordinate system, you can write an equation for that circle. Now, the origin of that circle is a bit below your feet but you can calculate that so you get a really good planar approximation to the circle transcribed by your visible horizon. Going back to our geosynch satellite, the center of that circle is close to the center of the Earth. So, if we know out height, we can write a nice planar equation for our local circle, call it x^2 + y^2 = r^2, an equation we all know and love.
Another thing that is true is that if you are looking at the Earth with your orbital-sensor with conical projection, a cross-section of this cone normal to the boresight will be a circle. At the sensor it is a point but as you move away from the sensor it becomes an expanding circle. Now, for the special case, if only part of the Earth is in the field of view (FOV) of the sensor('part' of the sensor is looking past the Earth, into space) this circle will intersect your local circle in two places,both of these spots being tangent to the surface with a line from that spot to the satellite. I can iterate and get these locations but I'd prefer an analytical solution and I'm getting stuck.
I'm thinking, if I can find these two points, I should be able to use these intersections to generate my footprint. I simply start at the first one, use my quadratic to find the intersection points, and then find the tangent points. As as said, I'm just getting stuck finding the intersection points. I've thought about projecting the sensor circle onto the same place as my local circle. It'll be an ellipse and I should be able to derive the intersections though, it's going to be messy for a circle and non-colocated ellipse. I've also thought about rotating the circle into the plane of my local circle but I'd have to rotate it about the line connecting the intersection points and I don't have those. I could rotate it about the center of the sensor circle and drop it onto the plane of my local circle but that moves the intersection points. So, you see, I've run out of ideas and am looking for help. Thanks!