These subseries come with Altimeter
G-Shocks with Altimeter are able to display the altitude.
The built-in pressure sensor is used to calculate an altitude based on the air pressure using ISA values, which define the connection between altitude, air pressure and temperature.
Drawbacks
Because the altitude is not measured directly, changing air pessure (due to weather changes) will result in different altitudes, even if you stay exactly at the same elevation.
Therefore it's recommended, to adjust you altimeter to a reference altitude at the begin of every hike. On days with changing weather its helpful to re-adjust during the day, if you pass points with known altitude.
Exceptions
The Rangeman GPR-B1000 and the G-Squad GBD-H1000, which have not only a pressure sensor but also GPS are an exception.
Like other G-Shocks they use the pressure sensor to estimate the altitude. If GPS is activated, the GPS information is used to automatically re-adjust the altimeter.