geodetic.hpp
Go to the documentation of this file.
1 /*
2  * This program is free software: you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation, version 3.
5  *
6  * This program is distributed in the hope that it will be useful, but
7  * WITHOUT ANY WARRANTY; without even the implied warranty of
8  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9  * General Public License for more details.
10  *
11  * You should have received a copy of the GNU General Public License
12  * along with this program. If not, see <http://www.gnu.org/licenses/>.
13  *
14  * Author: Dmitry Ponomarev <ponomarevda96@gmail.com>
15  */
16 
17 #ifndef SRC_MATH_GEODETIC_HPP
18 #define SRC_MATH_GEODETIC_HPP
19 
21 public:
23 
24  void setInitialValues(double lat, double lon, double alt);
25 
26  void enuToGeodetic(double enu_x, double enu_y, double enu_z, double* lat, double* lon, double* alt) const;
27 
28 private:
29  // Helper method to convert degrees to radians
30  double degreesToRadians(double degrees) const;
31 
32  // Approximate radius of the Earth in meters
33  double earthRadiusMeters() const;
34 
35  // Initial geodetic coordinates
36 
37  double ref_lat_deg;
38  double ref_lon_deg;
40 
41  // Precompute values for efficiency
42  double cos_lat;
43 };
44 
45 #endif // SRC_MATH_GEODETIC_HPP
CoordinateConverter::degreesToRadians
double degreesToRadians(double degrees) const
Definition: geodetic.cpp:50
CoordinateConverter::cos_lat
double cos_lat
Definition: geodetic.hpp:42
CoordinateConverter::CoordinateConverter
CoordinateConverter()
Definition: geodetic.cpp:27
CoordinateConverter::earthRadiusMeters
double earthRadiusMeters() const
Definition: geodetic.cpp:54
CoordinateConverter::ref_lon_deg
double ref_lon_deg
Definition: geodetic.hpp:38
CoordinateConverter::ref_lat_deg
double ref_lat_deg
Definition: geodetic.hpp:37
CoordinateConverter
Definition: geodetic.hpp:20
CoordinateConverter::setInitialValues
void setInitialValues(double lat, double lon, double alt)
Definition: geodetic.cpp:29
CoordinateConverter::ref_alt_meters
double ref_alt_meters
Definition: geodetic.hpp:39
CoordinateConverter::enuToGeodetic
void enuToGeodetic(double enu_x, double enu_y, double enu_z, double *lat, double *lon, double *alt) const
Definition: geodetic.cpp:38


inno_vtol_dynamics
Author(s): Roman Fedorenko, Dmitry Ponomarev, Ezra Tal, Winter Guerra
autogenerated on Mon Dec 9 2024 03:13:35