More affine spaces #647
Labels
design
Design-related discussion
high priority
EXTRA URGENT
question
Further information is requested
Milestone
We have long supported The Affine Space abstraction. We have
quantity
andquantity_point
.Abstractions in ISQ
However, it turns out that is not the only abstraction level where we observe affine spaces. When we look closer at ISQ, we can see some examples as well.
height
andaltitude
altitudes
does not make sense,altitude
fromheight
does not make sense as well,height
fromaltitude
is analtitude
,height
andaltitude
is analtitude
.Those are provided as aliased quantities in the ISQ.
displacement
andposition_vector
position_vectors
does not make sense,position_vector
fromdisplacement
does not make sense as well,displacement
fromposition_vector
is aposition_vector
,displacement
andposition_vector
is aposition_vector
.Those are separate quantities in the ISQ.
duration
andtime
times
does not make sense,time
fromduration
does not make sense as well,duration
fromtime
istime
,duration
andtime
istime
.time
is not defined at ISQ at all (even though it is mentioned in Part 1 as a base quantity and referred to in some parts as defined in ISO 80000-3).What to do?
Now the question is, what can/should we do with it?
altitudes
orposition_vectors
. The same applies to one of their subtractions. Should we disallow that?isq::altitude(4 * m) - isq::altitude(2 * m) -> isq::height(2 * m)
)?common_type
ofaltitude
andheight
bealtitude
?altitude
to be used only withquantity_point
andheight
forquantity
? This will automatically solve all the above math problems, as this has already been modeled in the library. However, we can't do arithmetic onquantity_point
. If there is an operation that requires a point (e.g., usage ofposition_vector
inmoment_of_force
), we would need to doqp.quantity_from_zero()
. However, this should also return a quantity ofdisplacement
(and notposition_vector
), which will violate the requirements of the equation ofmoment_of_force
.Note 1: The above means that we need to diverge from ISQ and define
altitude
as a different quantity thanheight
.Note 2: Looking at the hierarchy tree provided in another thread #646 (comment), we can see that it does not allow doing arithmetics on vector quantities of
displacement
andposition_vector
as those do not share a common node that would also be of avector
type. So we need to think about how to provide both:The text was updated successfully, but these errors were encountered: