2021-12-17 16:03:43 -06:00
|
|
|
/************************************************************************
|
|
|
|
PURPOSE: (Simulate a hor-air balloon.)
|
|
|
|
LIBRARY DEPENDENCIES:
|
|
|
|
((balloon/src/Balloon.o))
|
|
|
|
**************************************************************************/
|
|
|
|
#ifndef BALLOON_HH
|
|
|
|
#define BALLOON_HH
|
|
|
|
|
|
|
|
class Balloon {
|
|
|
|
public:
|
|
|
|
// State Variables (Uncalculated Variables)
|
|
|
|
double pos[2];
|
|
|
|
double vel[2];
|
|
|
|
double envelope_mass;
|
|
|
|
double basket_mass;
|
|
|
|
double burner_system_mass;
|
|
|
|
double payload_mass;
|
|
|
|
double envelope_air_temperature;
|
|
|
|
double envelope_radius;
|
|
|
|
double envelope_theta;
|
2022-01-12 13:41:04 -06:00
|
|
|
double wind_speed;
|
|
|
|
double Cd[2];
|
2021-12-17 16:03:43 -06:00
|
|
|
|
|
|
|
// Calculated Variables
|
|
|
|
double acc[2];
|
|
|
|
double envelope_volume;
|
|
|
|
double fixed_mass;
|
|
|
|
|
|
|
|
// Control Variable
|
|
|
|
int temperature_change_command;
|
2022-01-12 13:41:04 -06:00
|
|
|
int wind_change_command;
|
2021-12-17 16:03:43 -06:00
|
|
|
|
|
|
|
// Methods
|
|
|
|
int default_data();
|
|
|
|
int state_init();
|
|
|
|
int state_deriv();
|
|
|
|
int state_integ();
|
|
|
|
int check_ground_contact();
|
|
|
|
int control();
|
|
|
|
double calc_fixed_mass();
|
|
|
|
double calc_envelope_volume();
|
|
|
|
double calc_total_mass();
|
|
|
|
double calc_envelope_air_mass();
|
|
|
|
double calc_heated_air_density();
|
|
|
|
double calc_buoyancy_force();
|
|
|
|
double calc_displaced_air_mass();
|
2022-01-12 13:41:04 -06:00
|
|
|
void calc_drag_force(double * F);
|
2021-12-17 16:03:43 -06:00
|
|
|
double volume_of_a_spherical_dome( double r, double h);
|
|
|
|
double volume_of_a_cone( double r, double h);
|
|
|
|
};
|
|
|
|
#endif
|