From 0c28d9dc80e634ebfbabed5ad446b6a4f82056e3 Mon Sep 17 00:00:00 2001 From: ccolin Date: Mon, 4 Jan 2021 14:49:26 +0100 Subject: add speeding violation reporting --- src/drone_controller.hh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/drone_controller.hh') diff --git a/src/drone_controller.hh b/src/drone_controller.hh index 6099e08..3c09089 100644 --- a/src/drone_controller.hh +++ b/src/drone_controller.hh @@ -25,6 +25,8 @@ class DroneController : public QObject, public Painter { QMap>> collisions; bool draw_trajectories = false; bool draw_guides = false; + QMap> speed_violations; + double speed_limit = 0; static OpenGLMesh *sphere; static const unsigned char sphere_neutral[]; @@ -44,6 +46,7 @@ signals: void playing(); void pausing(); void collision(int idA, int idB, int frame); + void speedViolation(int id, double speed, int frame); private slots: void step(); @@ -55,6 +58,7 @@ public slots: void resume(); void seek(int frame); void computeCollisions(double sphere_radius); + void computeSpeedingViolations(double speed); void displaySpheres(double sphere_radius); void setDrawTrajectories(bool enable); void setDrawGuides(bool enable); -- cgit v1.2.3-70-g09d2