EDCD / EDDI

Companion application for Elite Dangerous
Other
444 stars 81 forks source link

Entered normal space body type discrepancy #2556

Closed Darkcyde13 closed 1 year ago

Darkcyde13 commented 1 year ago

What's Wrong (please be as specific as possible)

Expected

The type of body you enter normal space near to, to be correct.

Observed

Moons are called 'planets'.

Steps to reproduce

  1. Enter normal space around a moon.
  2. Observe the Entered normal space script says 'planet'

Configuration

My Investigation

Investigation Notes

I've noticed this a few times, but finally got around to checking it out. It appears that EDDI is taking the data direct from the Journal event (as expected), and the Journal is calling moons 'planets'. For example:

{ "timestamp":"2023-07-01T14:56:53Z", "event":"SupercruiseExit", "Taxi":true, "Multicrew":false, "StarSystem":"Chnuphis", "SystemAddress":5067927397809, "Body":"Chnuphis 3 d a", "BodyID":27, "BodyType":"Planet" }

This is clearly a moon, not a planet.

If I remember correctly, the Journal does this for all events when a body type is reported, and EDDI corrects it. However, it seems this one event does not.

I've fixed this in my own script by replacing the event.bodytype with reportBody.bodytype after setting reportBody with BodyDetails().

EDDI Logs

N/A

Player journals

(As above)

Darkcyde13 commented 1 year ago

OK, I've just realised the the default already does this. All except for the setting of the state variables at the top of the script though. The Context still uses event.bodytype for setting the eddi_context_body_type.

Tkael commented 1 year ago

Essentially, the raw journal event doesn't provide enough detail to distinguish between planets and moons. I'll try pulling in a little more external data to be able to make that determination.