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