Tool to get the shortest path in a compass course. The compass is a navigational instrument for locating the North and by extension the South, West and East.
Compass Course - dCode
Tag(s) : Geography
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
A compass route is any type of route defined using the 4 cardinal points (N for North, E for East, S for South, and W for West) that can therefore be carried out using a compass.
Walk the requested path and calculate/represent the final position. This position is then given by 2 coordinates with respect to the starting point.
Example: Going 10 steps to the East E then 10 steps to the West W is to return to the starting point. So better not to have moved!
dCode calculates the path traveled, its distance, its orientation but also its equivalent in a straight line.
Example: If a treasure is 40 steps North, then 30 steps East, then 20 steps South, and 10 steps West, then indicate 40N-30E-20S-10W. dCode will simplify the path to 20N,20E, read 20 steps North and 20 steps East (relatively to the starting point). The move is simplified to only 40 steps (20 + 20) instead of 100 (40 + 30 + 20 + 10). For information, a walker as the crow flies (in a straight line), will be about 28.3 steps from its starting point.
Do not hesitate to invest in a true magnetic compass here (affiliate link)
The expected format is number1direction1,number2direction2, ie. 2N,3E for 2 (steps, meters, etc.) direction North then 3 direction East.
Only integers are allowed
dCode retains ownership of the "Compass Course" source code. Any algorithm for the "Compass Course" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Compass Course" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Compass Course" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Compass Course" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source.
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Compass Course on dCode.fr [online website], retrieved on 2025-04-16,