Commit Graph

82 Commits

Author SHA1 Message Date
Matthias Grob fd04ece6d4 geo: remove dependency on drv_hrt time driver 2024-10-07 14:24:18 +02:00
BazookaJoe1900 4d83badba1 fix files tags on the header comments (#23564) 2024-09-19 09:25:18 +03:00
GuillaumeLaine 63495ddac3 geo: correct unit test 2024-02-27 09:05:39 +01:00
Roman Bapst dd2322d622 Added PerformanceModel for fixed wing (#22091)
* created a Performance Model for fixed wing vehicle
- added compensation for maximum climbrate, minimum sinkrate, minimum airspeed and trim airspeed based on weight ratio and air density
- added atmosphere lib to standard atmosphere calculations


---------

Signed-off-by: RomanBapst <bapstroman@gmail.com>
Co-authored-by: Thomas Stastny <thomas.stastny@auterion.com>
2023-11-21 17:13:50 +01:00
Mohamad Akkawi 9de52bb5ec [navigator] Tone Down traffic warnings
- add unit tests for adsb conflict detection
- move adsb conflict detection to lib/adsb and adsb conflict class
- use containers/Array.hpp for buffer array
- expand fake_traffic
2023-03-16 07:32:43 +01:00
Ville Juven 59e86c490d Remove include <log.h> from defines.h
The reason for this is that log.h includes drv_hrt.h which sucks in
half the project's include files with it, which causes strange build
issues
2022-09-29 07:56:24 +02:00
Matthias Grob 10ceea2fe6 geo: refactoring on comments and usage 2021-12-06 14:30:14 +01:00
Thomas Debrunner 8db7a6225b geo: Moved the map_projection_* functions and state into a self-contained C++ class 2021-12-06 14:30:14 +01:00
bresch 5874b1f87c mc atune: add module to all targets
- adjust flash constrianed targets to fit
2021-10-02 18:12:05 -04:00
Daniel Agar 2cf66a5d8f ekf2: move EKF out of ecl 2021-07-15 10:38:24 -04:00
Daniel Agar 883624d915 lib/geo: move from ecl 2021-07-15 10:38:24 -04:00
Daniel Agar 29b3950747 move geo and geo_lookup to PX4/ecl 2018-03-26 23:16:55 -04:00
Daniel Agar b4755297ec delete control_state and cleanup vehicle_attitude (#7882) 2017-09-21 16:24:53 -04:00
Lorenz Meier 91c982758e GEO: Fix double promotion warning 2017-08-01 12:46:59 +02:00
Daniel Agar 4b8bedef48 avoid double promotions 2017-04-01 20:19:28 +02:00
Daniel Agar fa3b3df061 astyle src/lib/geo 2017-01-29 01:18:32 +01:00
Carlo Wood 90f3e3b5d3 Do not include headers inside __BEGIN_DECLS ... __END_DECLS blocks.
We don't have C++ unsafe headers (anymore).

I added a test to fix_headers.sh that checks if certain "unsafe"
headers are ONLY included inside a __BEGIN_DECLS ... __END_DECLS
(because after all, they are unsafe), as well as checking that
no other header files are included inside such a block. The rationale
of the latter is that if a file is a C header and it declares
function prototypes (otherwise it doesn't matter) and is sometimes
included outside a __BEGIN_DECLS ... __END_DECLS block (from a C++
source file) then it has to be C++ safe and doesn't ever to be
included from inside such a block; while if a file is a C++ header
then obviously it should never be included from such a block.

fix_headers.sh subsequently found several safe headers to be
included from inside such a block, and those that were (apparently
in the past) unsafe were included only sometimes inside such a
block and often outside it. I had a look at those files and saw
that at least an attempt has been made to make them C++ safe,
but especially because they already are included OFTEN outside
a __BEGIN_DECLS ... __END_DECLS (from C++ source files) the
best decision seems to treat them as safe.

This is not risky: .c files that define such functions still
generate C-linkage for their functions. If a C++ unsafe C header
is included outside a __BEGIN_DECLS ... __END_DECLS block then
the only possible result would be an undefined reference to
a function with C++-linkage that will not exist. Aka, when
something links after this commit, then the commit was correct.
I did build all targets and they all linked.
2016-10-28 11:57:08 +02:00
Peter Duerr 6b78b72ab2 Fix code style according to astyle 2015-12-04 14:53:59 +09:00
Peter Duerr c070d326e0 Avoid violation of acos' domain in map_projection
* There are pathological cases (e.g., setpoint very close to reference
  for certain reference latitudes), where numerical errors lead to a sum
  larger than 1.0 passed to acos, resulting in NaN values.

This should fix issue #2813
2015-12-04 14:14:31 +09:00
Lorenz Meier 352b1692d1 Geo lib: Do not hardcode assumptions about process name. 2015-11-22 14:00:31 +01:00
tumbili 154fa07a46 fixes after review 2015-11-17 22:28:09 +01:00
Roman c989c21269 fixed geo functions 2015-11-17 22:28:09 +01:00
Roman e48cf53ce8 fix code style 2015-11-17 22:28:09 +01:00
Andreas Antener 5b1c7321e7 reverted navigation on landing back to old heading hold 2015-11-17 22:28:09 +01:00
Roman 896dff40cf added geo functions to create new waypoints from given setting 2015-11-17 22:28:09 +01:00
Lorenz Meier af1fe6ab9b Geo lib: Fix code style 2015-10-19 13:48:23 +02:00
Lorenz Meier fa5071b3c5 Remove module.mk files to prevent confusion of adopters upgrading 2015-10-06 11:23:20 +02:00
James Goppert 1d6b31d196 Switch to cmake build system. 2015-09-07 20:37:45 -04:00
Mark Charlebois 62f8bd6679 Linux build support for some libs
The following libs can now be built under Linux:

   lib/mathlib
   lib/geo
   lib/geo_lookup

The constants used for ROS are now shared with Linux in
px4_defines.h

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:57:01 -07:00
Mark Charlebois 9758112e31 Use px4_config.h instead of nuttx/config.h
Modified code to use OS independent header file for config settings.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:55:41 -07:00
Thomas Gubler 5056b03ab0 geo: fix include 2015-01-06 19:14:01 +01:00
Thomas Gubler 9520983e08 lots' of header juggling and small changes to make mc att control compile for NuttX and ROS 2014-12-16 08:24:51 +01:00
Lorenz Meier b7b4804791 GEO: fix compile warnings 2014-10-11 00:28:48 +02:00
Thomas Gubler 5baf9cea0d geo: fix some warnings 2014-08-11 15:29:59 +02:00
Thomas Gubler af1ad04c23 Merge remote-tracking branch 'origin/master' into geo 2014-08-11 13:37:08 +02:00
Don Gagne 278aafe939 Bring everything up to double 2014-07-06 11:06:14 -07:00
Don Gagne b9299e68d4 Compiler warning fixes 2014-07-05 13:35:12 -07:00
Lorenz Meier 34c13df3dd geo: Fix a series of warnings, some which actually pointed to real issues 2014-07-01 09:50:48 +02:00
Lorenz Meier efc992b4d9 Merged master into geo 2014-07-01 09:34:26 +02:00
Don Gagne 92adbe9216 Fix compiler warnings 2014-06-29 17:47:24 -07:00
Lorenz Meier 2bd5511d09 geo lookup lib: Moved to separate module and compiling with -Os to save some precious flash 2014-06-28 12:37:26 +02:00
Thomas Gubler a43e963bdb geo: fix logic of globallocal converter initialization to depend on map projection initialization 2014-05-30 16:09:52 +02:00
Thomas Gubler e0042ec12c geo: add functions to get global projection/transformation reference values 2014-05-22 13:26:15 +02:00
Anton Babushkin bd9d58f565 attitude_estimator_ekf: auto detect mag declination using GPS coordinates 2014-05-12 23:06:45 +02:00
Thomas Gubler 548c7f4aaf geo: introduce global/local coordinate frame converter which uses the map projection but also converts altitude 2014-05-06 14:56:47 +02:00
Thomas Gubler fc204a1890 geo: map projection: fix stupid typo and use constants for deg to rad conversion 2014-05-06 13:14:15 +02:00
Thomas Gubler f24a6187b6 geo: map projection: fix variable name to highlight the unit 2014-05-06 11:24:33 +02:00
Thomas Gubler 6e0690fde1 init global map projection when gps is valid 2014-05-05 16:44:02 +02:00
Thomas Gubler 474a76b553 Merge remote-tracking branch 'upstream/master' into geo 2014-05-05 14:42:46 +02:00
Lorenz Meier 5429b82ae0 Fix last data type and casting compiler nuisances 2014-04-30 08:53:22 +02:00