Really do not even know where to start

Write a Matlab function that computes the Cartesian position and velocity of a satellite on an orbit in the perifocal frame, given the gravitational parameter µ, the semi-major axis a, the true anomaly, the eccentricity e, and the true anomaly θ.
I haven't taken a MATLAB course and our professor just threw this at us, seriously anything helps. Even just to help me start it out.

4 Comments

Do these tutorials (they won't take long, and teach basics that you need to know):
You might also like to try the "MATLAB OnRamp" here:
function [x,y,z] = RVPerifocal( a, e, th )
% Compute the position and velocity in the perifical frame, given:
% a Semi major axis (km)
% e Eccentricity
% theta True anaomaly (rad)
% mu Gravitational parameter
mu = 398600.44;
Re = 6378.14;
% perifocal coordinates
r = a*(1-e^2)./(1+e*cos(th));
x = r.*cos(th);
y = r.*sin(th);
This is as far as I can get. IDK where to go from here
It's unclear if you need help with the maths (in which case, sorry wrong forum) or with the code, in which case what's the maths your're trying to implement?
What is the relation between the velocity or cartesian position with the mentioned parameters.

Sign in to comment.

Answers (0)

Categories

Find more on Satellite and Orbital Mechanics in Help Center and File Exchange

Tags

Asked:

on 6 Feb 2020

Commented:

on 11 Feb 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!