![thumbnail](_images/thumbnail.png)
Great Circle Cookbook
+ +This Project Pythia Cookbook covers the mathematics of working with Great Circles
+Motivation
+A great circle is the largest circle that can be drawn onto a sphere (like the Earth) that is the same diameter of the sphere. Great Circle arcs connect two positions on the curved surface of a planet like Earth and are commonly used for navigation that relies on “as-the crow flies” directions like planes, ships, and satellites
+
+
+
Image Source: Wolfram MathWorld
+Structure
+This cookbook is broken into two main sections:
+-
+
Foundations and Terminology
+Working with Great Circles
+
Where avaiable, this cookbook will demonstrate how to determine the features of a great circle with both existing open-source Python packages and through spherical trigonometry and mathematics
+Foundations and Terminology
+-
+
“Great Circle Terminology”: Breakdown of terminology important for working with and understanding great circles including WGS-84
+“Coordinate Systems”: Understanding and converted to different types of coordinate systems like Cartesian, Spherical, Polar, and Geodesic (Latitude/Longitude)
+“Geodesic and Python”: General overview of powerful open-source Python packages for working with geodesic data like
pyproj
andgeopy
+
Each section will make use of plotting to visually demonstrate concepts with matplotlib
and cartopy
Working with Great Circles
+-
+
Generating a great circle arc and path
+Midpoint (and additional intermediate points) of a great circle arc
+Length of a great circle arc (the distance between two points)
+Bearing of a great circle arc
+Compare great circle arc to rhumb line
+Determine when a great circle path crosses parallels
+Determine if a point lies on a great circle arc and path (with and without tolerances)
+Determine the distance of a point to a great circle arc with error analysis
+Determine the maximum and minimum latitude coordinates along a great circle path
+Find the intersection of two great circle arcs (if it exists)
+Find the intersection of two great circle paths (always exists)
+Calculate the acute and obtuse angle of two great circle paths
+Calculate the directed angle of two great circle paths based on an intersection point
+Working with Spherical Triangles formed by great circle arcs
+Indiana Jones and the Great Circle
+
Running the Notebooks
+You can either run the notebook using Binder or on your local machine.
+Running on Binder
+The simplest way to interact with a Jupyter Notebook is through +Binder, which enables the execution of a +Jupyter Book in the cloud. The details of how this works are not +important for now. All you need to know is how to launch a Pythia +Cookbooks chapter via Binder. Simply navigate your mouse to +the top right corner of the book chapter you are viewing and click +on the rocket ship icon, (see figure below), and be sure to select +“launch Binder”. After a moment you should be presented with a +notebook that you can interact with. I.e. you’ll be able to execute +and even change the example programs. You’ll see that the code cells +have no output at first, until you execute them by pressing +Shift+Enter. Complete details on how to interact with +a live Jupyter notebook are described in Getting Started with +Jupyter.
+Running on Your Own Machine
+If you are interested in running this material locally on your computer, you will need to follow this workflow:
+-
+
Clone the
+https://github.com/ProjectPythia/great-circle-cookbook
repository:++git clone https://github.com/ProjectPythia/great-circle-cookbook.git +
+Move into the
+great-circle-cookbook
directory++cd great-circle-cookbook +
+Create and activate your conda environment from the
+environment.yml
file++conda env create -f environment.yml +conda activate cookbook-gc +
+Move into the
+notebooks
directory and start up Jupyterlab++cd notebooks/ +jupyter lab +
+