40 return "MatrixLogger";
82 if (j.contains(
"FileWriter"))
118 constexpr int gpsCyclePrecision = 3;
119 constexpr int gpsTimePrecision = 12;
120 constexpr int valuePrecision = 12;
124 _filestream <<
"Time [s],GpsCycle,GpsWeek,GpsTow [s]";
127 if (
auto* sourcePin =
inputPins.at(pinIdx).link.getConnectedPin())
130 if (sourcePin->dataIdentifier.front() ==
"Eigen::MatrixXd")
133 value && !insTime.
empty())
137 for (
int row = 0; row < value->v->rows(); row++)
139 for (
int col = 0; col < value->v->cols(); col++)
154 for (
int row = 0; row < value->v->rows(); row++)
156 for (
int col = 0; col < value->v->cols(); col++)
nlohmann::json json
json namespace
Utility class for logging to console and file.
#define LOG_TRACE
Detailled info to trace the execution of the program. Should not be called on functions which receive...
Data Logger for matrices.
Keeps track of the current real/simulation time.
static bool ShowOriginInput(const char *id)
Shows a GUI to input a origin location.
void initialize() const
Initialize the common log variables.
static double calcTimeIntoRun(const InsTime &insTime)
Calculates the relative time into he run.
FileType _fileType
File Type.
void deinitialize()
Deinitialize the file reader.
bool guiConfig(const char *vFilters, const std::vector< std::string > &extensions, size_t id, const std::string &nameId)
ImGui config.
void restore(const json &j)
Restores the node from a json object.
json save() const
Saves the node into a json object.
bool initialize()
Initialize the file reader.
std::ofstream _filestream
File stream to write the file.
The class is responsible for all time-related tasks.
constexpr InsTime_GPSweekTow toGPSweekTow(TimeSystem timesys=GPST) const
Converts this time object into a different format.
constexpr bool empty() const
Checks if the Time object has a value.
void deinitialize() override
Deinitialize the node.
static std::string typeStatic()
String representation of the Class Type.
MatrixLogger()
Default constructor.
static std::string category()
String representation of the Class Category.
json save() const override
Saves the node into a json object.
~MatrixLogger() override
Destructor.
void writeMatrix(const InsTime &insTime, size_t pinIdx)
Write a matrix to the file.
bool _headerWritten
Flag whether the header was written.
void flush() override
Function called by the flow executer after finishing to flush out remaining data.
static constexpr size_t INPUT_PORT_INDEX_MATRIX
Matrix.
void restore(const json &j) override
Restores the node from a json object.
std::string type() const override
String representation of the Class Type.
void guiConfig() override
ImGui config window which is shown on double click.
bool initialize() override
Initialize the node.
bool doDeinitialize(bool wait=false)
Asks the node worker to deinitialize the node.
void releaseInputValue(size_t portIndex)
Unblocks the connected node. Has to be called when the input value should be released and getInputVal...
ImVec2 _guiConfigDefaultWindowSize
Node(std::string name)
Constructor.
std::optional< InputPin::IncomingLink::ValueWrapper< T > > getInputValue(size_t portIndex) const
Get Input Value connected on the pin. Only const data types.
std::vector< InputPin > inputPins
List of input pins.
std::string nameId() const
Node name and id.
std::string name
Name of the Node.
InputPin * CreateInputPin(const char *name, Pin::Type pinType, const std::vector< std::string > &dataIdentifier={}, InputPin::Callback callback=static_cast< InputPin::FlowFirableCallbackFunc >(nullptr), InputPin::FlowFirableCheckFunc firable=nullptr, int priority=0, int idx=-1)
Create an Input Pin object.
bool _hasConfig
Flag if the config window should be shown.
void ApplyChanges()
Signals that there have been changes to the flow.
int32_t gpsCycle
Contains GPS cycle in GPS standard time [GPST].
int32_t gpsWeek
Contains GPS week in GPS standard time [GPST].
long double tow
Contains GPS time of week in seconds in GPS standard time [GPST].