The increased radiation exposure at aviation altitudes is of public interest as well as of legal relevance in many countries. The dose rates that are elevated compared to sea level are mainly caused by galactic cosmic ray particles interacting with the atmosphere and producing a complex radiation field at aviation altitudes. The intensity and composition of this radiation field mainly depend on altitude, geomagnetic shielding, and primary particle intensity. In this work, we present a model based on Monte Carlo simulations, which retrospectively estimates secondary particle fluence as well as ambient dose equivalent rates and effective dose rates at any point in the atmosphere. This model will be used as the physical core in the Professional Aviation Dose Calculator (PANDOCA) software developed by the German Aerospace Center (Deutsches Zentrum für Luft-und Raumfahrt) for the calculation of route doses in aviation. The calculations are based on galactic cosmic ray spectra taking into account primary nuclei from hydrogen to iron by direct transport calculations of hydrogen and helium nuclei and approximating heavier nuclei by the number of protons equaling the corresponding atomic number. A comparison to experimental data recorded on several flights with a tissue equivalent proportional counter shows a very good agreement between model calculations and measurements.