SIM_Balloon.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. This program is free software: you can redistribute it and/or modify
  3. it under the terms of the GNU General Public License as published by
  4. the Free Software Foundation, either version 3 of the License, or
  5. (at your option) any later version.
  6. This program is distributed in the hope that it will be useful,
  7. but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. GNU General Public License for more details.
  10. You should have received a copy of the GNU General Public License
  11. along with this program. If not, see <http://www.gnu.org/licenses/>.
  12. */
  13. /*
  14. balloon simulator class
  15. */
  16. #pragma once
  17. #include "SIM_Aircraft.h"
  18. namespace SITL {
  19. /*
  20. a balloon simulator
  21. */
  22. class Balloon : public Aircraft {
  23. public:
  24. Balloon(const char *frame_str);
  25. /* update model by one time step */
  26. void update(const struct sitl_input &input) override;
  27. /* static object creator */
  28. static Aircraft *create(const char *frame_str) {
  29. return new Balloon(frame_str);
  30. }
  31. private:
  32. float terminal_rotation_rate = radians(100);
  33. float climb_rate = 20;
  34. float terminal_velocity = 40;
  35. float burst_altitude = 20000;
  36. bool burst = false;
  37. bool released = false;
  38. };
  39. } // namespace SITL