ksp: minor fixes and variable collisions

This commit is contained in:
Vince Weaver 2016-05-26 16:41:04 -04:00
parent a10d80b1ad
commit 50e4256961
2 changed files with 5 additions and 2 deletions

View File

@ -109,12 +109,15 @@ int main(int argc, char **argv) {
engines[1]=2; stacks[1]=2; tanks[1]=1;
engines[2]=3; stacks[2]=3; tanks[2]=1;
/* 1000 */
for(i=0;i<stages;i++) {
stage_empty_mass[i]=(engines[i]*1.5)+(stacks[i]*tanks[i]*0.5)+capsule_mass;/* tons */
stage_empty_mass[i]=(engines[i]*1.5)+(stacks[i]*tanks[i]*0.5);
if (i==0) stage_empty_mass[i]+=capsule_mass;/* tons */
fuel_mass[i]=(stacks[i]*tanks[i]*4.0);
stage_fuel_total[i]=fuel_mass[i];
stage_full_mass[i]=stage_empty_mass[i]+fuel_mass[i];
/* 1020 */
total_mass[i]=0.0;
for(j=i;j>=0;j--) {
total_mass[i]+=stage_full_mass[j];

View File

@ -44,4 +44,4 @@
1330 PRINT "HOW MANY PARACHUTES? (0-3)";
1340 INPUT P
1350 PRINT "HOW MANY STRUTS? (0-20000)";
1360 INPUT ST
1360 INPUT SR