Tudat/Astrodynamics/TrajectoryDesign/exportTrajectory.cpp
//! Write a trajectory to a data file.
Write a trajectory to a data file.
Write a trajectory to a data file .
void writeManeuversToFile( std::vector < Eigen::Vector3d > positionVector,
                           std::vector < double > timeVector,
                           std::vector < double > deltaVVector,
                           const char * fileName )
{
    std::ofstream exportFile( fileName );
    for ( unsigned int counter = 0; counter < timeVector.size( ); counter++ )
    {
        exportFile << timeVector[ counter ] << ", " << positionVector[ counter ]( 0 ) << ", "
                   << positionVector[ counter ]( 1 ) << ", " << positionVector[ counter ]( 2 )
                   << ", " << deltaVVector[ counter ] << std::endl;
    }
    exportFile.close( );
}
void writeManeuversToFile ( std :: vector < Eigen :: Vector3d > positionVector , std :: vector < double > timeVector , std :: vector < double > deltaVVector , const char * fileName ) { std :: ofstream exportFile ( fileName ) ; for ( unsigned int counter = 0 ; counter < timeVector . size ( ) ; counter ++ ) { exportFile << timeVector [ counter ] << " " << positionVector [ counter ] ( 0 ) << " " << positionVector [ counter ] ( 1 ) << " " << positionVector [ counter ] ( 2 ) << " " << deltaVVector [ counter ] << std :: endl ; } exportFile . close ( ) ; }
Write a trajectory to a data file.
Write a trajectory to a data file .