Skip to content
Snippets Groups Projects
Commit eb89477f authored by gPauls-TUHH's avatar gPauls-TUHH
Browse files

Merge branch 'CreateMissionXML_auto_climb_fix' into 'develop'

Little adaption to auto climb parameters

See merge request !41
parents d006f8fe be9fee53
No related branches found
No related tags found
5 merge requests!263Apply 1 suggestion(s) to 1 file(s),!261Reintruduced automatic flight condition selection,!245Apply 1 suggestion(s) to 1 file(s),!233Initial open source version,!41Little adaption to auto climb parameters
......@@ -72,7 +72,7 @@
<upper_boundary>50000</upper_boundary>
</crossover_altitude>
</adapt_climb_speed_schedule>
<climb_thrust_setting description="Selector to set the thrust rating within climb/acceleration segments. Selector: mode_0 (Takeoff) / mode_1 (Climb / mode_2 (Maximum continuous) / mode_3 (Cruise)">
<climb_thrust_setting description="Selector to set the thrust rating within climb/acceleration segments. Selector: mode_0 (Takeoff) / mode_1 (Climb) / mode_2 (Maximum continuous) / mode_3 (Cruise)">
<value>mode_1</value>
</climb_thrust_setting>
<maximum_rate_of_climb description="Limit the rate of climb (ROC) to a preset value during Climb segments; values less then 0: Use full thrust as limit">
......@@ -135,7 +135,7 @@
<lower_boundary>500</lower_boundary>
<upper_boundary>50000</upper_boundary>
</auto_climb_altitude_steps>
<auto_rate_of_climb_steps description="Rate of climb steps in cruise with automatic altitude adjustment">
<auto_rate_of_climb_steps description="Rate of climb limit in cruise with automatic altitude adjustment">
<value>300</value>
<unit>ft/min</unit>
<lower_boundary>0</lower_boundary>
......@@ -220,7 +220,7 @@
<lower_boundary>500</lower_boundary>
<upper_boundary>50000</upper_boundary>
</auto_climb_altitude_steps>
<auto_rate_of_climb_steps description="Rate of climb steps in cruise with automatic altitude adjustment">
<auto_rate_of_climb_steps description="Rate of climb limit in cruise with automatic altitude adjustment">
<value>300</value>
<unit>ft/min</unit>
<lower_boundary>0</lower_boundary>
......
......@@ -20,7 +20,7 @@ approach_step::approach_step(const std::string &a_mode, const std::string &a_rat
rating("rating", "Sets thrust rating within climb/acceleration segments to Takeoff, Climb, Maximum continuous, Cruise"),
derate("derate", "Derate during this step", 1., "1", 0., 1.5),
configuration("configuration", "Configuration of the aircraft during this step"),
rate_of_climb_limit("rate_of_climb_limit", "Rate of climb during this step (empty value = climb with full thrust)",
rate_of_climb_limit("rate_of_climb_limit", "Maximum rate of climb during this step (empty value = climb with full thrust)",
0., "m/s", 0., convertUnit(FOOTPERMINUTE, METERPERSECOND, 5000.)),
end_CAS("calibrated_airspeed", "Calibrated airspeed at the end of this step", 0., "m/s", 0., 250.),
end_altitude("altitude", "Altitude at the end of this step", 0., "m", 0., 20000.),
......
......@@ -14,7 +14,7 @@
/* Constructor for creation of an cruise step object and for the settings of the step parameters. */
cruise_step::cruise_step(const std::string &a_mode, const std::string &a_rating,
double a_derate, const std::string &a_config, double an_end_altitude,
bool auto_select_initial_cruise_altitude, bool round_to_regular_flight_level, double auto_climb_step_altitude_change,
bool auto_select_FL, bool round_to_regular_flight_level, double auto_climb_step_altitude_change,
bool a_flight_management_system, double a_rate_of_climb_limit, double an_end_CAS,
double an_end_Mach, double a_relative_segment_length)
:
......@@ -22,7 +22,7 @@ cruise_step::cruise_step(const std::string &a_mode, const std::string &a_rating,
mode("mode", "Mode during this step"),
rating("rating", "Sets thrust rating within climb/acceleration segments to Takeoff, Climb, Maximum continuous, Cruise"),
configuration("configuration", "Configuration of the aircraft during this step"),
rate_of_climb_limit("rate_of_climb_limit", "Rate of climb during this step (empty value = climb with full thrust)",
rate_of_climb_limit("rate_of_climb_limit", "Maximum rate of climb during this step (empty value = climb with full thrust)",
0., "m/s", 0., convertUnit(FOOTPERMINUTE, METERPERSECOND, 5000.)),
end_CAS("calibrated_airspeed", "Calibrated airspeed at the end of this step", 0., "m/s", 0., 250.),
end_Mach("mach_number", "Mach number at the end of this step", 0., "1", 0., 1.),
......@@ -45,7 +45,7 @@ cruise_step::cruise_step(const std::string &a_mode, const std::string &a_rating,
this->end_altitude.set_value(an_end_altitude);
this->flight_management_system.set_value(a_flight_management_system);
this->relative_segment_length.set_value(a_relative_segment_length);
if (auto_select_initial_cruise_altitude) {
if (auto_select_FL) {
this->auto_select_optimum_flight_level.set_value(true);
this->auto_climb_step_height.set_value(auto_climb_step_altitude_change);
}
......
......@@ -30,7 +30,7 @@ class cruise_step {
* \param a_derate: derate of the cruise step [-]
* \param a_config: reference to the configuration of the cruise step
* \param an_end_altitude: altitude at the end of the cruise step [m]
* \param auto_select_initial_cruise_altitude: switch for automatic select of the initial cruise altitude of the cruise step
* \param auto_select_FL: switch for automatic select of the cruise altitude of the cruise step
* \param round_to_regular_flight_level: switch for rounding to regular flight level of the cruise step
* \param a_rate_of_climb_limit: rate of climb of the cruise step [m/s]
* \param an_end_CAS: calibrated airspeed at the end of the cruise step [m/s]
......@@ -38,7 +38,7 @@ class cruise_step {
* \param a_relative_segment_length: relative segment length of the cruise step [-]
*/
cruise_step(const std::string &a_mode, const std::string &a_rating, double a_derate, const std::string &a_config, double an_end_altitude,
bool auto_select_initial_cruise_altitude, bool round_to_regular_flight_level,
bool auto_select_FL, bool round_to_regular_flight_level,
double auto_climb_step_altitude_change, bool a_flight_management_system,
double a_rate_of_climb_limit, double an_end_CAS, double an_end_Mach, double a_relative_segment_length);
/** \brief Destructor for class cruise_step
......
......@@ -20,7 +20,7 @@ departure_step::departure_step(const std::string &a_mode, const std::string &a_r
rating("rating", "Sets thrust rating within climb/acceleration segments to Takeoff, Climb, Maximum continuous, Cruise"),
derate("derate", "Derate during this step", 1., "1", 0., 1.5),
configuration("configuration", "Configuration of the aircraft during this step"),
rate_of_climb_limit("rate_of_climb_limit", "Rate of climb limit during this step (no limit set = full thrust climb)",
rate_of_climb_limit("rate_of_climb_limit", "Maximum rate of climb limit during this step (no limit set = full thrust climb)",
0., "m/s", 0., convertUnit(FOOTPERMINUTE, METERPERSECOND, 5000.)),
end_CAS("calibrated_airspeed", "Calibrated airspeed at the end of this step", 0., "m/s", 0., 250.),
end_altitude("altitude", "Altitude at the end of this step", 0., "m", 0., 20000.) {
......
......@@ -78,14 +78,20 @@ void standard_mission::set_module_settings(standard_mission::mission_parameters*
EndnodeReadOnly<bool>(subnode + "/auto_select_flight_level/enable").read(rtIO->moduleConfig).value();
mission->round_to_regular_flight_level =
EndnodeReadOnly<bool>(subnode + "/round_to_regular_flight_level").read(rtIO->moduleConfig).value();
/* Number of steps */
mission->no_steps =
EndnodeReadOnly<bool>(subnode + "/auto_select_flight_level/no_steps").read(rtIO->moduleConfig).value();
mission->auto_climb_altitude_steps =
EndnodeReadOnly<bool>(subnode + "/auto_climb_altitude_steps").read(rtIO->moduleConfig).value();
EndnodeReadOnly<double>(subnode + "/auto_climb_altitude_steps").read(rtIO->moduleConfig).value();
mission->auto_rate_of_climb_steps =
EndnodeReadOnly<double>(subnode + "/auto_rate_of_climb_steps").read(rtIO->moduleConfig).value();
// Correct contradiction on user input. noSteps has no effect when autoSelectFlightLevel is active
// Catch missing auto climb parameters if auto_select_flight_level is turned on
if (mission->auto_select_flight_level && (accuracyCheck(mission->auto_climb_altitude_steps, 0., ACCURACY_LOW) ||
accuracyCheck(mission->auto_rate_of_climb_steps, 0., ACCURACY_LOW))) {
myRuntimeInfo->warn << "auto_select_optimum_flight_level was switched on, but auto climb parameters were not set (auto_climb_altitude_steps, auto_rate_of_climb_steps)."
<< "auto_select_optimum_flight_level will be ignored!" << std::endl;
mission->auto_select_flight_level = false;
}
// Correct contradiction on user input. no_steps has no effect when auto_select_flight_level is active
if (mission->no_steps && mission->auto_select_flight_level)
mission->no_steps = false;
}
......
......@@ -95,7 +95,11 @@ void standard_mission::set_cruise_profile(standard_mission::mission_parameters*
if (i % 2 == 0) { // Mode: cruise
mode = "cruise";
rating = "cruise";
rate_of_climb_limit = NAN;
if (mission->auto_select_flight_level) {
rate_of_climb_limit = mission->auto_rate_of_climb_steps;
} else {
rate_of_climb_limit = NAN;
}
relative_segment_length = mission->cruise_step_segments[i / 2 - 2].relative_segment_length;
end_altitude = NAN;
} else { // Mode: change flight level...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment