When planning a fixed-speed cruise on simBrief, the XML/JSON data still contains a Cost Index value that appears random and/or unrelated [to the actual cruise schedule]. Some aircraft that pull their flight plan directly from simBrief but aren’t expecting a fixed-speed cruise will happily use the provided bogus CI value.
Ideally/eventually this must be fixed by the aircraft developer, but this can take time especially if it’s not the developer’s current priority, so it would be nice if simBrief did something about it to mitigate the issue.
when the cruise profile is not a Cost Index, set the CI field in the data to the default CI for the aircraft type (or the default for that particular airframe would also work)
Somewhat better way (arguably)
since there is already support for “automatic” cost index based on the scheduled flight time, and that the actual flight time is known, it might be reasonably easy and quick to compute a plausible cost index value corresponding to the current (cruise speed, flight route, weights, actual flight time) and use that in the XML/JSON data instead?
This should be how it works now actually. For example, from what I can tell the A320 returns a default cost index of 15, the B738 a default index of 20 in the XML data file if using fixed-speed cruise.
Perhaps there are some aircraft that don’t have a default cost index defined though, in which case I think it does return a random value at the moment. Most should have one set though AFAIK.
If it’s still returning a random CI for you, let me know which aircraft you’re using and I’ll check again.
As for the better/harder way, I’m not sure it’s worth the work to implement this. The “correct” solution IMO would be to nullify the cost index value if a fixed-speed is planned, but that isn’t an option since it would probably cause unexpected bugs or crashes on many aircraft.
Yep, that works (and since it uses the base type’s default CI, there’s no issue even when using a custom airframe with the default CI set to AUTO, so that’s nice).
Perhaps there are some aircraft that don’t have a default cost index defined though, in which case I think it does return a random value at the moment.
All aircraft I fly seem to have a default CI set. It would probably be easier for you to check them all, since you have access to the database/backend, whereas I’d have to check every drop-down manually
FWIW, the aircraft I was having issues with specifically were ToLiSS (developer is aware of the issue but too busy with other features to fix this one in the short term). Although now that I think about it, it would indeed be interesting to see how other aircraft with simBrief integration behave in that case too.