Adding and modify many useful function

in their header file:
-blh2enu.h
-xyz2blh.h
-rahcal.h
-deg2dms.h
-degRrad.h
This commit is contained in:
KenanZhu111 committed 2024-09-21 11:38:30 +08:00
1 parent 22cc906c00
commit c44c1df50f
10 files changed
+57651 -57503

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
#ifndef _DEGRRAD_H_
#define _DEGRRAD_H_
#define PI 3.141592653589793
/* -------------------------------------------------------------------------- */
/// @brief 角度转弧度
/// @param deg
/// @return 返回弧度
/* -------------------------------------------------------------------------- */
double deg2rad(double deg)
{
double rad = (PI / 180) * deg;
return rad;
}
/* -------------------------------------------------------------------------- */
/// @brief 弧度转角度
/// @param rad
/// @return 返回角度
/* -------------------------------------------------------------------------- */
double rad2deg(double rad)
{
double deg = (180 / PI) * rad;
return deg;
}
#endif