<commit_before>// =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2019 projectchrono.org
// All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of the distribution and at
// http://projectchrono.org/license-chrono.txt.
//
// =============================================================================
// Authors: <NAME>, <NAME>
// =============================================================================
//
// FED alpha acceleration test.
//
// The vehicle reference frame has Z up, X towards the front of the vehicle, and
// Y pointing to the left.
//
// =============================================================================

#include <cmath>

#include "chrono/ChConfig.h"
#include "chrono/utils/ChFilters.h"
#include "chrono/utils/ChUtilsInputOutput.h"
#include "chrono/core/ChTimer.h"

#include "chrono_vehicle/ChConfigVehicle.h"
#include "chrono_vehicle/ChVehicleModelData.h"
#include "chrono_vehicle/driver/ChPathFollowerDriver.h"
#include "chrono_vehicle/terrain/RigidTerrain.h"
#include "chrono_vehicle/utils/ChVehiclePath.h"
#include "chrono_vehicle/wheeled_vehicle/utils/ChWheeledVehicleIrrApp.h"

#include "chrono_models/vehicle/feda/FEDA.h"

#include "chrono_thirdparty/filesystem/path.h"

#ifdef CHRONO_POSTPROCESS
#include "chrono_postprocess/ChGnuPlot.h"
#endif

using namespace chrono;
using namespace chrono::irrlicht;
using namespace chrono::vehicle;
using namespace chrono::vehicle::feda;

// =============================================================================

// Visualization type for vehicle parts (PRIMITIVES, MESH, or NONE)
VisualizationType chassis_vis_type = VisualizationType::MESH;
VisualizationType suspension_vis_type = VisualizationType::PRIMITIVES;
VisualizationType steering_vis_type = VisualizationType::PRIMITIVES;
VisualizationType wheel_vis_type = VisualizationType::MESH;

// Type of powertrain model (SHAFTS, SIMPLE, SIMPLE_CVT)
PowertrainModelType powertrain_model = PowertrainModelType::SHAFTS;

// Drive type (FWD, RWD, or AWD)
DrivelineTypeWV drive_type = DrivelineTypeWV::AWD;

// Type of tire model (PAC02)
TireModelType tire_model = TireModelType::PAC02;

// Terrain length (X direction)
double terrainLength = 800.0;

// Simulation step sizes
double step_size = 5e-4;
double tire_step_size = 5e-4;

// output directory
const std::string out_dir = GetChronoOutputPath() + "FEDA_ACCELERATION";
bool data_output = false;

// =============================================================================

int main(int argc, char* argv[]) {
    GetLog() << "Copyright (c) 2017 projectchrono.org\nChrono version: " << CHRONO_VERSION << "\n\n";

    // --------------
    // Create systems
    // --------------

    // Create the FED alpha vehicle, set parameters, and initialize.
    // Typical aerodynamic drag for FED alpha: Cd = 0.6 and area 3.8 m2
    FEDA my_feda;
    my_feda.SetContactMethod(ChContactMethod::SMC);
    my_feda.SetChassisFixed(false);
    my_feda.SetInitPosition(ChCoordsys<>(ChVector<>(-terrainLength / 2 + 5, 0, 0.5), ChQuaternion<>(1, 0, 0, 0)));
    // my_hmmwv.SetPowertrainType(powertrain_model);
    // my_hmmwv.SetDriveType(drive_type);
    my_feda.SetTireType(tire_model);
    my_feda.SetTireStepSize(tire_step_size);
    my_feda.SetAerodynamicDrag(0.6, 3.8, 1.2041);
    my_feda.Initialize();

    // Set subsystem visualization mode
    VisualizationType tire_vis_type =
        (tire_model == TireModelType::RIGID_MESH) ? VisualizationType::MESH : VisualizationType::MESH;
    my_feda.SetChassisVisualizationType(chassis_vis_type);<commit_msg>Clean up the FEDA vehicle demo<commit_after>// =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2019 projectchrono.org
// All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of the distribution and at
// http://projectchrono.org/license-chrono.txt.
//
// =============================================================================
// Authors: <NAME>, <NAME>
// =============================================================================
//
// FED alpha acceleration test.
//
// The vehicle reference frame has Z up, X towards the front of the vehicle, and
// Y pointing to the left.
//
// =============================================================================

#include <cmath>

#include "chrono/ChConfig.h"
#include "chrono/utils/ChFilters.h"
#include "chrono/utils/ChUtilsInputOutput.h"
#include "chrono/core/ChTimer.h"

#include "chrono_vehicle/ChConfigVehicle.h"
#include "chrono_vehicle/ChVehicleModelData.h"
#include "chrono_vehicle/driver/ChPathFollowerDriver.h"
#include "chrono_vehicle/terrain/RigidTerrain.h"
#include "chrono_vehicle/utils/ChVehiclePath.h"
#include "chrono_vehicle/wheeled_vehicle/utils/ChWheeledVehicleIrrApp.h"

#include "chrono_models/vehicle/feda/FEDA.h"

#include "chrono_thirdparty/filesystem/path.h"

#ifdef CHRONO_POSTPROCESS
#include "chrono_postprocess/ChGnuPlot.h"
#endif

using namespace chrono;
using namespace chrono::irrlicht;
using namespace chrono::vehicle;
using namespace chrono::vehicle::feda;

// =============================================================================

// Visualization type for vehicle parts (PRIMITIVES, MESH, or NONE)
VisualizationType chassis_vis_type = VisualizationType::MESH;
VisualizationType suspension_vis_type = VisualizationType::PRIMITIVES;
VisualizationType steering_vis_type = VisualizationType::PRIMITIVES;
VisualizationType wheel_vis_type = VisualizationType::MESH;

// Type of powertrain model (SHAFTS, SIMPLE_MAP)
PowertrainModelType powertrain_model = PowertrainModelType::SIMPLE_MAP;

// Type of tire model (PAC02, RIGID)
TireModelType tire_model = TireModelType::PAC02;

// Type of brake model (SIMPLE, SHAFTS)
BrakeType brake_type = BrakeType::SIMPLE;

// Terrain length (X direction)
double terrainLength = 800.0;

// Simulation step sizes
double step_size = 5e-4;
double tire_step_size = 5e-4;

// output directory
const std::string out_dir = GetChronoOutputPath() + "FEDA_ACCELERATION";
bool data_output = false;

// =============================================================================

int main(int argc, char* argv[]) {
    GetLog() << "Copyright (c) 2017 projectchrono.org\nChrono version: " << CHRONO_VERSION << "\n\n";

    // --------------
    // Create systems
    // --------------

    // Create the FED alpha vehicle, set parameters, and initialize.
    // Typical aerodynamic drag for FED alpha: Cd = 0.6 and area 3.8 m2
    FEDA my_feda;
    my_feda.SetContactMethod(ChContactMethod::SMC);
    my_feda.SetChassisFixed(false);
    my_feda.SetInitPosition(ChCoordsys<>(ChVector<>(-terrainLength / 2 + 5, 0, 0.5), ChQuaternion<>(1, 0, 0, 0)));
    my_feda.SetPowertrainType(powertrain_model);
    my_feda.SetTireType(tire_model);
    my_feda.SetBrakeType(brake_type);
    my_feda.SetTireStepSize(tire_step_size);
    my_feda.SetAerodynamicDrag(0.6, 3.8, 1.2041);
    my_feda.Initialize();

    // Set subsystem visualization mode
    VisualizationType tire_vis_type =
        (tire_model == TireModelType::RIGID_MESH) ? VisualizationType::MESH : VisualizationType::MESH;
    my_feda.SetChassisVisualizationType(chassis_vis_type);
{'fraction_non_alphanumeric': 0.23213807867273215, 'fraction_numerical': 0.011506556061011506, 'mean_word_length': 5.167491749174918, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3518371', 'n_tokens_mistral': 2445, 'n_tokens_neox': 2286, 'n_words': 508}