Commit Graph

428 Commits

Author SHA1 Message Date
Mateusz Pusz b4828d243d refactor: first examples refactored for V2 2022-11-11 10:33:24 -10:00
Mateusz Pusz 3d1f339115 refactor: reference now takes NTTPs rather then types
Even though it makes error logs a bit more obscure it simplifies coding a lot.
2022-11-08 10:37:41 -10:00
Mateusz Pusz 4938e9d5c0 feat: Added support for natural units-like systems + dimension_one cleanup 2022-11-04 19:29:05 +01:00
Mateusz Pusz cb861dd81a feat: system's definition highly simplified by removing the need for a system_reference for most cases 2022-10-25 07:27:08 +02:00
Mateusz Pusz ec1dace1f9 feat: PrefixableUnit concept introduced 2022-10-19 13:15:02 +02:00
Mateusz Pusz a5c7934e0e refactor: units nearly done 2022-10-18 21:24:09 +02:00
Mateusz Pusz cf0a770d9b refactor: quantity arithmetics implemented 2022-10-09 21:32:38 +01:00
Mateusz Pusz 4a49bdda05 refactor: V2 design update 2022-10-06 23:43:01 +01:00
Mateusz Pusz 806fb0751b refactor: short_units renamed to unit_symbols 2022-09-10 08:44:46 +02:00
Mateusz Pusz b614a8c887 refactor: all dimension types now have _dim as a suffix 2022-09-09 15:22:35 +02:00
Mateusz Pusz 9d3a144551 test: a few more tests added to the framework v2 example 2022-09-09 15:18:49 +02:00
Mateusz Pusz 1c7ea89771 refactor: short units inlined subnamespaces introduced to limit possible name clashes 2022-09-09 11:50:47 +02:00
Mateusz Pusz 1a2c215578 refactor: derived dimensions now can be used in the equations but will not be visible in the final type 2022-09-09 11:46:08 +02:00
Mateusz Pusz a3d4c8f01f refactor: derived_dimension can now store only powers of base dimensions 2022-09-08 23:07:14 +02:00
Mateusz Pusz 8d711cdf8e fix: hello_units reverted to the original state 2022-09-08 19:21:47 +02:00
Mateusz Pusz daf97a3a86 feat: initial very dirty version of V2 framework 2022-09-08 19:11:45 +02:00
Mateusz Pusz abc429a71a refactor: rotation angle unit renamed to revolution 2022-09-05 12:12:12 +02:00
Mateusz Pusz 89a9551da0 feat(example): asin() usage added to the glide computer example 2022-09-02 20:08:14 +02:00
Mateusz Pusz 7719776711 feat: gradian support added 2022-09-01 10:48:34 +02:00
Mateusz Pusz c761601866 refactor(example): latitude and longitude now use angular degrees quantity 2022-08-31 12:58:57 +02:00
Mateusz Pusz 7caf14b8fe feat(example): angle examples extended with degrees and rotations 2022-08-31 12:57:56 +02:00
Mateusz Pusz 02bf37abc4 build(example): Disabled Kalman examples 6-8 for AppleClang (example 5 enabled)
Resolves #382
2022-08-10 11:20:29 +02:00
Mateusz Pusz 11c43e0412 build(example): Kalman examples 5 and 6 disabled for AppleClang
Resolves #382
2022-08-10 09:47:33 +02:00
Mateusz Pusz dd4679459d feat: hypot support added 2022-08-03 12:29:49 +02:00
Mateusz Pusz 0ebf85b9db fix: unknown_coherent_unit fixed 2022-08-01 11:59:00 +02:00
Chip Hogg ea83af8aa9 Rename as_magnitude<...>() to mag<...>()
This is easier to write and to read.
2022-07-29 01:46:06 +00:00
Chip Hogg 7fd6913b73 Replace exp with 0 everywhere, and remove it
This lets us remove a ton of special-casing throughout the codebase, and
just generally makes things a lot simpler.

We also remove the ability to take rational powers of `ratio`, including
`sqrt` and `cbrt` helpers, because these are intrinsically ill-defined.

Fixes #369.
2022-07-20 00:52:37 +00:00
Chip Hogg 6a9dcb30de Migrate explicit-exp inputs 2022-07-20 00:52:36 +00:00
Chip Hogg ef9e6522ca Merge branch 'master' into chiphogg/switch-to-mag 2022-06-15 20:50:30 +00:00
Mateusz Pusz a1637ebac6 feat(example): si_constants example added 2022-05-22 19:51:35 +02:00
Mateusz Pusz 0acfc8aa86 refactor(example): are_derivatives renamed to are_time_derivatives in kalman examples 2022-05-22 19:49:55 +02:00
Chip Hogg 5fb468697b Merge branch 'master' into chiphogg/switch-to-mag 2022-05-12 16:12:01 +00:00
Mateusz Pusz 0a11ebacb7 chore(example): unused example/literals/custom_systems.cpp removed 2022-05-11 20:21:44 +02:00
Mateusz Pusz fddde26157 fix(example): clang-14 compilation fixed 2022-05-11 20:20:55 +02:00
Mateusz Pusz 32b36fb670 refactor: 💥 ! PrefixFamily support removed
It doesn't have much sense to restrict prefixes usage for most units and in many places we were wrong to do so already.
2022-05-11 11:59:33 +02:00
Mateusz Pusz 0b8e5c0dfe fix(example): foot_pound_second example now correctly uses international::knot which is typical for Marine industry
Resolves #357
2022-05-09 14:03:14 +02:00
Mateusz Pusz 954dc5d53e fix: missing typename added for clang-12 2022-04-22 13:27:11 +02:00
Mateusz Pusz 967c1c9ca9 fix: ranged_representation fixed for clang-12 2022-04-22 13:26:31 +02:00
Mateusz Pusz c598201d11 fix: ranged_representation refactored to work with older compilers 2022-04-22 13:07:01 +02:00
Mateusz Pusz bded48987d refactor(example): glide_computer now use dimensionless quantities with ranged_representation as rep 2022-04-21 21:25:54 +02:00
Mateusz Pusz 11521a5a96 feat(example): validated_type and ranged_representation example types added 2022-04-21 21:23:45 +02:00
Mateusz Pusz 999ff52d70 refactor: knot unit helper renamed to kn in FPS
Relates to #357
2022-04-19 18:48:46 +02:00
Chip Hogg 78bcb3b019 Remove troublesome ::ratio members
For some reason, MSVC seems to want to instantiate these, even though
nobody ever asks for them (as evidenced by the fact that the builds
passed on other architectures).
2022-04-12 00:35:17 +00:00
Chip Hogg d19b2803ce Migrate units from ratio to Magnitude
This commit is huge, but hopefully the cognitive load is not too bad.
The bulk of this commit is just some fairly mechanical updates from
`ratio` to `Magnitude`.  Other things to call out:

- `UnitRatio` goes away.  We don't need this concept, because Magnitude
  can't even _represent_ anything that doesn't satisfy it.

- I commented out some formatting test cases where the precise
  expression changes, but the number is completely equivalent.  We will
  need to decide how we want to handle Magnitude formatting as a
  separate, follow-on task.  But at least Magnitude gives us all the
  tools we'll need to do so!
2022-04-11 15:16:16 +00:00
Mateusz Pusz b221dace3f style: clang-format applied to the remaining files 2022-04-02 21:36:42 +02:00
Markus Hofbauer cf7a7ed17a check: run pre-commit on all files 2022-04-02 18:58:23 +02:00
Markus Hofbauer 4c127797da check: run pre-commit on all files 2022-03-18 16:12:21 +01:00
Mateusz Pusz 5668257fe1 build: Conan geerated target renamed to wg21_linear_algebra 2022-02-28 19:23:34 +01:00
Mateusz Pusz 0ce18dc3c7 feat: std::format usage enabled for VS2022 2021-11-15 16:28:26 +01:00
Mateusz Pusz 331024a199 refactor: simplified formatting of latitude and longitude 2021-11-11 07:45:46 +01:00