From 0f8376afb7a62333e42f495b2facb031082a7fe4 Mon Sep 17 00:00:00 2001 From: Emmanuel Mathot Date: Mon, 13 May 2024 15:49:14 +0200 Subject: [PATCH 1/7] Add orbit state vectors --- .gitignore | 3 +- README.md | 71 +++++++++++++++++++++++++++++---- examples/example-sentinel1.json | 26 ++++++++++++ 3 files changed, 91 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index b68addb..0d19804 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /package-lock.json -/node_modules \ No newline at end of file +/node_modules +.vscode/settings.json diff --git a/README.md b/README.md index d220f86..32c048d 100644 --- a/README.md +++ b/README.md @@ -21,14 +21,15 @@ It will often be combined with other extensions that describe the actual data, s ## Item Properties -| Field Name | Type | Description | -| ------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| sat:platform_international_designator | string | The International Designator, also known as COSPAR ID, and NSSDCA ID | -| sat:orbit_state | string | The state of the orbit. Either `ascending` or `descending` for polar orbiting satellites, or `geostationary` for geosynchronous satellites | -| sat:absolute_orbit | integer | The absolute orbit number at the time of acquisition. | -| sat:relative_orbit | integer | The relative orbit number at the time of acquisition. | -| sat:anx_datetime | string | The [Ascending Node](https://en.wikipedia.org/wiki/Orbital_node) Crossing (ANX) time, in UTC. It is formatted according to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6). | -| sat:cycle | integer | The number of repeat cycle done by the satellite at the time of the acquisition. [Repeat cycle](https://ltb.itc.utwente.nl/page/498/concept/81577) is the time between two successive identical orbits. | +| Field Name | Type | Description | +| ------------------------------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| sat:platform_international_designator | string | The International Designator, also known as COSPAR ID, and NSSDCA ID | +| sat:orbit_state | string | The state of the orbit. Either `ascending` or `descending` for polar orbiting satellites, or `geostationary` for geosynchronous satellites | +| sat:absolute_orbit | integer | The absolute orbit number at the time of acquisition. | +| sat:relative_orbit | integer | The relative orbit number at the time of acquisition. | +| sat:anx_datetime | string | The [Ascending Node](https://en.wikipedia.org/wiki/Orbital_node) Crossing (ANX) time, in UTC. It is formatted according to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6). | +| sat:cycle | integer | The number of repeat cycle done by the satellite at the time of the acquisition. [Repeat cycle](https://ltb.itc.utwente.nl/page/498/concept/81577) is the time between two successive identical orbits. | +| sat:orbit_state_vectors | Map | The state vectors of the satellite at the time of acquisition. | *At least one of the fields must be specified.* @@ -73,6 +74,60 @@ The repeat cycle of the satellite. The repeat cycle is the number of orbits requ position in its orbit. It is used to determine the relative orbit number. For instance, a satellite with a 16-day repeat cycle will have 16 relative orbits. +#### sat:orbit_state_vectors + +The state vectors of the satellite at the time of acquisition. The state vectors are a set of parameters that describe the +position and velocity of the satellite at a given time. The state vectors are used to compute the position of the satellite +at any time during the acquisition. +The state vectors are usually provided in the [ECI](https://en.wikipedia.org/wiki/Earth-centered_inertial) frame. +The field is a map where the key is the time of the state vector and the value is an array of 6 elements (optional 9). +The first 3 elements are the position of the satellite in meters and the last 3 elements are the velocity of the satellite in meters per second. +The optional 3 additional elements are the acceleration of the satellite in meters per second squared. + +Example: + +```json +{ + "sat:orbit_state_vectors": { + "2015-03-05T05:19:40.103Z": [ + 5082939.4189831074, + 1595651.7369050409, + 4648033.5588545678, + 5173.8779329387489, + -269.5432365485845, + -5550.246440359806 + ], + "2015-03-05T05:19:45.449Z": [ + 5110519.0376543682, + 1594174.328112772, + 4618284.7202579351, + 5143.1200754073143, + -283.12343661734587, + -5578.2160610647188 + ], + "2015-03-05T05:19:50.449Z": [ + 5136162.3887853986, + 1592727.024757518, + 4590328.5904560406, + 5114.1961953273549, + -295.79384304587683, + -5604.2108611458289 + ] + } +} +``` + +Optionaly, the state vectors can be provided in a separate file and referenced as a link with relationship type `sat:osv`. + +## Relation types + +The following types should be used as applicable `rel` types in the +[Link Object](https://github.com/radiantearth/stac-spec/tree/master/item-spec/item-spec.md#link-object). + +| Type | Description | +| ------- | -------------------------------------------------- | +| sat:osv | Link to a file containing the orbit state vectors. | + ## Contributing All contributions are subject to the diff --git a/examples/example-sentinel1.json b/examples/example-sentinel1.json index dd26d59..c3d5ea4 100644 --- a/examples/example-sentinel1.json +++ b/examples/example-sentinel1.json @@ -55,6 +55,32 @@ "sat:relative_orbit": 95, "sat:anx_datetime": "2015-03-05T04:41:46.5788740Z", "sat:cycle": 407, + "sat:orbit_state_vectors": { + "2015-03-05T05:19:40.103Z": [ + 5082939.4189831074, + 1595651.7369050409, + 4648033.5588545678, + 5173.8779329387489, + -269.5432365485845, + -5550.246440359806 + ], + "2015-03-05T05:19:45.449Z": [ + 5110519.0376543682, + 1594174.328112772, + 4618284.7202579351, + 5143.1200754073143, + -283.12343661734587, + -5578.2160610647188 + ], + "2015-03-05T05:19:50.449Z": [ + 5136162.3887853986, + 1592727.024757518, + 4590328.5904560406, + 5114.1961953273549, + -295.79384304587683, + -5604.2108611458289 + ] + }, "sar:instrument_mode": "IW", "sar:polarizations": [ "VV", From abc2bd96d3a0284a40e45fd8a02c48026cbafb6c Mon Sep 17 00:00:00 2001 From: Emmanuel Mathot Date: Mon, 13 May 2024 15:50:58 +0200 Subject: [PATCH 2/7] updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f684a59..0767a2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Added cycle field ([#6](https://github.com/stac-extensions/sat/issues/6)) +- Added sat:orbit_state_vectors field ([#8](https://github.com/stac-extensions/sat/issues/8)) ### Changed From 5353f3ac12e2999810e987651cd6a2f363974fee Mon Sep 17 00:00:00 2001 From: Emmanuel Mathot Date: Mon, 13 May 2024 16:51:11 +0200 Subject: [PATCH 3/7] json schema --- README.md | 18 +++++++++--------- examples/example-sentinel1.json | 28 ++++++++++++++-------------- json-schema/schema.json | 19 +++++++++++++++++++ 3 files changed, 42 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 40d24ea..8a2ae67 100644 --- a/README.md +++ b/README.md @@ -21,15 +21,15 @@ It will often be combined with other extensions that describe the actual data, s ## Item Properties -| Field Name | Type | Description | -| ------------------------------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| sat:platform_international_designator | string | The International Designator, also known as COSPAR ID, and NSSDCA ID | -| sat:orbit_state | string | The state of the orbit. Either `ascending` or `descending` for polar orbiting satellites, or `geostationary` for geosynchronous satellites | -| sat:absolute_orbit | integer | The absolute orbit number at the time of acquisition. | -| sat:relative_orbit | integer | The relative orbit number at the time of acquisition. | -| sat:anx_datetime | string | The [Ascending Node](https://en.wikipedia.org/wiki/Orbital_node) Crossing (ANX) time, in UTC. It is formatted according to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6). | -| sat:orbit_cycle | integer | The number of repeat cycle done by the satellite at the time of the acquisition. [Repeat cycle](https://ltb.itc.utwente.nl/page/498/concept/81577) is the time between two successive identical orbits. | -| sat:orbit_state_vectors | Map | The state vectors of the satellite at the time of acquisition. | +| Field Name | Type | Description | +| ------------------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| sat:platform_international_designator | string | The International Designator, also known as COSPAR ID, and NSSDCA ID | +| sat:orbit_state | string | The state of the orbit. Either `ascending` or `descending` for polar orbiting satellites, or `geostationary` for geosynchronous satellites | +| sat:absolute_orbit | integer | The absolute orbit number at the time of acquisition. | +| sat:relative_orbit | integer | The relative orbit number at the time of acquisition. | +| sat:anx_datetime | string | The [Ascending Node](https://en.wikipedia.org/wiki/Orbital_node) Crossing (ANX) time, in UTC. It is formatted according to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6). | +| sat:orbit_cycle | integer | The number of repeat cycle done by the satellite at the time of the acquisition. [Repeat cycle](https://ltb.itc.utwente.nl/page/498/concept/81577) is the time between two successive identical orbits. | +| sat:orbit_state_vectors | Map | The state vectors of the satellite at the time of acquisition. | *At least one of the fields must be specified.* diff --git a/examples/example-sentinel1.json b/examples/example-sentinel1.json index f5862a9..0da39ee 100644 --- a/examples/example-sentinel1.json +++ b/examples/example-sentinel1.json @@ -57,28 +57,28 @@ "sat:orbit_cycle": 407, "sat:orbit_state_vectors": { "2015-03-05T05:19:40.103Z": [ - 5082939.4189831074, - 1595651.7369050409, - 4648033.5588545678, - 5173.8779329387489, + 5082939.418983107, + 1595651.736905041, + 4648033.558854568, + 5173.877932938749, -269.5432365485845, -5550.246440359806 ], "2015-03-05T05:19:45.449Z": [ - 5110519.0376543682, + 5110519.037654368, 1594174.328112772, - 4618284.7202579351, - 5143.1200754073143, - -283.12343661734587, - -5578.2160610647188 + 4618284.720257935, + 5143.120075407314, + -283.1234366173459, + -5578.216061064719 ], "2015-03-05T05:19:50.449Z": [ - 5136162.3887853986, + 5136162.388785399, 1592727.024757518, - 4590328.5904560406, - 5114.1961953273549, - -295.79384304587683, - -5604.2108611458289 + 4590328.590456041, + 5114.196195327355, + -295.7938430458768, + -5604.210861145829 ] }, "sar:instrument_mode": "IW", diff --git a/json-schema/schema.json b/json-schema/schema.json index 7294566..4e489b7 100644 --- a/json-schema/schema.json +++ b/json-schema/schema.json @@ -51,6 +51,11 @@ "required": [ "sat:orbit_cycle" ] + }, + { + "required": [ + "sat:orbit_state_vectors" + ] } ] }, @@ -149,6 +154,20 @@ "sat:orbit_cycle": { "type": "integer", "minimum": 1 + }, + "sat:orbit_state_vectors": { + "type": "object", + "patternProperties": { + "^.*$": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 6, + "maxItems": 9 + } + }, + "additionalProperties": false } }, "patternProperties": { From db831613148d29143066dc81b79205e6b4a2d0e5 Mon Sep 17 00:00:00 2001 From: Emmanuel Mathot Date: Tue, 14 May 2024 09:01:47 +0200 Subject: [PATCH 4/7] Remove .vscode/settings.json --- .vscode/settings.json | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 7709bc6..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "jira-plugin.workingProject": "" -} \ No newline at end of file From 8d3314a84b93600430bb621953a2dfdc02170c2c Mon Sep 17 00:00:00 2001 From: Emmanuel Mathot Date: Mon, 22 Jul 2024 15:34:08 +0200 Subject: [PATCH 5/7] feat: Add validation for orbit state vectors with date-time strings --- json-schema/schema.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/json-schema/schema.json b/json-schema/schema.json index 4e489b7..26e28d0 100644 --- a/json-schema/schema.json +++ b/json-schema/schema.json @@ -158,7 +158,8 @@ "sat:orbit_state_vectors": { "type": "object", "patternProperties": { - "^.*$": { + "$comment": "The key is a date-time string, and the value is an array of numbers.", + "^([\\+-]?\\d{4}(?!\\d{2}\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$": { "type": "array", "items": { "type": "number" From 5926678d8e8ad809980a08d63cf834970cd4291c Mon Sep 17 00:00:00 2001 From: Emmanuel Mathot Date: Mon, 22 Jul 2024 15:57:15 +0200 Subject: [PATCH 6/7] updated versions for validation --- .github/remark.yaml | 5 ++++- examples/example-landsat8.json | 2 +- examples/example-sentinel1.json | 2 +- json-schema/schema.json | 2 +- package.json | 19 ++++++++++--------- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/remark.yaml b/.github/remark.yaml index 9d1b95c..70dddb2 100644 --- a/.github/remark.yaml +++ b/.github/remark.yaml @@ -1,4 +1,6 @@ plugins: +# GitHub Flavored Markdown + - remark-gfm # Check links - validate-links # Apply some recommended defaults for consistency @@ -8,6 +10,7 @@ plugins: # General formatting - - remark-lint-emphasis-marker - '*' + - remark-lint-no-undefined-references - remark-lint-hard-break-spaces - remark-lint-blockquote-indentation - remark-lint-no-consecutive-blank-lines @@ -37,7 +40,7 @@ plugins: - - remark-lint-unordered-list-marker-style - '-' - - remark-lint-list-item-indent - - space + - space # Tables - remark-lint-table-pipes - remark-lint-no-literal-urls diff --git a/examples/example-landsat8.json b/examples/example-landsat8.json index 009e463..4e9a01c 100644 --- a/examples/example-landsat8.json +++ b/examples/example-landsat8.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-rc.2", + "stac_version": "1.0.0", "stac_extensions": [ "https://stac-extensions.github.io/sat/v1.0.0/schema.json", "https://stac-extensions.github.io/view/v1.0.0/schema.json" diff --git a/examples/example-sentinel1.json b/examples/example-sentinel1.json index 0da39ee..38b2bc2 100644 --- a/examples/example-sentinel1.json +++ b/examples/example-sentinel1.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-rc.1", + "stac_version": "1.0.0", "stac_extensions": [ "https://stac-extensions.github.io/sar/v1.0.0/schema.json", "https://stac-extensions.github.io/sat/v1.0.0/schema.json" diff --git a/json-schema/schema.json b/json-schema/schema.json index 26e28d0..076cfb4 100644 --- a/json-schema/schema.json +++ b/json-schema/schema.json @@ -157,8 +157,8 @@ }, "sat:orbit_state_vectors": { "type": "object", + "$comment": "The key is a date-time string, and the value is an array of numbers.", "patternProperties": { - "$comment": "The key is a date-time string, and the value is an array of numbers.", "^([\\+-]?\\d{4}(?!\\d{2}\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$": { "type": "array", "items": { diff --git a/package.json b/package.json index 65b863f..109f9a4 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "stac-extensions", + "name": "stac-extension-sat", "version": "1.0.0", "scripts": { "test": "npm run check-markdown && npm run check-examples", @@ -8,13 +8,14 @@ "format-examples": "stac-node-validator . --format --schemaMap https://stac-extensions.github.io/sat/v1.0.0/schema.json=./json-schema/schema.json" }, "dependencies": { - "remark-cli": "^8.0.0", - "remark-lint": "^7.0.0", - "remark-lint-no-html": "^2.0.0", - "remark-preset-lint-consistent": "^3.0.0", - "remark-preset-lint-markdown-style-guide": "^3.0.0", - "remark-preset-lint-recommended": "^4.0.0", - "remark-validate-links": "^10.0.0", - "stac-node-validator": "^1.0.0" + "remark-cli": "^12.0.0", + "remark-gfm": "^4.0.0", + "remark-lint": "^9.1.2", + "remark-lint-no-html": "^3.1.2", + "remark-preset-lint-consistent": "^5.1.2", + "remark-preset-lint-markdown-style-guide": "^5.1.3", + "remark-preset-lint-recommended": "^6.1.3", + "remark-validate-links": "^13.0.0", + "stac-node-validator": "^1.3.0" } } From 5a29daad13258e72e7254a57333d906ceee80055 Mon Sep 17 00:00:00 2001 From: Emmanuel Mathot Date: Mon, 7 Oct 2024 08:55:45 +0200 Subject: [PATCH 7/7] Update README.md Co-authored-by: Matthias Mohr --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8a2ae67..f317bcc 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ It will often be combined with other extensions that describe the actual data, s | sat:relative_orbit | integer | The relative orbit number at the time of acquisition. | | sat:anx_datetime | string | The [Ascending Node](https://en.wikipedia.org/wiki/Orbital_node) Crossing (ANX) time, in UTC. It is formatted according to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6). | | sat:orbit_cycle | integer | The number of repeat cycle done by the satellite at the time of the acquisition. [Repeat cycle](https://ltb.itc.utwente.nl/page/498/concept/81577) is the time between two successive identical orbits. | -| sat:orbit_state_vectors | Map | The state vectors of the satellite at the time of acquisition. | +| sat:orbit_state_vectors | Map | The state vectors of the satellite at the time of acquisition. | *At least one of the fields must be specified.*