PHP – Storing GPS Track Points In MySQL.

Though the term waypoint has come into fairly common use in recent times, the concept has existed for as long as we have been navigating. Waypoints have traditionally been associated with distinctive features of the physical world – such as mountains, rock formations, lakes, buildings, and so on. With the advancement of technology and times, waypoints have become increasingly abstract, often having no obvious relationship to any distinctive feature of the physical world. Such waypoints are used to define invisible routing paths for navigation. And for the sake of this discussion/article, we will stick to the following definition of a waypoint: a set of co-ordinates – latitude & longitude, and sometimes altitude – to uniquely identify a point in our physical universe. Extending this concept a bit further, one can define a Track as a collection of such waypoints in time – and when mapped using an appropriate software, it will look as follows:

Most GPS units of today, at least the modern hand-held models, record such waypoints & tracks and sometimes provide the facility to export them as a GPX file to a computer. I use Garmin GPSMap 60CSx and the GPX file, for a recorded track, looks as follows (let us call it TRKFile.gpx):

Why store them in MySQL?

As I mentioned in a previous post, I like to keep [a very detailed] track of where I have been and use that data for a variety of purposes – navigating, Google! mapping and geotagging my photographs to name just a few. Storing them in a MySQL database also makes it possible to do a variety of different calculations and visualizations.

How to convert GPX format to MySQL format?

It is my practice that I do a full/maximal installation of any linux distribution and that takes care of installing Apache (with all the required modules), PHP, MySQL, etc. I bet there are tons of documents online that you can refer and install them if you don’t already have them. Now that the requirements are taken care of, we need to decide what all information need to be extracted from the GPX file. It’s not too difficult to note that all the required information about each track point is stored within and . Let us suppose that we are interested in latitude, longitude, altitude (elevation) and date-time. Before proceeding ahead to extract this information from each track point, we need to create a MySQL table to hold this information:

Garmin International

2008-11-14T21:23:44Z

ACTIVE LOG

Transparent

-108.9722900
2008-06-27T01:34:06Z

-113.7789307
2008-06-27T01:34:09Z

-118.5854492
2008-06-27T01:34:12Z

-109.4528809
2008-06-27T01:34:14Z

A hidden world revealed: Titan.

We’ve sent space probes to every planet in our solar system (and if you’re a die-hard Pluto fan, you only have to wait 4 more years). And yet there is still much to see, much to explore. Not every world gives up its secrets easily, and perhaps none has been so difficult to probe than Titan, Saturn’s largest moon. Bigger than Mercury, second only to Jupiter’s Ganymede, Titan has an atmosphere of nitrogen so thick it has twice the Earth’s air pressure at its surface.
That thick, hazy atmosphere is impenetrable by optical light… but infrared light can pierce that veil, and the Cassini space probe is well-equipped with detectors that can see in that part of that spectrum. And after 7 years, and 78 fly-by passes of the huge moon, there are enough images for scientists to make this amazing global map:

Pretty awesome. And making this animation was a huge effort. First, not all of the passes were at the same distance, so scientists had to resize the images to match the scale. Cassini passed at different times of day for the local regions, so the sunlight angle changed, making illumination and shadowing different. The atmosphere of Titan is dynamic, changing with time, so again compensations must be made. It’s painstaking work, but the results are truly incredible:

In this false-color map, what’s shown as blue is actually light at a wavelength of 1.27 microns — very roughly twice the wavelength the human eye can detect. Green is 2 microns, and red is 5 microns, well out into the infrared. When the final images are combined, what show up as brown regions near the equator are actually vast dune fields, grains of frozen hydrocarbons rolling across the plains in the relentless Titanian winds. White areas are elevated terrain. Near the north pole, only barely visible, are smudges on the map that have been shown to be lakes — literally, giant lakes of liquid methane!
So Titan has air, lakes, and weather. Sound familiar? It’s not exactly Earth-like, since the temperature there is roughly -180°C (-300°F), but the similarities are compelling. And Titan is loaded with organic compounds like methane, ethane, and more. A complex chemistry is certainly possible there, but complex enough to have formed life? No one knows. Just a few years ago I don’t think anyone would’ve taken the possibility seriously, but now… well, I wouldn’t rule it out.
Remember, these maps only show global features, and even though Cassini dropped the Huygens probe onto the surface, it saw a tiny fraction of what there is to see on this moon, which boasts over 80 million square kilometers of territory. That’s a lot of land. What else is there to find there?

Olympus Mons: the solar system biggest known mountain.

OLYMPUS MONS

The largest of the volcanoes in the Tharsis Montes region, as well as all known volcanoes in the solar system, is Olympus Mons. Olympus Mons is a shield volcano 624 km (374 mi) in diameter (approximately the same size as the state of Arizona), 25 km (16 mi) high, and is rimmed by a 6 km (4 mi) high scarp. A caldera 80 km (50 mi) wide is located at the summit of Olympus Mons. To compare, the largest volcano on Earth is Mauna Loa. Mauna Loa is a shield volcano 10 km (6.3 mi) high and 120 km (75 mi) across. The volume of Olympus Mons is about 100 times larger than that of Mauna Loa. In fact, the entire chain of Hawaiian islands (from Kauai to Hawaii) would fit inside Olympus Mons!
These images, taken by the High Resolution Stereo Camera (HRSC) on board ESA’s Mars Express spacecraft, show the eastern scarp of the Olympus Mons volcano on Mars.

The HRSC obtained these images during orbit 1089 with a ground resolution of approximately 11 metres per pixel. The image is centred at 17.5° North and 230.5° East. The scarp is up to six kilometres high in places.
The surface of the summit plateau’s eastern flank shows lava flows that have are several kilometres long and a few hundred metres wide.

Age determinations show that they are up to 200 million years old, in some places even older, indicating episodic geological activity.
The lowland plains, seen here in the eastern part of the image (bottom), typically have a smooth surface.
Several channel-like features are visible which form a broad network composed of intersecting and ‘anastomosing’* channels that are several kilometres long and up to 40 metres deep. (*Anastomising means branching extensively and crossing over one another, like veins on the back of your hand.)
Several incisions suggest a tectonic control, others show streamlined islands and terraced walls suggesting outflow activity.
Age determinations show that the network-bearing area was geologically active as recent as 30 million years ago.
Between the edge of the lowland plains and the bottom of the volcano slope, there are ‘wrinkle ridges’ which are interpreted as the result of compressional deformation. In some places, wrinkle ridges border the arch-like terraces at the foot of the volcano slope.
The colour scenes have been derived from the three HRSC-colour channels and the nadir channel.
The perspective views have been calculated from the digital terrain model derived from the stereo channels.
The 3D anaglyph image was calculated from the nadir and one stereo channel. Image resolution has been decreased for use on the internet.
Links to look :
OlympusMons.com – Your Guide to Olympus Mons – the largest volcano in our solar system.

Mars Exploration: Multimedia

List of highest mountains on Mars by height


Name Elevation (m)
Olympus Mons 21,171
Ascraeus Mons 18,209
Arsia Mons 17,779
Pavonis Mons 14,037
Elysium Mons 13,862
Maxwell Mons, Venus
(tallest mountain on Venus) 11,000
Tharsis Tholus 8,000-9,000
Biblis Tholus
(formerly Patera) 7,198
Alba Mons 6,815
Ulysses Tholus 5,863
Uranius Mons 4,853
Anseris Mons 3,959
Hadriacus Mons
(formerly Hadriaca Patera) 3,959
Euripus Mons 3,945
Tyrrhenus Mons
(formerly Tyrrhena Patera) 3,920
Promethei Mons 3,789
Chronius Mons 3,240
Apollinaris Mons
(formerly Patera) 3,155
Gonnus Mons 2,937
Syrtis Major Planum 2,300
Amphitrites Patera 2,066
Nili Patera 2,036
Pityusa Patera 1,877
Malea Patera 1,313
Peneus Patera 1,276
Labeatis Mons 1,143
Issedon Paterae 826
Pindus Mons 704
Meroe Patera 542
Dead Sea, Earth
(depth below sea level) -420
Orcus Patera -764
Oceanidum Mons -1,277
Horarum Mons -2,325
Peraea Mons -2,470
Bentley Subglacial Trench,
Earth (depth below sea level) -2,555
Octantis Mons -2,731
Galaxius Mons -3,972
Challenger Deep, Earth
(depth below sea level) -10,924