23#include <unordered_set>
77 [[nodiscard]] std::string
type()
const override;
80 [[nodiscard]]
static std::string
category();
87 [[nodiscard]]
json save()
const override;
157 void addPlotDataItem(
size_t dataIndex,
const std::string& displayName);
176 std::vector<std::tuple<double, InsTime, std::string, int32_t>>
events;
279 std::array<ImPlotScale, 3>
yAxesScale = { ImPlotScale_Linear, ImPlotScale_Linear, ImPlotScale_Linear };
281 ImPlotLineFlags
lineFlags = ImPlotLineFlags_NoClip | ImPlotLineFlags_SkipNaN;
383 void addEvent(
size_t pinIndex,
InsTime insTime,
const std::string& text, int32_t dataIndex);
389 void addData(
size_t pinIndex,
size_t dataIndex,
double value);
396 size_t addData(
size_t pinIndex, std::string displayName,
double value);
434 void plotData(
const std::shared_ptr<const T>& obs,
size_t pinIndex,
size_t& plotIndex,
size_t startIndex = 0)
436 for (
size_t i = startIndex; i < T::GetStaticDescriptorCount(); ++i)
438 addData(pinIndex, plotIndex++, obs->getValueAtOrNaN(i));
Barometric Height Storage Class.
Barometric Pressure Storage Class.
Common logging variables like time into run and local positions.
nlohmann::json json
json namespace
GNSS measurement combinations.
GNSS Observation messages.
Data storage class for simulated IMU observations.
Data storage class for one VectorNavImu observation.
Parent Class for all IMU Observations.
Loosely-coupled Kalman Filter INS/GNSS errors.
Tightly-coupled Kalman Filter INS/GNSS errors.
Data storage class for one KVH Imu observation.
Specifying the look of a certain line in the plot.
Position, Velocity and Attitude Storage Class.
RTKLIB Pos Observation Class.
Binary Outputs from VectorNav Sensors.
Vector Utility functions.
WiFi Positioning Algorithm output.
static std::string type()
Returns the type of the data class.
static std::string type()
Returns the type of the data class.
CommonLog(const CommonLog &)=delete
Copy constructor.
static std::string type()
Returns the type of the data class.
static std::string type()
Returns the type of the data class.
static std::string type()
Returns the type of the data class.
static std::string type()
Returns the type of the data class.
static std::string type()
Returns the type of the data class.
static std::string type()
Returns the type of the data class.
static std::string type()
Returns the type of the data class.
static std::string type()
Returns the type of the data class.
The class is responsible for all time-related tasks.
static std::string type()
Returns the type of the data class.
Node(std::string name)
Constructor.
static std::string typeStatic()
String representation of the Class Type.
void plotInteger(const InsTime &insTime, size_t pinIdx)
Plots the data on this port.
static void pinDeleteCallback(Node *node, size_t pinIdx)
Function to call to delete a pin.
gui::widgets::DynamicInputPins _dynamicInputPins
Dynamic input pins.
size_t _screenshotFrameCnt
Frame counter for taking screenshots (> 0 when screenshot in progress)
void restore(const json &j) override
Restores the node from a json object.
void plotData(const std::shared_ptr< const T > &obs, size_t pinIndex, size_t &plotIndex, size_t startIndex=0)
Plot the data.
Plot(const Plot &)=delete
Copy constructor.
void plotFlowData(InputPin::NodeDataQueue &queue, size_t pinIdx)
Plot the data on this port.
void plotFloat(const InsTime &insTime, size_t pinIdx)
Plots the data on this port.
int _dragAndDropHeaderIndex
Index of the Collapsible Header currently being dragged.
std::string type() const override
String representation of the Class Type.
bool _overridePositionStartValues
Flag, whether to override the North/East startValues in the GUI.
Plot & operator=(Plot &&)=delete
Move assignment operator.
CommonLog::LocalPosition calcLocalPosition(const Eigen::Vector3d &lla_position)
Calculate the local position offset from the plot origin.
std::vector< PinData > _pinData
Data storage for each pin.
std::optional< gui::widgets::PositionWithFrame > _originPosition
Start position for the calculation of relative North-South and East-West.
void deinitialize() override
Deinitialize the node.
size_t _screenShotPlotIdx
Plot index a screenshot is taken of.
void plotMatrix(const InsTime &insTime, size_t pinIdx)
Plots the data on this port.
size_t GPST_PLOT_IDX
Index of the GPST data (unix timestamp)
Plot()
Default constructor.
Plot & operator=(const Plot &)=delete
Copy assignment operator.
json save() const override
Saves the node into a json object.
static std::string category()
String representation of the Class Category.
static void pinAddCallback(Node *node)
Function to call to add a new pin.
std::pair< std::unordered_set< size_t >, ImPlotRange > _forceXaxisRange
Values to force the x axis range to and a set of plotIdx to force.
void addEvent(size_t pinIndex, InsTime insTime, const std::string &text, int32_t dataIndex)
Adds a event to a certain point in time.
void addData(size_t pinIndex, size_t dataIndex, double value)
Add Data to the buffer of the pin.
void plotBoolean(const InsTime &insTime, size_t pinIdx)
Plots the data on this port.
~Plot() override
Destructor.
void updateNumberOfPlots()
Adds/Deletes Plots depending on the variable nPlots.
void afterCreateLink(OutputPin &startPin, InputPin &endPin) override
Called when a new link was established.
std::vector< PlotInfo > _plots
Info for each plot window.
void guiConfig() override
ImGui config window which is shown on double click.
size_t _nPlots
Amount of plot windows (should equal _plots.size())
Plot(Plot &&)=delete
Move constructor.
std::vector< std::string > _dataIdentifier
Possible data identifiers to connect.
bool initialize() override
Initialize the node.
static std::string type()
Returns the type of the data class.
static std::string type()
Returns the type of the data class.
static std::string type()
Returns the type of the data class.
static std::string type()
Returns the type of the data class.
static std::string type()
Returns the type of the data class.
static std::string type()
Returns the type of the data class.
static std::string type()
Returns the type of the data class.
void move(std::vector< T > &v, size_t sourceIdx, size_t targetIdx)
Moves an element within a vector to a new position.
Local position offset from a reference point.
Specifying the look of a certain line in the plot.
bool isDynamic
Bool to show if dynamic data.
PlotData()=default
Default constructor (needed to make serialization with json working)
bool hasData
Flag if data was received, as the buffer contains std::nan("") otherwise.
bool markedForDelete
When connecting a new link. All data is flagged for delete and only those who are also present in the...
ScrollingBuffer< double > buffer
Buffer for the data.
std::string displayName
Display name of the contained data.
std::mutex mutex
Mutex to lock the buffer so that the GUI thread and the calculation threads don't cause a data race.
~PinData()=default
Destructor.
PinType
Possible Pin types.
@ Float
Floating Point Number.
std::vector< std::tuple< double, InsTime, std::string, int32_t > > events
Events with relative time, absolute time, tooltip text and data Index (-1 means all)
PinData()=default
Constructor.
int size
Size of all buffers of the plotData elements.
ScrollingBuffer< std::shared_ptr< const NodeData > > rawNodeData
List with the raw data received.
int stride
Amount of points to skip for plotting.
PinData & operator=(const PinData &rhs)
Copy assignment operator.
int dynamicDataStartIndex
Dynamic data start index.
std::vector< PlotData > plotData
List with all the data.
std::string dataIdentifier
Data Identifier of the connected pin.
void addPlotDataItem(size_t dataIndex, const std::string &displayName)
Adds a plotData Element to the list.
std::string displayName
Display name of the data (not changing and unique)
ScrollingBuffer< ImU32 > markerColormapMaskColors
Buffer for the colormap mask.
PlotItem()=default
Default constructor (needed to make serialization with json working)
size_t pinIndex
Index of the pin where the data came in.
std::vector< std::tuple< double, double, PlotEventTooltip > > eventTooltips
List of tooltips (x,y, tooltip)
ScrollingBuffer< double > eventMarker
Buffer for event markers.
PlotItem(size_t pinIndex, size_t dataIndex, std::string displayName, ImAxis axis)
Constructor.
ScrollingBuffer< ImU32 > colormapMaskColors
Buffer for the colormap mask.
size_t colormapMaskVersion
Colormap version (to track updates of the colormap)
size_t dataIndex
Index of the data on the pin.
constexpr bool operator==(const PlotItem &rhs) const
Equal comparison operator (needed to search the vector with std::find)
std::array< ScrollingBuffer< double >, 2 > errorBoundsData
Error bounds lower and upper data.
size_t markerColormapMaskVersion
Colormap version (to track updates of the colormap)
PlotItem(size_t pinIndex, size_t dataIndex, std::string displayName)
Constructor.
ImAxis axis
Axis to plot the data on (Y1, Y2, Y3)
ImVec2 size
Size of the plot.
bool visible
Flag whether the whole plot is visible. If not, then it should be deleted.
std::string y2AxisLabel
Y2 axis label.
std::string headerText
Title of the CollapsingHeader.
std::array< ImPlotScale, 3 > yAxesScale
Scale for the y-Axes.
ImPlotLineFlags lineFlags
Line Flags for all items (each item can override the selection)
ImPlotAxisFlags xAxisFlags
Flags for the x-Axis.
float leftPaneWidth
Width of plot Data content.
int plotFlags
Flags which are passed to the plot.
bool overrideXAxisLabel
Flag, whether to override the x axis label.
std::vector< PlotTooltip > tooltips
List of tooltip windows to show.
std::string xAxisLabel
X axis label.
size_t selectedPin
Selected pin in the GUI for the Drag & Drop Data.
ImPlotScale xAxisScale
Scale for the x-Axis.
PlotInfo(const std::string &title, size_t nInputPins)
Constructor.
PlotInfo()=default
Default constructor.
float rightPaneWidth
Width of the plot.
std::vector< PlotItem > plotItems
List containing all elements which should be plotted.
std::vector< size_t > selectedXdata
Key: PinIndex, Value: plotData to use for x-Axis.
std::string title
Title of the ImPlot.
std::string y1AxisLabel
Y1 axis label.
ImPlotAxisFlags yAxisFlags
Flags for the y-Axes.
std::string y3AxisLabel
Y3 axis label.