0.4.1
Loading...
Searching...
No Matches
NAV::RinexNavFile Class Reference

File reader Node for RINEX Navigation messages. More...

Public Member Functions

void guiConfig () override
 ImGui config window which is shown on double click.
 
RinexNavFileoperator= (const RinexNavFile &)=delete
 Copy assignment operator.
 
RinexNavFileoperator= (RinexNavFile &&)=delete
 Move assignment operator.
 
bool resetNode () override
 Resets the node. Moves the read cursor to the start.
 
void restore (const json &j) override
 Restores the node from a json object.
 
 RinexNavFile ()
 Default constructor.
 
 RinexNavFile (const RinexNavFile &)=delete
 Copy constructor.
 
 RinexNavFile (RinexNavFile &&)=delete
 Move constructor.
 
json save () const override
 Saves the node into a json object.
 
std::string type () const override
 String representation of the Class Type.
 
 ~RinexNavFile () override
 Destructor.
 
- Public Member Functions inherited from NAV::Node
virtual void afterCreateLink (OutputPin &startPin, InputPin &endPin)
 Called when a new link was established.
 
virtual void afterDeleteLink (OutputPin &startPin, InputPin &endPin)
 Called when a link was deleted.
 
bool doDeinitialize (bool wait=false)
 Asks the node worker to deinitialize the node.
 
bool doDisable (bool wait=false)
 Asks the node worker to disable the node.
 
bool doEnable ()
 Enable the node.
 
bool doInitialize (bool wait=false)
 Asks the node worker to initialize the node.
 
bool doReinitialize (bool wait=false)
 Asks the node worker to reinitialize the node.
 
virtual void flush ()
 Function called by the flow executer after finishing to flush out remaining data.
 
template<typename T>
std::optional< InputPin::IncomingLink::ValueWrapper< T > > getInputValue (size_t portIndex) const
 Get Input Value connected on the pin. Only const data types.
 
Mode getMode () const
 Get the current mode of the node.
 
const ImVec2 & getSize () const
 Get the size of the node.
 
State getState () const
 Get the current state of the node.
 
bool hasInputPinWithSameTime (const InsTime &insTime) const
 Checks wether there is an input pin with the same time.
 
InputPininputPinFromId (ax::NodeEditor::PinId pinId)
 Returns the pin with the given id.
 
size_t inputPinIndexFromId (ax::NodeEditor::PinId pinId) const
 Returns the index of the pin.
 
void invokeCallbacks (size_t portIndex, const std::shared_ptr< const NodeData > &data)
 Calls all registered callbacks on the specified output port.
 
bool isDisabled () const
 Checks if the node is disabled.
 
bool isInitialized () const
 Checks if the node is initialized.
 
bool isOnlyRealtime () const
 Checks if the node is only working in real time (sensors, network interfaces, ...)
 
bool isTransient () const
 Checks if the node is changing its state currently.
 
std::string nameId () const
 Node name and id.
 
 Node (const Node &)=delete
 Copy constructor.
 
 Node (Node &&)=delete
 Move constructor.
 
 Node (std::string name)
 Constructor.
 
void notifyOutputValueChanged (size_t pinIdx, const InsTime &insTime, const std::scoped_lock< std::mutex > &&guard)
 Notifies connected nodes about the change.
 
virtual bool onCreateLink (OutputPin &startPin, InputPin &endPin)
 Called when a new link is to be established.
 
virtual void onDeleteLink (OutputPin &startPin, InputPin &endPin)
 Called when a link is to be deleted.
 
Nodeoperator= (const Node &)=delete
 Copy assignment operator.
 
Nodeoperator= (Node &&)=delete
 Move assignment operator.
 
OutputPinoutputPinFromId (ax::NodeEditor::PinId pinId)
 Returns the pin with the given id.
 
size_t outputPinIndexFromId (ax::NodeEditor::PinId pinId) const
 Returns the index of the pin.
 
void releaseInputValue (size_t portIndex)
 Unblocks the connected node. Has to be called when the input value should be released and getInputValue was not called.
 
std::scoped_lock< std::mutex > requestOutputValueLock (size_t pinIdx)
 Blocks the thread till the output values was read by all connected nodes.
 
virtual void restoreAtferLink (const json &j)
 Restores link related properties of the node from a json object.
 
void wakeWorker ()
 Wakes the worker thread.
 
virtual ~Node ()
 Destructor.
 
- Public Member Functions inherited from NAV::FileReader
 FileReader (const FileReader &)=delete
 Copy constructor.
 
 FileReader (FileReader &&)=delete
 Move constructor.
 
FileReaderoperator= (const FileReader &)=delete
 Copy assignment operator.
 
FileReaderoperator= (FileReader &&)=delete
 Move assignment operator.
 
virtual ~FileReader ()=default
 Destructor.
 

Static Public Member Functions

static std::string category ()
 String representation of the Class Category.
 
static std::string typeStatic ()
 String representation of the Class Type.
 
- Static Public Member Functions inherited from NAV::Node
static std::string toString (State state)
 Converts the state into a printable text.
 

Private Types

enum class  NavMsgType : uint8_t {
  EPH ,
  STO ,
  EOP ,
  ION ,
  UNKNOWN
}
 RINEX navigation message types enumeration with continuous range. More...
 

Private Member Functions

void abortReading ()
 Aborts RINEX file reading and deinitializes node.
 
void deinitialize () override
 Deinitialize the node.
 
FileType determineFileType () override
 Determines the type of the file.
 
void executeHeaderParser (double version)
 Read the header of the file with correct version.
 
void executeOrbitParser (double version)
 Read the messages of the file with correct version.
 
bool initialize () override
 Initialize the node.
 
bool parseEphemeris (std::string &line, SatelliteSystem satSys, uint8_t satNum)
 Parses ephemeris message since version 3.
 
void parseHeader2 ()
 Parses RINEX version 2.* headers.
 
void parseHeader3 ()
 Parses RINEX version 3.* headers.
 
void parseHeader4 ()
 Parses RINEX version 4.00 headers.
 
void parseOrbit2 ()
 Parses RINEX version 2.* messages.
 
void parseOrbit3 ()
 Parses RINEX version 3.* messages.
 
void parseOrbit4 ()
 Parses RINEX version 4.00 messages.
 
void readHeader () override
 Read the Header of the file.
 
void readOrbits ()
 Read the orbit information.
 

Static Private Member Functions

static NavMsgType getNavMsgType (const std::string &type)
 Converts RINEX navigation message string to enum type.
 

Private Attributes

GnssNavInfo _gnssNavInfo
 Data object to share over the output pin.
 
bool _sbasNotSupportedWarned
 Only warn once.
 
double _version
 Version of the RINEX file.
 

Static Private Attributes

static const std::set< double > _supportedVersions
 Supported RINEX versions.
 
static constexpr size_t OUTPUT_PORT_INDEX_GNSS_NAV_INFO
 Object (GnssNavInfo)
 

Additional Inherited Members

- Public Types inherited from NAV::Node
enum class  Mode : uint8_t {
  REAL_TIME ,
  POST_PROCESSING
}
 Different Modes the Node can work in. More...
 
enum class  State : uint8_t {
  Disabled ,
  Deinitialized ,
  DoInitialize ,
  Initializing ,
  Initialized ,
  DoDeinitialize ,
  Deinitializing ,
  DoShutdown ,
  Shutdown
}
 Possible states of the node. More...
 
- Public Types inherited from NAV::FileReader
enum  FileType : uint8_t {
  NONE ,
  BINARY ,
  ASCII
}
 File Type Enumeration. More...
 
enum  GuiResult : uint8_t {
  PATH_UNCHANGED ,
  PATH_CHANGED ,
  PATH_CHANGED_INVALID
}
 Results enum for the gui config. More...
 
- Data Fields inherited from NAV::Node
bool callbacksEnabled
 Enables the callbacks.
 
ax::NodeEditor::NodeId id
 Unique Id of the Node.
 
std::vector< InputPininputPins
 List of input pins.
 
Kind kind
 Kind of the Node.
 
std::string name
 Name of the Node.
 
std::vector< OutputPinoutputPins
 List of output pins.
 
std::multimap< InsTime, std::pair< OutputPin *, size_t > > pollEvents
 Map with callback events (sorted by time)
 
- Protected Member Functions inherited from NAV::FileReader
void deinitialize ()
 Deinitialize the file reader.
 
auto eof () const
 Check whether the end of file is reached.
 
 FileReader ()=default
 Default constructor.
 
size_t getCurrentLineNumber () const
 Get the current line number.
 
std::filesystem::path getFilepath ()
 Returns the path of the file.
 
auto & getline (std::string &str)
 Reads a line from the filestream.
 
bool good () const
 Fast error checking.
 
GuiResult guiConfig (const char *vFilters, const std::vector< std::string > &extensions, size_t id, const std::string &nameId)
 ImGui config.
 
auto & ignore (std::streamsize count, int delim)
 Extracts and discards characters from the input stream until and including delim.
 
bool initialize ()
 Initialize the file reader.
 
auto peek ()
 Looking ahead in the stream.
 
auto & read (char *__s, std::streamsize __n)
 Extraction without delimiters.
 
auto readsome (char *s, std::streamsize count)
 Extracts up to count immediately available characters from the input stream. The extracted characters are stored into the character array pointed to by s.
 
void resetReader ()
 Moves the read cursor to the start.
 
void restore (const json &j)
 Restores the node from a json object.
 
json save () const
 Saves the node into a json object.
 
auto & seekg (std::streamoff pos, std::ios_base::seekdir dir)
 Changing the current read position.
 
std::streampos tellg ()
 Getting the current read position.
 
- Protected Attributes inherited from NAV::Node
ImVec2 _guiConfigDefaultWindowSize
 
bool _hasConfig
 Flag if the config window should be shown.
 
bool _lockConfigDuringRun
 Lock the config when executing post-processing.
 
bool _onlyRealTime
 Whether the node can run in post-processing or only real-time.
 
- Protected Attributes inherited from NAV::FileReader
FileType _fileType
 File Type.
 
std::vector< std::string > _headerColumns
 Header Columns of a CSV file.
 
std::string _path
 Path to the file.
 

Detailed Description

File reader Node for RINEX Navigation messages.

Definition at line 26 of file RinexNavFile.hpp.

Member Enumeration Documentation

◆ NavMsgType

enum class NAV::RinexNavFile::NavMsgType : uint8_t
strongprivate

RINEX navigation message types enumeration with continuous range.

Enumerator
EPH 

Ephemeris.

STO 

System Time Offset.

EOP 

Earth Orientation Parameter.

ION 

Ionosphere.

UNKNOWN 

Unknown message type.

Definition at line 129 of file RinexNavFile.hpp.

Constructor & Destructor Documentation

◆ RinexNavFile() [1/3]

NAV::RinexNavFile::RinexNavFile ( )

Default constructor.

Definition at line 30 of file RinexNavFile.cpp.

◆ ~RinexNavFile()

NAV::RinexNavFile::~RinexNavFile ( )
override

Destructor.

Definition at line 41 of file RinexNavFile.cpp.

◆ RinexNavFile() [2/3]

NAV::RinexNavFile::RinexNavFile ( const RinexNavFile & )
delete

Copy constructor.

◆ RinexNavFile() [3/3]

NAV::RinexNavFile::RinexNavFile ( RinexNavFile && )
delete

Move constructor.

Member Function Documentation

◆ abortReading()

void NAV::RinexNavFile::abortReading ( )
inlineprivate

Aborts RINEX file reading and deinitializes node.

Definition at line 83 of file RinexNavFile.hpp.

◆ category()

std::string NAV::RinexNavFile::category ( )
staticnodiscard

String representation of the Class Category.

Definition at line 56 of file RinexNavFile.cpp.

◆ deinitialize()

void NAV::RinexNavFile::deinitialize ( )
overrideprivatevirtual

Deinitialize the node.

Reimplemented from NAV::Node.

Definition at line 127 of file RinexNavFile.cpp.

◆ determineFileType()

FileReader::FileType NAV::RinexNavFile::determineFileType ( )
nodiscardoverrideprivatevirtual

Determines the type of the file.

Returns
The File Type

Reimplemented from NAV::FileReader.

Definition at line 143 of file RinexNavFile.cpp.

◆ executeHeaderParser()

void NAV::RinexNavFile::executeHeaderParser ( double version)
private

Read the header of the file with correct version.

Parameters
[in]versionRINEX version

Definition at line 259 of file RinexNavFile.cpp.

◆ executeOrbitParser()

void NAV::RinexNavFile::executeOrbitParser ( double version)
private

Read the messages of the file with correct version.

Parameters
[in]versionRINEX version

Definition at line 280 of file RinexNavFile.cpp.

◆ getNavMsgType()

static NavMsgType NAV::RinexNavFile::getNavMsgType ( const std::string & type)
inlinestaticprivate

Converts RINEX navigation message string to enum type.

Parameters
[in]typestring
Returns
navMsgType enum

Definition at line 141 of file RinexNavFile.hpp.

◆ guiConfig()

void NAV::RinexNavFile::guiConfig ( )
overridevirtual

ImGui config window which is shown on double click.

Attention
Don't forget to set _hasConfig to true in the constructor of the node

Reimplemented from NAV::Node.

Definition at line 61 of file RinexNavFile.cpp.

◆ initialize()

bool NAV::RinexNavFile::initialize ( )
overrideprivatevirtual

Initialize the node.

Reimplemented from NAV::Node.

Definition at line 105 of file RinexNavFile.cpp.

◆ operator=() [1/2]

RinexNavFile & NAV::RinexNavFile::operator= ( const RinexNavFile & )
delete

Copy assignment operator.

◆ operator=() [2/2]

RinexNavFile & NAV::RinexNavFile::operator= ( RinexNavFile && )
delete

Move assignment operator.

◆ parseEphemeris()

bool NAV::RinexNavFile::parseEphemeris ( std::string & line,
SatelliteSystem satSys,
uint8_t satNum )
private

Parses ephemeris message since version 3.

Parameters
[in]linestring
[in]satSysSatellite System
[in]satNumuint8_t Satellite Number
Returns
False if message should be skipped

Definition at line 1354 of file RinexNavFile.cpp.

◆ parseHeader2()

void NAV::RinexNavFile::parseHeader2 ( )
private

Parses RINEX version 2.* headers.

Definition at line 301 of file RinexNavFile.cpp.

◆ parseHeader3()

void NAV::RinexNavFile::parseHeader3 ( )
private

Parses RINEX version 3.* headers.

Definition at line 409 of file RinexNavFile.cpp.

◆ parseHeader4()

void NAV::RinexNavFile::parseHeader4 ( )
private

Parses RINEX version 4.00 headers.

Definition at line 543 of file RinexNavFile.cpp.

◆ parseOrbit2()

void NAV::RinexNavFile::parseOrbit2 ( )
private

Parses RINEX version 2.* messages.

Definition at line 615 of file RinexNavFile.cpp.

◆ parseOrbit3()

void NAV::RinexNavFile::parseOrbit3 ( )
private

Parses RINEX version 3.* messages.

Definition at line 1037 of file RinexNavFile.cpp.

◆ parseOrbit4()

void NAV::RinexNavFile::parseOrbit4 ( )
private

Parses RINEX version 4.00 messages.

Definition at line 1084 of file RinexNavFile.cpp.

◆ readHeader()

void NAV::RinexNavFile::readHeader ( )
overrideprivatevirtual

Read the Header of the file.

Reimplemented from NAV::FileReader.

Definition at line 1767 of file RinexNavFile.cpp.

◆ readOrbits()

void NAV::RinexNavFile::readOrbits ( )
private

Read the orbit information.

Definition at line 1774 of file RinexNavFile.cpp.

◆ resetNode()

bool NAV::RinexNavFile::resetNode ( )
overridevirtual

Resets the node. Moves the read cursor to the start.

Reimplemented from NAV::Node.

Definition at line 134 of file RinexNavFile.cpp.

◆ restore()

void NAV::RinexNavFile::restore ( const json & j)
overridevirtual

Restores the node from a json object.

Parameters
[in]jJson object with the node state

Reimplemented from NAV::Node.

Definition at line 95 of file RinexNavFile.cpp.

◆ save()

json NAV::RinexNavFile::save ( ) const
nodiscardoverridevirtual

Saves the node into a json object.

Reimplemented from NAV::Node.

Definition at line 84 of file RinexNavFile.cpp.

◆ type()

std::string NAV::RinexNavFile::type ( ) const
nodiscardoverridevirtual

String representation of the Class Type.

Implements NAV::Node.

Definition at line 51 of file RinexNavFile.cpp.

◆ typeStatic()

std::string NAV::RinexNavFile::typeStatic ( )
staticnodiscard

String representation of the Class Type.

Definition at line 46 of file RinexNavFile.cpp.

Field Documentation

◆ _gnssNavInfo

GnssNavInfo NAV::RinexNavFile::_gnssNavInfo
private

Data object to share over the output pin.

Definition at line 164 of file RinexNavFile.hpp.

◆ _sbasNotSupportedWarned

bool NAV::RinexNavFile::_sbasNotSupportedWarned
private

Only warn once.

Definition at line 170 of file RinexNavFile.hpp.

◆ _supportedVersions

const std::set<double> NAV::RinexNavFile::_supportedVersions
inlinestaticprivate

Supported RINEX versions.

Definition at line 126 of file RinexNavFile.hpp.

◆ _version

double NAV::RinexNavFile::_version
private

Version of the RINEX file.

Definition at line 167 of file RinexNavFile.hpp.

◆ OUTPUT_PORT_INDEX_GNSS_NAV_INFO

size_t NAV::RinexNavFile::OUTPUT_PORT_INDEX_GNSS_NAV_INFO
staticconstexprprivate

Object (GnssNavInfo)

Definition at line 66 of file RinexNavFile.hpp.


The documentation for this class was generated from the following files: