Tudat/JsonInterface/Propagation/torque.cpp
//! Create a shared pointer to a `TorqueSettings` object from a `json` object.
Create a shared pointer to a `TorqueSettings` object from a `json` object.
Create a shared pointer to a ` TorqueSettings ` object from a ` json ` object .
void from_json( const nlohmann::json& jsonObject, std::shared_ptr< TorqueSettings >& torqueSettings )
{
    using namespace json_interface;
    using namespace basic_astrodynamics;
    using K = Keys::Propagator::Torque;
    const AvailableTorque torqueType = getValue< AvailableTorque >( jsonObject, K::type );
    switch ( torqueType ) {
    case underfined_torque:
    case second_order_gravitational_torque:
    case aerodynamic_torque:
    {
        torqueSettings = std::make_shared< TorqueSettings >( torqueType );
        return;
    }
    default:
        handleUnimplementedEnumValue( torqueType, torqueTypes, unsupportedTorqueTypes );
    }
}
void from_json ( const nlohmann :: json & jsonObject , std :: shared_ptr < TorqueSettings > & torqueSettings ) { using namespace json_interface ; using namespace basic_astrodynamics ; using K = Keys :: Propagator :: Torque ; const AvailableTorque torqueType = getValue < AvailableTorque > ( jsonObject , K :: type ) ; switch ( torqueType ) { case underfined_torque : case second_order_gravitational_torque : case aerodynamic_torque : { torqueSettings = std :: make_shared < TorqueSettings > ( torqueType ) ; return ; } default : handleUnimplementedEnumValue ( torqueType , torqueTypes , unsupportedTorqueTypes ) ; } }
Create a shared pointer to a `TorqueSettings` object from a `json` object.
Create a shared pointer to a ` TorqueSettings ` object from a ` json ` object .
// Get acceleration type