Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
build
*.cbp
*cppcheck*
Expand Down Expand Up @@ -27,4 +28,4 @@ CPackSourceConfig.cmake
**/*_overview.json
**/local_env/
*venv
data/
data/
8 changes: 5 additions & 3 deletions AircraftDynamicsTestFramework/fmacm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
// (c) 2026 The MITRE Corporation. All Rights Reserved.
// ****************************************************************************

#include <loader/Loadable.h>
#include <loader/RunFileArchiveDirector.h>
#include <log4cplus/initializer.h>
#include <log4cplus/logger.h>
#include <log4cplus/loggingmacros.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
Expand All @@ -31,9 +35,7 @@

#include "cppmanifest/cppmanifest.h"
#include "framework/TestFrameworkScenario.h"
#include "loader/Loadable.h"
#include "loader/Logging.h"
#include "loader/RunFileArchiveDirector.h"
#include "public/Log4cplusSetup.h"
#include "public/ScenarioUtils.h"

#define _MAX_PATH 260
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

#include "framework/FrameworkAircraftLoader.h"

#include <loader/NullLoader.h>
#include <scalar/Length.h>

#include <algorithm>
#include <memory>
#include <string>
Expand All @@ -28,7 +31,6 @@
#include "framework/ForeWindReader.h"
#include "framework/NullAircraftPerformance.h"
#include "framework/PreloadedAdsbReceiver.h"
#include "loader/NullLoader.h"
#include "public/AircraftControllerFactory.h"
#include "public/EllipsoidalPositionEstimator.h"
#include "public/FullWindTrueWeatherOperator.h"
Expand All @@ -41,7 +43,6 @@
#include "public/SpeedOnThrustControl.h"
#include "public/USStandardAtmosphere1976.h"
#include "public/WeatherPrediction.h"
#include "scalar/Length.h"

#ifdef SAMPLE_ALGORITHM_LIBRARY
#include "imalgs/FIMAlgorithmInitializer.h"
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
project(aaesim VERSION 5.3.1.1) # the nano value is a boolean. 1 == SNAPSHOT, 0 == release # the nano value is a boolean. 1 == SNAPSHOT, 0 == release
project(aaesim VERSION 5.3.1.0) # the nano value is a boolean. 1 == SNAPSHOT, 0 == release # the nano value is a boolean. 1 == SNAPSHOT, 0 == release

set (CMAKE_CXX_STANDARD 20)

Expand Down Expand Up @@ -57,7 +57,7 @@ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall -Wno-unused-functi
CPMAddPackage(
NAME fsloader
GIT_REPOSITORY https://github.com/mitre/fsloader.git
GIT_TAG 1.0.0
GIT_TAG 1.1.0
OPTIONS
"FSLOADER_BUILD_EXAMPLE OFF"
"BUILD_SHARED_LIBS FALSE"
Expand Down
35 changes: 0 additions & 35 deletions Public/AircraftIntent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,41 +266,6 @@ void AircraftIntent::Copy(const AircraftIntent &in) {
m_ascent_waypoints = in.m_ascent_waypoints;
}

bool AircraftIntent::load(DecodedStream *input) {
set_stream(input);

std::list<Waypoint> waypoints, descent_waypoints;
std::list<Waypoint> ascent_waypoints, cruise_waypoints;
double cruise_mach_loaded;
Units::FeetLength cruise_alt_loaded(0);

// register all the variables used by the Aircraft Intent
register_var("planned_cruise_mach", &cruise_mach_loaded, true);
register_var("planned_cruise_altitude", &cruise_alt_loaded, true);
register_named_list("descent_waypoints", &descent_waypoints, false);
register_named_list("cruise_waypoints", &cruise_waypoints, false);
register_named_list("ascent_waypoints", &ascent_waypoints, false);

// do the actual reading:
m_is_loaded = complete();

m_planned_cruise_altitude = cruise_alt_loaded;
planned_cruise_mach_ = cruise_mach_loaded;

if (!waypoints.empty() && descent_waypoints.empty()) {
descent_waypoints = waypoints;
}
if (waypoints.empty() && descent_waypoints.empty() && ascent_waypoints.empty() && cruise_waypoints.empty()) {
LOG4CPLUS_ERROR(m_logger,
"No waypoints were found in the scenario file. Check the aircraft_intent{} input block.");
throw std::runtime_error("Must provide waypoints.");
} else {
LoadWaypointsFromList(ascent_waypoints, cruise_waypoints, descent_waypoints);
}

return m_is_loaded;
}

void AircraftIntent::DumpParms(const std::string &str) const {
LOG4CPLUS_TRACE(AircraftIntent::m_logger, str);
DoRouteDataLogging();
Expand Down
77 changes: 77 additions & 0 deletions Public/AircraftIntentLoader.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
// ****************************************************************************
// NOTICE
//
// This work was produced for the U.S. Government under Contract 693KA8-22-C-00001
// and is subject to Federal Aviation Administration Acquisition Management System
// Clause 3.5-13, Rights In Data-General, Alt. III and Alt. IV (Oct. 1996).
//
// The contents of this document reflect the views of the author and The MITRE
// Corporation and do not necessarily reflect the views of the Federal Aviation
// Administration (FAA) or the Department of Transportation (DOT). Neither the FAA
// nor the DOT makes any warranty or guarantee, expressed or implied, concerning
// the content or accuracy of these views.
//
// For further information, please contact The MITRE Corporation, Contracts Management
// Office, 7515 Colshire Drive, McLean, VA 22102-7539, (703) 983-6000.
//
// (c) 2026 The MITRE Corporation. All Rights Reserved.
// ****************************************************************************

#include "public/AircraftIntentLoader.h"

#include <list>
#include <stdexcept>

#include "WaypointLoader.h"

namespace {
std::list<Waypoint> BuildWaypointList(const std::list<aaesim::loaders::WaypointLoader> &waypoint_loaders) {
std::list<Waypoint> waypoints;
for (const auto &waypoint_loader : waypoint_loaders) {
waypoints.push_back(waypoint_loader.BuildWaypoint());
}
return waypoints;
}
} // namespace

namespace aaesim {
namespace loaders {

bool AircraftIntentLoader::load(DecodedStream *input) {
set_stream(input);

std::list<WaypointLoader> descent_waypoint_loaders;
std::list<WaypointLoader> ascent_waypoint_loaders, cruise_waypoint_loaders;
double cruise_mach_loaded;
Units::FeetLength cruise_alt_loaded(0);

// register all the variables used by the Aircraft Intent
register_var("planned_cruise_mach", &cruise_mach_loaded, true);
register_var("planned_cruise_altitude", &cruise_alt_loaded, true);
register_named_list("descent_waypoints", &descent_waypoint_loaders, false);
register_named_list("cruise_waypoints", &cruise_waypoint_loaders, false);
register_named_list("ascent_waypoints", &ascent_waypoint_loaders, false);

// do the actual reading:
aircraft_intent_.m_is_loaded = complete();

aircraft_intent_.m_planned_cruise_altitude = cruise_alt_loaded;
aircraft_intent_.planned_cruise_mach_ = cruise_mach_loaded;

const auto descent_waypoints = BuildWaypointList(descent_waypoint_loaders);
const auto ascent_waypoints = BuildWaypointList(ascent_waypoint_loaders);
const auto cruise_waypoints = BuildWaypointList(cruise_waypoint_loaders);

if (descent_waypoints.empty() && ascent_waypoints.empty() && cruise_waypoints.empty()) {
LOG4CPLUS_ERROR(logger_,
"No waypoints were found in the scenario file. Check the aircraft_intent{} input block.");
throw std::runtime_error("Must provide waypoints.");
} else {
aircraft_intent_.LoadWaypointsFromList(ascent_waypoints, cruise_waypoints, descent_waypoints);
}

return aircraft_intent_.m_is_loaded;
}

} // namespace loaders
} // namespace aaesim
2 changes: 2 additions & 0 deletions Public/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ set(LIBRARY_SOURCE_FILES
AircraftCalculations.cpp
AircraftControl.cpp
AircraftIntent.cpp
AircraftIntentLoader.cpp
AircraftSpeed.cpp
AircraftState.cpp
Atmosphere.cpp
Expand Down Expand Up @@ -71,6 +72,7 @@ set(LIBRARY_SOURCE_FILES
VerticalPath.cpp
VerticalPredictor.cpp
Waypoint.cpp
WaypointLoader.cpp
WeatherEstimate.cpp
WeatherPrediction.cpp
WeatherTruth.cpp
Expand Down
1 change: 1 addition & 0 deletions Public/ConfigurationFileReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include "public/ConfigurationFileReader.h"

#include <log4cplus/loggingmacros.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
Expand Down
2 changes: 2 additions & 0 deletions Public/DataReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

#include "public/DataReader.h"

#include <log4cplus/loggingmacros.h>

#include <iostream>
#include <memory>
#include <string>
Expand Down
5 changes: 3 additions & 2 deletions Public/InvalidIndexException.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@

#include "public/InvalidIndexException.h"

#include <iostream>
#include <log4cplus/logger.h>
#include <log4cplus/loggingmacros.h>

#include "loader/Logging.h"
#include <iostream>

InvalidIndexException::InvalidIndexException(const int value, const int low_limit, const int high_limit) : exception() {
log4cplus::Logger logger = log4cplus::Logger::getInstance(LOG4CPLUS_TEXT("InvalidIndexException"));
Expand Down
2 changes: 2 additions & 0 deletions Public/LocalTangentPlane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

#include "public/LocalTangentPlane.h"

#include <log4cplus/loggingmacros.h>

#include <memory>
#include <string>

Expand Down
45 changes: 0 additions & 45 deletions Public/PrecalcWaypoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

#include "public/PrecalcWaypoint.h"

PrecalcWaypoint::~PrecalcWaypoint() = default;

bool PrecalcWaypoint::operator==(const PrecalcWaypoint &obj) const {
bool match = (m_leg_length == obj.m_leg_length);
match = match && (m_course_angle == obj.m_course_angle);
Expand All @@ -33,46 +31,3 @@ bool PrecalcWaypoint::operator==(const PrecalcWaypoint &obj) const {

return match;
}

bool PrecalcWaypoint::load(DecodedStream *input) {
set_stream(input);

Units::NauticalMilesLength leg_length;
bool f = load_datum(leg_length);
if (!f) {
LoggingLoadable::report_error("could not load leg length");
}
m_leg_length = leg_length;

Units::DegreesAngle course_angle1;
f = load_datum(course_angle1);
if (!f) {
LoggingLoadable::report_error("could not load m_path_course angle");
}
m_course_angle = course_angle1;

Units::NauticalMilesLength path_distance;
f = load_datum(path_distance);
if (!f) {
LoggingLoadable::report_error("could not load distance constraint");
}
m_precalc_constraints.constraint_along_path_distance = path_distance;

Units::FeetLength in_altitude_high;
f = load_datum(in_altitude_high);
if (!f) {
LoggingLoadable::report_error("could not load max altitude constraint");
}
m_precalc_constraints.constraint_altHi = in_altitude_high;

Units::FeetLength in_altitude_low;
f = load_datum(in_altitude_low);
if (!f) {
LoggingLoadable::report_error("could not load min altitude constraint");
}
m_precalc_constraints.constraint_altLow = in_altitude_low;

m_loaded = true;

return m_loaded;
}
1 change: 1 addition & 0 deletions Public/RandomGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "public/RandomGenerator.h"

#include <assert.h>
#include <log4cplus/loggingmacros.h>
#include <math.h>
#include <time.h>

Expand Down
2 changes: 2 additions & 0 deletions Public/StatisticalPilotDelay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

#include "public/StatisticalPilotDelay.h"

#include <log4cplus/loggingmacros.h>

#include <iomanip>

#include "public/CustomMath.h"
Expand Down
4 changes: 3 additions & 1 deletion Public/ThreeDOFDynamics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@

#include "public/ThreeDOFDynamics.h"

#include <log4cplus/logger.h>
#include <log4cplus/loggingmacros.h>

#include <iomanip>
#include <memory>
#include <utility>

#include "loader/Logging.h"
#include "nlohmann/json.hpp"
#include "public/CoreUtils.h"

Expand Down
5 changes: 3 additions & 2 deletions Public/USStandardAtmosphere1976.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@

#include "public/USStandardAtmosphere1976.h"

#include <string>
#include <log4cplus/logger.h>
#include <log4cplus/loggingmacros.h>

#include "loader/Logging.h"
#include <string>

const Units::KelvinTemperature TEMPERATURE_TOLERANCE(0.1);

Expand Down
8 changes: 4 additions & 4 deletions Public/VerticalPredictor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ VerticalPredictor::VerticalPredictor()
LOW_GROUNDSPEED_FATAL(0.1),
DESCENT_ANGLE_MAX(6.0),
DESCENT_ANGLE_WARNING(4.0),
m_transition_altitude_msl(Units::FeetLength(0.0)),
m_current_trajectory_index(0),
m_cruise_altitude_msl(Units::FeetLength(37000)),
m_descent_start_time(Units::SecondsTime(0.0)),
m_transition_ias(Units::KnotsSpeed(310)),
m_transition_mach(0.8),
m_transition_altitude_msl(Units::FeetLength(0.0)),
m_cruise_mach(0.8),
m_current_trajectory_index(0),
m_descent_start_time(Units::SecondsTime(0.0)) {}
m_transition_mach(0.8) {}

void VerticalPredictor::SetMembers(const VerticalPredictor &vertical_predictor) {
m_descent_start_time = vertical_predictor.m_descent_start_time;
Expand Down
Loading
Loading