We perform a Bayesian calibration of the freestream velocity and density starting from measurements of the pressure and heat flux at the stagnation point of a hypersonic highenthalpy flow around a cylinder. The objective is to explore the possibility of using stagnation heat flux measurements, together with pressure measurements, to rebuild freestream conditions since such measurements are available for recent space missions but not exploited for freestream characterization. First, we formulate an algorithm of mesh adaptation, enabling accurate numerical solutions in an automatic way for a given set of inputs. Secondly, active subspaces are used to find a low-dimensional dependence structures in the input-to-output map of the forward numerical solver. Then, surrogate models on the active variables are used to accelerate the forward uncertainty propagation by Monte Carlo sampling and the Markov Chain Monte Carlo sampling of the posterior distribution for Bayesian inversion. A preliminary sensitivity analysis with sparse Polynomial Dimensional Decomposition is performed on the chemical model of the air mixture, to determine the most influential uncertain chemical parameters in the forward problem. Then, the forward and backward methodologies are applied to the simulation of a hypersonic flow around a cylinder, in conditions for which experimental data are available, revealing new insights towards the potential exploitation of heat flux data for freestream rebuilding.