Commit Graph

234 Commits

Author SHA1 Message Date
Mateusz Pusz
f06e8898ae refactor: capacitor_time_curve refactored for V2 2022-12-20 10:43:55 +01:00
Mateusz Pusz
dd8a0a9697 feat: electromagnetic SI constants added 2022-12-20 10:42:13 +01:00
Mateusz Pusz
eaaee2e305 refactor: total_energy example refactored for V2 2022-12-19 20:44:18 +01:00
Mateusz Pusz
92c70f1a4e feat: quantity_spec support added 2022-12-16 18:15:48 +01:00
Mateusz Pusz
e0101f14d9 refactor(example): avg_speed example refactored for V2 2022-12-04 15:06:53 +01:00
Mateusz Pusz
e7fff94d7c refactor(example): hello_units refactored 2022-11-30 18:36:16 +01:00
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