how to convert SPL in dBA to dB
You can't convert these directly. You need to start with either a calibrated pressure time domain pressure wave form or a calibrated power spectrum. To create calculate unweighted dBSPL yo simply sum the total energy. To calculate dBA, you need to apply an A-weighting filter to either one of those first.