With the advancement of the electromagnetic (EM) launcher and the idea of the launch of smart equipment by railgun, one cannot ignore the EM compatibility issues of the railgun. Large acceleration values, varying strong magnetic and electric fields and the existence of electric arcs specialized EM launchers. Future applications of railguns include the launch of small satellites or launch of smart meteorological parts to space. Such applications necessarily involve the acceleration of complex electronic circuitry and a reliable communication channel to the outer world. Moreover, during the accelerating run of the railgun, the radiated EM fields can compromise the life of electronic devices, can influence the signal to noise ratio, and can generate electrical shock. The short duration pulse signal, such as a current pulse of the railgun, switching and arcing between components of railgun is typically rich in frequency spectral contents. All these effects might affect any electronic circuitry that the projectile is being equipped with. It should be noted that the propulsive force of the current pulse in each time push the armature in motion direction and changes the parameters of the railgun. As a result, the strong EM field varies versus time. In this study, it is investigated the magnetic field from the current pulse in the environment of the railgun by considering the change in armature position and it is discussed about the best location of the electronic equipment inside the barrel. Furthermore, the presence of the earth as a good conductor near railgun can affect the EM fields around it. In this study, the effect of the earth on the fields, which is due to the transient flow of current, is obtained theoretically. The calculations done by using the Maxwell equations and image theory have shown that the earth presence can affect the performance of noise-sensitive equipment.