I had a question regarding transforming kepler elements to cartesian coordinates. I have the following MATLAB code that does the transformation. But what if the kepler elements given were changed from (a, ecc, inc, raan, argp, f) to (a, ex, ey, inc, raan, theta) where ex and ey are the x and y components of eccentricity and theta is argument of latitude = argp + f. How would the following equations in the code change? We no longer have ecc or argp or f(true anomaly) as inputs.    % Calculate angular momentum     h = sqrt(a * (1-ecc^2)*mu);    % (km^2/s)          % Calculate position and velocity in the periforcal frame     r_w = ((h^2 / mu) / (1 + ecc * cosd(f))) .* [cosd(f), sind(f), 0];     v_w = (mu / h) .* [-sind(f), ecc + cosd(f), 0];          % Define the Rotational Matrices     R1 = [cosd(-argp) -sind(-argp) 0;           sind(-argp) cosd(-argp)  0;                0           0       1];     R2 = [1      0          0;           0 cosd(-inc) -sind(-inc);           0 sind(-inc) cosd(-inc)];          R3 = [cosd(-raan) -sind(-raan) 0;           sind(-raan) cosd(-raan)  0;                0           0       1];          % Calculate position vector     r_rot = r_w * R1 * R2 * R3;          % Calculate velocity vector     v_rot = v_w * R1 * R2 * R3;

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

I had a question regarding transforming kepler elements to cartesian coordinates. I have the following MATLAB code that does the transformation. But what if the kepler elements given were changed from (a, ecc, inc, raan, argp, f) to (a, ex, ey, inc, raan, theta) where ex and ey are the x and y components of eccentricity and theta is argument of latitude = argp + f. How would the following equations in the code change? We no longer have ecc or argp or f(true anomaly) as inputs.

 

 % Calculate angular momentum
    h = sqrt(a * (1-ecc^2)*mu);    % (km^2/s)
    
    % Calculate position and velocity in the periforcal frame
    r_w = ((h^2 / mu) / (1 + ecc * cosd(f))) .* [cosd(f), sind(f), 0];
    v_w = (mu / h) .* [-sind(f), ecc + cosd(f), 0];
    
    % Define the Rotational Matrices
    R1 = [cosd(-argp) -sind(-argp) 0;
          sind(-argp) cosd(-argp)  0;
               0           0       1];
    R2 = [1      0          0;
          0 cosd(-inc) -sind(-inc);
          0 sind(-inc) cosd(-inc)];
    
    R3 = [cosd(-raan) -sind(-raan) 0;
          sind(-raan) cosd(-raan)  0;
               0           0       1];
    
    % Calculate position vector
    r_rot = r_w * R1 * R2 * R3;
    
    % Calculate velocity vector
    v_rot = v_w * R1 * R2 * R3;

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Computational Systems
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education