Monthly Archives: August 2013

How to play multiple instances of VLC on MacOS

Sometimes you might need to play multiple videos at the same time in a separated window.

It is straight forward in Windows by setting preference but quite hacky in Mac.

Original source from:

On the Mac, running multiple instances of VLC is not supported out of the box.

As a workaround, you can create a Droplet that behaves as expected. Paste the code below into a new AppleScript Editor script and save it as an application. Launch the app to get a separate instance of VLC, or drop one or more files onto it.

on run
    do shell script "open -n /Applications/"
end run

on open theFiles
    repeat with theFile in theFiles
        do shell script "open -na /Applications/ " & quote & (POSIX path of theFile) & quote
    end repeat
end open

After creating this app, all you need to do is clicks the app icon as many time as you want. It will create multiple VLCs then enjoy.


Sharing history all around terminals in Linux.

By default, a terminal doesn’t share its history with another one. For example, you open a terminal(1) and type some commands. You need one more a terminal and then open another terminal(2). These terminal(1) and terminal(2) do not have the same history. (You can easily check by typing ‘history’)

All what you need to do for sharing the history for all opened terminal is adding the following code in “.bashrc” file. (Ubuntu 11.04)

export PROMPT_COMMAND='history -a; history -r'

More explanation about options, googling history.

Don’t forget “source” after editing “.bashrc” file in order to apply your changes.

Magnetic Declination – Magnetic Inclination (Dip)

Source from:

Magnetic Declination

Many people state that the compass needle points to magnetic north pole. Technically this is not true. The compass points in the direction of the horizontal component of the earth’s magnetic field at that location. The images at the bottom of the geomagnetic field section show how the compass needle alings itself with the magnetic field line. The angle between true north (the line towards geographic north pole) and the direction towards which the compass points (horizontal component of the magnetic field) is called magnetic declination. You need to adjust for this declination when working with a map and compass. As you approach the magnetic north or south pole, there are areas of compass unreliabilitywhere the compass starts to behave erratically and eventually becomes unusable.

Magnetic declination changes with time as a result of secular variation of the magnetic field, it also undergoes more rapid variations as a result of magnetic activities originating from the sun.

Magnetic Declination Chart (Declination Map)

Below is the contour map of the magnetic field declination based on the World Magnetic Model (WMM) 2010 accessed from NOAA Contour lines connecting points of equal magnetic declination are called isogonic lines. The contour lines (green in map) connecting points where declination is 0° are called agonic lines; therefore on these lines the above angular difference is zero and the compass points along the field line that goes through true north and magnetic north. Red isogonic lines denotepositive or east declination where the compass points east of true north. Blue lines denote negative or west declination, and compass in these areas points west of true north. Contour interval in this graph is two degrees. For example points along the line going through Baja California in Mexico have a 10° east declination (compass points 10° east of true north). Points along contour line bisecting Vancouver Island (west of Canada) have 18° east declination, while points along the line going through southern New Foundland (eastern Canada) have a -20° or 20° west declination (compass points 20° west of true north).

world magnetic declination map

Declination Diagram

Topographic maps usually contain a declination diagram in their margin. The year for which the declination was measured and the annual rate of change are stated in the diagram. Remember that the rate of change of the magnetic field and therefore the declination is not constant with time. As a result calculating the present day declination using the annual change from older maps is not going to be very accurate.

On the declination diagram typically there are three lines, one denoting the direction to true north, one for magnetic north, and one for grid north (parallel to grid lines on the map). Also measurement of two angles (if all three lines present) are given. Depending on the relative position of true north, grid north and magnetic north lines, the angles may represent: true north declination – the angle between true north and magnetic north; grid declination – the angle between grid north and magnetic north; convergence angle – angle between true north and grid north. Again depending on the relative position of these lines (see bottom diagram, Geological Survery of Canada tutorial) to each other, you will need to add or subtract the convergence angle from either grid north or true north to find the desired declination (grid or true north). Grid declination is probably more useful when using maps with gridlines (e.g. UTM), since bearings are measured relative to grid lines.

declination diagramIn order to calculate declination for a specific date from this diagram, first the date of publication of the map needs to be noted (i.e. 2009 for this map). Assuming the present year is 2013, next step is counting the number of years that have elapsed since publication of the map (2013 – 2009 = 4 years). Total change in declination is found by multiplying the annual change by the number of years elapsed, annual change is 13.2 minutes (13.2′ x 4 = 52.8′). Adding or subtracting this value (depending on whether declination is decreasing or increasing) from the original declination (true north or grid declination) will result in the desired declination value. Here declination value is decreasing by 13.2′ per year. Therefore the total change in declination needs to be subtracted from original declination.

Year 2009:
True north declination = 18°22′
Grid declination = 18°22′ + 0°58′ = 18°80′ = 18°(60′ + 20′) = 19°20′ — one degree = 60 minutes

Year 2013:
True north declination = 18°22′ – 0°52.8′ = 17°(1° + 22′) – 0°52.8′ = 17°(60′ + 22′) – 0°52.8′ = 17°82′ – 0°52.8′ = 17°29.2′
Grid declination = 19°20′ – 0°52.8′ = 18°(1° + 20′) – 0°52.8′ = 18°(60′ + 20′) – 0°52.8′ = 18°(80′) – 0°52.8′ = 18°27.2′

Magnetic Declination Calculator

A declination calculator based on a magnetic reference field model can be used to calculate magnetic declination for any desired location (latitude / longitude) and time. The models are typically updated every five years, therefore the ones adopted in 2010 are valid until 2015. Below are some examples of such calculators:

Following points should be kept in mind when using the above calculators (quoted directly from Geological Survey of Canada

“Magnetic reference field models give results that are typically accurate to about 30 minutes of arc, but the difference between the model value and the true value of the magnetic field at a given location is dependent on a number of factors:

  • The accuracy of the model will worsen at locations close to the magnetic poles.
  • As the time from the epoch of the model increases, uncertainties in the estimate of secular variation will result in an increasingly large difference.
  • Magnetic minerals in local geological formations cause magnetic anomalies that can sometimes be very large. These cannot be reproduced by reference field models.
  • Large magnetic storms can temporarily cause large changes in the magnetic field, especially at high latitudes.”

Magnetic Inclination or Magnetic Dip

Magnetic inclination or magnetic dip is the angle (I) between the horizontal plane and the magnetic field vector. Moving closer to magnetic poles results in one side of the compass needle pointing downwards. Between the magnetic poles there is an area called the magnetic equatorwhere inclination or the magnetic dip angle is zero; the magnetic field vector does not have a vertical component (Z) in this area. To the north of the magnetic equator, the north end of the compass needle points downward, both I and Z are positive. To the south of the magnetic equator, the south end of the needle points downward, that is I and Z are both negative.

Magnetic Inclination Map

Below is the contour map of the magnetic inclination based on the World Magnetic Model (WMM) 2010 accessed from NOAA Contour lines connecting points of equal magnetic inclination are called isoclinic linesor isoclinal lines. The contour line (green in map) connecting points where inclination is 0° is the magnetic equator or the aclinic line. To the north of the equator, red contour lines denote areas with positive inclination (magnetic dip angle is down) and to the south blue contour lines represent areas with negative inclination values (magnetic dip angle is up). Also inclination values for any location on Earth can be obtained using the magnetic field calculators mentioned in the earth’s magnetic field section.

world magnetic inclination map

Compass Magnetic Zones

The compass needle needs to rotate freely in order to align with the magnetic field, however as mentioned, the increase in magnetic inclination especially at higher latitudes results in one end of the compass needle to dip down and possibly drag against the compass capsule. In such cases the compass reading most likely won’t be accurate. To prevent excessive dipping of the compass needle, compass manufactureres balance the needle for a specific magnetic zone. For example Silva compass manufacturer has divided the earth into five magnetic zones. MN – Magnetic North, NME – North of Magnetic Equator, ME – Magnetic Equator, SME – South of Magnetic Equator, MS – Magnetic South. Check with the compass manufacturer or a knowledgable retailer if you intend to use your compass during a trip in another part of the world. Safest bet is to buy a quality global compass that can be used in all regions.

Useful links