mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
.. | ||
.github | ||
examples | ||
test | ||
.arduino-ci.yml | ||
CHANGELOG.md | ||
geomath.h | ||
keywords.txt | ||
library.json | ||
library.properties | ||
LICENSE | ||
README.md |
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.
related
- https://github.com/RobTillaart/AtomicWeight
- https://github.com/RobTillaart/printHelpers (to print scientific notation)
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,