dimval 0.2.0
Modern C++23 header-only library of dimensional values (units, measures, ranges)
Loading...
Searching...
No Matches
mechanics.hpp
Go to the documentation of this file.
1#pragma once
2
7
8#include <dimval/define.hpp>
11#include <dimval/units/si.hpp>
12
14 ::dimval::MeterPerSecond,
15 "speed",
16 "Speed",
17 ::comms::Icons::mdi::speedometer,
18 ::comms::Colors::mui::light_green[400])
19
20DIMVAL_DEFINE_MEASURE(Acceleration,
21 ::dimval::MeterPerSecondSquared,
22 "acceleration",
23 "Acceleration",
24 ::comms::Icons::mdi::axis_arrow,
25 ::comms::Colors::mui::red[400])
26
28 ::dimval::SquareMeter,
29 "area",
30 "Area",
31 ::comms::Icons::mdi::vector_square,
32 ::comms::Colors::mui::green[400])
33
35 ::dimval::KilogramPerCubicMeter,
36 "density",
37 "Density",
38 ::comms::Icons::mdi::weight_kilogram,
39 ::comms::Colors::mui::brown[400])
40
42 ::dimval::Litre,
43 "volume",
44 "Volume",
45 ::comms::Icons::mdi::water_outline,
46 ::comms::Colors::mui::blue_grey[400])
47
49 ::dimval::Pascal,
50 "pressure",
51 "Pressure",
52 ::comms::Icon::from("ph:gauge"),
53 ::comms::Colors::mui::blue_grey[500])
54
56 ::dimval::Newton,
57 "force",
58 "Force",
59 ::comms::Icons::mdi::arrow_right_bold,
60 ::comms::Colors::mui::blue_grey[500])
Macros that expand into a CRTP unit/measure struct and a runtime auto-registration for it.
#define DIMVAL_DEFINE_MEASURE(Tag, BaseUnit, Id, Name, Icon, Color,...)
Define a measure struct in ::dimval and auto-register its descriptor.
Definition define.hpp:102
Practical / accepted units that mostly carry their own kind: clock drift, rotational frequency,...
Canonical SI units (base + derived) and accepted/practical alts.
Mechanics units: acceleration, area, density.