playing with named derived units to allow knots to be deduced from
nautical miles & hours but be called knot instead of mi(naut) / h
This commit is contained in:
1 parent
aa84dcb9ef
commit
c97a438807
4 files changed
+29
-11
No files matched your search
@@ -35,7 +35,7 @@ struct foot_poundal : unit<foot_poundal> {};
|
||||
struct dim_energy : physical::dim_energy<dim_energy, foot_poundal, dim_force, dim_length> {};
|
||||
|
||||
// https://en.wikipedia.org/wiki/Foot-pound_(energy)
|
||||
struct foot_pound_force : named_deduced_unit<foot_pound_force, dim_energy, pound_force, foot> {};
|
||||
struct foot_pound_force : noble_deduced_unit<foot_pound_force, dim_energy, pound_force, foot> {};
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ using pressure = quantity<dim_pressure, U, Rep>;
|
||||
|
||||
struct pound_force_per_foot_sq : named_scaled_unit<pound_force_per_foot_sq, "lbf ft2", si::prefix, ratio<32'174'049, 1'000'000>, poundal_per_foot_sq> {};
|
||||
|
||||
// struct pound_force_per_foot_sq : named_deduced_unit<pound_force_per_foot_sq, dim_pressure, pound_force, square_ft> {};
|
||||
// struct pound_force_per_foot_sq : noble_deduced_unit<pound_force_per_foot_sq, dim_pressure, pound_force, square_ft> {};
|
||||
|
||||
struct pound_force_per_inch_sq : named_scaled_unit<pound_force_per_inch_sq, "psi", si::prefix, ratio<1, 144>, pound_force_per_foot_sq> {};
|
||||
|
||||
|
||||
@@ -37,9 +37,9 @@ using speed = quantity<dim_speed, U, Rep>;
|
||||
|
||||
struct mile_per_hour : deduced_unit<mile_per_hour, dim_speed, mile, hour>{};
|
||||
|
||||
struct nautical_mile_per_hour : deduced_unit<nautical_mile_per_hour, dim_speed, nautical_mile, hour>{};
|
||||
struct nautical_mile_per_hour :named_deduced_derived_unit<nautical_mile_per_hour, dim_speed, "knot", no_prefix, nautical_mile, hour>{};
|
||||
|
||||
struct knot : alias_unit<nautical_mile_per_hour, "knot", si::prefix> {};
|
||||
struct knot : alias_unit<nautical_mile_per_hour, "knot", no_prefix> {};
|
||||
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
Reference in new issue
Block a user