Skip to content

FitnessKit/FitnessUnits

Repository files navigation

FitnessUnits

Units of Measurement for Fitness

Swift5 Version License Platform Readme Score codebeat badge

Installation

FitnessUnits is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "FitnessUnits"

Swift Package Manager:

Swift

    dependencies: [
        .package(url: "https://github.com/FitnessKit/FitnessUnits", from: "3.1.0"),
    ]

Swift4

    dependencies: [
        .package(url: "https://github.com/FitnessKit/FitnessUnits", .branch("swift42")),
    ]

New Dimensional Unit Types

  • UnitAngularVelocity
  • UnitForce
  • UnitLinearDensity
  • UnitMagneticField
  • UnitTorque

Extensions to Dimensional Units

  • UnitAcceleration - Galileo
  • UnitAngle - Bradian
  • UnitAngle - Milliradian
  • UnitAngle - Semicircle
  • UnitAngle - Garmin Semicircle (ANT/FIT Files)
  • UnitSpeed - metersPerMinute
  • UnitSpeed - metersPerHour
  • UnitSpeed - kilometersPerSecond
  • UnitSpeed - kilometersPerMinute
  • UnitSpeed - milesPerSecond
  • UnitSpeed - milesPerMinute
  • UnitSpeed - speedOfLight
  • UnitEnergy - Energy Burn Calculations
  • UnitEnergy - MegaJoule
  • UnitEnergy - Watt Hour
  • UnitEnergy - Electron Volts
  • UnitEnergy - British Thermal Units (BTU)
  • UnitEnergy - US Therm (thm)
  • UnitMass - Mass Calculations
  • UnitConcentrationMass - gramsPerDeciliter
  • UnitConcentrationMass - gramsPerMilliliter
  • UnitConcentrationMass - kilogramsPerMilliliter
  • UnitConcentrationMass - milligramsPerLiter
  • UnitConcentrationMass - kilogramsPerLiter
  • UnitDuration - microsecond
  • UnitDuration - millisecond
  • UnitDuration - year
  • UnitDuration - decade

New Dimensionless Unit Types

  • UnitCadence - Cadence (RPM, BPM, Steps per min, etc..)
  • UnitCount
  • UnitGender
  • UnitOxygenConsumption - VO2
  • UnitPercent
  • UnitRadioactivity

New Measurement Types

  • StringMeasurement - Type that holds a String value associated with a Unit
  • ValidatedMeasurement - Extension of Measurement that provides feedback on validity of data.
  • ValidatedBinaryInteger - BinaryInteger with a validity check
  • ValidatedBinaryFloatingPoint - BinaryFloatingPoint with a validity check

Other Types

  • MeasurementZone - Type that bounds values between a upper and lower bounds.

Author

This package is developed and maintained by Kevin A. Hoogheem

License

FitnessUnits is available under the MIT license