How to do integration of matrices on local fields? I'm currently reading Buzzard's note and trying to calculate the integral on page 5:
$$
S(f)(\mathrm{diag}(\varpi, 1)) = q^{-1/2} \int_N f \left( \begin{pmatrix} \varpi & \varpi n \\ 0 & 1 \end{pmatrix}  \right)  \mathrm{d}n.
$$
Here $f$ is the characteristic function on the double coset $\mathrm{GL}_2(\mathcal{O}_F) \begin{pmatrix} \varpi & 0 \\ 0 & 1 \end{pmatrix}  \mathrm{GL}_2(\mathcal{O}_F)$. So actually the $f$ here can be erased.
According to Buzzard's calculation, the integral
$$
\int_N \begin{pmatrix} \varpi & \varpi n \\ 0 & 1 \end{pmatrix} \mathrm{d}n = q,
$$
if I understand it correctly.
My question: How can I get this?
Attempts: It is my first time to really integrating matrices, so I am not quite familiar with such things. Can I just claim that
$$
\int_N f \left( \begin{pmatrix} \varpi & \varpi n \\ 0 & 1 \end{pmatrix} \right) \mathrm{d}n = \int_{F} \varpi n \mathrm{d}n  \quad ?
$$
It seems quite weird and I still do not know how to calculate the right hand side one. It seems that the only thing I know is that $\mathrm{d}x(\mathcal{O}_F)=1$ is a usual normalization of Haar measures on $F$ and given this normalization, the Haar measure is fixed.

Some notations: $F$ is a nonarchemedian local field with $\mathcal{O}_F$ as its ring of integer and $\varpi$ its uniformizer. $N$ consists of all upper triangular matrices.
 A: Here is how I get the calculation (I am writing this with $F=\mathbb{Q}_p$
in mind). Somehow I did not get the result as in the notes, due to a
normalisation of Haar measure on $N$ (the italic part described below)
so $N(\mathcal{O})$ has volume $1$. And I don't know where I got it wrong,
so allow me to post it here.

First, we need to define a Haar measure on $N$.
We do this by finding a left-invariant differential form on $N$ of top
dimension. Consider the matrix multiplication
$$
AX=\begin{pmatrix}
a & b \\ 0 & c 
\end{pmatrix}\begin{pmatrix}
x& y \\ 0 &z
\end{pmatrix}
=\begin{pmatrix} ax & ay+bz \\0 & cz
\end{pmatrix}
$$
Let $A=k[x,y,z,x^{-1},z^{-1}]$, the ring that defines $N$.
The space of (algebraic) differential forms on $N$ is the $A$-module generated by $dx,dy,dz$. Let $\omega = f dx\wedge dy\wedge dz$ be an
left $N$-invariant differential form. This means
$$
f(X)dx\wedge dy\wedge dz = f(AX) d(ax)\wedge d(ay+bz)\wedge d(cz)
=f(AX)a^2c dx\wedge dy\wedge dz
$$
So we want $f(X)=f(AX)a^2c$ for any $A,X\in N$, which we can take $f=x^{-2}z^{-1}$. So $x^{-2}z^{-1} dx\wedge dy\wedge dz$ is a left-invariant
top differential form on $N$.
Thus, one can define a Haar measure $dn$ on $N(F)$ by
$$
\int_{N(F)} f(n)dn:=\int_{x\in F^{\times}}\int_{y\in F}\int_{z\in F^{\times}} f(x,y,z) |x|_F^{-2}|z|_F^{-1}dxdydz
$$
Here $dx,dy,dz$ are Haar measures on $F$ with $\mathcal{O}$ being volume $1$. Then left-invariant property of
this measure follows from change of variables
formula for integral (which works over $p$-adic field).
We want to check if this Haar measure is normalised so that volume over
maximal compact $N(\mathcal{O})$ is $1$. So we need to compute
$$
\int_{x,z\in \mathcal{O}^{\times}}\int_{y\in \mathcal{O}}
|x|_F^{-2}|z|_F^{-1}dx dy dz= \int_{x,z\in \mathcal{O}^{\times}}
|x|_F^{-2}|z|_F^{-1}dxdz=\int_{x,z\in \mathcal{O}^{\times}}dxdz=
\mu(\mathcal{O}^{\times})^2
$$
Note $\mathcal{O}^{\times}=\bigsqcup_{i=1}^{p-1} (i+p\mathcal{O})$
so $\mu(\mathcal{O}^{\times})=(p-1)\mu(q\mathcal{O})=(p-1)/p$. This means
we need to normalize our measure by adding a factor of $p^2/(p-1)^2$.
Now, back to your question, we want to compute the volume of
$U=\left\{ \begin{pmatrix} \varpi & \varpi t\\ 0 &1 \end{pmatrix}: t\in 
\mathcal{O} \right\}$. By the above measure on $N$, this is
$$\frac{p^2}{(p-1)^2}\int_{y\in \varpi\mathcal{O}} |\varpi|^{-2} dy=\frac{p^2}{(p-1)^2}\cdot p^{2}\mu(\varpi \mathcal{O})=\frac{p^2}{(p-1)^2}\cdot p.$$
(Note that if we remove the factor $p^2/(p-1)^2$ then the result is
really $p$, but in the notes, it specifically requires Haar measure
on $N$ is defined so $N(\mathcal{O})$ has measure $1$).
A: First off, I think that Buzzard means by $N$ the upper unitriangular matrices, i.e. with $1$ on the main diagonal. As a group, we have that $N$ is isomorphic to the additive group of $F$, so we can just transfer the Haar measure from there. Only with the identification $N \cong F$, it makes sense to consider $\int_N f\left(\begin{pmatrix} \varpi & \varpi n \\ 0 & 1 \end{pmatrix}\right) \mathrm{d}n$, because if $n$ is a $2\times 2$ matrix, then what is $\begin{pmatrix} \varpi & \varpi n \\ 0 & 1 \end{pmatrix}$ supposed to mean?
So we're actually computing the integral $$\int_F f\left(\begin{pmatrix} \varpi & \varpi n \\ 0 & 1 \end{pmatrix}\right) \mathrm{d}n$$
So we need to consider when $\begin{pmatrix} \varpi & \varpi n \\ 0 & 1 \end{pmatrix}$ is in $K\begin{pmatrix} \varpi & 0 \\ 0 & 1\end{pmatrix} K$. It's not difficult to see that this is the case exactly when $\varpi n \in \mathcal O_F$, i.e. when $v(n) \geq -1$, but the set $\{x \in F \mid v(x) \geq -1\}=\frac{1}{\varpi}\mathcal O_F$ has measure $q$ if the measure on $F$ is normalized so that $\mathcal O_F$ has measure $1$: indeed, the quotient group $\frac{1}{\varpi}\mathcal O_F/\mathcal O_F$ has order $q$, so we may write $\frac{1}{\varpi}\mathcal O_F$ as a disjoint union of $q$ cosets of $\mathcal O_F$, each of which have measure $1$.
