forked from mpusz/mp-units
feat: dimensionless quantities with a unit one are not special anymore
This commit is contained in:
@@ -124,7 +124,7 @@ constexpr state<Q1, Q2, Q3> state_update(const state<Q1, Q2, Q3>& predicted, QM
|
||||
template<mp_units::Quantity Q, mp_units::QuantityOf<mp_units::dimensionless> K>
|
||||
constexpr Q covariance_update(Q uncertainty, K gain)
|
||||
{
|
||||
return (1 - gain) * uncertainty;
|
||||
return (1 * mp_units::one - gain) * uncertainty;
|
||||
}
|
||||
|
||||
// state extrapolation
|
||||
|
||||
@@ -121,7 +121,7 @@ int main()
|
||||
|
||||
const QuantityOf<isq::mass_change_rate> auto input_flow_rate = measured_mass / fill_time;
|
||||
const QuantityOf<isq::speed> auto float_rise_rate = fill_level / fill_time;
|
||||
const QuantityOf<isq::time> auto fill_time_left = (height / fill_level - 1) * fill_time;
|
||||
const QuantityOf<isq::time> auto fill_time_left = (height / fill_level - 1 * one) * fill_time;
|
||||
|
||||
const auto fill_ratio = fill_level / height;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user