Calculate NDL in Simulator
Calculate NDL in Simulator
Hi,
I am not sure, if I cannot find this functionality, or if it is not implemented.
I would like to be able to calculate the NDL on a certain depth for a repetative dive, based on the current tissue load.
Anyone able to help out?
Thanks,
Benjamin
I am not sure, if I cannot find this functionality, or if it is not implemented.
I would like to be able to calculate the NDL on a certain depth for a repetative dive, based on the current tissue load.
Anyone able to help out?
Thanks,
Benjamin
Re: Calculate NDL in Simulator
Hi Benjamin,
there is no direct output of the current NDL for a specific depth in the surface custom views or by the menu system itself, but there are two ways to get it. Both ways build upon the fact that all calculations and simulations take into account your current tissue status and the surface pressure - at least if using the latest firmware.
a) you can use the deco calculator to check if a given depth & time combination is within NDL or not.
b) you can start the simulator mode, go to the desired target depth and the OSTC will show the NDL as if you were diving.
In both cases you can use 'interval' to compute the NDL for some time in the future, i.e. after some more surface break.
BR
Ralph
there is no direct output of the current NDL for a specific depth in the surface custom views or by the menu system itself, but there are two ways to get it. Both ways build upon the fact that all calculations and simulations take into account your current tissue status and the surface pressure - at least if using the latest firmware.
a) you can use the deco calculator to check if a given depth & time combination is within NDL or not.
b) you can start the simulator mode, go to the desired target depth and the OSTC will show the NDL as if you were diving.
In both cases you can use 'interval' to compute the NDL for some time in the future, i.e. after some more surface break.
BR
Ralph
Re: Calculate NDL in Simulator
Hi Ralph,
that matches what I found. Could that be a dev request?
I am not very good at assembler, but what I found so far is that for the calculation of a deco plan, basically a complete dive (as long as the bottom time) is calculated in the background. Maybe we can get the NDL at the beginning of the simulation and then display it?
BR,
Benjamin
that matches what I found. Could that be a dev request?
I am not very good at assembler, but what I found so far is that for the calculation of a deco plan, basically a complete dive (as long as the bottom time) is calculated in the background. Maybe we can get the NDL at the beginning of the simulation and then display it?
BR,
Benjamin
Re: Calculate NDL in Simulator
Hello Benjamin,
you are right, basically all code is already there to calculate the NDL at any time of the dive. Actually, each round of NDL/deco calculation starts with calculating the NDL and if it is >0 the NDL gets displayed and the next computation round will be started. If the NDL computes to zero, the code branches to doing the deco calculation before starting over afterwards again.
So if a dive simulation or deco calculation ends up to be inside NDL, not much computational load will be posed on ressources (CPU, battery drain).
The "problem" is - showing a NDL limit in surface mode takes quite a lot of auxiliary code to create a custom view, menu entries, generate the related text messages and not to forget you need a possibility to enter the target depth. Else it would require a loop to calculate the NDLs for e.g. 20, 25, 30, ... meters of depth and show them all.
To be honest, the OSTC is more of a full blown deco diving machine than a sports diving NDL computer and there is some more code on the to-do-list like the TR (pressure transmitter) functions and also a cave mode for the gas needs calculation, which currently ranks higher priority.
BR
Ralph
you are right, basically all code is already there to calculate the NDL at any time of the dive. Actually, each round of NDL/deco calculation starts with calculating the NDL and if it is >0 the NDL gets displayed and the next computation round will be started. If the NDL computes to zero, the code branches to doing the deco calculation before starting over afterwards again.
So if a dive simulation or deco calculation ends up to be inside NDL, not much computational load will be posed on ressources (CPU, battery drain).
The "problem" is - showing a NDL limit in surface mode takes quite a lot of auxiliary code to create a custom view, menu entries, generate the related text messages and not to forget you need a possibility to enter the target depth. Else it would require a loop to calculate the NDLs for e.g. 20, 25, 30, ... meters of depth and show them all.
To be honest, the OSTC is more of a full blown deco diving machine than a sports diving NDL computer and there is some more code on the to-do-list like the TR (pressure transmitter) functions and also a cave mode for the gas needs calculation, which currently ranks higher priority.
BR
Ralph
Re: Calculate NDL in Simulator
Hi Ralph,
I understand that there are more prominent tasks in the queue and I agree that the full deco calculation is more valuable for the "default" OSTC user.
But I do not mean to create a complete new menu and result screen just to show the NDL. I think it could be included in the deco planner screen, maybe in between the depth and the algorithm (for the Sport version).
I could try to provide some code, but I am not sure, how to get the max NDL (at the beginning of the simulated dive).
BR,
Benjamin
I understand that there are more prominent tasks in the queue and I agree that the full deco calculation is more valuable for the "default" OSTC user.
But I do not mean to create a complete new menu and result screen just to show the NDL. I think it could be included in the deco planner screen, maybe in between the depth and the algorithm (for the Sport version).
I could try to provide some code, but I am not sure, how to get the max NDL (at the beginning of the simulated dive).
BR,
Benjamin
Re: Calculate NDL in Simulator
Well, calculating the NDL time is a simple task: just call calc_NDL_time(). But it needs the depth to be set before through the values of ppN2 and ppHe. So were could this depth entry be placed in the existing HMI?
Re: Calculate NDL in Simulator
Sorry for the delayed answer. Maybe the max NDL can be put in the Dive Plan UI. (https://my.hidrive.com/lnk/YOTtGo6x), but I am not sure, if this gets too much information for that page.
Re: Calculate NDL in Simulator
Indeed, that could work. The place you indicated in your picture is already occopied in my firmware version, but all of the right side is unused if in NDL so the output could be placed there. I've put it on my todo list...
BR
Ralph
BR
Ralph
Re: Calculate NDL in Simulator
Great! Let me know, if I can assist somehow.
Wir können übrigens auch Deutsch schreiben, ich wusste nur nicht wie hier die Community verteilt ist.
BR
Benjamin
Wir können übrigens auch Deutsch schreiben, ich wusste nur nicht wie hier die Community verteilt ist.

BR
Benjamin
Re: Calculate NDL in Simulator
Hallo Benjamin,
wenn möglich ist es tatsächlich nett hier in englischer Sprache zu schreiben, da es eine ganze Menge interessierter nicht deutsch sprechender Mitleser gibt.
Bei näherem Nachdenken ist dein NDL-Vorschlag geradezu genial, weil er sich nahezu komplett aus "Abfallprodukten", also Code der schon da ist, realisieren lassen müsste...!
Viele Grüße,
Ralph
wenn möglich ist es tatsächlich nett hier in englischer Sprache zu schreiben, da es eine ganze Menge interessierter nicht deutsch sprechender Mitleser gibt.
Bei näherem Nachdenken ist dein NDL-Vorschlag geradezu genial, weil er sich nahezu komplett aus "Abfallprodukten", also Code der schon da ist, realisieren lassen müsste...!
Viele Grüße,
Ralph
Re: Calculate NDL in Simulator
Hallo Ralph,
ja, das war meine Annahme, nachdem ich mir den Code angeschaut habe. Nur für eine max NDL extra irgendwelche HMIs oder gar Code zu erstellen, hätte ich sicher nicht vorgeschlagen
Wie gesagt: Wenn ich irgendwo helfen kann, Bescheid geben.
Viele Grüße,
Benjamin
ja, das war meine Annahme, nachdem ich mir den Code angeschaut habe. Nur für eine max NDL extra irgendwelche HMIs oder gar Code zu erstellen, hätte ich sicher nicht vorgeschlagen

Wie gesagt: Wenn ich irgendwo helfen kann, Bescheid geben.
Viele Grüße,
Benjamin
Re: Calculate NDL in Simulator
Hallo Benjamin,
habe in simulator.asm eine Ausgabe der verbleibenden Nullzeit eingebaut:
;---- No Deco --------------------------------------------------------
call TFT_standard_color
TEXT_SMALL .80, .0, tNoDeco
; output of remaining NDL time
WIN_SMALL .80, .50 ; same line as bottom time
movff char_O_nullzeit,lo ; remaining NDL at end of bottom time
output_8
PUTC "'"
PUTC " "
STRCAT_TEXT_PRINT tNDLleft ; "left"
bsf decoplan_last_ceiling_shown
return
In den Spachdateien ist dann noch tNDLleft als "left" bzw. "übrig" definiert.
Hatte erst überlegt die Grundzeit und die verbleibende Nullzeit zu addieren um somit die gesamte Nullzeit auszugeben, aber es gibt einen Effekt der mich bewogen hat es nicht zu machen: je länger man die Grundzeit einstellt, desto länger wird auch die gesamte Nullzeit die der OSTC berechnet. Das ist zwar einerseits Quatsch, aber andererseits auch richtig denn die Nullzeit wird durch beschleunigte Hochrechnung bestimmt und je länger die Nullzeit noch ist desto ungenauer (aber stets zur sicheren Seite gerechnet!) ist die Prognose noch. Unter Wasser spielt das überhaupt keine Rolle, weil niemand für 10, 20 oder gar 30 Minuten auf den Bruchteil eines Meter genau auf konstanter Tiefe verweilt. Weiterhin sieht man wie unter Wasser auch die Zeitphase in der die Nullzeit zwar schon Null ist, aber noch keine Stopps generiert werden weil die noch minimale Deko sich während des Aufstiegs von selbst abbaut.
Mal sehen ob der Code in eine Stable kommen wird, das ist immer auch eine Abwägung zwischen echtem Nutzwert-Gewinn und der Menge an Verwirrung / Supportanfragen die so eine Anzeige nach sich ziehen kann...
Viele Grüße,
Ralph
habe in simulator.asm eine Ausgabe der verbleibenden Nullzeit eingebaut:
;---- No Deco --------------------------------------------------------
call TFT_standard_color
TEXT_SMALL .80, .0, tNoDeco
; output of remaining NDL time
WIN_SMALL .80, .50 ; same line as bottom time
movff char_O_nullzeit,lo ; remaining NDL at end of bottom time
output_8
PUTC "'"
PUTC " "
STRCAT_TEXT_PRINT tNDLleft ; "left"
bsf decoplan_last_ceiling_shown
return
In den Spachdateien ist dann noch tNDLleft als "left" bzw. "übrig" definiert.
Hatte erst überlegt die Grundzeit und die verbleibende Nullzeit zu addieren um somit die gesamte Nullzeit auszugeben, aber es gibt einen Effekt der mich bewogen hat es nicht zu machen: je länger man die Grundzeit einstellt, desto länger wird auch die gesamte Nullzeit die der OSTC berechnet. Das ist zwar einerseits Quatsch, aber andererseits auch richtig denn die Nullzeit wird durch beschleunigte Hochrechnung bestimmt und je länger die Nullzeit noch ist desto ungenauer (aber stets zur sicheren Seite gerechnet!) ist die Prognose noch. Unter Wasser spielt das überhaupt keine Rolle, weil niemand für 10, 20 oder gar 30 Minuten auf den Bruchteil eines Meter genau auf konstanter Tiefe verweilt. Weiterhin sieht man wie unter Wasser auch die Zeitphase in der die Nullzeit zwar schon Null ist, aber noch keine Stopps generiert werden weil die noch minimale Deko sich während des Aufstiegs von selbst abbaut.
Mal sehen ob der Code in eine Stable kommen wird, das ist immer auch eine Abwägung zwischen echtem Nutzwert-Gewinn und der Menge an Verwirrung / Supportanfragen die so eine Anzeige nach sich ziehen kann...
Viele Grüße,
Ralph
Re: Calculate NDL in Simulator
Hi Ralph,
sorry für die Verzögerte Antwort.
Ja, da stellt sich wirklich die Frage, ob das mehr für Verwirrung sorgt, als es nutzt. Der "normale" Taucher würde wahrscheinlich die gesamte zur Verfügung stehende Nullzeit erwarten. Er macht sich aber vor dem Tauchgang aber auch nur wenig bis keine Gedanken über die Grundzeit oder wie sinnvoll es überhaupt ist einem Computer blind zu vertrauen.
Ansonsten klingt die Lösung ja schonmal brauchbar!
Gruß,
Benjamin
sorry für die Verzögerte Antwort.
Ja, da stellt sich wirklich die Frage, ob das mehr für Verwirrung sorgt, als es nutzt. Der "normale" Taucher würde wahrscheinlich die gesamte zur Verfügung stehende Nullzeit erwarten. Er macht sich aber vor dem Tauchgang aber auch nur wenig bis keine Gedanken über die Grundzeit oder wie sinnvoll es überhaupt ist einem Computer blind zu vertrauen.
Ansonsten klingt die Lösung ja schonmal brauchbar!
Gruß,
Benjamin
Re: Calculate NDL in Simulator
Hi zusammen
Gibt es zu dieser Thematik denn inzwischen schon News, wann dieser für Sport-TC allgemain übliche Planer in eine stable FW aufgenommen wird?
Das wäre eine echt sinnvolle Ergänzung.
LG aus dem gerade verregneten Gozo
Thom
Gibt es zu dieser Thematik denn inzwischen schon News, wann dieser für Sport-TC allgemain übliche Planer in eine stable FW aufgenommen wird?
Das wäre eine echt sinnvolle Ergänzung.
LG aus dem gerade verregneten Gozo
Thom
Best regards
Thom
Thom
Re: Calculate NDL in Simulator
Hallo Thom,
da in der letzten Zeit viel Arbeit in die Tech-Version gesteckt wurde, unterscheiden sich die Code-Basen der Tech- und der Sport-Version mittlerweile recht stark und Neuerungen in der Tech können nicht unbedingt mehr per copy & paste in die Sport übernommen werden. Noch sind die Arbeiten an der Tech-Version nicht ganz abgeschlossen, aber wenn dass in hoffentlich wenigen Monaten der Fall ist könnte die Sport auf ein neues "Fundament" gestellt werden um wieder eine einheitliche Codebasis zu haben. Dazu gibt es aber zur Zeit noch keine konkrete Planung.
Man kommt an die aktuelle Nullzeit aber auch über einen kleinen Umweg: einfach den Simulator starten und die angezeigte Nullzeit ablesen. Der Simulator startet immer mit den aktuellen Gewebedaten.
Viele Grüße,
Ralph
da in der letzten Zeit viel Arbeit in die Tech-Version gesteckt wurde, unterscheiden sich die Code-Basen der Tech- und der Sport-Version mittlerweile recht stark und Neuerungen in der Tech können nicht unbedingt mehr per copy & paste in die Sport übernommen werden. Noch sind die Arbeiten an der Tech-Version nicht ganz abgeschlossen, aber wenn dass in hoffentlich wenigen Monaten der Fall ist könnte die Sport auf ein neues "Fundament" gestellt werden um wieder eine einheitliche Codebasis zu haben. Dazu gibt es aber zur Zeit noch keine konkrete Planung.
Man kommt an die aktuelle Nullzeit aber auch über einen kleinen Umweg: einfach den Simulator starten und die angezeigte Nullzeit ablesen. Der Simulator startet immer mit den aktuellen Gewebedaten.
Viele Grüße,
Ralph