R. J. Dev. Kwan eb05416991 Initial commit of "Rocket Workbench".
Taken from sources in CVS at:
    https://sourceforge.net/projects/rocketworkbench/

Sources extracted in two steps:
1. Pull entire project tree into a subdir "rwb" via "rsync":
    rsync -a a.cvs.sourceforge.net::cvsroot/rocketworkbench/ rwb/.
2. Export sources:
    export CVSROOT=$(pwd)/rwb
    SUBDIRS="analyser cpropep cpropep-web CVSROOT data libcompat libcpropep libnum libsimulation libthermo prop rocketworkbench rockflight"
    mkdir rwbx; cd rwbx
    cvs export -D now ${SUBDIRS}

After this (and some backups for safety), the directory content was
added to a Git repo:
    git init .
    git add *
2021-01-20 15:50:36 -08:00

32 lines
860 B
Matlab

altitude = 0; # altitude in meter
latitude = 15; # latitude in decimal degree
longitude = 0; # longitude in decimal degree
velocity = 1000; # magnitude of the initial velocity in meter/s
angle = 0; # angle with the horizontal in degree
direction = 90; # direction (0=east 90=north 180=west 270=south)
R = 6.37e6; # earth radius in meter
r = R + altitude;
r_dot = velocity*sin(angle*pi/180);
u_dot = velocity*cos(angle*pi/180)*cos(direction*pi/180)/(r*cos(latitude*pi/180));
l_dot = velocity*cos(angle*pi/180)*sin(direction*pi/180)/r;
init = [ r; latitude*pi/180; longitude*pi/180; r_dot; l_dot; u_dot; ];
t = 0:0.1:200;
y = lsode('flight_vacuum', init, t);
hold off
plot(y(:,1).*cos(y(:,2)), y(:,1).*sin(y(:,2)));
hold on;
plot(R*cos(y(:,2)), R*sin(y(:,2)));
#plot(y(:,3)*180/pi, y(:,2)*180/pi);