Spacex-api: Fairing endpoint

Created on 9 Dec 2020  路  6Comments  路  Source: r-spacex/SpaceX-API

SpaceX has been trying not only to recover fairings, but has also reflown some of them. Usually if a fairing is reused it is announced on Twitter after the static fire is succesfully executed or some minutes prior the liftoff during the webcast.

I thought that an endpoint like this should be like this:

|Field|Explanation|
|---|---|
|id|Assign an unique ID to each half of the fairing, because if two fairing halves fly together, they may fly again on different launches;
|launches|List all launches in which the specific fairing has partecipated
|ships|List all ships who have caught or tried to caught it
|net_landing_attempts|Number of all attempts to landing on the net (both of Ms.Tree/Ms.Chief, since it's quite difficult to say which reflown halves was caught by a specific ship)
|net_landing_success|Number of successfully landing on the net (both of Ms.Tree/Ms.Chief)
|water_landing_attempts|Sometimes one or both ships are unavailable but fairing are still tried to be recovered using GO Searcher. Not all water landings result in succesfull recovery, because fairing can break up.
|water_landing_success|Number of times fairing has been succesfully recovered from water (only if there are no fairing catchers ships available)
|status|List all the results from the various launches, using a sort of enum: caught, recovered from water by fairing catcher, no attempt but recovered, destroyed, no attempt

I'm struggling how to easily represent the status of attempts: the one I wrote above are just the first thing that came up in my mind.

The fairing endpoint that is active now, would be replaced by this one.

Obiouvsly suggestions are welcomed and also @jakewmeyer has the last word, since he is the owner and knows how to implement this.

Feature

Most helpful comment

Yes, that's what I had in my mind and I mixed a little bit what should appear in launch property and what should be in something like the core route.

So the /fairing route would be:

{
  "serial": {
    "type": "String",
    "unique": true,
    "required": true,
  },
  "version": {
    "enum": ["1.0", "2.0", "2.1"]   ##1.0 was the first version withot chutes, 2.0 with chutes but no thermal tip on top (aluminium or something similar), and 2.1 chutes and thermal tip.
    "default": null,
  },
  "status": {
    "type": "String",
    "enum": ["active", "inactive", "unknown", "expended", "lost", "retired"],
    "required": true,
  },
  "reuse_count": {
    "type": "Number",
    "default": 0,
  },
  "net_landing_attempts": {
    "type": "Number",
    "default": 0,
  },
  "net_landing": {
    "type": "Number",
    "default": 0,
  },
  "water_landing_attempts": {
    "type": "Number",
    "default": 0,
  },
  "water_landing": {
    "type": "Number",
    "default": 0,
  },
  "last_update": {
    "type": "String",
    "default": null,
  },
  "launches": [{
    "type": "UUID",
  }],
}

In the launch field, in addition to what you proposed, I would add also only flight field. At the end, it would be, into launch field:

{
  "fairings": [
    {
      "fairing": "5ea6ed30080df4000697c913",
      "flight": 3
      "reused": true,
      "net_attempt": true,
      "net_landing": true,
      "water_landing": false,
      "ships": [
        "5ea6ed2f080df4000697c90d"
      ]
    },
    {
      "fairing": "6e46ed30080df4781697c913",
      "flight": 3
      "reused": true,
      "net_attempt": true,
      "net_landing": true,
      "water_landing": false,
      "ships": [
        "5ea6ed30080df4000697c913"
      ]
    }
  ]
}

Hope it's understandable and thank you for clarifying my messy post.

All 6 comments

Representing the status of attempts in a launch?

No fairing endpoint currently, are you referring to the top level fairings property in launches?

I'd probably handle this in a similar way to how cores work, the /cores route is for looking up the current past history of the core, and the status of that core during a launch lives within the launch.

So in the launch, the new fairings property might look like:

{
  "fairings": [
    {
      "fairing": "5ea6ed30080df4000697c913",
      "reused": true,
      "net_attempt": true,
      "net_landing": true,
      "water_landing": false,
      "ships": [
        "5ea6ed2f080df4000697c90d"
      ]
    },
    {
      "fairing": "6e46ed30080df4781697c913",
      "reused": false,
      "net_attempt": true,
      "net_landing": false,
      "water_landing": true,
      "ships": [
        "5ea6ed30080df4000697c913"
      ]
    }
  ]
}

Yes, that's what I had in my mind and I mixed a little bit what should appear in launch property and what should be in something like the core route.

So the /fairing route would be:

{
  "serial": {
    "type": "String",
    "unique": true,
    "required": true,
  },
  "version": {
    "enum": ["1.0", "2.0", "2.1"]   ##1.0 was the first version withot chutes, 2.0 with chutes but no thermal tip on top (aluminium or something similar), and 2.1 chutes and thermal tip.
    "default": null,
  },
  "status": {
    "type": "String",
    "enum": ["active", "inactive", "unknown", "expended", "lost", "retired"],
    "required": true,
  },
  "reuse_count": {
    "type": "Number",
    "default": 0,
  },
  "net_landing_attempts": {
    "type": "Number",
    "default": 0,
  },
  "net_landing": {
    "type": "Number",
    "default": 0,
  },
  "water_landing_attempts": {
    "type": "Number",
    "default": 0,
  },
  "water_landing": {
    "type": "Number",
    "default": 0,
  },
  "last_update": {
    "type": "String",
    "default": null,
  },
  "launches": [{
    "type": "UUID",
  }],
}

In the launch field, in addition to what you proposed, I would add also only flight field. At the end, it would be, into launch field:

{
  "fairings": [
    {
      "fairing": "5ea6ed30080df4000697c913",
      "flight": 3
      "reused": true,
      "net_attempt": true,
      "net_landing": true,
      "water_landing": false,
      "ships": [
        "5ea6ed2f080df4000697c90d"
      ]
    },
    {
      "fairing": "6e46ed30080df4781697c913",
      "flight": 3
      "reused": true,
      "net_attempt": true,
      "net_landing": true,
      "water_landing": false,
      "ships": [
        "5ea6ed30080df4000697c913"
      ]
    }
  ]
}

Hope it's understandable and thank you for clarifying my messy post.

Looking at this a bit further, and a few thoughts

  1. Going to add recovered to the fairing launch info, for the times that there was a water landing, but no recovery of the fairing, or only pieces recovered.

  2. On Starlink 15, one of the fairing halves had a known origin because it flew twice before, but the other origin wasn't named by SpaceX and it could be any number of fairings. How do you think we should handle this? Thinking the launch fairing details should be populated, but the fairing id should be null. This way reusability stats would stay intact, but they just wouldn't be attributed to a particular fairing half.

Oh right, about point 1 I totally agree. About point 2 also, if there are no information about its origin, it's better to set ID null. Maybe in the next days some info come up and can be updated.

All the changes for this are currently live on the stage environment

Planning on adding the crew role bit next to stage, pinging a group of people to prep updates in line with stage, and then cutting the changes over to prod at a later date.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andrewconnell picture andrewconnell  路  5Comments

samg11 picture samg11  路  3Comments

Tearth picture Tearth  路  4Comments

esper-creative picture esper-creative  路  5Comments

timisenman picture timisenman  路  4Comments