diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 4c6fb581..475ca826 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -86,12 +86,13 @@ add_custom_command(OUTPUT "${SPHINX_INDEX_FILE}" "${CMAKE_CURRENT_SOURCE_DIR}/examples/capacitor_time_curve.rst" "${CMAKE_CURRENT_SOURCE_DIR}/examples/clcpp_response.rst" "${CMAKE_CURRENT_SOURCE_DIR}/examples/conversion_factor.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/examples/foot_pound_second.rst" "${CMAKE_CURRENT_SOURCE_DIR}/examples/hello_units.rst" "${CMAKE_CURRENT_SOURCE_DIR}/examples/kalman_filter-alpha_beta_filter_example2.rst" "${CMAKE_CURRENT_SOURCE_DIR}/examples/linear_algebra.rst" "${CMAKE_CURRENT_SOURCE_DIR}/examples/measurement.rst" "${CMAKE_CURRENT_SOURCE_DIR}/examples/total_energy.rst" - + "${CMAKE_CURRENT_SOURCE_DIR}/faq.rst" "${CMAKE_CURRENT_SOURCE_DIR}/framework.rst" @@ -151,6 +152,21 @@ add_custom_command(OUTPUT "${SPHINX_INDEX_FILE}" "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/dimensions_and_concepts.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/fps.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/fps/length.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/fps/acceleration.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/fps/area.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/fps/density.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/fps/energy.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/fps/force.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/fps/length.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/fps/mass.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/fps/power.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/fps/pressure.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/fps/speed.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/fps/time.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/fps/volume.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/iau.rst" "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/iau/length.rst" diff --git a/docs/_static/img/units.png b/docs/_static/img/units.png index 7fd36576..40727db1 100644 Binary files a/docs/_static/img/units.png and b/docs/_static/img/units.png differ diff --git a/docs/examples.rst b/docs/examples.rst index 0faff276..0ef41cfd 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -10,6 +10,7 @@ Examples examples/unknown_dimension examples/measurement examples/linear_algebra + examples/foot_pound_second examples/capacitor_time_curve examples/clcpp_response diff --git a/docs/examples/foot_pound_second.rst b/docs/examples/foot_pound_second.rst new file mode 100644 index 00000000..23c694e9 --- /dev/null +++ b/docs/examples/foot_pound_second.rst @@ -0,0 +1,7 @@ +foot_pound_second +================= + +.. literalinclude:: ../../example/foot_pound_second.cpp + :caption: foot_pound_second.cpp + :start-at: #include + :linenos: diff --git a/docs/framework/units.rst b/docs/framework/units.rst index a16fbaa7..58e19d0b 100644 --- a/docs/framework/units.rst +++ b/docs/framework/units.rst @@ -300,8 +300,21 @@ does not exist at all. With it `si::kilometre_per_hour` can be defined as:: } -Please note that this is the only unit-related class template that takes -a dimension as its parameter. This derived dimension provides a :term:`recipe` +In case the deduced unit should served as a named one we can use ether a +`named_deduced_unit` where the user is able to provide a symbol for the unit +by him/her-self or `noble_deduced_unit` where the symbol is the deduced name +based on the ingredients:: + + namespace fps { + + struct nautical_mile_per_hour : named_deduced_unit{}; + struct foot_pound_force : noble_deduced_unit {}; + + } + +Please note that deduced units are the only unit-related class template that +take a dimension as its parameter. This derived dimension provides a :term:`recipe` used for its definition. Based on the information stored in the recipe (order, type, and exponents of composite dimensions) and the ratios of units provided in the template parameter list after the derived dimension parameter, @@ -353,6 +366,8 @@ of a `scaled_unit` class template: [scaled_unit]<:-[named_scaled_unit] [scaled_unit]<:-[prefixed_unit] [scaled_unit]<:-[deduced_unit] + [scaled_unit]<:-[noble_deduced_unit] + [scaled_unit]<:-[named_deduced_unit] [scaled_unit]<:-[alias_unit] [scaled_unit]<:-[prefixed_alias_unit] diff --git a/docs/reference/core/types/units.rst b/docs/reference/core/types/units.rst index 65a35484..c7ad4b1d 100644 --- a/docs/reference/core/types/units.rst +++ b/docs/reference/core/types/units.rst @@ -19,6 +19,12 @@ Units .. doxygenstruct:: units::deduced_unit :members: +.. doxygenstruct:: units::noble_deduced_unit + :members: + +.. doxygenstruct:: units::named_deduced_unit + :members: + .. doxygenstruct:: units::alias_unit :members: diff --git a/docs/reference/systems/physical.rst b/docs/reference/systems/physical.rst index 19cae654..b28dd665 100644 --- a/docs/reference/systems/physical.rst +++ b/docs/reference/systems/physical.rst @@ -10,6 +10,7 @@ Physical physical/international physical/us physical/imperial + physical/fps physical/iau physical/typographic physical/natural diff --git a/docs/reference/systems/physical/fps.rst b/docs/reference/systems/physical/fps.rst new file mode 100644 index 00000000..31308a5e --- /dev/null +++ b/docs/reference/systems/physical/fps.rst @@ -0,0 +1,18 @@ +FPS +=== + +.. toctree:: + :maxdepth: 2 + + fps/acceleration + fps/area + fps/density + fps/energy + fps/force + fps/length + fps/mass + fps/power + fps/pressure + fps/speed + fps/time + fps/volume diff --git a/docs/reference/systems/physical/fps/acceleration.rst b/docs/reference/systems/physical/fps/acceleration.rst new file mode 100644 index 00000000..53b59605 --- /dev/null +++ b/docs/reference/systems/physical/fps/acceleration.rst @@ -0,0 +1,4 @@ +Acceleration +============ + +.. doxygenfile:: fps/acceleration.h diff --git a/docs/reference/systems/physical/fps/area.rst b/docs/reference/systems/physical/fps/area.rst new file mode 100644 index 00000000..4e67f9f0 --- /dev/null +++ b/docs/reference/systems/physical/fps/area.rst @@ -0,0 +1,4 @@ +Area +==== + +.. doxygenfile:: fps/area.h diff --git a/docs/reference/systems/physical/fps/density.rst b/docs/reference/systems/physical/fps/density.rst new file mode 100644 index 00000000..81244e83 --- /dev/null +++ b/docs/reference/systems/physical/fps/density.rst @@ -0,0 +1,4 @@ +Density +======= + +.. doxygenfile:: fps/density.h diff --git a/docs/reference/systems/physical/fps/energy.rst b/docs/reference/systems/physical/fps/energy.rst new file mode 100644 index 00000000..95e41248 --- /dev/null +++ b/docs/reference/systems/physical/fps/energy.rst @@ -0,0 +1,4 @@ +Energy +====== + +.. doxygenfile:: fps/energy.h diff --git a/docs/reference/systems/physical/fps/force.rst b/docs/reference/systems/physical/fps/force.rst new file mode 100644 index 00000000..b5bfa94c --- /dev/null +++ b/docs/reference/systems/physical/fps/force.rst @@ -0,0 +1,4 @@ +Force +===== + +.. doxygenfile:: fps/force.h diff --git a/docs/reference/systems/physical/fps/length.rst b/docs/reference/systems/physical/fps/length.rst new file mode 100644 index 00000000..7d90dc3f --- /dev/null +++ b/docs/reference/systems/physical/fps/length.rst @@ -0,0 +1,4 @@ +Length +====== + +.. doxygenfile:: fps/length.h diff --git a/docs/reference/systems/physical/fps/mass.rst b/docs/reference/systems/physical/fps/mass.rst new file mode 100644 index 00000000..cf6295f5 --- /dev/null +++ b/docs/reference/systems/physical/fps/mass.rst @@ -0,0 +1,4 @@ +Mass +==== + +.. doxygenfile:: fps/mass.h diff --git a/docs/reference/systems/physical/fps/power.rst b/docs/reference/systems/physical/fps/power.rst new file mode 100644 index 00000000..2bb49e3a --- /dev/null +++ b/docs/reference/systems/physical/fps/power.rst @@ -0,0 +1,4 @@ +Power +===== + +.. doxygenfile:: fps/power.h diff --git a/docs/reference/systems/physical/fps/pressure.rst b/docs/reference/systems/physical/fps/pressure.rst new file mode 100644 index 00000000..e97bb249 --- /dev/null +++ b/docs/reference/systems/physical/fps/pressure.rst @@ -0,0 +1,4 @@ +Pressure +======== + +.. doxygenfile:: fps/pressure.h diff --git a/docs/reference/systems/physical/fps/speed.rst b/docs/reference/systems/physical/fps/speed.rst new file mode 100644 index 00000000..6631ae67 --- /dev/null +++ b/docs/reference/systems/physical/fps/speed.rst @@ -0,0 +1,4 @@ +Speed +===== + +.. doxygenfile:: fps/speed.h diff --git a/docs/reference/systems/physical/fps/time.rst b/docs/reference/systems/physical/fps/time.rst new file mode 100644 index 00000000..d53013c8 --- /dev/null +++ b/docs/reference/systems/physical/fps/time.rst @@ -0,0 +1,4 @@ +Time +==== + +.. doxygenfile:: fps/time.h diff --git a/docs/reference/systems/physical/fps/volume.rst b/docs/reference/systems/physical/fps/volume.rst new file mode 100644 index 00000000..8a9ebe5d --- /dev/null +++ b/docs/reference/systems/physical/fps/volume.rst @@ -0,0 +1,4 @@ +Volume +====== + +.. doxygenfile:: fps/volume.h