{
  "address": "007fa1b8a433d439095d9ab9e351bea2",
  "category": "other",
  "question": "What is the initial compass bearing from (0, 0) toward (0, 90)?",
  "answer": "90.00 degrees",
  "askedBy": {
    "kind": "guest",
    "display": "method deck",
    "stamped": false,
    "id": null
  },
  "answeredBy": "method",
  "madeAt": "2026-09-30T22:39:30.722Z",
  "validUntil": null,
  "validityClass": "forever",
  "sources": [
    {
      "label": "Calculate distance, bearing and more between latitude/longitude points",
      "url": "http://www.movable-type.co.uk/scripts/latlong.html"
    }
  ],
  "supersedes": null,
  "supersededBy": null,
  "isSeed": false,
  "seedSource": null,
  "seedAttribution": null,
  "duplicateOfQid": null,
  "publishedAt": null,
  "unpublishedAt": null,
  "voteCount": 0,
  "queuedForSubstrate": false,
  "answerMethod": "method",
  "unsourced": false,
  "source": {
    "kind": "url",
    "value": "http://www.movable-type.co.uk/scripts/latlong.html",
    "retrieved_utc": "2026-09-30T19:45:00Z"
  },
  "qsha256": "e48b7beb391250042128b152ab2599c3f92fff431d2887537a7b2c4e3462c6b4",
  "runOne": null,
  "cardContractVersion": "card_contract/1",
  "deck_id": "method-deck",
  "deck_title": "Method Deck",
  "method": {
    "name": "Initial bearing between two points",
    "version": "1",
    "source_url_or_file": "methods/initial-bearing-between-points.cjs",
    "sha256_of_method_file": "e3b64c85d971f395275b0a0fe8b8a7376170a6e4c9c87a05184c6a6ca420694a"
  },
  "receipt": {
    "inSubstrate": false,
    "local": true,
    "modelCallsAtMint": 0,
    "tokensAtMint": 0
  },
  "method_deck": {
    "inputs": [
      {
        "name": "lat1",
        "type": "number",
        "unit": "degrees",
        "required": true,
        "description": "Latitude of the starting point.",
        "min": -90,
        "max": 90
      },
      {
        "name": "lon1",
        "type": "number",
        "unit": "degrees",
        "required": true,
        "description": "Longitude of the starting point.",
        "min": -180,
        "max": 180
      },
      {
        "name": "lat2",
        "type": "number",
        "unit": "degrees",
        "required": true,
        "description": "Latitude of the destination point.",
        "min": -90,
        "max": 90
      },
      {
        "name": "lon2",
        "type": "number",
        "unit": "degrees",
        "required": true,
        "description": "Longitude of the destination point.",
        "min": -180,
        "max": 180
      }
    ],
    "outputs": [
      {
        "name": "bearing_degrees",
        "unit": "degrees from true north, 0-360",
        "description": "Initial great-circle bearing from point 1 to point 2."
      }
    ],
    "steps": [
      "Convert both points' latitudes and longitudes to radians.",
      "theta = atan2( sin(dLon)*cos(lat2), cos(lat1)*sin(lat2) - sin(lat1)*cos(lat2)*cos(dLon) ), where dLon = lon2 - lon1.",
      "Convert theta to degrees and normalize into the range 0 to 360 by adding 360 and taking the result modulo 360.",
      "Round to 2 decimals.",
      "This is the initial bearing only; the bearing changes continuously along a great-circle route except along the equator or a meridian."
    ],
    "constants": [],
    "examples": [
      {
        "name": "worked example",
        "inputs": {
          "lat1": 0,
          "lon1": 0,
          "lat2": 0,
          "lon2": 90
        },
        "expected": {
          "answer": "90.00 degrees"
        },
        "check": "Both points are on the equator, so travel between them is due east along the equator; the formula must analytically reduce to exactly 90 degrees (sin(dLon)*1 over 1*0-0 = atan2(1,0) = 90 degrees), which it does."
      },
      {
        "name": "test vector: London to Paris",
        "inputs": {
          "lat1": 51.5074,
          "lon1": -0.1278,
          "lat2": 48.8566,
          "lon2": 2.3522
        },
        "expected": {
          "answer": "148.12 degrees"
        },
        "check": "By hand: with dLon=2.48deg, y=sin(2.48deg)*cos(48.8566deg) and x=cos(51.5074deg)*sin(48.8566deg)-sin(51.5074deg)*cos(48.8566deg)*cos(2.48deg) are both small values with x negative and y positive, placing theta in the second quadrant (between 90 and 180 degrees); atan2(y,x) evaluates to about 148 degrees, consistent with Paris lying east-southeast of London."
      }
    ],
    "disclaimer": null,
    "deck_category": "astronomy"
  },
  "status": "minted",
  "kind": "method",
  "provenanceClass": "own_question",
  "provenance": {
    "schema": "card_provenance/2.0.0",
    "chain": [
      {
        "source": {
          "kind": "url",
          "value": "http://www.movable-type.co.uk/scripts/latlong.html",
          "retrieved_utc": "2026-09-30T19:45:00Z"
        },
        "sha256": "e0d9fa67a5a3b71d401123135d57c3df6a15f7762c9994656acd0ee422423ac4",
        "supersedes": null,
        "added_utc": "2026-09-30T22:39:30.722Z",
        "added_by": "method:Initial bearing between two points",
        "why": "the method that computed this answer",
        "check": null,
        "status_label": "pending",
        "signature": null
      }
    ]
  }
}
