51 lines
1.5 KiB
C++
51 lines
1.5 KiB
C++
#ifndef PLOTTER_H
|
|
#define PLOTTER_H
|
|
#include <vector>
|
|
#include <string>
|
|
|
|
/**
|
|
* @brief Abstract interface for plotting flight data.
|
|
*/
|
|
class Plotter {
|
|
public:
|
|
virtual ~Plotter() = default;
|
|
|
|
/**
|
|
* @brief Plot a 2D line graph.
|
|
*
|
|
* @param xData Vector of x-axis values (e.g., time)
|
|
* @param yData Vector of y-axis values (e.g., altitude)
|
|
* @param title Plot title
|
|
* @param xLabel Label for x-axis
|
|
* @param yLabel Label for y-axis
|
|
*/
|
|
virtual void plot2D(const std::vector<double>& xData,
|
|
const std::vector<double>& yData,
|
|
const std::string& title,
|
|
const std::string& xLabel,
|
|
const std::string& yLabel) = 0;
|
|
|
|
|
|
/**
|
|
* @brief Add a vertical marker at a specific x-axis value.
|
|
*
|
|
* @param xValue The x position (e.g., time in seconds)
|
|
* @param label Text label to display near the marker
|
|
*/
|
|
virtual void addMarker(double xValue, const std::string& label) = 0;
|
|
|
|
/**
|
|
* @brief Plot altitude, velocity, and acceleration together on a single canvas.
|
|
*
|
|
* @param time Time points
|
|
* @param altitude Altitude (Z position)
|
|
* @param velocity Vertical velocity
|
|
* @param acceleration Vertical acceleration
|
|
*/
|
|
virtual void plotPosVelAcc(const std::vector<double>& time,
|
|
const std::vector<double>& altitude,
|
|
const std::vector<double>& velocity,
|
|
const std::vector<double>& acceleration) = 0;
|
|
};
|
|
|
|
#endif // PLOTTER_H
|