Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Coordinate Transformations Question

  1. Dec 16, 2009 #1


    User Avatar

    Hi there. This isn't so much a math question as it is a conceptual question. I can't seem to wrap my head around the need for coordinate transformations. *Why* do they need to be done? I think I really need a picture for this, so this might not be the right place to ask, but if you can describe the "why" rather than the "how" that I find in all the papers/books I've found, that would be great.
    Basically, the problem that I'm working on is a plane with a camera on a motorized gimbal. This gimbal needs to point to a spot on the ground and remain pointed to that spot as the plane flies through space. So, the first step is to convert the Lat/Lon into ECEF coordinates to get cartesian math. Get that part, no problem. My question is, why can't I just calculate the vector between these two points and call it a day? From everything I've read, I need to rotate the plane's coordinate system to align with the earth's coordinate system using matrix transformations. But then, if the plane is now "tipped" to be on the same "axes" as the target, and I calculate the vector, it still won't be correct because the plane isn't really tipped! Please forgive me if I'm being rather obtuse here, but any insight that you can give me would be much appreciated.
  2. jcsd
  3. Dec 18, 2009 #2


    User Avatar
    Science Advisor

    I've done this very thing in a computer program I made. Essentially you should simply create a matrix using an eye vector and then you have to create an "up" vector. You can
    create a matrix using an eye vector and use the z axis as your up vector and then reorthonormalize the matrix, using the calculated binormal and the lookat vector.

    There are tonnes of examples on the internet but essentially its going to result in
    normalizing the lookat vector, taking a cross product between y-axis and lookat
    vector and then calculating the up vector from the binormal and the lookat vector.

    Hope that helps
  4. Dec 19, 2009 #3


    User Avatar

    Well, in thinking about it more I think I may have figured it out. Forgive me while I think "aloud". After converting the aircraft and target locations to ECEF coordinates, you subtract them to get the vector between them. BUT that vector is only the straight line distance between the two points. It doesn't take into account the orientation of the aircraft, which may very well be pitch up 25 degrees and banked 10 degrees. Therefore to get the new "coordinates" of the target, with respect to the planes' attitude, the transformation needs to be done to get them in the same "plane" (no pun intended ;P ). Any confirmation or correction of this thought is appreciated. thanks.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook