src/AircraftTrajectories/Models/Trajectory/TrajectoryFileReader.cs
/// <summary>
/// Read the data from the given file and store it as an array of double arrays
/// </summary>
/// <param name="filepath"></param>
Read the data from the given file and store it as an array of double arrays
Read the data from the given file and store it as an array of double arrays
protected void readFromFile(string filepath)
        {
            string rawTrackData = File.ReadAllText(filepath);
            _trackData = rawTrackData
                .Split('\n')
                .Select(q =>
                    q.Split(new[]{" "}, StringSplitOptions.RemoveEmptyEntries)
                     .Select(Convert.ToDouble)
                     .ToArray()
                )
                .ToArray();
        }
protected void readFromFile ( string filepath ) { string rawTrackData = File . ReadAllText ( filepath ) ; _trackData = rawTrackData . Split ( ' \n ' ) . Select ( q => q . Split ( new [ ] { " " } , StringSplitOptions . RemoveEmptyEntries ) . Select ( Convert . ToDouble ) . ToArray ( ) ) . ToArray ( ) ; }
Read the data from the given file and store it as an array of double arrays
Read the data from the given file and store it as an array of double arrays
filepath
string
None