OurskyClient.Sda (OurskyClient v0.1.4)

View Source

Client for the OurSky SDA API https://api.prod.oursky.ai/docs/sda

Summary

Functions

Cancel a plane scan given its UUID

Cancel a volumetric search given its UUID

Create a custom target for your organization using a two-line element set (TLE)

Get node properties given a node's UUID (found in observation sequence results)

Get observation sequence results for a given target UUID

Get target information for a given NORAD ID

Get all targets tasked by your organization

Task a target to be observed given a UUID (OurSky uses immutable UUIDs for each target- these can be retrieved using the get_targets_by_norad_id function)

Untask a target given its UUID.

Functions

cancel_plane_scan(scan_uuid)

Cancel a plane scan given its UUID

Parameters

  • scan_uuid: The UUID of the scan

cancel_volumetric_search(search_uuid)

Cancel a volumetric search given its UUID

Parameters

  • search_uuid: The UUID of the search

create_target(tle_line_1, tle_line_2, name, opts \\ [])

Create a custom target for your organization using a two-line element set (TLE)

Parameters

  • tle_line_1: The first line of the TLE
  • tle_line_2: The second line of the TLE
  • name: The name of the target

Options

  • :mass - Mass in kg (default: 100.0)
  • :area - Cross-sectional area in square meters (default: 1.0)
  • :reflection_coefficient - Reflection coefficient (default: 0.2)
  • :linked_target_id - UUID of linked target (default: nil)

Examples

iex> OurskyClient.Sda.create_target(
...>   "1 25544U 98067A   25080.55743056  .00026289  00000-0  47116-3 0  9999",
...>   "2 25544  51.6381  21.0488 0004053  35.5022 296.1249 15.49747147501567",
...>   "ISS (ZARYA)",
...>   mass: 420000.0,
...>   area: 160.0
...> )
{:ok, "6e801835-4aae-4b78-9741-f10fbab472db"}

get_node_properties(node_uuid)

Get node properties given a node's UUID (found in observation sequence results)

Examples

iex> OurskyClient.Sda.get_node_properties("3be53422-5c54-413c-9a54-2a8e73c0ed27")
{:ok,
%OurskyClient.Sda.Node{
  id: "3be53422-5c54-413c-9a54-2a8e73c0ed27",
  gps_timestamps: false,
  location: %{latitude: 52.200239, longitude: 6.857524, altitude: 30.0},
  mount_type: "EQUITORIAL",
  ota_aperture_mm: 207,
  ota_focal_length_mm: 831,
  pixel_size_microns: 4.78,
  focuser_travel_distance_mm: nil,
  shutter_type: "ROLLING",
  megapixels: 16.236096
}}

get_observation_sequence_results(target_uuid, min_epoch, max_pages \\ 100)

Get observation sequence results for a given target UUID

  • If you intend to receive many observations, set up webhooks on the API console.

Parameters

  • target_uuid: The UUID of the target
  • min_epoch: The minimum epoch to filter results
  • max_pages: The maximum number of pages to retrieve (default: 100)

Examples

iex> OurskyClient.Sda.get_observation_sequence_results("c0baf754-4561-4219-a559-03f648c1208e", "2025-03-21T00:00:00Z")
{:ok, [%OurskyClient.Sda.ObservationSequenceResult{...}]}

get_targets_by_norad_id(norad_id)

Get target information for a given NORAD ID

Examples

iex> OurskyClient.Sda.get_targets_by_norad_id("25544")
{:ok,
[
  %OurskyClient.Sda.SatelliteTarget{
    id: "6e801835-4aae-4b78-9741-f10fbab472db",
    norad_id: "25544",
    name: "ISS (ZARYA)",
    description: nil,
    area: 160.273,
    mass: 20351.0,
    classification: "U",
    reflection_coefficient: nil,
    launch_year: 1998,
    elset_number: nil,
    orbit_type: "LEO",
    mean_motion: 15.497471470000002,
    eccentricity: 4.053e-4,
    inclination: 51.6381,
    raan: 21.0488,
    arg_of_perigee: 35.5022,
    mean_anomaly: 296.1249,
    epoch: ~U[2025-03-21 13:22:42Z],
    mean_motion_dot: nil,
    mean_motion_ddot: 0.0,
    bstar: 0.0,
    tle_line_1: "1 25544U 98067A   25080.55743056  .00026289  00000-0  47116-3 0  9999",
    tle_line_2: "2 25544  51.6381  21.0488 0004053  35.5022 296.1249 15.49747147501567",
    tracking_status: "ACTIVE",
    linked_target_id: nil,
    rev_at_epoch: 50156
  }
]}

get_tasked_targets()

Get all targets tasked by your organization

schedule_plane_scan(target_uuid, step_size \\ 1.0, half_angle_range \\ 5.0)

Schedule a plane scan on a target

  • Searches a target's orbital plane in the specified angle range, centered on the target
  • Returns a UUID for the scan
  • Observations generated by the scan are available in the observation sequence results endpoint or webhooks
  • Webhooks for searches are also available in the API console

Parameters

  • target_uuid: The UUID of the target
  • step_size: The step size in degrees (default: 1.0)
  • half_angle_range: The half angle range in degrees (default: 5.0) - the scan will cover this range on either side of the target

schedule_volumetric_search(target_uuid, radial_3_sigma \\ 20000.0, intrack_3_sigma \\ 50000.0, crosstrack_3_sigma \\ 10000.0, covariance_epoch \\ nil)

Schedule a volumetric search on a target

  • Searches a volume around a target (volume is specified by a 3-sigma RIC uncertainty)
  • Returns a UUID for the search
  • Observations generated by the search are available in the observation sequence results endpoint or webhooks
  • Webhooks for searches are also available in the API console

Parameters

  • target_uuid: The UUID of the target
  • radial_3_sigma: The radial 3-sigma uncertainty in m (default: 20000.0)
  • intrack_3_sigma: The in-track 3-sigma uncertainty in m (default: 50000.0)
  • cross_track_3_sigma: The cross-track 3-sigma uncertainty in m (default: 10000.0)
  • covariance_epoch: The epoch of the covariance in ISO 8601 format (default: nil - use the current epoch)

task_observations_on_target(oursky_target_uuid)

Task a target to be observed given a UUID (OurSky uses immutable UUIDs for each target- these can be retrieved using the get_targets_by_norad_id function)

Returns an OrganizationTarget (SatelliteTarget + tasking information)

Examples

iex> OurskyClient.Sda.task_observations_on_target("c0baf754-4561-4219-a559-03f648c1208e")
{:ok,
%OurskyClient.Sda.OrganizationTarget{
  created_at: ~U[2025-03-21 23:25:50.445716Z],
  created_by: "123e4567-e89b-12d3-a456-426614174000",
  id: "333afd5e-9b4e-4811-8a18-fde7b2604fce",
  revisit_rate_minutes: nil,
  satellite_target: %OurskyClient.Sda.SatelliteTarget{
    id: "c0baf754-4561-4219-a559-03f648c1208e",
    norad_id: "41937",
    name: "SBIRS GEO 4 (USA 273)",
    description: nil,
    area: 33.213,
    mass: nil,
    classification: "U",
    reflection_coefficient: nil,
    launch_year: 2017,
    elset_number: nil,
    orbit_type: "EGO",
    mean_motion: 0.9999522199999998,
    eccentricity: 2.276e-4,
    inclination: 1.5423,
    raan: 21.6811,
    arg_of_perigee: 329.5307,
    mean_anomaly: 172.5673,
    epoch: ~U[2025-03-21 09:49:38.672Z],
    mean_motion_dot: nil,
    mean_motion_ddot: 0.0,
    bstar: 0.0,
    tle_line_1: "1 41937U 17004A   25080.40947537  .00000107  00000-0  00000-0 0  9998",
    tle_line_2: "2 41937   1.5423  21.6811 0002276 329.5307 172.5673  0.99995222 30063",
    tracking_status: "ACTIVE",
    linked_target_id: nil,
    rev_at_epoch: 3006
  }
}}

untask_target(oursky_target_uuid)

Untask a target given its UUID.

Examples

iex> OurskyClient.Sda.untask_target("c0baf754-4561-4219-a559-03f648c1208e")
{:ok, %{"id" => "333afd5e-9b4e-4811-8a18-fde7b2604fce"}}

update_target(target_uuid, tle_line_1, tle_line_2, name, opts \\ [])

PUT request to update a target's TLE