{ "cells": [ { "cell_type": "markdown", "id": "7d3bbaeb", "metadata": {}, "source": [ "# Example - 60 - Compute v_inf and arrival declination from flyby dates (1)" ] }, { "cell_type": "markdown", "id": "111bf35d", "metadata": {}, "source": [ "In this example, we compute the arrival v_inf and declination from a trajectory whose last flyby and arrival dates are known." ] }, { "cell_type": "markdown", "id": "ad9737aa", "metadata": {}, "source": [ "**Note**: This examples requires ```astropy``` and ```poliastro``` to be installed. These are not installed by default when AMAT is installed and must be installed separately using ```pip install astropy``` and ```pip install poliastro```. " ] }, { "cell_type": "code", "execution_count": 1, "id": "fb7b5263", "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "from astropy.time import Time\n", "from AMAT.arrival import Arrival" ] }, { "cell_type": "code", "execution_count": 2, "id": "01af1bca", "metadata": {}, "outputs": [], "source": [ "arrival = Arrival()\n", "arrival.set_vinf_vec_from_lambert_arc(lastFlybyPlanet='JUPITER',\n", " arrivalPlanet='NEPTUNE',\n", " lastFlybyDate=Time(\"2032-06-29 00:00:00\", scale='tdb'),\n", " arrivalDate=Time(\"2039-01-03 00:00:00\", scale='tdb'))" ] }, { "cell_type": "code", "execution_count": 3, "id": "3793363d", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Arrival v_inf vector, ICRF: [17.78952518 8.62038536 3.15801163] km/s\n" ] } ], "source": [ "print(\"Arrival v_inf vector, ICRF: \"+str(arrival.v_inf_vec)+\" km/s\")" ] }, { "cell_type": "code", "execution_count": 4, "id": "c0567db9", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Arrival Declination: 8.76 deg.\n" ] } ], "source": [ "print(\"Arrival Declination: \"+str(round(arrival.declination, 2))+\" deg.\")" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.10" } }, "nbformat": 4, "nbformat_minor": 5 }