Setting the implementation of an abstract class based on settings in config file using smart pointers
When you have a derived type deleted via a pointer to the base class you need to define a virtual destructor. This also applies when you are using unique_ptr.

// Base class for all position systems
class PositionSystem {
public:
    virtual ~PositionSystem() {}    // You need this or your object will 
                                    // not be correctly destroyed.
    virtual int getX() const = 0;
};


You don't need to create an objet and copy it.

    ps = std::make_unique&lt;GPS&gt;(GPS());
                           //  ^^^^^    This creates a automatic object
                           //           When make_unique calls new
                           //           this automatic object is copy constructed
                           //           into the dynamic object.


Simply do this:

    ps = std::make_unique&lt;GPS&gt;();


You have the correct answer. Its an if/switch/command patter that you use to create the correct object. But you don't need to use a unique pointer. You could use a reference rather than a unique_ptr (but a unique_ptr is simpler).

But rather than do it in main I would move this work into a factory specifically for this job.

std::unique_ptr&lt;PositionSystem&gt; ps = positionSystemFactory(settings);


Then you just need to write the factory method:

std::unique_ptr&lt;PositionSystem&gt; positionSystemFactory(Settings const&amp; settings)
{
    // Choose implementation based on settings
    if(settings.position_system == "GPS"){
        return std::make_unique&lt;GPS&gt;();
    }
    else if (settings.position_system == "Galileo"){
        return std::make_unique&lt;Galileo&gt;();
    }
    throw Failure;
}



  am having doubts about using std::make_unique inside the if scope. 


Yes it will work as expected.

else if (settings.position_system == "Galileo"){
        ps = std::make_unique&lt;Galileo&gt;(Galileo());
    }


Even though the temp object created by make_unique() will be destroyed when it goes out of scope; this object is assigned to the variable ps where its content is maintained.

How this works: The temp object invokes the templatized move constructor on ps thus resulting in the contained pointer being moved from the temp object into ps (which takes ownership away from the temp object). When the temp object is destroyed it no longer owns the pointer and thus does not delete it.