GY-63_MS5611/libraries/AngleConvertor
2023-01-31 16:28:11 +01:00
..
.github 0.1.1 AngleConvertor 2023-01-31 16:28:11 +01:00
examples 0.1.1 AngleConvertor 2023-01-31 16:28:11 +01:00
test 0.1.1 AngleConvertor 2023-01-31 16:28:11 +01:00
.arduino-ci.yml 0.1.0 AngleConvertor 2022-12-07 20:19:21 +01:00
AngleConvertor.h 0.1.1 AngleConvertor 2023-01-31 16:28:11 +01:00
CHANGELOG.md 0.1.1 AngleConvertor 2023-01-31 16:28:11 +01:00
keywords.txt 0.1.1 AngleConvertor 2023-01-31 16:28:11 +01:00
library.json 0.1.1 AngleConvertor 2023-01-31 16:28:11 +01:00
library.properties 0.1.1 AngleConvertor 2023-01-31 16:28:11 +01:00
LICENSE 0.1.1 AngleConvertor 2023-01-31 16:28:11 +01:00
README.md 0.1.1 AngleConvertor 2023-01-31 16:28:11 +01:00

Arduino CI Arduino-lint JSON check License: MIT GitHub release

AngleConvertor

Arduino library for converting angles (degrees/radians) to less known formats.

Description

AngleConvertor is an Arduino class to convert an angle from and to less known formats.

Formats

name full circle
Degrees 360
Radians 2 PI
Gradians 400
AngularMil 6400
BinaryRadians 256
CentiTurn 100
DiameterPart 120
Hexacontade 60
HourAngle 24
MilliTurn 1000
MinuteTime 1440
Octant 8
Pechus 180
Points 32
Quadrant 4
QuarterPoint 128
SecondsTime 86400
Sextant 6
Sign 12
Turn 1

Interface

#include "AngleConvertor.h"

Constructor

  • AngleConvertor() create an AngleConvertor, default value is zero.

Setters

  • void setDegrees(float value = 0)
  • void setRadians(float value = 0)
  • void setGradians(float value = 0)
  • void setAngularMil(float value = 0)
  • void setBinaryRadians(float value = 0)
  • void setCentiTurn(float value = 0)
  • void setDiameterPart(float value = 0)
  • void setHexacontade(float value = 0)
  • void setHourAngle(float value = 0)
  • void setMilliTurn(float value = 0)
  • void setMinuteTime(float value = 0)
  • void setOctant(float value = 0)
  • void setPechus(float value = 0)
  • void setPoints(float value = 0)
  • void setQuadrant(float value = 0)
  • void setQuarterPoint(float value = 0)
  • void setSecondsTime(float value = 0)
  • void setSextant(float value = 0)
  • void setSign(float value = 0)
  • void setTurn(float value = 0)

Getters

  • float getDegrees()
  • float getRadians()
  • float getGradians()
  • float getAngularMil()
  • float getBinaryRadians()
  • float getCentiTurn()
  • float getDiameterPart()
  • float getHexacontade()
  • float getHourAngle()
  • float getMilliTurn()
  • float getMinuteTime()
  • float getOctant()
  • float getPechus()
  • float getPoints()
  • float getQuadrant()
  • float getQuarterPoint()
  • float getSecondsTime()
  • float getSextant()
  • float getSign()
  • float getTurn()

WindRose

From: https://forum.arduino.cc/t/function-optimization-wind-direction-open-for-ideas/92493/10

Converts an angle in degrees to a char array like "WSW". 0 and 360 degrees is considered North.

  • char * windrose() converter version.
  • char * windrose(float degrees) stand alone version. degrees should be between 0 and 360, as function does no normalization.

Operation

See examples.

Future

Must

  • improve documentation

Should

Could

  • add dedicated functions == faster (on request only).
  • add more conversions
  • integrate with Angle class ?
    • printing can be a lot of work