Map Calculation Bp

Map Calculation BP: Understand and Calculate Bearing Point :root { –primary-color: #004a99; –success-color: #28a745; –background-color: #f8f9fa; –text-color: #333; –border-color: #ddd; –card-background: #fff; –shadow: 0 2px 5px rgba(0,0,0,0.1); } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: var(–background-color); color: var(–text-color); line-height: 1.6; margin: 0; padding: 0; } .container { max-width: 1000px; margin: 20px auto; padding: 20px; background-color: var(–card-background); border-radius: 8px; box-shadow: var(–shadow); } header { text-align: center; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid var(–border-color); } h1, h2, h3 { color: var(–primary-color); } h1 { font-size: 2.5em; margin-bottom: 10px; } h2 { font-size: 1.8em; margin-top: 30px; margin-bottom: 15px; border-bottom: 2px solid var(–primary-color); padding-bottom: 5px; } h3 { font-size: 1.4em; margin-top: 20px; margin-bottom: 10px; } .calculator-section { background-color: var(–card-background); padding: 25px; border-radius: 8px; box-shadow: var(–shadow); margin-bottom: 30px; } .loan-calc-container { display: flex; flex-wrap: wrap; gap: 20px; } .input-group { flex: 1 1 300px; /* Grow, shrink, basis */ display: flex; flex-direction: column; margin-bottom: 15px; } .input-group label { font-weight: bold; margin-bottom: 8px; color: var(–primary-color); } .input-group input[type="number"], .input-group select { padding: 10px; border: 1px solid var(–border-color); border-radius: 4px; font-size: 1em; width: calc(100% – 22px); /* Account for padding and border */ } .input-group input[type="number"]:focus, .input-group select:focus { outline: none; border-color: var(–primary-color); box-shadow: 0 0 0 2px rgba(0, 74, 153, 0.2); } .input-group .helper-text { font-size: 0.85em; color: #666; margin-top: 5px; } .error-message { color: red; font-size: 0.8em; margin-top: 5px; min-height: 1.2em; /* Prevent layout shift */ } .button-group { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; justify-content: center; } button { padding: 12px 25px; border: none; border-radius: 5px; cursor: pointer; font-size: 1em; font-weight: bold; transition: background-color 0.3s ease; } .btn-calculate { background-color: var(–primary-color); color: white; } .btn-calculate:hover { background-color: #003366; } .btn-reset { background-color: #6c757d; color: white; } .btn-reset:hover { background-color: #5a6268; } .btn-copy { background-color: #ffc107; color: #212529; } .btn-copy:hover { background-color: #e0a800; } .results-section { margin-top: 30px; padding: 20px; background-color: var(–primary-color); color: white; border-radius: 8px; text-align: center; box-shadow: var(–shadow); } .results-section h3 { color: white; margin-bottom: 15px; } .primary-result { font-size: 2.5em; font-weight: bold; margin: 10px 0; padding: 15px; background-color: var(–success-color); border-radius: 5px; display: inline-block; } .intermediate-results div, .key-assumptions div { margin-bottom: 10px; font-size: 1.1em; } .intermediate-results span, .key-assumptions span { font-weight: bold; color: #e0e0e0; } .formula-explanation { font-size: 0.9em; margin-top: 15px; padding-top: 15px; border-top: 1px solid rgba(255, 255, 255, 0.3); } table { width: 100%; border-collapse: collapse; margin-top: 20px; overflow-x: auto; /* Mobile responsiveness */ display: block; /* Needed for overflow-x */ white-space: nowrap; /* Prevent wrapping in cells */ } th, td { padding: 12px 15px; border: 1px solid var(–border-color); text-align: left; } thead { background-color: var(–primary-color); color: white; } tbody tr:nth-child(even) { background-color: #f2f2f2; } caption { font-size: 1.1em; font-weight: bold; color: var(–primary-color); margin-bottom: 10px; text-align: left; } canvas { max-width: 100%; /* Mobile responsiveness */ height: auto; display: block; margin: 20px auto; border: 1px solid var(–border-color); border-radius: 4px; } .chart-container { text-align: center; margin-top: 30px; } .chart-container h3 { margin-bottom: 10px; } .article-content { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(–border-color); } .article-content p, .article-content ul, .article-content ol { margin-bottom: 15px; } .article-content li { margin-bottom: 8px; } .article-content a { color: var(–primary-color); text-decoration: none; } .article-content a:hover { text-decoration: underline; } .faq-item { margin-bottom: 15px; padding: 10px; border-left: 3px solid var(–primary-color); background-color: #f0f8ff; } .faq-item strong { color: var(–primary-color); } .related-links ul { list-style: none; padding: 0; } .related-links li { margin-bottom: 10px; } .related-links a { font-weight: bold; } .related-links span { font-size: 0.9em; color: #555; display: block; margin-top: 3px; } /* Responsive adjustments */ @media (max-width: 768px) { .container { margin: 10px; padding: 15px; } h1 { font-size: 2em; } h2 { font-size: 1.5em; } .loan-calc-container { flex-direction: column; } .input-group { flex-basis: auto; width: 100%; } .button-group { flex-direction: column; align-items: center; } button { width: 80%; } .primary-result { font-size: 2em; } table { font-size: 0.9em; } th, td { padding: 8px 10px; } }

Map Calculation BP

Calculate Bearing Point (BP) for navigation and surveying with precision.

Bearing Point (BP) Calculator

Enter latitude in decimal degrees (e.g., 34.0522 for Los Angeles).
Enter longitude in decimal degrees (e.g., -118.2437 for Los Angeles).
Enter the distance to travel in kilometers.
Enter the bearing angle clockwise from North (0-360).

Calculation Results

Formula Used: This calculator uses the Haversine formula and spherical trigonometry to calculate the destination point (Bearing Point) given a starting point, distance, and bearing angle on a spherical Earth model.

Geographic Path Visualization

Starting Point Bearing Point

What is Map Calculation BP?

Map calculation BP, referring to the calculation of a Bearing Point (BP), is a fundamental concept in navigation, surveying, and geographic information systems (GIS). It involves determining a new geographic coordinate (latitude and longitude) based on a known starting point, a specific distance, and a defined bearing or azimuth. This process is crucial for plotting courses, marking locations, and understanding spatial relationships on the Earth's surface. Essentially, it answers the question: "If I start here, travel this far in this direction, where will I end up?"

Who should use it:

  • Navigators: Pilots, sailors, and hikers use BP calculations to plan routes and determine future positions.
  • Surveyors: Professionals use these calculations to establish property boundaries, map terrain, and conduct land surveys.
  • GIS Analysts: They employ BP calculations for spatial analysis, creating buffer zones, and modeling movement.
  • Geographers and Researchers: Used for studying migration patterns, environmental changes, and historical routes.
  • Game Developers and Simulators: For creating realistic world maps and movement systems.

Common Misconceptions:

  • Flat Earth Assumption: Many assume simple Euclidean geometry applies, ignoring the Earth's curvature. This leads to significant errors over longer distances.
  • Constant Bearing: A common mistake is assuming a constant compass bearing will lead to the destination in a straight line on a map. Due to the Earth's spherical nature, a constant compass bearing (rhumb line) spirals towards the poles, while the shortest distance (great circle) is a curve on most map projections. This calculator typically uses great-circle calculations for accuracy.
  • Ignoring Earth's Ellipsoidal Shape: While this calculator uses a spherical model for simplicity, the Earth is technically an oblate spheroid. For extremely high-precision applications, ellipsoidal models are used.

Bearing Point (BP) Formula and Mathematical Explanation

Calculating the Bearing Point involves spherical trigonometry. We'll use the formulas for finding a destination point on a sphere given a starting point, distance, and bearing. The Earth is approximated as a sphere with a mean radius.

Variables Used:

Variables in Bearing Point Calculation
Variable Meaning Unit Typical Range
Lat1 Starting Latitude Degrees -90 to +90
Lon1 Starting Longitude Degrees -180 to +180
d Distance Kilometers (km) ≥ 0
θ Bearing Angle (Azimuth) Degrees 0 to 360
R Earth's Mean Radius Kilometers (km) ~6371
Lat2 Destination Latitude Degrees -90 to +90
Lon2 Destination Longitude Degrees -180 to +180

Mathematical Derivation:

To calculate the destination point (Lat2, Lon2) from a starting point (Lat1, Lon1), distance (d), and bearing (θ), we use the following steps:

  1. Convert Inputs to Radians: Trigonometric functions in most programming languages expect angles in radians.
    • Lat1rad = Lat1 * (π / 180)
    • Lon1rad = Lon1 * (π / 180)
    • θrad = θ * (π / 180)
  2. Calculate Angular Distance: Convert the linear distance (d) into an angle on the sphere.
    • Δσ = d / R
    Where R is the Earth's mean radius (approximately 6371 km).
  3. Calculate Destination Latitude (Lat2):
    • Lat2rad = asin( sin(Lat1rad) * cos(Δσ) + cos(Lat1rad) * sin(Δσ) * cos(θrad) )
  4. Calculate Destination Longitude (Lon2):
    • Numerator = sin(θrad) * sin(Δσ) * cos(Lat1rad)
    • Denominator = cos(Δσ) – sin(Lat1rad) * sin(Lat2rad)
    • Δλ = atan2(Numerator, Denominator)
    • Lon2rad = Lon1rad + Δλ
    The `atan2` function handles the quadrant correctly.
  5. Convert Results Back to Degrees:
    • Lat2 = Lat2rad * (180 / π)
    • Lon2 = Lon2rad * (180 / π)
  6. Normalize Longitude: Ensure Lon2 is within the -180 to +180 degree range.
    • Lon2 = (Lon2 + 180) % 360 – 180

The intermediate results often include the final latitude and longitude, and sometimes the azimuth to the destination if calculating a return bearing.

Practical Examples (Real-World Use Cases)

Example 1: Planning a Flight Leg

A small aircraft is departing from Los Angeles International Airport (LAX) and needs to fly to a point 300 km away on a bearing of 75 degrees (roughly towards Las Vegas). We need to calculate the destination coordinates.

  • Starting Latitude (Lat1): 33.9416° N
  • Starting Longitude (Lon1): 118.4081° W
  • Distance (d): 300 km
  • Bearing Angle (θ): 75°
  • Earth Radius (R): 6371 km

Using the calculator or formulas:

Calculated Results:

  • Destination Latitude (Lat2): ~34.58° N
  • Destination Longitude (Lon2): ~117.15° W

Interpretation: The aircraft will reach its destination approximately 300 km east-northeast of LAX at the calculated coordinates. This information is vital for flight planning and navigation systems.

Example 2: Surveying a Property Boundary

A surveyor starts at a known benchmark (Point A) and needs to mark a corner of a property (Point B) located 1.5 km away on a bearing of 220 degrees.

  • Starting Latitude (Lat1): 40.7128° N
  • Starting Longitude (Lon1): 74.0060° W (New York City)
  • Distance (d): 1.5 km
  • Bearing Angle (θ): 220°
  • Earth Radius (R): 6371 km

Using the calculator or formulas:

Calculated Results:

  • Destination Latitude (Lat2): ~40.7015° N
  • Destination Longitude (Lon2): ~74.0245° W

Interpretation: The surveyor can use these coordinates to accurately place the property marker. The slight change in latitude and longitude defines the precise location of Point B relative to Point A.

How to Use This Bearing Point (BP) Calculator

Our interactive Bearing Point calculator simplifies these complex calculations. Follow these steps:

  1. Input Starting Coordinates: Enter the latitude and longitude of your starting point in decimal degrees. Use positive values for North latitude and East longitude, and negative values for South latitude and West longitude.
  2. Enter Distance: Input the distance you intend to travel in kilometers.
  3. Specify Bearing Angle: Enter the bearing angle in degrees, measured clockwise from North (0° is North, 90° is East, 180° is South, 270° is West).
  4. Calculate: Click the "Calculate BP" button.
  5. Read Results: The calculator will display the primary result: the destination Latitude and Longitude. It also shows intermediate values like the angular distance and the final azimuth, along with the assumed Earth radius.
  6. Interpret: Use the calculated coordinates for your navigation, mapping, or surveying needs.
  7. Reset: Click "Reset" to clear all fields and return to default values.
  8. Copy: Click "Copy Results" to copy the key outputs to your clipboard for use elsewhere.

How to read results: The primary results are the Latitude and Longitude of your destination point. Pay attention to the sign conventions (positive for North/East, negative for South/West).

Decision-making guidance: Use the calculated BP to verify planned routes, confirm locations, or guide physical movement. For long distances, consider the difference between great-circle paths (shortest distance) and rhumb lines (constant bearing).

Key Factors That Affect Bearing Point Results

Several factors can influence the accuracy and interpretation of Bearing Point calculations:

  1. Earth's Curvature: This is the most significant factor. Treating the Earth as flat leads to substantial errors, especially over long distances. Our calculator uses a spherical model, which is a good approximation.
  2. Earth's Radius Assumption: The Earth is not a perfect sphere but an oblate spheroid. Using a mean radius (like 6371 km) is standard for general calculations, but specific geodetic datums and ellipsoidal models offer higher precision for critical applications.
  3. Accuracy of Input Data: Errors in the starting latitude, longitude, distance, or bearing angle will directly propagate to the calculated Bearing Point. Precise measurements are essential.
  4. Map Projection Distortion: When plotting results on a 2D map, the chosen map projection can distort distances and angles, affecting visual representation. The calculated coordinates themselves are independent of the projection.
  5. Magnetic vs. True North: Bearing angles are typically measured relative to True North. However, compasses point to Magnetic North. The difference (magnetic declination) varies geographically and over time and must be accounted for if using a magnetic compass for input.
  6. Rhumb Line vs. Great Circle: This calculator calculates the destination along a great-circle path (shortest distance). If a constant compass bearing (rhumb line) is maintained, the actual path will differ, especially at higher latitudes, and the endpoint might not be exactly the calculated BP.
  7. Altitude: For most terrestrial navigation, altitude differences are negligible. However, for aviation or satellite calculations, altitude can become a factor.
  8. Time and Tectonic Drift: For extremely precise, long-term positioning, factors like continental drift and changes in the Earth's rotation can subtly alter coordinates over geological timescales, though this is irrelevant for typical map calculations.

Frequently Asked Questions (FAQ)

Q1: What is the difference between Bearing and Azimuth?
A: In many contexts, Bearing and Azimuth are used interchangeably. Azimuth is typically measured clockwise from North (0-360°). Bearing can sometimes refer to a more complex system involving North/South followed by an angle East/West (e.g., N30°E), but for calculations like this, they represent the same directional angle.
Q2: Does this calculator account for the Earth's shape (ellipsoid)?
A: No, this calculator uses a spherical model of the Earth for simplicity and broad applicability. For extremely high-precision geodetic work, specialized software using ellipsoidal models (like WGS84) is required.
Q3: How accurate are the results?
A: The accuracy depends on the input precision and the spherical model assumption. For most practical navigation and mapping purposes, the results are highly accurate. Errors are typically less than 0.5% of the distance traveled.
Q4: Can I use negative values for latitude and longitude?
A: Yes. Use negative values for South latitude and West longitude (e.g., -33.8688 for Sydney, Australia).
Q5: What happens if the distance is very large?
A: The spherical model remains reasonably accurate, but the difference between a great-circle path and a rhumb line becomes more pronounced. The calculator provides the great-circle destination.
Q6: How do I convert my map bearing to the input format?
A: Ensure your bearing is measured clockwise from True North. If your map uses a different convention (e.g., quadrant bearings like N45°E), convert it to the 0-360° format (N45°E becomes 45°, S30°W becomes 210°).
Q7: What is the 'intermediate azimuth' result?
A: This represents the bearing angle from the starting point to the calculated destination point. It's essentially the bearing angle used in the calculation itself.
Q8: Can this calculator calculate the reverse bearing?
A: While this calculator focuses on finding the destination point, the formulas used can be adapted to find the reverse bearing (bearing from the destination back to the start). This often involves calculating the initial forward azimuth and then adjusting it.

Related Tools and Internal Resources

© 2023 Your Company Name. All rights reserved.

var R = 6371; // Earth's mean radius in km function toRadians(degrees) { return degrees * Math.PI / 180; } function toDegrees(radians) { return radians * 180 / Math.PI; } function normalizeLongitude(lon) { while (lon 180) lon -= 360; return lon; } function validateInput(id, errorId, min, max) { var input = document.getElementById(id); var errorDiv = document.getElementById(errorId); var value = parseFloat(input.value); errorDiv.textContent = "; // Clear previous error if (isNaN(value)) { errorDiv.textContent = 'Please enter a valid number.'; return false; } if (id === 'bearingAngle' && (value 360)) { errorDiv.textContent = 'Bearing must be between 0 and 360.'; return false; } if (id === 'startLat' && (value 90)) { errorDiv.textContent = 'Latitude must be between -90 and 90.'; return false; } if (id === 'startLon' && (value 180)) { errorDiv.textContent = 'Longitude must be between -180 and 180.'; return false; } if (id === 'distance' && value < 0) { errorDiv.textContent = 'Distance cannot be negative.'; return false; } return true; } function calculateBP() { var startLatInput = document.getElementById('startLat'); var startLonInput = document.getElementById('startLon'); var distanceInput = document.getElementById('distance'); var bearingAngleInput = document.getElementById('bearingAngle'); var startLatError = document.getElementById('startLatError'); var startLonError = document.getElementById('startLonError'); var distanceError = document.getElementById('distanceError'); var bearingAngleError = document.getElementById('bearingAngleError'); var isValid = true; isValid = validateInput('startLat', 'startLatError', -90, 90) && isValid; isValid = validateInput('startLon', 'startLonError', -180, 180) && isValid; isValid = validateInput('distance', 'distanceError', 0, null) && isValid; isValid = validateInput('bearingAngle', 'bearingAngleError', 0, 360) && isValid; if (!isValid) { document.getElementById('resultsSection').style.display = 'none'; return; } var startLat = parseFloat(startLatInput.value); var startLon = parseFloat(startLonInput.value); var distance = parseFloat(distanceInput.value); var bearingAngle = parseFloat(bearingAngleInput.value); var startLatRad = toRadians(startLat); var startLonRad = toRadians(startLon); var bearingRad = toRadians(bearingAngle); var angularDistance = distance / R; var destLatRad = Math.asin( Math.sin(startLatRad) * Math.cos(angularDistance) + Math.cos(startLatRad) * Math.sin(angularDistance) * Math.cos(bearingRad) ); var y = Math.sin(bearingRad) * Math.sin(angularDistance) * Math.cos(startLatRad); var x = Math.cos(angularDistance) – Math.sin(startLatRad) * Math.sin(destLatRad); var destLonRad = startLonRad + Math.atan2(y, x); var destLat = toDegrees(destLatRad); var destLon = toDegrees(destLonRad); destLon = normalizeLongitude(destLon); // Calculate intermediate azimuth (bearing from start to end) var intermediateAzimuthRad = Math.atan2(y, x); var intermediateAzimuth = toDegrees(intermediateAzimuthRad); intermediateAzimuth = normalizeLongitude(intermediateAzimuth); document.getElementById('bearingPointResult').textContent = toDegrees(destLatRad).toFixed(6) + '°, ' + normalizeLongitude(toDegrees(destLonRad)).toFixed(6) + '°'; document.getElementById('intermediateLat').innerHTML = 'Destination Latitude: ' + destLat.toFixed(6) + '°'; document.getElementById('intermediateLon').innerHTML = 'Destination Longitude: ' + destLon.toFixed(6) + '°'; document.getElementById('intermediateAzimuth').innerHTML = 'Forward Azimuth: ' + bearingAngle.toFixed(2) + '°'; // Display input bearing document.getElementById('assumptionEarthRadius').innerHTML = 'Assumed Earth Radius: ' + R + ' km'; document.getElementById('resultsSection').style.display = 'block'; updateChart(startLat, startLon, destLat, destLon); } function resetCalculator() { document.getElementById('startLat').value = '34.0522'; document.getElementById('startLon').value = '-118.2437'; document.getElementById('distance').value = '100'; document.getElementById('bearingAngle').value = '45'; document.getElementById('startLatError').textContent = "; document.getElementById('startLonError').textContent = "; document.getElementById('distanceError').textContent = "; document.getElementById('bearingAngleError').textContent = "; document.getElementById('resultsSection').style.display = 'none'; // Clear canvas var canvas = document.getElementById('bpChart'); var ctx = canvas.getContext('2d'); ctx.clearRect(0, 0, canvas.width, canvas.height); } function copyResults() { var resultText = "Bearing Point Calculation Results:\n"; resultText += "———————————-\n"; resultText += "Destination Coordinates: " + document.getElementById('bearingPointResult').textContent + "\n"; resultText += document.getElementById('intermediateLat').textContent + "\n"; resultText += document.getElementById('intermediateLon').textContent + "\n"; resultText += document.getElementById('intermediateAzimuth').textContent + "\n"; resultText += document.getElementById('assumptionEarthRadius').textContent + "\n"; resultText += "\nKey Assumptions:\n"; resultText += "- Earth modeled as a sphere with radius " + R + " km.\n"; resultText += "- Input values are accurate.\n"; // Use a temporary textarea to copy var textArea = document.createElement("textarea"); textArea.value = resultText; document.body.appendChild(textArea); textArea.select(); try { var successful = document.execCommand('copy'); var msg = successful ? 'Results copied!' : 'Copy failed'; console.log(msg); // Optionally show a temporary message to the user var copyButton = document.querySelector('.btn-copy'); var originalText = copyButton.textContent; copyButton.textContent = msg; setTimeout(function() { copyButton.textContent = originalText; }, 2000); } catch (err) { console.log('Oops, unable to copy'); } document.body.removeChild(textArea); } function updateChart(startLat, startLon, destLat, destLon) { var canvas = document.getElementById('bpChart'); var ctx = canvas.getContext('2d'); var width = canvas.width; var height = canvas.height; ctx.clearRect(0, 0, width, height); // Clear previous drawing // Simple projection: Assume a small area, treat lat/lon as x/y // This is a simplification for visualization purposes only. // A proper map projection would be needed for accuracy over large areas. // Normalize coordinates for better visualization range if needed var minLat = Math.min(startLat, destLat); var maxLat = Math.max(startLat, destLat); var minLon = Math.min(startLon, destLon); var maxLon = Math.max(startLon, destLon); // Add some padding var latRange = maxLat – minLat; var lonRange = maxLon – minLon; var paddingLat = latRange * 0.2 || 1; // Default padding if range is 0 var paddingLon = lonRange * 0.2 || 1; var displayMinLat = minLat – paddingLat; var displayMaxLat = maxLat + paddingLat; var displayMinLon = minLon – paddingLon; var displayMaxLon = maxLon + paddingLon; // Scale coordinates to canvas dimensions // Y-axis: Latitude (higher latitude = higher on canvas, but canvas Y increases downwards) // X-axis: Longitude (more positive longitude = further right on canvas) var scaleLat = height / (displayMaxLat – displayMinLat); var scaleLon = width / (displayMaxLon – displayMinLon); // Function to convert lat/lon to canvas coordinates function getCanvasCoords(lat, lon) { var canvasX = (lon – displayMinLon) * scaleLon; var canvasY = height – (lat – displayMinLat) * scaleLat; // Invert Y-axis return { x: canvasX, y: canvasY }; } // Draw Starting Point var startCoords = getCanvasCoords(startLat, startLon); ctx.fillStyle = 'blue'; // Primary color for start ctx.beginPath(); ctx.arc(startCoords.x, startCoords.y, 6, 0, Math.PI * 2); ctx.fill(); // Draw Bearing Point var destCoords = getCanvasCoords(destLat, destLon); ctx.fillStyle = '#28a745'; // Success color for destination ctx.beginPath(); ctx.arc(destCoords.x, destCoords.y, 6, 0, Math.PI * 2); ctx.fill(); // Draw Line between points ctx.strokeStyle = 'rgba(0, 74, 153, 0.7)'; // Primary color, slightly transparent ctx.lineWidth = 2; ctx.beginPath(); ctx.moveTo(startCoords.x, startCoords.y); ctx.lineTo(destCoords.x, destCoords.y); ctx.stroke(); } // Initial chart draw on load if default values are present document.addEventListener('DOMContentLoaded', function() { var startLat = parseFloat(document.getElementById('startLat').value); var startLon = parseFloat(document.getElementById('startLon').value); var distance = parseFloat(document.getElementById('distance').value); var bearingAngle = parseFloat(document.getElementById('bearingAngle').value); // Calculate initial destination point to draw the chart var startLatRad = toRadians(startLat); var startLonRad = toRadians(startLon); var bearingRad = toRadians(bearingAngle); var angularDistance = distance / R; var destLatRad = Math.asin( Math.sin(startLatRad) * Math.cos(angularDistance) + Math.cos(startLatRad) * Math.sin(angularDistance) * Math.cos(bearingRad) ); var y = Math.sin(bearingRad) * Math.sin(angularDistance) * Math.cos(startLatRad); var x = Math.cos(angularDistance) – Math.sin(startLatRad) * Math.sin(destLatRad); var destLonRad = startLonRad + Math.atan2(y, x); var destLat = toDegrees(destLatRad); var destLon = normalizeLongitude(toDegrees(destLonRad)); updateChart(startLat, startLon, destLat, destLon); });

Leave a Comment