# Spacecraft and Asteroid Thermal Image Generation for Proximity Navigation and Detection Scenarios
## 2 Thermal Modeling
### Radiation Modeling
Introducing the normal versor of \(dA_{f}\) and \(dA_{p}\) as \(\mathbf{\hat{n}}_{f}\) and \(\mathbf{\hat{n}}_{p}\) respectively, then \(\cos\beta_{fp}\) and \(\cos\beta_{pf}\) can be written as a simple scalar product between the normal versor and the position vector, normalized, paying attention to invert the position vector for \(dA_{p}\) (i.e., \(\mathbf{\hat{r}}_{pf}\) instead of \(\mathbf{\hat{r}}_{fp}\)). A visualization of the formulation is reported in Figure 3. Thus, the equation can be written as:  
\[dQ_{fp}=i\,\frac{\left(\mathbf{\hat{n}}_{f}\cdot\mathbf{r}_{fp}\right)\left( \mathbf{\hat{n}}_{p}\cdot\mathbf{r}_{pf}\right)}{|\mathbf{r}_{fp}|^{4}}\,dA_ {f}dA_{p}\,. \tag{5}\]  
Figure 3: Angles and nomenclature for infinitesimal area of a mesh face and of a pixel. \[q_{out}(T)=\pi\int_{0}^{\infty}\varepsilon(\lambda)\,B(\lambda,T)\,R(\lambda) \,d\lambda=\pi\,i\,. \tag{2}\]0 Pixel area projection onto the sphere. The intensity of radiation can be rewritten inverting Equation (2); therefore, the final expression for the heat flux emitted by \(dA_{f}\) and intercepted by \(dA_{p}\) is the following:  
\[q_{out}(T)=\pi\int_{0}^{\infty}\varepsilon(\lambda)\,B(\lambda,T)\,R(\lambda) \,d\lambda=\pi\,i\,. \tag{2}\]1  
Given the small size of the pixels and their close positions, it is assumed that the view factors between one mesh face and all the camera pixels are equal; thus, it is sufficient to compute the view factor between the mesh face and the full camera array. Thus, the formulation becomes:  
\[q_{out}(T)=\pi\int_{0}^{\infty}\varepsilon(\lambda)\,B(\lambda,T)\,R(\lambda) \,d\lambda=\pi\,i\,. \tag{2}\]2  
The formula needs to be integrated over the camera area and over the mesh face. This step is discretized, assuming the mesh face is small enough to write the expression as:  
\[q_{out}(T)=\pi\int_{0}^{\infty}\varepsilon(\lambda)\,B(\lambda,T)\,R(\lambda) \,d\lambda=\pi\,i\,. \tag{2}\]3  
In the expression above, the approximation is in the fact that the mesh face normal vector is assumed constant over the small area of the real object it is representing, and therefore, it is a good approximation only when the mesh face is small compared to the size of the object. Indeed, when the object geometry is meshed, it is a multitude of small flat faces. For what concerns the camera, it is assumed to be a flat surface; hence, it can be approximated as one flat face with a given area \(\Delta A_{c}\) and normal vector \(\mathbf{\hat{n}}_{c}\). To be more specific, the just mentioned approximations are introduced in the step between Equation (7) and Equation (8), where the part of the equation regarding the view factor is approximated using the following formula:  
\[q_{out}(T)=\pi\int_{0}^{\infty}\varepsilon(\lambda)\,B(\lambda,T)\,R(\lambda) \,d\lambda=\pi\,i\,. \tag{2}\]4  
As verified in [9], such an approximation is able to catch the correct values of the view factors. Dividing by the mesh face and considering a single diffuse value for the emissivity, the equation provides the heat flux per unit area emitted by each face and intercepted by the camera:  
\[q_{out}(T)=\pi\int_{0}^{\infty}\varepsilon(\lambda)\,B(\lambda,T)\,R(\lambda) \,d\lambda=\pi\,i\,. \tag{2}\]5  
To compute the heat flux, the camera pose and attitude (i.e., \(\mathbf{\hat{r}}_{fp}\) and \(\mathbf{\hat{n}}_{c}\)) must be provided to the algorithm as well as the different emissivities of each part of the mesh. The final result is a field of the heat flux emitted by each mesh face and intercepted by the camera. In this way, the image accounts for the view factor effects of the scene. The field is then passed to the render engine (Blender v2.93, [[https://www.blender.org/](https://www.blender.org/)]([https://www.blender.org/](https://www.blender.org/)), accessed on 21 March 2024) for the actual image generation.