Consider $2n$ coordinates $x_1,\ldots,x_n,y_1,\ldots,y_n$ and the quadratic form $q = \sum_{i=1}^n x_i y_i$. Now call $O(q,A)$ (orthogonal group of $q$) the group of $(2n)\times(2n)$ matrices, with coefficients in a commutative ring $A$, which preserve $q$. (This is an algebraic group over $\mathop{\mathrm{Spec}}\mathbb{Z}$.) When $A$ is a field of characteristic $\neq 2$, the determinant restricted to $O(q,A)$ takes its values in $\{\pm 1\}$, its kernel $O(q,A) \cap SL(2n,A)$ defines a subgroup $SO(q,A)$ of index $2$. When $A$ is a field of characteristic $2$, the determinant is identically $1$ on $O(q,A)$ but there is still a subgroup of index $2$, which one might still denote $SO(q,A)$, defined by the so-called "Dickson invariant", also known as quasideterminant or pseudodeterminant, and it is relatively straightforward to give an explicit polynomial in the coefficients of $A$ which defines an equation of $SO(q,A)$ inside $O(q,A)$ (see, Dickson's book, Linear Groups, theorem 205 on page 206).
Now for an arbitrary ring $A$, there is still a subgroup $SO(q,A)$ of $O(q,A)$, which is the kernel of a morphism $\deg$ of $O(q,A)$ to the group $(\mathbb{Z}/2\mathbb{Z})(A)$ of idempotents of $A$ (so, when $A$ is connected, $SO(q,A)$ is a subgroup of order $2$) natural in $A$ and which coincides with $\frac{1}{2}(1-\det)$ when $2$ is invertible in $A$ and with Dickson's invariant when $2$ is zero in $A$. This is due to H. Bass ("Commutative Algebras and Spinor Norms over a Commutative Rings", Amer. J. Math. 96 (1974), 156–206).
Concretely, this means that there exists a polynomial $\deg$ in $4n^2$ variables over $\mathbb{Z}$ such that, modulo the ideal $I$ of relations defining $O(q,A)$, we have $\deg^2 = \deg$ and $\det = 1-2\deg$. And $I_0 := I+(\deg)$ is the ideal defining $SO(q,A)$.
My question is: can one give an explicit expression of $\deg$ (as a polynomial in $4n^2$ variables), or perhaps an explicit set of equations of $SO(q,A)$ (e.g., Gröbner basis of $I_0$ for some term order)? (At least for the particular quadratic form $q = \sum_{i=1}^n x_i y_i$ if not in general.)