package main

import (
	"github.com/bluenviron/goroslib/v2/pkg/msgs/sensor_msgs"
	"math"
)

func Topic() string {
	return "/imu"
}

func Label() string {
	return "unstabledriving"
}

func Rule(data *sensor_msgs.Imu) string {
	if math.Abs(data.LinearAcceleration.X) >= 0.7 && math.Abs(data.LinearAcceleration.Y) >= 0.7 {
		return "unstabledriving"
	}
	return ""
}
