How to read the runway selected for departure?

When reading the flight plan with Coherent call GET_FLIGHTPLAN, I get a
JS_FlightPlan in which departureRunwayIndex and originRunwayIndex are
defined. What is the difference between these 2 variables? I guess it is
departureRunwayIndex, but its value is often set to -1, or with an index that
does not correspond to the selected runway for the departure airport. Where
did I go wrong? Thanks.

A quick test on Paris Orly LFPO showed that if I select an OPAL departure from
runway 20, or another OPAL departure from runway 25, the departureRunwayIndex
is always 0.

I believe originRunwayIndex is the index of the runway on the OneWayRunways
associated with the JS_FacilityAirport, while departureRunwayIndex is the
index of the runway transition in the selected SID/departure procedure.

That’s what I thought, so originRunwayIndex is the one I should use, but it is
always set to -1 which probably means “undefined”