Commit Graph

53 Commits

Author SHA1 Message Date
Mateusz Pusz
45888ac44e Physical constants support redesigned 2020-03-17 17:13:18 +01:00
Andy Little
f6ab0aaf17 examples,alternative namespaces : update box_example and put alternative namespace definitions in local headers 2020-03-12 16:37:49 +01:00
Andy Little
8ceb224908 example, kalman filter : remove #include <iomanip> sinc mpusz/units uses format syntax for io now 2020-03-12 16:36:12 +01:00
Andy Little
79f81bfe39 example, kalman filter : use constexpr std::array rather than std::vector for measurements and track,
to make it harder for compiler to complain about existence of first element.
2020-03-12 16:36:12 +01:00
Mateusz Pusz
6a5f25750d UDL naming refactored 2020-03-10 20:53:53 +01:00
Mateusz Pusz
1865b92e90 Workaround for a stupid compiler reporting potential null-pointer dereference 2020-03-09 19:47:36 +01:00
Mateusz Pusz
e122d6baae avg_velocity renamed to avg_speed 2020-03-09 18:56:18 +01:00
Mateusz Pusz
af6358fbdb gcc-9 compilation fixed 2020-03-05 11:40:05 +01:00
Mateusz Pusz
4b33c0f7c5 Examples with an alternate way to create quantities refactored
- examples modified to provide a unified library look-and-feel
- originals moved to a dedicated subdirectory for further reference and comparison
2020-03-01 14:44:45 +01:00
Mateusz Pusz
0c5864cc87 Kalman filter slightly refactored + clang_format 2020-03-01 14:40:54 +01:00
Mateusz Pusz
63463e7a35 Total energy example slightly refactored 2020-02-24 20:46:21 +01:00
Mateusz Pusz
d53a5337f3 Total energy example extended with Natural Units 2020-02-24 19:16:28 +01:00
Mateusz Pusz
b9e7ffc90c total_energy fixed for gcc-9 2020-02-24 14:12:38 +01:00
Mateusz Pusz
64248c0752 Total energy example added 2020-02-23 17:40:18 +01:00
Andy Little
065323c7d7 1d aircraft α-β filter ( kalman filter tutorial from https://www.kalmanfilter.net/alphabeta.html#ex2 ) converted to mpusz/units 2020-02-22 22:10:45 +01:00
Mateusz Pusz
0c89df3980 unknown_unit renamed to unknown_coherent_unit 2020-02-22 09:37:40 +01:00
Mateusz Pusz
18620044c5 All UDLs are now prefixed with q_ 2020-02-17 15:56:06 +01:00
Mateusz Pusz
3be8ee921e Starship improvements after the latest gcc fixes 2020-02-12 09:48:04 +01:00
Mateusz Pusz
3a76c1de91 gcc10 compilation error fixed in conversion example 2020-01-14 12:55:07 +01:00
Mateusz Pusz
15e656aba6 clang-format on new examples 2020-01-14 12:50:30 +01:00
Andy Little
024f5a9c83 change const order
move in,ft,fathom,ft2,ft3,mph from us to international namespace
TODO distinguish units with different names for same values
2020-01-12 21:34:36 +01:00
Andy Little
c93136e81b physical/si/density : change UDL from kg_per_m3 to kgpm3 (and then fix example/box_example) 2020-01-12 21:34:36 +01:00
Andy Little
6ba2362af9 example , clcpp_response : clean up comments 2020-01-12 21:34:36 +01:00
Andy Little
3b0e445b4c Remove sandbox.cpp from repo
Examples/clcpp_response.cpp : removed debug #defines
2020-01-12 21:34:36 +01:00
Andy Little
283e9d81a3 Split the various non-si length units into their own namespaces.
new namespaces are
international ( combination of us and imperial + Canada etc)
iau  (https://www.iau.org/
imperial ( old imperial units)
typographical ( for sizes of printing fonts etc)

These namespace are based on some research , mainly on wikipedia.
Look in src/include/units/physical/si/length.h to see links to see the references to documentation justifying the change.

Unfortunately there are 3 foot units for example, an old imperial version, an old us version and an international version, which is more recent and attempts to unify the two previous ones. All versions have slight changes in value, so I opted to use the international version
The main change in the layout is that inch,foot and yard have been moved from us to international.

With this modification, I also modified the physical/us/area.hpp, volume.hpp and volume.hpp headers to refer to the international units.
This may not be correct, but if the modified us::foot (rather than international foot is used as a basis for these units, then
there is a ratio integer overflow during compilation, probably due to taking 3rd power of a ratio. After this commit. I will try to show that on another branch.
2020-01-12 21:34:36 +01:00
Andy Little
868842bd46 Third party examples : add box example
Add si::density quantity header .
Add si::resistance quantity header.
Update si::capacitance header with mF, uF, nF, pF.
Update si::voltage header with mV, uV, nV,pV
Third party example : add capacitor time curve example
Add incoherent length units, TODO  move them out from si header.
Third party examples : add clcpp_response showing effectivenes of typed units for physical quantity library
Third party examples : add conversion factor example
Add third party examples to cmake

Third party examples : box example : Add air_density constant for clarity remove explicit this-> and tidy up.
Third party examples : in clcpp response example, change base unit from km to m for single type or all units example.
Third party examples : conversion_factor , add inline constexpr to units_str function.
Third party examples : box_example, change quantity::unit syntax to quantity::unit<> to allow generic(default double) value_type.
examples : remove examples from third party to main examples directory. Update cmake.
physical/si/resistance.hpp : remove underscores from kiloohm etc, UDL collision with 'R' so prefix with underscore
2020-01-12 21:34:36 +01:00
Mateusz Pusz
3decaecb52 TODO comments clean-up 2019-12-17 20:15:38 +01:00
Mateusz Pusz
80a13b1a94 US system isolated from SI 2019-12-17 12:29:19 +01:00
Mateusz Pusz
b3ea3cdc91 hello_units compilation on gcc-9 fixed 2019-12-17 10:51:59 +01:00
Mateusz Pusz
75081bf566 hello_units example added 2019-12-17 10:48:54 +01:00
Mateusz Pusz
1b2d27a64c measurement example updated with a starship operator 2019-12-17 09:12:11 +01:00
Mateusz Pusz
fbf3ef8c4f Most of concepts moved to a new file + quantity.h split to smaller pieces 2019-12-12 13:17:31 +01:00
Mateusz Pusz
9d50ea6ab5 CGS case added to avg_speed example 2019-12-11 21:38:44 +01:00
Mateusz Pusz
6b4220100f quantity_cast refactored
- new version with ToD added
- <ToU, Rep> version removed
2019-12-08 16:24:29 +01:00
Mateusz Pusz
f31b26b5e5 Design cleanup
- unknown_unit added
- examples refactored
- base_type renamed to downcast_base_type
- scaled_unit renamed to named_scaled_unit
- detail::reference_unit renamed to scaled_unit
- quantity_test cleanup
2019-12-06 12:18:39 +01:00
Mateusz Pusz
fbbb28fdfd measurement example added 2019-11-16 18:30:44 +01:00
Mateusz Pusz
b2f33c6dfa Example and test package code changed to use text formatting 2019-10-19 00:08:25 +02:00
Mateusz Pusz
95028d10a7 gcc-10 enabled 2019-10-17 18:22:51 +02:00
Mateusz Pusz
c3d7359ca3 units removed from a std::experimental namespace 2019-09-18 21:55:16 -06:00
Mateusz Pusz
90a7dbe3fa quantity_cast<U, Rep> support added 2019-09-16 00:21:58 -06:00
Mateusz Pusz
7d70e6b1ce Predefined dimensions moved to a dedicated directory 2019-08-06 10:44:25 +02:00
Mateusz Pusz
b0c4a6c2a8 meter renamed to metre 2019-08-02 17:04:55 +02:00
Mateusz Pusz
9e74613a4a Leading underscore prefix removed from UDLs 2019-07-24 12:20:06 +02:00
Mateusz Pusz
98203afa29 units moved to std::experimental namespace 2019-07-24 11:58:15 +02:00
Mateusz Pusz
eeb4c9c951 Dimension template parameter removed from quantity 2019-07-19 13:49:49 +02:00
Mateusz Pusz
d78508a02f Refactored units definitions, added the remaining SI base units, refactored header includes 2019-04-09 21:31:09 +01:00
Mateusz Pusz
125ecc56c8 units package renamed to mp-units/mp::units 2019-04-07 08:33:13 +02:00
Mateusz Pusz
8d86d9401f units building and packaging redesigned + Travis CI support 2019-04-06 23:25:35 +02:00
Mateusz Pusz
6646051e65 Hand written concepts replaced with Casey Carter's repository 2019-04-05 17:43:42 +02:00
Mateusz Pusz
e0511669cf Concepts usage added to example 2018-10-16 15:41:00 +02:00