MagicPingu

data class MagicPingu(var velocity: Double = 0.0, var acceleration: Double = 0.0, var jerk: Double = 0.0)

A data class that wraps magic motion with velocity, acceleration, and jerk.

Units depend on the motor's controlled variable:

  • For rotational motion: velocity in rotations/second, acceleration in rotations/second², jerk in rotations/second³

  • For linear motion: velocity in meters/second, acceleration in meters/second², jerk in meters/second³

Constructors

Link copied to clipboard
constructor(velocity: Double = 0.0, acceleration: Double = 0.0, jerk: Double = 0.0)

Properties

Link copied to clipboard

The acceleration (units depend on system - see class docs).

Link copied to clipboard

The jerk (units depend on system - see class docs).

Link copied to clipboard

The velocity (units depend on system - see class docs).

Functions

Link copied to clipboard
fun setAcceleration(acceleration: LoggedNetworkNumber)

Sets the acceleration of the MagicPingu.

Link copied to clipboard
fun setJerk(jerk: LoggedNetworkNumber)

Sets the jerk of the MagicPingu.

Link copied to clipboard
fun setVelocity(velocity: LoggedNetworkNumber)

Sets the velocity of the MagicPingu.