Show / Hide Table of Contents

Class AngleSmoothingAbstractBase

Base class for implementing different smoothing strategies

Inheritance
MonoBehaviour
AngleSmoothingAbstractBase
AngleSmoothingAverage
AngleSmoothingEMA
AngleSmoothingLowPass
AngleSmoothingNoOp
Namespace:Mapbox.Unity.Location
Assembly:cs.temp.dll.dll
Syntax
public abstract class AngleSmoothingAbstractBase : MonoBehaviour, IAngleSmoothing

Constructors

AngleSmoothingAbstractBase()

Declaration
public AngleSmoothingAbstractBase()

Fields

_angles

Internal storage for latest 'n' values. Latest value at [0],

Declaration
protected CircularBuffer<double> _angles
Field Value
Type Description
CircularBuffer<System.Double>

_measurements

Declaration
public int _measurements
Field Value
Type Description
System.Int32

DEG2RAD

For conversions from degrees to radians needed for Math functions.

Declaration
protected readonly double DEG2RAD
Field Value
Type Description
System.Double

RAD2DEG

For conversions from radians to degrees.

Declaration
protected readonly double RAD2DEG
Field Value
Type Description
System.Double

Methods

Add(Double)

Add angle to list of angles used for calculation.

Declaration
public void Add(double angle)
Parameters
Type Name Description
System.Double angle
Implements
IAngleSmoothing.Add(Double)

Calculate()

Calculate smoothed angle from previously added angles.

Declaration
public abstract double Calculate()
Returns
Type Description
System.Double

Smoothed angle

Implements
IAngleSmoothing.Calculate()

debugLogAngle(Double, Double)

Declaration
[Conditional("UNITY_EDITOR")]
protected void debugLogAngle(double raw, double smoothed)
Parameters
Type Name Description
System.Double raw
System.Double smoothed
Back to top © 2017 Mapbox