Based on the original Rocket Workbench on SourceForge in CVS at: https://sourceforge.net/projects/rocketworkbench
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
1.5 KiB

  1. #include <iostream>
  2. #include <fstream.h>
  3. #include "c++rocket.h"
  4. #include "rocket.h"
  5. #include "simulation.h"
  6. //extern simulation *simptr;
  7. int main(int argc, char *argv[]) {
  8. simulation muty(AERO_MODEL);
  9. simulation simple(SIMPLE_MODEL);
  10. //simptr = &muty;
  11. muty.set_propulseurs(1,"/home/antoine/debian/rocketsim-0.3/thrust/AEJ125.edx");
  12. muty.set_propulseurs(2,"/home/antoine/debian/rocketsim-0.3/thrust/AEJ180T.eng");
  13. // muty.set_propulseurs(3,"/home/antoine/debian/rocketsim-0.3/thrust/AEK250W.eng");
  14. muty.set_prog(0,0,0);
  15. //cout << muty.tl[2] << endl;
  16. //simptr = &muty;
  17. double state[7] = {0, 0, 6370000, PI/3, PI/3, 100, 0};
  18. double state2[5] = {0, 0, 6370000, PI/3, 1000};
  19. //lsode ode;
  20. //int flag = ode.solve(state, 10, 0.1);
  21. muty.solve(state, 50, 0.01);
  22. simple.solve(state2, 1, 0.001);
  23. // cout << simptr->prop[0].impulse() << endl;
  24. // cout << simptr->prop[0].favg() << endl;
  25. // cout << simptr->prop[0].vg() << endl;
  26. // cout << simptr->prop[0].propellant_mass_fraction() << endl;
  27. // cout << simptr->prop[0].impulse_to_weight() << endl;
  28. // cout << simptr->prop[0].isp() << endl;
  29. //simptr->prop[0].plot_data();
  30. //for (int i = 0; i<MAXPROP; i++)
  31. // simptr->prop[i].print_data();
  32. //for (int i = 0; i < 40; i++)
  33. // cout << mass((double)i/2) << endl;
  34. //muty.print();
  35. //muty.export_octave("test");
  36. //simple.print();
  37. //ode.print();
  38. //simptr->print();
  39. //cout << flag << endl;
  40. return 0;
  41. }