1. A method of detecting a tsunami by using a global positioning system (GPS), comprising steps of: (a) distributing a plurality of GPS receivers over a sea surface in a target area; (b) receiving signals from GPS satellites by the plurality of GPS receivers, and transmitting the signals and coordinates of the plurality of GPS receivers to a computer; (c) processing the signals to acquire a real-time monitoring data of the ionosphere, wherein the real-time monitoring data includes a distribution of electrons in an ionosphere above the target area; and (d) determining an occurrence of the tsunami based on the distribution of the electrons.