Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
721 B
3
Indexable
Never
// Obtiene el tiempo actual en nanosegundos desde el epoch.
        auto now = std::chrono::high_resolution_clock::now();
        auto now_ns = std::chrono::duration_cast<std::chrono::nanoseconds>(now.time_since_epoch()).count();

        // Escribir la marca de tiempo y los datos en formato CSV.
        outFile << now_ns << ","
                << afUncompAccel_[0] << "," << afUncompAccel_[1] << "," << afUncompAccel_[2] << ","
                << afUncompGyro_[0] << "," << afUncompGyro_[1] << "," << afUncompGyro_[2] << ","
                << afUncompMag_[0] << "," << afUncompMag_[1] << "," << afUncompMag_[2] << ","
                << fTemp_ << "," << fPressure_ << "\n";

        outFile.close();
    }
Leave a Comment