Class AngleDataUnit

java.lang.Object
PamguardMVC.PamDataUnit
angleMeasurement.AngleDataUnit
All Implemented Interfaces:
Comparable

public class AngleDataUnit extends PamDataUnit
Data unit for storing angular information, often used to store data from imu intruments (inertial measurement unit) and heading data from compass sensors. (Wiki) An inertial measurement unit, or IMU, is an electronic device that measures and reports on a craft's velocity, orientation, and gravitational forces, using a combination of accelerometers and gyroscopes, sometimes also magnetometers In PAMGUARD the convention for angles is as follows:

Bearing- 0==north, 90==east 180=south, 270==west

Pitch- 90=-g, 0=0g, -90=g

Tilt 0->180 -camera turning towards left to upside down 0->-180 camera turning right to upside down

All angles are in RADIANS.

Author:
Douglas Gillespie modified by Jamie Macaulay
  • Constructor Details

    • AngleDataUnit

      public AngleDataUnit(long timeMilliseconds, double rawAngle, double calibratedAngle, double correctedAngle)
      Constructor for heading data: Primarily used in AngleMeasurment module

      Data from an angle measurements
      Angle data come in three stages.
      1. Raw data as came out of the instrument
      2. Calibrated data - the raw data after calibration, 0 degrees should be equal to 0 degrees in the calibrated data.
      3. Correct raw data - the calibrated data - the set constant offset.

      Parameters:
      timeMilliseconds - - time in millis
      rawAngle - - Raw data as came out of the instrument
      calibratedAngle - -the raw data after calibration, 0 degrees should be equal to 0 degrees in the calibrated data.
      correctedAngle - - the calibrated data - the set constant offset.
      timeMilliseconds - - time in millis
    • AngleDataUnit

      public AngleDataUnit(long timeMilliseconds, Double[] IMU)
      Constructor for IMU angle data. Note that this assumes the calibration values are zero for each measurement (unless set afterwards)
      Parameters:
      timeMilliseconds - - the time of this measurment
      IMU - - imuData heading, pitch and roll in radians.
    • AngleDataUnit

      public AngleDataUnit(long timeMilliseconds, Double[] IMU, Double[] errors)
      Constructor for IMU angle data. Note that this assumes the calibration values are zero for each measurement (unless set afterwards)
      Parameters:
      timeMilliseconds - - the time of this measurment
      IMU - - imuData heading, pitch and tilt in radians.
      IMU - Errors- error in the heading, pitch and tilt in radians.
  • Method Details

    • getRawAngle

      public Double getRawAngle()
    • getHeld

      public Boolean getHeld()
    • getTrueHeading

      public Double getTrueHeading()
    • getPitch

      public Double getPitch()
    • getTilt

      public Double getTilt()
    • setRawAngle

      public void setRawAngle(Double rawAngle)
    • setHeld

      public void setHeld(Boolean held)
    • setTrueHeading

      public void setTrueHeading(Double trueHeading)
    • setPitch

      public void setPitch(Double pitch)
    • setTilt

      public void setTilt(Double tilt)
    • getCalTrueHeading

      public Double getCalTrueHeading()
    • getCalPitch

      public Double getCalPitch()
    • getCalTilt

      public Double getCalTilt()
    • setCalTrueHeading

      public void setCalTrueHeading(Double calTrueHeading)
    • setCalPitch

      public void setCalPitch(Double calPitch)
    • setCalTilt

      public void setCalTilt(Double calTilt)
    • getErrorHeading

      public Double getErrorHeading()
    • getErrorPitch

      public Double getErrorPitch()
    • getErrorTilt

      public Double getErrorTilt()
    • setErrorHeadings

      public void setErrorHeadings(Double errorHeadings)
    • setErrorPitch

      public void setErrorPitch(Double errorPitch)
    • setErrorTilt

      public void setErrorTilt(Double errorTilt)
    • getNUnits

      public int getNUnits()
    • setNUnits

      public void setNUnits(int nUnits)