Given a line on the earth's surface, how do I plot a line perpendicular to it?
Apologies if this is a very simple question. I thought this would be a straightforward task, but it is proving counter-intuitive.
I start with the blue line in the figure below (see link -- I'm unable to upload figures yet). I found a perpendicular line by calculating the gradient of the blue line (m), then plotting another line (green) with gradient -1/m. When I plot the lines in Matlab (using 'plot' and 'axis equal'), they look perpendicular, as expected.
However, when I export these lines to Google Earth (using the KML Toolbox), they no longer look perpendicular (see link below; the shorter line is the blue line from the previous figure).
I understand that strange things happen on curved surfaces, but I thought the lines should at least look perpendicular locally. I suspect this has something to do with the projection in Google Earth -- in particular, the fact that the grid cells appear to have roughly similar side lengths, yet the longitudinal edge has length = 1 degree, whereas the latitudinal edge has length = 0.5 degree.
So, in summary:
- is my method of finding a perpendicular line valid on a curved surface? (i.e., plotting a line with gradient -1/m)
- in the Google Earth image, do the perpendicular lines look as expected, or is something strange going on?
To provide more context: I am looking at radar data taken from a plane. The multi-colored area is the 'swath', where observations have been recorded. The blue line I started with in the explanation above is parallel to the swath: this is the aircraft's flight line (the plane was moving in the roughly south-west direction). The radar looks in the direction orthogonal to the flight line, on the left. I am trying to draw a line perpendicular to the flight line; this should be the direction the radar is looking, and should cut the swath neatly. As you can see, this is not the case.