In order to accurately estimate the masses of heavy trucks in the PCC processes, based on the vehicle longitudinal dynamics model, a vehicle mass estimation algorithm was proposed. The Kalman filtering algorithm was used to estimate the engine output shaft torques which were used as inputs for the vehicle mass estimation algorithm. The vehicle mass was estimated based on the RLS method. C code was generated for the quality estimation control model built by MATLAB/Simulink and embedded in the development boards. And the proposed vehicle mass estimation algorithm was carried out under no-load, one-third load and full load road tests. The testing results show that the maximum errors of the proposed algorithm are 8.87% under full load, 7.43% under one-third load and 4.40% under the no-load, which may meet the mass estimation error requirement within 10% of the vehicle PCC processes and plays an important role in the stability and safety of the vehicle.