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

Question about Direction Cosine Matrix

  1. Jul 8, 2009 #1
    Hi Everyone,

    I am facing a basic level problem about direction cosine matrix as I am not an expert in mathmatics. Hope you people will help me..

    I am working on inertial navigation system in three coordinate frames :
    1. ENU
    2. ECEF (XYZ)
    3. LLH (Latitude , Longitude , Height)

    I want to convert a point in LLH to ENU using Direction Cosine Matrix(from earth to enu frame)

    I have written a piece of code in MATLAB:

    enu_orig = [45 0 0]*pi/180; % origin of ENU frame expressed in LLH frame
    enu_orig1 = llh2xyz(enu_orig); % origin of ENU frame expressed in XYZ frame

    enu = [10 100 0]; % Reference point in ENU frame
    xyz = enu2xyz(enu , enu_orig1); % convert to XYZ frame

    llh = xyz2llh(xyz); % Convert to LLH frame
    dcm = llw2dcm(llh); % Find the Direction Cosine Matrix relating Earth Frame (LLH) to ENU

    enu1 = dcm * xyz; % Convert the point back to ENU using DCM

    My problem is that :
    Can I use DCM in this way for conversion from LLH to ENU frame. If yes then in the above code 'enu' and 'enu1' must be equal. But they are not in my case.

    If I can not use DCM then what is the basic purpose of DCM ?

    Hope it will be clear ...

    n Reqards

    Athar Khan
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted