I am interested in representing vectors in $\mathbb{R}^n$ in a sign-invariant and efficient manner. That is, I am looking for a function $$f:\mathbb{R}^{n+1}\rightarrow\mathbb{R}^d$$ such that for $v\in\mathbb{R}^{n+1}$ it holds that $$f(v)=f(-v)$$ and $f(v)$ does not cause a loss of information, except about the sign. Based on my research, the best approach to do so is to consider $v$ as a tuple $(c,\xi)$ with $c\in\mathbb{R}$ and $\xi\in\mathbb{P}_n(\mathbb{R})$, so that $c$ decodes the length of $v$ and $\xi$ its orientation in $\mathbb{R}^{n+1}$.
I am interested in implementing this numerically. Representing $c$ is trivial, but representing $\xi$ is not. My current understanding is that the Whitney theorem provides the theoretical basis for a lower bound on $d$. I want $d$ to be as small as possible, while the computation effort to compute $f(v)$ should at the same time not be excessive.
This answer here provides an explicit formula (using all products $v_iv_j$ where $i\le j$) with $d=1+\frac{1}{2}n(n+3)$ and this paper here claims to have an explicit formula with $d=\frac{1}{2}n(n+3)$. As far as I understand, the Whitney theorem proves that it is possible to represent $\xi$ with roughly $2n$ dimensions. Also, it appears to me that there was a enormous amount of work in the second half of the 20th century to find low values of $d$ for all sorts of $n$.
However, I didn't quite manage to find a good survey on explicit methods to compute these embeddings. So my question is the following:
Does an explicit embedding of $\mathbb{P}_n(\mathbb{R})$ for arbitrary $n\ge 1$ exist, which embeds into $\mathbb{R}^l$ with $l$ being an affine function of $n$?
Edit: $f$ shall furthermore be continuous.