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

15 lines
413 B
C++

function rho = density(y)
P0 = 1.013e5; # standard stmospheric pressure
Ma = 0.0289644; # atmosphere molar mass
Rg = 8.3145; # perfect gas constant
T = 273.15; # standard temperature
G = 6.67259e-11; # gravitational constant
Mt = 5.98e24; # earth mass
Rt = 6370000; # earth radius
rho = (P0*Ma/(Rg*T))*exp( ((Ma*G*Mt)/(Rg*T))*((1/(Rt+y))-(1/Rt)) );
endfunction