trajectory" />

Trajectory tool

Model API name: trajectory

Orbit generator

Version: v1

Model developer:

Model provision:
NoM


Model example


# coding=utf-8
from datetime import datetime, timedelta

from nom_client.nom_client import NoMClient



def convert_cmjd_to_datetime(modified_julian_date):
    return datetime(1950, 1, 1, 0, 0, 0) + timedelta(days=modified_julian_date)

nom_client = NoMClient(project_name="Saturn trajectory example")


trajectory_model = nom_client.get_model('trajectory')

saturn_radius = 60280 #km

trajectory_model.set_params(orbitSpecificationCode=205,
                       epoch="2020-01-01 12:00:00",
                       startDate="2020-01-02 12:00:00",
                       missionDuration=30,
                       naifCode=699,
                       perigeeAltitude=3*saturn_radius,
                       apogeeAltitude=5*saturn_radius,
                       raan=0,
                       inclination=0, trueAnomaly=0,
                       argumentOfPerigee=0,
                            altitudeSteps=[3*saturn_radius, 5*saturn_radius],
                            timeSteps=[60, 240, 3600]
                            )

trajectory__result = nom_client.run_model(trajectory_model)
print(trajectory__result)

trajectory__result['trajectory'].result_meta_data["spenvis"]

trajectory_data = trajectory__result['trajectory']

mjd_values = trajectory_data['mjd'].values.squeeze().tolist()

# X, Y, Z
position_values = trajectory_data['position'].values.T.tolist()

# Vx, Vy, Vz
velocity_values = trajectory_data['velocity'].values.T.tolist()

for i in range(len(mjd_values)):
    print(f"{convert_cmjd_to_datetime(mjd_values[i])} {position_values[i][0]} {position_values[i][1]} {position_values[i][2]}")

         
Model references

No references