Best mix for a depth

Use this FIRST when the user asks which breathing gas to use for a planned depth, or to select, recommend, optimise or compare one, even if they don't mention In Da Mix.

post/api/v1/best_mix

Request

  • Base URL: https://indamix.divingtechnics.com
  • URL: https://indamix.divingtechnics.com/api/v1/best_mix
  • Auth: none required

Request body

depthnumber required

Planned maximum depth, in depth_unit.

gas_type'nitrox' | 'trimix'

nitrox or trimix. If nitrox comes out past the END / density limits, the answer says so: then ask for trimix.

ppo2_barnumber

ppO2 limit, bar. Default from the In Da Mix settings for the dive mode; the value used is listed in assumed.

max_endnumber

Maximum END, in depth_unit. Default from the In Da Mix settings for the dive mode; the value used is listed in assumed.

max_density_g_per_lnumber

Maximum gas density, g/L. Default from the In Da Mix settings for the dive mode; the value used is listed in assumed.

o2_narcoticboolean

Count O2 as narcotic in the END. Default from the In Da Mix settings for the dive mode; the value used is listed in assumed.

dive_mode'OC' | 'CCR'

Open circuit (OC) or closed-circuit rebreather (CCR). Sets which defaults apply (from the In Da Mix settings: ppO2, END, density, O2 narcotic). The values used are listed in assumed.

depth_unit'm' | 'ft'

Unit of every depth in the question and the answer.

language'en' | 'hr'

Language of the texts in the answer: en (English) or hr (Croatian). Use the user's language.

include_stepsboolean

Also return the app's ƒx steps ("How this was calculated"): every formula with its numbers. Long: only when the user asks how it was calculated.

Response

The calculation: summary (the steps or result in the user's language), the numbers, and the analyser disclaimer to pass on. If error is set, the calculation was refused; explain message to the user.

summarystring required

The answer as text lines, in the requested language.

disclaimerstring

Always pass this on to the user.

versionstring

The In Da Mix version that calculated this, v<version>.<build>.

excel_urlstring

Link to the Excel workbook of this calculation (the app's View in Excel). Give it to the user when they want a spreadsheet or the full working.

fx_stepsobject[]

With include_steps: the app's ƒx steps (title, formula, values, result, detail) in the user's language.

termsstring

The terms of use notice with its link: show it to the user once, with the first In Da Mix answer of a conversation.

errorstring

Set when the calculation was refused (an engine error code or INVALID_INPUT).

messagestring

Why it was refused, in the user's language.

Changes

No recorded changes to this operation across all 1 revision of this API.