atoF returns an error in its second parameter.
After calling the function, that parameter should be checked and if it fails the whole update can be rollbacked (or simply not done):

    double d;
    std::string status;

    d = atof(number1, status);
    if (status == "")
    {
        latitude = d;
        d = atoF(number2)   etc ..