Octave m-files

These programs are designed to help you explore some of the ideas in the book. Most have been written by me, although some contain parts that are not original or have been copied in their entirety. These cases are clearly identified.

I hope that these programs will encourage you to experiment with Octave and to write your own programs. Suitable programs contributed by readers may be included in the website.

2.3 Fourier

Illustrates the Fourier transform of the function shown in figure 2.5

2.6 Planck

Plots the Planck black body radiation function for three different temperatures

2.6 Planckint

Integrates the Planck black body radiation function between finite limits

3.3.4.1 SPM

Calculates backscattering coefficients using the Small Perturbation Model. The program exports the results as text files so that they can be imported into a spreadsheet or graph-plotting program.

3.3.4.2 scalar

Calculates backscattering coefficients using the Scalar Model. The program exports the results as text files so that they can be imported into a spreadsheet or graph-plotting program.

3.3.4.2 statphase

Calculates backscattering coefficients using the Stationary Phase Model. The program exports the results as text files so that they can be imported into a spreadsheet or graph-plotting program.

3.4 Mie

A suite of programs written by Christian Mätzler (in Matlab) for calculating Mie scattering from spherical non-magnetic particles. They run under Octave. Note that the refractive index is defined as m'+im'', not as m'-im'' as in the book. The programs are fully documented in the accompanying report by Christian Mätzler. For example, to tabulate the extinction, scattering and absorption efficiencies for a sphere with m=2+10i at values of X (dimensionless size parameter) = 0, 0.1, 0.2 … 2, just type

mie_tab(2+10i, 21, 0.1)

at the Octave prompt.

10.3 calcorbit

Tabulate the latitude, longitude and local solar time of the subsatellite point for a circular or elliptical orbit around the Earth. The program does not take into account the effect of the Earth's asphericity. The results are stored in a matrix 'x' but the program does not plot or export the data: that is left to the user.

10.3 plotsat

Generate a series of GIF images representing the motion of a satellite and the subsatellite point, for circular or elliptical orbits. The images can be assembled into an animated GIF file.

10.3.2.4.1 Findorbit

Finds the characteristics of a circular satellite orbit from its radius and inclination, or just from its radius if it is known to be sun-synchronous. The program can be used to check whether an orbit is in fact sun-synchronous, and whether it is in an exactly repeating configuration. As a bonus, the program calculates the variation of orbital direction with latitude (this was used to calculate figure 10.22).

Appendix Sun_position

Matlab program written by Vincent Roy for calculating solar position. It runs under Octave.