Skip to content

QuanityKind and Altitudes #457

Closed Answered by mpusz
jasonbeach asked this question in Q&A
May 9, 2023 · 2 comments · 18 replies
Discussion options

You must be logged in to vote

@jasonbeach, as I mentioned, the library framework can do only as much. The conversions have to be known at compile time. However, as I stated, you can easily add runtime conversion functions to your projects. For example you can do it this way:

#include <mp_units/iostream.h>
#include <mp_units/quantity_point.h>
#include <mp_units/systems/international/international.h>
#include <mp_units/systems/isq/space_and_time.h>
#include <mp_units/systems/si/unit_symbols.h>
#include <iostream>

using namespace mp_units;

// clang-format off
inline constexpr struct mean_sea_level : absolute_point_origin<isq::altitude> {} mean_sea_level;
inline constexpr struct height_above_launch : absolute_point_orig…

Replies: 2 comments 18 replies

Comment options

You must be logged in to vote
8 replies
@jasonbeach
Comment options

@JohelEGP
Comment options

@mpusz
Comment options

Answer selected by jasonbeach
@mpusz
Comment options

@mpusz
Comment options

@jasonbeach
Comment options

@mpusz
Comment options

Comment options

You must be logged in to vote
10 replies
@JohelEGP
Comment options

@jasonbeach
Comment options

@mpusz
Comment options

@mpusz
Comment options

@JohelEGP
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants