/// <summary> /// Reads the contents from the file. /// </summary> /// <returns>True if the file could be read succesfully.</returns> public bool ReadFile() { mFileSupport_.Filename = Filename; if (!FileIsValid()) { throw new ArgumentException("filename", "there is an issue with file, check it exists at specified path"); } Header = ReadObservationFileHeader(); var body_ = ReaderObservationBodies(); return(true); }
/// <summary> /// Parses a line adding the contents to the observation header /// </summary> /// <param name="line">A string from the header</param> /// <param name="observationHeader">The observation header</param> private void ParseHeaderLine(string line, ref IRinexObservationHeader observationHeader) { if (line.Contains(RinexIOConstant.AntennaDelta)) { observationHeader.AntennaDelta = mObservationHeaderParser.ParseAntennaDelta(line); } if (line.Contains(RinexIOConstant.ApproximatePosition)) { observationHeader.ApproximatePosition = mObservationHeaderParser.ParseApproximatePosistion(line); } if (line.Contains(RinexIOConstant.MarkerName)) { observationHeader.Marker = mObservationHeaderParser.ParseMarker(line); } if (line.Contains(RinexIOConstant.ObserverationTypes)) { int Count = 0; observationHeader.SignalTypes = mObservationHeaderParser.ParseSignalTypes(line, out Count); observationHeader.SignalTypeCount = Count; } if (line.Contains(RinexIOConstant.ProgramInformation)) { observationHeader.ProgramHeader = mObservationHeaderParser.ParseProgramHeader(line); } if (line.Contains(RinexIOConstant.RinexVersion)) { observationHeader.RinexHeader = mObservationHeaderParser.ParseHeaderInformation(line); } if (line.Contains(RinexIOConstant.TimeOfFirstObservation)) { observationHeader.FirstObservation = mObservationHeaderParser.ParseObservationDateAndTime(line); } if (line.Contains(RinexIOConstant.TimeOfLastObservation)) { observationHeader.LastObservation = mObservationHeaderParser.ParseObservationDateAndTime(line); } }