GY-63_MS5611/libraries/geomath/README.md
2023-12-20 22:06:37 +01:00

2.6 KiB

Arduino CI Arduino-lint JSON check GitHub issues

License: MIT GitHub release PlatformIO Registry

Geomath

Library for geographical math functions.

Description

Experimental library, use with care.

The geomath library is a collection of functions for doing math in a geographical context. The library act primary as a placeholder for these related functions.

Wrote them long ago and share them because they might be useful e.g. for educational purposes.

Interface

#include geomath.h

Sphere class

Placeholder for some math

  • sphere(float radius) constructor, constructs a sphere (planet) with a certain radius.
  • **float circumference(float latitude) returns the length in same units as used in constructor.
  • float angle(float distance) returns the angle between two points, given the distance. (E.g. Tokio Buenos Aires)

Haversine

To calculate the distance between two points with longitude and lattitude.

  • double haverSine((double lat1, double lon1, double lat2, double lon2)
  • double fastHaverSine(double lat1, double lon1, double lat2, double lon2)

Future

Must

  • update documentation
  • need more math

Should

  • add more functions
  • add unit tests
  • escape velocity math
  • heat inside earth ?
  • find my sunset/sunrise formulas.

Could

Wont

Support

If you appreciate my libraries, you can support the development and maintenance. Improve the quality of the libraries by providing issues and Pull Requests, or donate through PayPal or GitHub sponsors.

Thank you,