Skip to content
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

Trappist-1 main star has null id64 value #506

Open
sentrychris opened this issue Jul 27, 2023 · 1 comment
Open

Trappist-1 main star has null id64 value #506

sentrychris opened this issue Jul 27, 2023 · 1 comment

Comments

@sentrychris
Copy link

Forgive me if this is the wrong place for this kind of issue. I'm building a personal tool using data from EDSM, primarily just for educational purposes, however while requesting system bodies from EDSM via the API, I encountered a celestial body that doesn't have an id64 value.

  • System: Trappist-1
  • Body: Trappist-1 (main star)

Here is the particular celestial body in the response from https://www.edsm.net/api-system-v1/bodies?systemName=Trappist-1:

{
  "id": 56283510,
  "id64": null,
  "bodyId": null,
  "name": "Trappist-1",
  "discovery": {
      "commander": "Taimaru",
      "date": "2017-04-11 17:45:43"
  },
  "type": "Star",
  "subType": "M (Red dwarf) Star",
  "parents": null,
  "distanceToArrival": 0,
  "isMainStar": true,
  "isScoopable": true,
  "age": 12648,
  "spectralClass": "M6",
  "luminosity": "V",
  "absoluteMagnitude": 14.775818,
  "solarMasses": 0.078125,
  "solarRadius": 0.11398314881380302,
  "surfaceTemperature": 2600,
  "orbitalPeriod": null,
  "semiMajorAxis": null,
  "orbitalEccentricity": null,
  "orbitalInclination": null,
  "argOfPeriapsis": null,
  "rotationalPeriod": 1.4000000105092594,
  "rotationalPeriodTidallyLocked": false,
  "axialTilt": 0,
  "updateTime": "2020-12-23 09:49:41"
},

Based on Spansh's data, I assume it should be the same as the system: 5364950911832.

@klightspeed
Copy link

The main star should have BodyID=0, but in this case BodyID is null.

https://github.com/EDSM-NET/EDDN-Events/blob/e47802a77ad3982eec930a34cb6de50e73de39e0/System/Body.php#L263

                    if(!array_key_exists('id64', $currentBodyData) || $currentBodyData['id64'] != $message['BodyID'])

That != probably should be !==

php > var_dump(0 != null);
bool(false)
php > var_dump(0 !== null);
bool(true)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants