{
  "$defs": {
    "BetaAngleRange": {
      "additionalProperties": false,
      "properties": {
        "maximum_deg": {
          "maximum": 90.0,
          "minimum": -90.0,
          "title": "Maximum Deg",
          "type": "number"
        },
        "minimum_deg": {
          "maximum": 90.0,
          "minimum": -90.0,
          "title": "Minimum Deg",
          "type": "number"
        }
      },
      "required": [
        "minimum_deg",
        "maximum_deg"
      ],
      "title": "BetaAngleRange",
      "type": "object"
    },
    "EnvironmentCaseKind": {
      "enum": [
        "low",
        "nominal",
        "high",
        "explicit",
        "external"
      ],
      "title": "EnvironmentCaseKind",
      "type": "string"
    },
    "EnvironmentCaseV2": {
      "additionalProperties": false,
      "properties": {
        "albedo_flux_w_per_m2": {
          "minimum": 0.0,
          "title": "Albedo Flux W Per M2",
          "type": "number"
        },
        "applicability": {
          "$ref": "#/$defs/ModelApplicabilityAssessment"
        },
        "atmospheric_density_kg_per_m3": {
          "exclusiveMinimum": 0.0,
          "title": "Atmospheric Density Kg Per M3",
          "type": "number"
        },
        "beta_angle_deg": {
          "anyOf": [
            {
              "maximum": 90.0,
              "minimum": -90.0,
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Beta Angle Deg"
        },
        "beta_angle_range": {
          "anyOf": [
            {
              "$ref": "#/$defs/BetaAngleRange"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "case_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Case Id",
          "type": "string"
        },
        "case_kind": {
          "$ref": "#/$defs/EnvironmentCaseKind"
        },
        "critical_beta_angle_deg": {
          "maximum": 90.0,
          "minimum": 0.0,
          "title": "Critical Beta Angle Deg",
          "type": "number"
        },
        "earth_ir_flux_w_per_m2": {
          "minimum": 0.0,
          "title": "Earth Ir Flux W Per M2",
          "type": "number"
        },
        "maximum_eclipse_duration_s": {
          "minimum": 0.0,
          "title": "Maximum Eclipse Duration S",
          "type": "number"
        },
        "orbital_eclipse_fraction": {
          "maximum": 1.0,
          "minimum": 0.0,
          "title": "Orbital Eclipse Fraction",
          "type": "number"
        },
        "orbital_sunlight_fraction": {
          "maximum": 1.0,
          "minimum": 0.0,
          "title": "Orbital Sunlight Fraction",
          "type": "number"
        },
        "solar_flux_w_per_m2": {
          "exclusiveMinimum": 0.0,
          "title": "Solar Flux W Per M2",
          "type": "number"
        }
      },
      "required": [
        "case_id",
        "case_kind",
        "critical_beta_angle_deg",
        "orbital_sunlight_fraction",
        "orbital_eclipse_fraction",
        "maximum_eclipse_duration_s",
        "solar_flux_w_per_m2",
        "earth_ir_flux_w_per_m2",
        "albedo_flux_w_per_m2",
        "atmospheric_density_kg_per_m3",
        "applicability"
      ],
      "title": "EnvironmentCaseV2",
      "type": "object"
    },
    "EnvironmentModeTermsV2": {
      "additionalProperties": false,
      "properties": {
        "attitude_tag": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Attitude Tag",
          "type": "string"
        },
        "case_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Case Id",
          "type": "string"
        },
        "duration_fraction": {
          "exclusiveMinimum": 0.0,
          "maximum": 1.0,
          "title": "Duration Fraction",
          "type": "number"
        },
        "effective_solar_generation_factor": {
          "maximum": 1.0,
          "minimum": 0.0,
          "title": "Effective Solar Generation Factor",
          "type": "number"
        },
        "mode_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Mode Id",
          "type": "string"
        },
        "solar_incidence_factor": {
          "maximum": 1.0,
          "minimum": 0.0,
          "title": "Solar Incidence Factor",
          "type": "number"
        },
        "sun_access_factor": {
          "maximum": 1.0,
          "minimum": 0.0,
          "title": "Sun Access Factor",
          "type": "number"
        }
      },
      "required": [
        "mode_id",
        "attitude_tag",
        "duration_fraction",
        "case_id",
        "solar_incidence_factor",
        "sun_access_factor",
        "effective_solar_generation_factor"
      ],
      "title": "EnvironmentModeTermsV2",
      "type": "object"
    },
    "EnvironmentOrbitGeometryV2": {
      "additionalProperties": false,
      "properties": {
        "altitude_km": {
          "exclusiveMinimum": 0.0,
          "title": "Altitude Km",
          "type": "number"
        },
        "eccentricity": {
          "default": 0.0,
          "exclusiveMaximum": 1.0,
          "minimum": 0.0,
          "title": "Eccentricity",
          "type": "number"
        },
        "epoch_utc": {
          "anyOf": [
            {
              "maxLength": 40,
              "minLength": 20,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Epoch Utc"
        },
        "inclination_deg": {
          "maximum": 180.0,
          "minimum": 0.0,
          "title": "Inclination Deg",
          "type": "number"
        },
        "local_time_ascending_node_hours": {
          "anyOf": [
            {
              "exclusiveMaximum": 24.0,
              "minimum": 0.0,
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Local Time Ascending Node Hours"
        },
        "regime": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Regime",
          "type": "string"
        },
        "right_ascension_ascending_node_deg": {
          "anyOf": [
            {
              "exclusiveMaximum": 360.0,
              "minimum": 0.0,
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Right Ascension Ascending Node Deg"
        }
      },
      "required": [
        "regime",
        "altitude_km",
        "inclination_deg"
      ],
      "title": "EnvironmentOrbitGeometryV2",
      "type": "object"
    },
    "ModelApplicabilityAssessment": {
      "additionalProperties": false,
      "properties": {
        "active_limitation_ids": {
          "default": [],
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "title": "Active Limitation Ids",
          "type": "array"
        },
        "applicability_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Applicability Id",
          "type": "string"
        },
        "applied_default_policy_ids": {
          "default": [],
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "title": "Applied Default Policy Ids",
          "type": "array"
        },
        "authority_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Authority Id",
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/ModelApplicabilityStatus"
        }
      },
      "required": [
        "authority_id",
        "applicability_id",
        "status"
      ],
      "title": "ModelApplicabilityAssessment",
      "type": "object"
    },
    "ModelApplicabilityStatus": {
      "enum": [
        "applicable",
        "degraded",
        "unsupported"
      ],
      "title": "ModelApplicabilityStatus",
      "type": "string"
    }
  },
  "$id": "urn:sindri:contracts:1.0.0:environment-v2",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "cases": {
      "items": {
        "$ref": "#/$defs/EnvironmentCaseV2"
      },
      "minItems": 1,
      "title": "Cases",
      "type": "array"
    },
    "method_id": {
      "maxLength": 128,
      "minLength": 1,
      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
      "title": "Method Id",
      "type": "string"
    },
    "mission_id": {
      "maxLength": 128,
      "minLength": 1,
      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
      "title": "Mission Id",
      "type": "string"
    },
    "modes": {
      "items": {
        "$ref": "#/$defs/EnvironmentModeTermsV2"
      },
      "minItems": 1,
      "title": "Modes",
      "type": "array"
    },
    "orbit": {
      "$ref": "#/$defs/EnvironmentOrbitGeometryV2"
    },
    "orbit_period_s": {
      "exclusiveMinimum": 0.0,
      "title": "Orbit Period S",
      "type": "number"
    },
    "payload_kind": {
      "const": "environment",
      "default": "environment",
      "title": "Payload Kind",
      "type": "string"
    },
    "payload_version": {
      "const": "2.0.0",
      "default": "2.0.0",
      "title": "Payload Version",
      "type": "string"
    },
    "selected_reference_case_id": {
      "maxLength": 128,
      "minLength": 1,
      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
      "title": "Selected Reference Case Id",
      "type": "string"
    },
    "weighted_effective_solar_generation_factor": {
      "maximum": 1.0,
      "minimum": 0.0,
      "title": "Weighted Effective Solar Generation Factor",
      "type": "number"
    },
    "weighted_orbital_eclipse_fraction": {
      "maximum": 1.0,
      "minimum": 0.0,
      "title": "Weighted Orbital Eclipse Fraction",
      "type": "number"
    },
    "weighted_orbital_sunlight_fraction": {
      "maximum": 1.0,
      "minimum": 0.0,
      "title": "Weighted Orbital Sunlight Fraction",
      "type": "number"
    }
  },
  "required": [
    "mission_id",
    "method_id",
    "orbit",
    "orbit_period_s",
    "selected_reference_case_id",
    "cases",
    "modes",
    "weighted_orbital_sunlight_fraction",
    "weighted_orbital_eclipse_fraction",
    "weighted_effective_solar_generation_factor"
  ],
  "title": "EnvironmentResultV2",
  "type": "object",
  "x-sindri-contract-suite": "sindri.contracts",
  "x-sindri-contract-version": "1.0.0"
}
