From d8310c51308adcad8e03a17bec0bb9cf389ae963 Mon Sep 17 00:00:00 2001 From: Vishwa Shah Date: Tue, 7 May 2024 15:34:24 -0700 Subject: [PATCH] fix: astrodynamics notebooks (#116) * feat: fix astrodynamics notebooks * feat: update Visualization notebook --- ...dation (Mission Sequence Scenario 1).ipynb | 8 +- ...dation (Mission Sequence Scenario 2).ipynb | 8 +- ...dation (Mission Sequence Scenario 3).ipynb | 8 +- ...dation (Mission Sequence Scenario 4).ipynb | 8 +- .../Access Computation.ipynb | 63 +--- .../Find RF Interference Accesses.ipynb | 2 +- .../Orbit Computation/Untitled.ipynb | 316 ------------------ ...ualize Satellite Trajectory (Cesium).ipynb | 188 +++++++++++ .../Sensor Modeling/Area Coverage.ipynb | 22 +- .../Sensor Modeling/Sensor Modeling.ipynb | 7 +- 10 files changed, 216 insertions(+), 414 deletions(-) delete mode 100644 notebooks/Astrodynamics/Orbit Computation/Untitled.ipynb create mode 100644 notebooks/Astrodynamics/Orbit Computation/Visualize Satellite Trajectory (Cesium).ipynb diff --git a/notebooks/Astrodynamics/Cross Platform Validation/OSTk Cross Platform Validation (Mission Sequence Scenario 1).ipynb b/notebooks/Astrodynamics/Cross Platform Validation/OSTk Cross Platform Validation (Mission Sequence Scenario 1).ipynb index d49a0e0..86ae0c1 100644 --- a/notebooks/Astrodynamics/Cross Platform Validation/OSTk Cross Platform Validation (Mission Sequence Scenario 1).ipynb +++ b/notebooks/Astrodynamics/Cross Platform Validation/OSTk Cross Platform Validation (Mission Sequence Scenario 1).ipynb @@ -465,7 +465,7 @@ "tags": [] }, "source": [ - "# Validation Plots " + "## Validation Plots " ] }, { @@ -4325,7 +4325,7 @@ " )\n", " )\n", "\n", - "figure.show()" + "figure.show(\"svg\")" ] }, { @@ -8156,7 +8156,7 @@ " )\n", " )\n", "\n", - "figure.show()" + "figure.show(\"svg\")" ] } ], @@ -8184,4 +8184,4 @@ }, "nbformat": 4, "nbformat_minor": 4 -} \ No newline at end of file +} diff --git a/notebooks/Astrodynamics/Cross Platform Validation/OSTk Cross Platform Validation (Mission Sequence Scenario 2).ipynb b/notebooks/Astrodynamics/Cross Platform Validation/OSTk Cross Platform Validation (Mission Sequence Scenario 2).ipynb index 7326b8a..839dd35 100644 --- a/notebooks/Astrodynamics/Cross Platform Validation/OSTk Cross Platform Validation (Mission Sequence Scenario 2).ipynb +++ b/notebooks/Astrodynamics/Cross Platform Validation/OSTk Cross Platform Validation (Mission Sequence Scenario 2).ipynb @@ -465,7 +465,7 @@ "tags": [] }, "source": [ - "# Validation Plots " + "## Validation Plots " ] }, { @@ -4324,7 +4324,7 @@ " )\n", " )\n", "\n", - "figure.show()" + "figure.show(\"svg\")" ] }, { @@ -8154,7 +8154,7 @@ " )\n", " )\n", "\n", - "figure.show()" + "figure.show(\"svg\")" ] } ], @@ -8182,4 +8182,4 @@ }, "nbformat": 4, "nbformat_minor": 4 -} \ No newline at end of file +} diff --git a/notebooks/Astrodynamics/Cross Platform Validation/OSTk Cross Platform Validation (Mission Sequence Scenario 3).ipynb b/notebooks/Astrodynamics/Cross Platform Validation/OSTk Cross Platform Validation (Mission Sequence Scenario 3).ipynb index 945ec18..7c33f10 100644 --- a/notebooks/Astrodynamics/Cross Platform Validation/OSTk Cross Platform Validation (Mission Sequence Scenario 3).ipynb +++ b/notebooks/Astrodynamics/Cross Platform Validation/OSTk Cross Platform Validation (Mission Sequence Scenario 3).ipynb @@ -465,7 +465,7 @@ "tags": [] }, "source": [ - "# Validation Plots " + "## Validation Plots " ] }, { @@ -4324,7 +4324,7 @@ " )\n", " )\n", "\n", - "figure.show()" + "figure.show(\"svg\")" ] }, { @@ -8154,7 +8154,7 @@ " )\n", " )\n", "\n", - "figure.show()" + "figure.show(\"svg\")" ] } ], @@ -8182,4 +8182,4 @@ }, "nbformat": 4, "nbformat_minor": 4 -} \ No newline at end of file +} diff --git a/notebooks/Astrodynamics/Cross Platform Validation/OSTk Cross Platform Validation (Mission Sequence Scenario 4).ipynb b/notebooks/Astrodynamics/Cross Platform Validation/OSTk Cross Platform Validation (Mission Sequence Scenario 4).ipynb index 934c808..abc57bc 100644 --- a/notebooks/Astrodynamics/Cross Platform Validation/OSTk Cross Platform Validation (Mission Sequence Scenario 4).ipynb +++ b/notebooks/Astrodynamics/Cross Platform Validation/OSTk Cross Platform Validation (Mission Sequence Scenario 4).ipynb @@ -479,7 +479,7 @@ "tags": [] }, "source": [ - "# Validation Plots " + "## Validation Plots " ] }, { @@ -4338,7 +4338,7 @@ " )\n", " )\n", "\n", - "figure.show()" + "figure.show(\"svg\")" ] }, { @@ -8168,7 +8168,7 @@ " )\n", " )\n", "\n", - "figure.show()" + "figure.show(\"svg\")" ] } ], @@ -8196,4 +8196,4 @@ }, "nbformat": 4, "nbformat_minor": 4 -} \ No newline at end of file +} diff --git a/notebooks/Astrodynamics/Orbit Computation/Access Computation.ipynb b/notebooks/Astrodynamics/Orbit Computation/Access Computation.ipynb index 2f95f83..7525591 100644 --- a/notebooks/Astrodynamics/Orbit Computation/Access Computation.ipynb +++ b/notebooks/Astrodynamics/Orbit Computation/Access Computation.ipynb @@ -31,7 +31,7 @@ "\n", "import plotly.graph_objs as go\n", "\n", - "from ostk.mathematics.objects import RealInterval\n", + "from ostk.mathematics.object import RealInterval\n", "\n", "from ostk.physics import Environment\n", "from ostk.physics.unit import Length\n", @@ -43,10 +43,8 @@ "from ostk.physics.time import DateTime\n", "from ostk.physics.time import Time\n", "from ostk.physics.coordinate.spherical import LLA\n", - "from ostk.physics.coordinate.spherical import AER\n", "from ostk.physics.coordinate import Position\n", "from ostk.physics.coordinate import Frame\n", - "from ostk.physics.environment.object.celestial import Earth\n", "\n", "from ostk.astrodynamics import Trajectory\n", "from ostk.astrodynamics.trajectory import Orbit\n", @@ -54,7 +52,9 @@ "from ostk.astrodynamics.trajectory.orbit.model.kepler import COE\n", "from ostk.astrodynamics.trajectory.orbit.model import SGP4\n", "from ostk.astrodynamics.trajectory.orbit.model.sgp4 import TLE\n", - "from ostk.astrodynamics.access import Generator as AccessGenerator" + "from ostk.astrodynamics.access import Generator as AccessGenerator\n", + "from ostk.astrodynamics.utilities import compute_trajectory_geometry\n", + "from ostk.astrodynamics.utilities import compute_time_lla_aer_state" ] }, { @@ -764,62 +764,9 @@ "metadata": {}, "outputs": [], "source": [ - "def compute_lla(state):\n", - " lla = LLA.cartesian(\n", - " state.get_position()\n", - " .in_frame(Frame.ITRF(), state.get_instant())\n", - " .get_coordinates(),\n", - " earth.get_equatorial_radius(),\n", - " earth.get_flattening(),\n", - " )\n", - "\n", - " return [\n", - " float(lla.get_latitude().in_degrees()),\n", - " float(lla.get_longitude().in_degrees()),\n", - " float(lla.get_altitude().in_meters()),\n", - " ]\n", - "\n", - "\n", - "def compute_aer(instant, from_lla, to_position):\n", - " nedFrame = earth.get_frame_at(from_lla, Earth.FrameType.NED)\n", - "\n", - " fromPosition_NED = from_position.in_frame(nedFrame, instant)\n", - " sunPosition_NED = to_position.in_frame(nedFrame, instant)\n", - "\n", - " aer = AER.from_position_to_position(fromPosition_NED, sunPosition_NED, True)\n", - "\n", - " return [\n", - " float(aer.get_azimuth().in_degrees()),\n", - " float(aer.get_elevation().in_degrees()),\n", - " float(aer.get_range().in_meters()),\n", - " ]\n", - "\n", - "\n", - "def compute_time_lla_aer_state(state):\n", - " instant = state.get_instant()\n", - "\n", - " lla = compute_lla(state)\n", - " aer = compute_aer(\n", - " instant,\n", - " from_lla,\n", - " state.get_position().in_frame(Frame.ITRF(), state.get_instant()),\n", - " )\n", - "\n", - " return [instant, lla[0], lla[1], lla[2], aer[0], aer[1], aer[2]]\n", - "\n", - "\n", - "def compute_trajectory_geometry(aTrajectory, anInterval):\n", - " return [\n", - " compute_lla(state)\n", - " for state in aTrajectory.get_states_at(\n", - " anInterval.generate_grid(Duration.minutes(1.0))\n", - " )\n", - " ]\n", - "\n", - "\n", "def compute_access_geometry(access):\n", " return [\n", - " compute_time_lla_aer_state(state)\n", + " compute_time_lla_aer_state(state, from_lla, environment)\n", " for state in satellite_orbit.get_states_at(\n", " access.get_interval().generate_grid(Duration.seconds(1.0))\n", " )\n", diff --git a/notebooks/Astrodynamics/Orbit Computation/Find RF Interference Accesses.ipynb b/notebooks/Astrodynamics/Orbit Computation/Find RF Interference Accesses.ipynb index c2a1781..0042e80 100644 --- a/notebooks/Astrodynamics/Orbit Computation/Find RF Interference Accesses.ipynb +++ b/notebooks/Astrodynamics/Orbit Computation/Find RF Interference Accesses.ipynb @@ -36,7 +36,7 @@ "\n", "from tqdm.notebook import tqdm\n", "\n", - "from ostk.mathematics.objects import RealInterval\n", + "from ostk.mathematics.object import RealInterval\n", "\n", "from ostk.physics import Environment\n", "from ostk.physics.coordinate import Position\n", diff --git a/notebooks/Astrodynamics/Orbit Computation/Untitled.ipynb b/notebooks/Astrodynamics/Orbit Computation/Untitled.ipynb deleted file mode 100644 index 7a4c91b..0000000 --- a/notebooks/Astrodynamics/Orbit Computation/Untitled.ipynb +++ /dev/null @@ -1,316 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "260b01cf-af50-4a65-8388-06917b48aab8", - "metadata": {}, - "source": [ - "### Visualize satellite states" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "id": "d804ee69-a904-4767-a98a-12c31a465b2c", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Collecting cesiumpy\n", - " Cloning https://github.com/lucas-bremond/cesiumpy.git to /tmp/pip-install-0kl85nsi/cesiumpy_e1a0d6eaf347436da387af6bda24b0a6\n", - " Running command git clone --filter=blob:none --quiet https://github.com/lucas-bremond/cesiumpy.git /tmp/pip-install-0kl85nsi/cesiumpy_e1a0d6eaf347436da387af6bda24b0a6\n", - " Resolved https://github.com/lucas-bremond/cesiumpy.git to commit 81f11427b708206cb74d0c42c734960ae3fb9bad\n", - " Running command git submodule update --init --recursive -q\n", - " Preparing metadata (setup.py) ... \u001b[?25ldone\n", - "\u001b[?25hRequirement already satisfied: six in /opt/conda/lib/python3.11/site-packages (from cesiumpy) (1.16.0)\n", - "Requirement already satisfied: traitlets in /opt/conda/lib/python3.11/site-packages (from cesiumpy) (5.9.0)\n", - "Collecting geopy>=1.11.0 (from cesiumpy)\n", - " Obtaining dependency information for geopy>=1.11.0 from https://files.pythonhosted.org/packages/e1/58/9289c6a03116025cdb61461d99b2493daa4967a80b13755463d71a0affeb/geopy-2.4.0-py3-none-any.whl.metadata\n", - " Downloading geopy-2.4.0-py3-none-any.whl.metadata (6.8 kB)\n", - "Collecting geographiclib<3,>=1.52 (from geopy>=1.11.0->cesiumpy)\n", - " Downloading geographiclib-2.0-py3-none-any.whl (40 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m40.3/40.3 kB\u001b[0m \u001b[31m3.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hDownloading geopy-2.4.0-py3-none-any.whl (125 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m125.4/125.4 kB\u001b[0m \u001b[31m10.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hBuilding wheels for collected packages: cesiumpy\n", - " Building wheel for cesiumpy (setup.py) ... \u001b[?25ldone\n", - "\u001b[?25h Created wheel for cesiumpy: filename=cesiumpy-0.4.0.dev0-py3-none-any.whl size=4788128 sha256=1cdac1dbb54b84b00cfe7d1e154fb931a16f99022c1526179275c4c0e966b46b\n", - " Stored in directory: /tmp/pip-ephem-wheel-cache-o2ct_vws/wheels/fa/fa/50/c47d1d9ae6acc5d3d61d1ba896e9267c1f5b7e4e5700739bfa\n", - "Successfully built cesiumpy\n", - "Installing collected packages: geographiclib, geopy, cesiumpy\n", - "Successfully installed cesiumpy-0.4.0.dev0 geographiclib-2.0 geopy-2.4.0\n" - ] - } - ], - "source": [ - "import sys\n", - "\n", - "!{sys.executable} -m pip install git+https://github.com/lucas-bremond/cesiumpy.git#egg=cesiumpy" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "id": "a2734ee4-5d74-4f5c-b615-597d0dee26c2", - "metadata": {}, - "outputs": [], - "source": [ - "from ostk.physics import Environment\n", - "from ostk.physics.unit import Length\n", - "from ostk.physics.unit import Angle\n", - "from ostk.physics.time import Instant\n", - "from ostk.physics.time import Interval\n", - "from ostk.physics.time import Duration\n", - "from ostk.physics.time import DateTime\n", - "from ostk.physics.time import Time\n", - "from ostk.physics.time import Scale\n", - "from ostk.physics.unit import Length\n", - "from ostk.physics.coordinate import Position\n", - "from ostk.physics.coordinate import Frame\n", - "\n", - "from ostk.astrodynamics.trajectory import Orbit\n", - "from ostk.astrodynamics.flight import Profile\n", - "from ostk.astrodynamics.viewer import Viewer\n", - "from ostk.astrodynamics.viewer import ConicSensor" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "id": "ebe3537c-c5cb-4a36-b6f7-2bdeb285597c", - "metadata": {}, - "outputs": [], - "source": [ - "environment = Environment.default()" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "id": "a2f9f6c7-83d0-4b8c-b273-7025cc10e9f3", - "metadata": {}, - "outputs": [], - "source": [ - "orbit = Orbit.sun_synchronous(\n", - " epoch=Instant.date_time(DateTime(2023, 1, 1, 0, 0, 0), Scale.UTC),\n", - " altitude=Length.kilometers(500.0),\n", - " local_time_at_descending_node=Time(14, 0, 0),\n", - " celestial_object=environment.access_celestial_object_with_name(\"Earth\"),\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "id": "82a79278-fd35-4468-a6b4-a9f69ebdf9c3", - "metadata": {}, - "outputs": [], - "source": [ - "profile = Profile.nadir_pointing(\n", - " orbit=orbit,\n", - " orbital_frame_type=Orbit.FrameType.VVLH,\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": 20, - "id": "ed194065-f81d-4a86-8470-1c86278709de", - "metadata": {}, - "outputs": [], - "source": [ - "interval = Interval.closed(\n", - " start_instant=Instant.date_time(DateTime(2023, 1, 1, 0, 0, 0), Scale.UTC),\n", - " end_instant=Instant.date_time(DateTime(2023, 1, 1, 0, 10, 0), Scale.UTC),\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": 29, - "id": "b69434f8-10ad-48dc-824c-5da081203f6f", - "metadata": {}, - "outputs": [], - "source": [ - "viewer = Viewer(\n", - " interval=interval,\n", - " cesium_token=\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI2NzNkYWEzMy0wMjBiLTRmMjctYjQ0OC0zYmI5MWI5OWMzZmIiLCJpZCI6MTAwMTgyLCJpYXQiOjE2NTcwNDY1NTV9.C9vziiqYdR7e6SQfLz5FueXB27R4SeuZv0Nn_vIeHIg\",\n", - ")\n", - "viewer.add_profile(\n", - " profile=profile,\n", - " step=Duration.seconds(30.0),\n", - " show_orbital_track=True,\n", - " cesium_asset_id=123,\n", - " sensors=[\n", - " ConicSensor(\n", - " name=\"star_tracker\",\n", - " direction=(1.0, 0.0, 0.0),\n", - " half_angle=Angle.degrees(8.0),\n", - " length=Length.meters(0.1),\n", - " color=\"red\",\n", - " )\n", - " ],\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": 30, - "id": "6466e462-a178-472a-bfd2-4625f40f1bcc", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "
\n", - "" - ], - "text/plain": [ - "" - ] - }, - "execution_count": 30, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "viewer" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "7cf6843b-e76e-4025-b8b7-fedd29ae11ce", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "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.11.5" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} \ No newline at end of file diff --git a/notebooks/Astrodynamics/Orbit Computation/Visualize Satellite Trajectory (Cesium).ipynb b/notebooks/Astrodynamics/Orbit Computation/Visualize Satellite Trajectory (Cesium).ipynb new file mode 100644 index 0000000..a34ac2c --- /dev/null +++ b/notebooks/Astrodynamics/Orbit Computation/Visualize Satellite Trajectory (Cesium).ipynb @@ -0,0 +1,188 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "260b01cf-af50-4a65-8388-06917b48aab8", + "metadata": {}, + "source": [ + "### Visualize Satellite States (Cesium)" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "d804ee69-a904-4767-a98a-12c31a465b2c", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Collecting cesiumpy\n", + " Cloning https://github.com/open-space-collective/cesiumpy.git to /tmp/pip-install-5mv25b95/cesiumpy_f3d9a4e417b848c6b6bdb04198f81902\n", + " Running command git clone --filter=blob:none --quiet https://github.com/open-space-collective/cesiumpy.git /tmp/pip-install-5mv25b95/cesiumpy_f3d9a4e417b848c6b6bdb04198f81902\n", + " Resolved https://github.com/open-space-collective/cesiumpy.git to commit d72945ab0816cd459c5083c817fa94c0b563c46a\n", + " Running command git submodule update --init --recursive -q\n", + " Preparing metadata (setup.py) ... \u001b[?25ldone\n", + "\u001b[?25hRequirement already satisfied: six in /opt/conda/lib/python3.10/site-packages (from cesiumpy) (1.16.0)\n", + "Requirement already satisfied: traitlets in /opt/conda/lib/python3.10/site-packages (from cesiumpy) (5.9.0)\n", + "Requirement already satisfied: geopy>=1.11.0 in /opt/conda/lib/python3.10/site-packages (from cesiumpy) (2.4.1)\n", + "Requirement already satisfied: geographiclib<3,>=1.52 in /opt/conda/lib/python3.10/site-packages (from geopy>=1.11.0->cesiumpy) (2.0)\n", + "\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.3.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.0\u001b[0m\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n" + ] + } + ], + "source": [ + "import sys\n", + "\n", + "!{sys.executable} -m pip install git+https://github.com/open-space-collective/cesiumpy.git#egg=cesiumpy" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "a2734ee4-5d74-4f5c-b615-597d0dee26c2", + "metadata": {}, + "outputs": [], + "source": [ + "import os\n", + "\n", + "from ostk.physics import Environment\n", + "from ostk.physics.unit import Length\n", + "from ostk.physics.unit import Angle\n", + "from ostk.physics.time import Instant\n", + "from ostk.physics.time import Interval\n", + "from ostk.physics.time import Duration\n", + "from ostk.physics.time import DateTime\n", + "from ostk.physics.time import Time\n", + "from ostk.physics.time import Scale\n", + "from ostk.physics.unit import Length\n", + "\n", + "from ostk.astrodynamics.trajectory import Orbit\n", + "from ostk.astrodynamics.flight import Profile\n", + "from ostk.astrodynamics.viewer import Viewer\n", + "from ostk.astrodynamics.viewer import ConicSensor" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "ebe3537c-c5cb-4a36-b6f7-2bdeb285597c", + "metadata": {}, + "outputs": [], + "source": [ + "environment = Environment.default()" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "a2f9f6c7-83d0-4b8c-b273-7025cc10e9f3", + "metadata": {}, + "outputs": [], + "source": [ + "orbit = Orbit.sun_synchronous(\n", + " epoch=Instant.date_time(DateTime(2023, 1, 1, 0, 0, 0), Scale.UTC),\n", + " altitude=Length.kilometers(500.0),\n", + " local_time_at_descending_node=Time(14, 0, 0),\n", + " celestial_object=environment.access_celestial_object_with_name(\"Earth\"),\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "82a79278-fd35-4468-a6b4-a9f69ebdf9c3", + "metadata": {}, + "outputs": [], + "source": [ + "profile = Profile.nadir_pointing(\n", + " orbit=orbit,\n", + " orbital_frame_type=Orbit.FrameType.VVLH,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "ed194065-f81d-4a86-8470-1c86278709de", + "metadata": {}, + "outputs": [], + "source": [ + "interval = Interval.closed(\n", + " start_instant=Instant.date_time(DateTime(2023, 1, 1, 0, 0, 0), Scale.UTC),\n", + " end_instant=Instant.date_time(DateTime(2023, 1, 1, 3, 0, 0), Scale.UTC),\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "b69434f8-10ad-48dc-824c-5da081203f6f", + "metadata": {}, + "outputs": [], + "source": [ + "viewer = Viewer(\n", + " interval=interval,\n", + " cesium_token=os.environ.get(\"CESIUM_TOKEN\"), # Get a token from https://cesium.com/learn/ion/cesium-ion-access-tokens/\n", + ")\n", + "viewer.add_profile(\n", + " profile=profile,\n", + " step=Duration.seconds(30.0),\n", + " show_orbital_track=True,\n", + " cesium_asset_id=669199,\n", + " sensors=[\n", + " ConicSensor(\n", + " name=\"Payload\",\n", + " direction=(0.0, 0.0, 1.0),\n", + " half_angle=Angle.degrees(8.0),\n", + " length=Length.meters(1.0),\n", + " color=\"red\",\n", + " )\n", + " ],\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "6466e462-a178-472a-bfd2-4625f40f1bcc", + "metadata": {}, + "outputs": [], + "source": [ + "viewer" + ] + }, + { + "cell_type": "markdown", + "id": "de018151", + "metadata": {}, + "source": [ + "---" + ] + } + ], + "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.10.9" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/notebooks/Astrodynamics/Sensor Modeling/Area Coverage.ipynb b/notebooks/Astrodynamics/Sensor Modeling/Area Coverage.ipynb index c1ac847..cd6c745 100644 --- a/notebooks/Astrodynamics/Sensor Modeling/Area Coverage.ipynb +++ b/notebooks/Astrodynamics/Sensor Modeling/Area Coverage.ipynb @@ -32,47 +32,31 @@ "\n", "import plotly.graph_objs as go\n", "\n", - "from ostk.mathematics.geometry.d2 import Object\n", "from ostk.mathematics.geometry.d2.object import Point as Point2d\n", "from ostk.mathematics.geometry.d2.object import LineString as LineString2d\n", "from ostk.mathematics.geometry.d2.object import Polygon as Polygon2d\n", "from ostk.mathematics.geometry.d3.object import Point as Point3d\n", "from ostk.mathematics.geometry.d3.object import Polygon as Polygon3d\n", - "from ostk.mathematics.geometry.d3.object import Ellipsoid\n", "from ostk.mathematics.geometry.d3.object import Pyramid\n", "from ostk.mathematics.geometry.d3.object import Cone\n", "from ostk.mathematics.geometry.d3.transformation.rotation import Quaternion\n", "from ostk.mathematics.geometry.d3.transformation.rotation import RotationVector\n", - "from ostk.mathematics.geometry.d3.transformation.rotation import RotationMatrix\n", "from ostk.mathematics.geometry import Angle as MathAngle\n", "\n", - "from ostk.physics.unit import Length\n", - "from ostk.physics.unit import Angle\n", - "from ostk.physics.time import Scale\n", - "from ostk.physics.time import Instant\n", "from ostk.physics.time import Duration\n", "from ostk.physics.time import Interval\n", - "from ostk.physics.time import DateTime\n", "from ostk.physics.coordinate.spherical import LLA\n", "from ostk.physics.coordinate.spherical import AER\n", - "from ostk.physics.coordinate import Position\n", - "from ostk.physics.coordinate import Velocity\n", "from ostk.physics.coordinate import Frame\n", "from ostk.physics.coordinate import Transform\n", - "from ostk.physics.coordinate.frame.providers import Dynamic as DynamicFrameProvider\n", + "from ostk.physics.coordinate.frame.provider import Dynamic as DynamicFrameProvider\n", "from ostk.physics import Environment\n", "from ostk.physics.environment.object import Geometry\n", "from ostk.physics.environment.object import Celestial\n", - "from ostk.physics.environment.object.celestial import Earth\n", "\n", - "from ostk.astrodynamics import Trajectory\n", - "from ostk.astrodynamics.trajectory import State\n", "from ostk.astrodynamics.trajectory import Orbit\n", - "from ostk.astrodynamics.trajectory.orbit.model import Kepler\n", - "from ostk.astrodynamics.trajectory.orbit.model.kepler import COE\n", "from ostk.astrodynamics.trajectory.orbit.model import SGP4\n", - "from ostk.astrodynamics.trajectory.orbit.model.sgp4 import TLE\n", - "from ostk.astrodynamics import Access" + "from ostk.astrodynamics.trajectory.orbit.model.sgp4 import TLE" ] }, { @@ -1237,4 +1221,4 @@ }, "nbformat": 4, "nbformat_minor": 4 -} \ No newline at end of file +} diff --git a/notebooks/Astrodynamics/Sensor Modeling/Sensor Modeling.ipynb b/notebooks/Astrodynamics/Sensor Modeling/Sensor Modeling.ipynb index 99554c7..43a4cf4 100644 --- a/notebooks/Astrodynamics/Sensor Modeling/Sensor Modeling.ipynb +++ b/notebooks/Astrodynamics/Sensor Modeling/Sensor Modeling.ipynb @@ -18,7 +18,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Setup" + "## Setup" ] }, { @@ -42,7 +42,6 @@ "from ostk.mathematics.geometry.d3.object import Cone\n", "from ostk.mathematics.geometry.d3.transformation.rotation import Quaternion\n", "from ostk.mathematics.geometry.d3.transformation.rotation import RotationVector\n", - "from ostk.mathematics.geometry.d3.transformation.rotation import RotationMatrix\n", "\n", "from ostk.physics.unit import Length\n", "from ostk.physics.unit import Angle\n", @@ -56,7 +55,7 @@ "from ostk.physics.coordinate import Position\n", "from ostk.physics.coordinate import Frame\n", "from ostk.physics.coordinate import Transform\n", - "from ostk.physics.coordinate.frame.providers import Dynamic as DynamicFrameProvider\n", + "from ostk.physics.coordinate.frame.provider import Dynamic as DynamicFrameProvider\n", "from ostk.physics import Environment\n", "from ostk.physics.environment.object import Geometry\n", "from ostk.physics.environment.object import Celestial\n", @@ -1120,4 +1119,4 @@ }, "nbformat": 4, "nbformat_minor": 4 -} \ No newline at end of file +}