All Over The Map

Here is a Google Maps API static map example, generated from arbitrary data.
A linear path following Broad Street north from City Hall in Philadelphia, PA (USA) was used, but the points could have been taken from .csv data files etc. The points on this map were colored according to their position along the path — but each can be arbitrarily colored from the entire RRGGBB colorspace.

Given its ease of use, lack of cost, and incorporation of road, terrain, or satellite imagery, it looks like a very useful tool for scientific visualization.

The Google Maps API explanation for static maps can be found here.

Here is the HTML code which produced the above map.
(It is shown split into lines for readability, but I found that this seems to break the map API.
When using the API, combine everything into one long line.)

<img src=”http://maps.google.com/maps/api/staticmap?
sensor=false
&size=640×640
&markers=color:0x0000FF|39.953,-75.1633
&markers=color:0x0005F9|39.954,-75.1631
&markers=color:0x000AF4|39.955,-75.1629
&markers=color:0x000FEF|39.956,-75.1627
&markers=color:0x0014EA|39.957,-75.1624
&markers=color:0x0019E5|39.958,-75.1622
&markers=color:0x001EE0|39.959,-75.162
&markers=color:0x0023DB|39.96,-75.1618
&markers=color:0x0028D6|39.961,-75.1616
&markers=color:0x002DD1|39.962,-75.1614
&markers=color:0x0033CC|39.963,-75.1611
&markers=color:0x0038C6|39.964,-75.1609
&markers=color:0x003DC1|39.965,-75.1607
&markers=color:0x0042BC|39.966,-75.1605
&markers=color:0x0047B7|39.967,-75.1603
&markers=color:0x004CB2|39.968,-75.1601
&markers=color:0x0051AD|39.969,-75.1599
&markers=color:0x0056A8|39.97,-75.1596
&markers=color:0x005BA3|39.971,-75.1594
&markers=color:0x00609E|39.972,-75.1592
&markers=color:0x006699|39.973,-75.159
&markers=color:0x006B93|39.974,-75.1588
&markers=color:0x00708E|39.975,-75.1586
&markers=color:0x007589|39.976,-75.1584
&markers=color:0x007A84|39.977,-75.1581
&markers=color:0x007F7F|39.978,-75.1579
&markers=color:0x00847A|39.979,-75.1577
&markers=color:0x008975|39.98,-75.1575
&markers=color:0x008E70|39.981,-75.1573
&markers=color:0x00936B|39.982,-75.1571
&markers=color:0x009966|39.983,-75.1568
&markers=color:0x009E60|39.984,-75.1566
&markers=color:0x00A35B|39.985,-75.1564
&markers=color:0x00A856|39.986,-75.1562
&markers=color:0x00AD51|39.987,-75.156
&markers=color:0x00B24C|39.988,-75.1558
&markers=color:0x00B747|39.989,-75.1556
&markers=color:0x00BC42|39.99,-75.1553
&markers=color:0x00C13D|39.991,-75.1551
&markers=color:0x00C638|39.992,-75.1549
&markers=color:0x00CC33|39.993,-75.1547
&markers=color:0x00D12D|39.994,-75.1545
&markers=color:0x00D628|39.995,-75.1543
&markers=color:0x00DB23|39.996,-75.1541
&markers=color:0x00E01E|39.997,-75.1538
&markers=color:0x00E519|39.998,-75.1536
&markers=color:0x00EA14|39.999,-75.1534
&markers=color:0x00EF0F|40,-75.1532
&markers=color:0x00F40A|40.001,-75.153
&markers=color:0x00F905|40.002,-75.1528
&markers=color:0x00FF00|40.003,-75.1525>

Posted in Coding, Digital, Digital Citizenship, GPS, Internet, Science | Leave a comment

Windows 98 Speed Limit

You learn something every day, I’m told. Apparently today’s lesson is that parts of Windows 98 fall apart when running on a CPU clocked at over 2.1GHz.

Why I’m still running Windows 98 is a long story involving a Robotics class at work and some very old Lego Mindstorms software. At any rate, apparently the NDIS driver in Windows 98 produces a divide-by-zero error if the processor is running faster than 2.1GHz. The symptom is a crash on startup, with a cryptic message about a “Windows Protection Error” when loading the NDIS driver. The error message states that the computer must be restarted — but that won’t help. The machine will boot into Safe Mode, but only because the network drivers aren’t loaded, that way.

Microsoft no longer supports Windows 98, so it took a bit of digging to find the fix. The Windows 98 Q312108 hotfix should patch the NDIS drivers so the divide-by-zero doesn’t occur.

Enjoy!

Posted in Digital, Drexel, Nostalgia, Robotics, System Administration | Tagged , , , , , | 2 Comments

UltraVNC

For a while now, I have used the built-in Remote Desktop functionality in Windows XP and Windows 7. It works well, but I recently came across a limitation. It turns out that when you log in via Remote Desktop, Windows uses a custom “remote desktop” video driver — that disables 3D support, including CUDA.
The workaround I found was to use UltraVNC — a free remote-access solution. It’s slower than Remote Desktop, but doesn’t interfere with the native video drivers (and running three video cards with one monitor is experimental enough, without Windows periodically pulling the drivers out from underneath everything.)

Posted in Digital, System Administration | Leave a comment

Why SI Is Cool

The Système International d’unités (or SI, or the “Metric” system) is still less than popular in the U.S. My guess is that this is due to a lack of familiarity, or just basic intellectual inertia: people are most comfortable with what they already know.

If you do much serious scientific or engineering work, though, the problem of unit conversion comes up constantly (pardon the pun). Working in electronics, unit conversion is needed to determine how long a particular capacitor will power a microcontroller at a given current draw, or what value of resistor is needed in order to limit current through an LED to an acceptable value.

This is where SI units really start to become useful. For example, take the following statement of equivalencies, found in the Wikipedia article on the farad (the SI unit of capacitance):

SI Equivalents of one Farad (unit of capacitance)

SI Equivalents of one Farad (unit of capacitance) Source: Wikipedia

At first, all this doesn’t look very simple. But look closer. There are no conversion constants! No “12 inches to the foot,” no “5,280 feet to a mile,” no “divide by this weird, irrational magic number to make the units fit.”  Numerically (without the units), the whole statement above just says 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1. Everything just works!

It took a lot of work to come up with a set of units that all work together like this (a cube ten centimeters on a side has a volume of one liter; fill it with water and it has a mass of one kilogram; accelerating it at one meter per second per second requires a force of one Newton etc). All of the conversions are either one-to-one, or based on some power of ten. There are a few arbitrary choices (water tying the kilogram to the meter etc), but the whole system is very numerically consistent.

Pop quiz: How many inches in a mile? You’d need a calculator, or at least a pencil and paper to find out that it’s 63,360 — and that’s if you remember the conversions.

Now try it in metric: How many centimeters in a kilometer? Easy: 1000 meters in a kilometer, and 100 centimeters to the meter. The answer is 100,000.

It’s not a Big Liberal Plot — it just makes doing science and engineering a lot easier.

Posted in Analog, Electronics, Math, Science | 3 Comments