![]() |
Da Vinci Firmware 1
Firmware for the DaVinci-M rocket avionics board.
|

Go to the source code of this file.
Functions | |
| static double | rt_powd_snf (double u0, double u1) |
| double | optimalAngle (double sim_time_step, double altitude, double temperature, double velocity, double pressure, double current_delta, double tilt_angle, double target_apogee, double tolerance, const double mach_states[5], const double deployment_states[6], const double cd_table[30]) |
| Calculates the optimal constant airbrake angle to reach a target apogee. | |
| double optimalAngle | ( | double | sim_time_step, |
| double | altitude, | ||
| double | temperature, | ||
| double | velocity, | ||
| double | pressure, | ||
| double | current_delta, | ||
| double | tilt_angle, | ||
| double | target_apogee, | ||
| double | tolerance, | ||
| const double | mach_states[5], | ||
| const double | deployment_states[6], | ||
| const double | cd_table[30] | ||
| ) |
Calculates the optimal constant airbrake angle to reach a target apogee.
| [in] | sim_time_step | The duration of a single time step used inside the internal trajectory simulation, in seconds (s). |
| [in] | altitude | The rocket's current altitude above ground level in meters (m). |
| [in] | temperature | Current ambient air temperature in Kelvin (K). |
| [in] | velocity | The rocket's current total speed (magnitude of velocity vector) in m/s. |
| [in] | pressure | Current ambient air pressure in Pascals (Pa). |
| [in] | current_delta | The current, real-world deployment angle of the airbrakes in degrees. (Note: May not be used in this version). |
| [in] | tilt_angle | The angle of the rocket's velocity vector with respect to the vertical axis in radians. |
| [in] | target_apogee | The desired final apogee for the rocket in meters (m). |
| [in] | tolerance | The desired precision for the binary search, in degrees. The search stops when dep_max - dep_min <= tolerance. |
| [in] | mach_states | An array of 5 discrete Mach numbers that form the x-axis of the Cd lookup table. |
| [in] | deployment_states | An array of 6 discrete airbrake deployment angles that form the y-axis of the Cd lookup table. |
| [in] | cd_table | A 1D array of 30 Coefficient of Drag (Cd) values, representing the 6x5 lookup grid (row-major). |
Definition at line 86 of file optimalAngle.c.
References altitude, cd_table, cdEvaluation(), current_delta, deployment_states, mach_states, rt_powd_snf(), rtIsNaN(), rtNaN, sim_time_step, target_apogee, tilt_angle, tolerance, and velocity.
Referenced by StartMPC_Task().


|
static |
Definition at line 27 of file optimalAngle.c.
References rtInf, rtIsInf(), rtIsNaN(), and rtNaN.
Referenced by optimalAngle().

