-
Notifications
You must be signed in to change notification settings - Fork 64
Add ScanOrganic schema 1.0 #230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Silarn
wants to merge
6
commits into
EDCD:develop
Choose a base branch
from
Silarn:scanorganic-1.0
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
651add8
Add ScanOrganic schema 1.0
Silarn a372436
Add lat/long and other corrections
Silarn a24fa98
Applying changes as per discussion
Silarn 0e0d5db
Move status.json readme text
Silarn 8be89a5
Make StarSystem required, remove StarPos as per discussion
Silarn bf7d75b
Restore StarPos as per discussion
Silarn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| # EDDN ScanOrganic Schema | ||
|
|
||
| ## Introduction | ||
| Here we document how to take data from an ED `ScanOrganic` Journal Event and | ||
| properly structure it for sending to EDDN. | ||
|
|
||
| Please consult [EDDN Schemas README](./README-EDDN-schemas.md) for general | ||
| documentation for a schema such as this. | ||
|
|
||
| If you find any discrepancies between what this document says and what is | ||
| defined in the relevant Schema file, then you should, in the first instance, | ||
| assume that it is the Schema file that is correct. | ||
| **PLEASE open | ||
| [an issue on GitHub](https://github.com/EDCD/EDDN/issues/new/choose) | ||
| to report any such anomalies you find so that we can check and resolve the | ||
| discrepancy.** | ||
|
|
||
| ## Senders | ||
| The primary data source for this schema is the ED Journal event `ScanOrganic`. | ||
|
|
||
| ### ScanType | ||
| The 'Analyse' scan type only triggers when you have the scan tool out for a | ||
| long enough duration following your third scan. It's possible to put away the | ||
| tool before this completes and the event will then trigger the next time the | ||
| tool is used, which could be in another system entirely. For this reason, | ||
| it may report incorrect data and is thus excluded from submission. | ||
|
|
||
| ### Variant | ||
| Variant should be reported if present. It was not included in older journal | ||
| versions and therefore is not required to facilitate older journal submissions. | ||
|
|
||
| ### Augmentations | ||
| #### horizons and odyssey flags | ||
| Please read [horizons and odyssey flags](../docs/Developers.md#horizons-and-odyssey-flags) | ||
| in the Developers' documentation. | ||
|
|
||
| #### gameversion and gamebuild | ||
| You **MUST** always set these as per [the relevant section](../docs/Developers.md#gameversions-and-gamebuild) | ||
| of the Developers' documentation. | ||
|
|
||
| #### StarSystem | ||
| You MUST add a StarSystem key/value pair representing the name of the system | ||
| this event occurred in. Source this from either Location, FSDJump or | ||
| CarrierJump as appropriate. | ||
|
|
||
| **You MUST apply a location cross-check, as per | ||
| [Other data augmentations](../docs/Developers.md#other-data-augmentations).** | ||
|
|
||
| #### StarPos | ||
| You MUST add a `StarPos` array containing the system co-ordinates from the | ||
| last `FSDJump`, `CarrierJump`, or `Location` event. | ||
|
|
||
| **You MUST apply a location cross-check, as per | ||
| [Other data augmentations](../docs/Developers.md#other-data-augmentations).** | ||
Silarn marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| #### BodyID and BodyName | ||
| BodyID is already present in the form of the 'Body' key. This should be | ||
| renamed to BodyID to mirror many other events. | ||
|
|
||
| You MUST track `BodyName` both from Status.json *and* also from some | ||
| Journal events in order to cross-check it before using the `Body` from | ||
| Journal events. | ||
|
|
||
| The following is correct as of game version 4.0.0.801 (Odyssey initial | ||
| release, Update 7, plus one patch). | ||
|
|
||
| 1. Record `journal_body_name` and `journal_body_id` from the | ||
| `BodyName` and `BodyID` values in `ApproachBody` events. | ||
|
|
||
| This will occur when the player flies below Orbital Cruise altitude | ||
| around a body. | ||
| 2. Also record these from `Location` events to cover logging in already there. | ||
| 3. Unset both `journal_body_name` and `journal_body_id` on `LeaveBody` and | ||
| `FSDJump` events. | ||
| Do NOT do so for `SupercruiseEntry`, because a player can enter supercruise | ||
| below max Orbital Cruise altitude and then come back down without a new | ||
| `ApproachBody` event occurring. | ||
| 4. If Status.json has `BodyName` present, record that as `status_body_name`. | ||
|
|
||
| This key and its value will be present whenever the player comes close | ||
| enough to a body for the Orbital Cruise/Glide HUD elements to appear. | ||
| It will disappear again when they fly back above that altitude, or jump | ||
| away. | ||
| 5. If Status.json does **not** have `BodyName` then clear `status_body_name`. | ||
Silarn marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| #### Latitude / Longitude | ||
| While latitude and longitude are not reported with the event data, this event | ||
| necessitates being on a planet surface. Pulling the current coordinates from | ||
| the `Status.json` should be sufficient to populate the data. The `Status.json` | ||
| granularity is quite accurate when on-foot. | ||
Silarn marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| { | ||
| "$schema" : "http://json-schema.org/draft-04/scanorganic#", | ||
| "id" : "https://eddn.edcd.io/schemas/scanorganic/1", | ||
| "type" : "object", | ||
| "additionalProperties" : false, | ||
| "required": [ "$schemaRef", "header", "message" ], | ||
| "properties": { | ||
| "$schemaRef": { | ||
| "type" : "string" | ||
| }, | ||
| "header": { | ||
| "type" : "object", | ||
| "additionalProperties" : true, | ||
| "required" : [ "uploaderID", "softwareName", "softwareVersion" ], | ||
| "properties" : { | ||
| "uploaderID": { | ||
| "type" : "string" | ||
| }, | ||
| "softwareName": { | ||
| "type" : "string" | ||
| }, | ||
| "softwareVersion": { | ||
| "type" : "string" | ||
| }, | ||
| "gatewayTimestamp": { | ||
| "type" : "string", | ||
| "format" : "date-time", | ||
| "description" : "Timestamp upon receipt at the gateway. If present, this property will be overwritten by the gateway; submitters are not intended to populate this property." | ||
| } | ||
| } | ||
| }, | ||
| "message": { | ||
| "type" : "object", | ||
| "description" : "Contains all properties from the listed events in the client's journal minus the Localised strings and the properties marked below as 'disallowed'", | ||
| "additionalProperties" : false, | ||
| "required" : [ "timestamp", "event", "ScanType", "Genus", "Species", "Latitude", "Longitude", "SystemAddress", "BodyID", "BodyName"], | ||
Silarn marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "properties" : { | ||
| "timestamp": { | ||
| "type" : "string", | ||
| "format" : "date-time" | ||
| }, | ||
| "event" : { | ||
| "enum" : [ "ScanOrganic" ] | ||
| }, | ||
| "horizons": { | ||
| "type" : "boolean", | ||
| "description" : "Boolean value copied from the Journal LoadGame event, when it is present there." | ||
| }, | ||
| "odyssey": { | ||
| "type" : "boolean", | ||
| "description" : "Boolean value copied from the Journal LoadGame event, when it is present there." | ||
| }, | ||
| "StarPos": { | ||
| "type" : "array", | ||
| "items" : { "type": "number" }, | ||
| "minItems" : 3, | ||
| "maxItems" : 3, | ||
| "description" : "Must be added by the sender" | ||
| }, | ||
| "ScanType": { | ||
| "enum" : ["Log", "Sample"], | ||
| "description" : "Scan level of the scan; can be 'Log', 'Sample', or 'Analyse'. 'Analyse' can give bad location data and is excluded." | ||
| }, | ||
| "Genus": { | ||
| "type" : "string", | ||
| "minLength" : 1, | ||
| "description" : "Internal ID of bio genus string." | ||
| }, | ||
| "Species": { | ||
| "type" : "string", | ||
| "minLength" : 1, | ||
| "description" : "Internal ID of bio species string." | ||
| }, | ||
| "Variant": { | ||
| "type" : "string", | ||
| "minLength" : 1, | ||
| "description" : "Internal ID of bio variant string. This mirrors the CodexEntry name." | ||
Silarn marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }, | ||
| "SystemAddress": { | ||
| "type" : "integer" | ||
| }, | ||
| "Body": { | ||
| "type" : "integer", | ||
| "renamed" : "BodyID", | ||
| "description" : "Body ID is reported as 'Body' in this event. Rename to BodyID for general cross-compatibility." | ||
| }, | ||
| "BodyID": { | ||
| "type" : "integer" | ||
| }, | ||
| "BodyName": { | ||
| "type" : "string", | ||
| "description" : "Must be added by the sender to corroborate BodyID" | ||
| }, | ||
Silarn marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "Latitude": { | ||
| "type" : "number", | ||
| "description" : "Must be added by the sender, generally from Status.json" | ||
| }, | ||
| "Longitude": { | ||
| "type" : "number", | ||
| "description" : "Must be added by the sender, generally from Status.json" | ||
| } | ||
Silarn marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }, | ||
| "patternProperties": { | ||
| "_Localised$" : { "$ref" : "#/definitions/disallowed" } | ||
| } | ||
| } | ||
| }, | ||
| "definitions": { | ||
| "disallowed" : { "not" : { "type": [ "array", "boolean", "integer", "number", "null", "object", "string" ] } } | ||
| } | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.