Fluxes of soft X-ray radiation (XR) are the most important indicator of space weather. Currently, the standard is to classify the power of solar flares on the basis of XR measurements in 0.1–0.8 nm waverange onboard geostationary satellites GOES. As a part of the monitoring of conditions in the near-Earth space on Russian satellite of series "Elektro" a Geiger counter with an aluminum filter was used as the XR detector, the bandwidth of the detector is 0.05–0.4 nm. We propose a method of classification of solar flares and the calculation of the spectrum for the simulation of the ionosphere based on the satellite "Elektro" measurements. The method is based on the algorithm for calculating the flow of XR in the 0.1–0.8 nm based on the "Elektro" measurements data, and then use the model spectra of X-ray emission of the flare.