I am trying to get the Time To Surface while evaluating a file that was used in SCUBA diving.
My c# logic is this
foreach (RecordMesg mesg in fitMessages.RecordMesgs)
{
i++;
var currentTime = mesg.GetTimestamp().ToString();
var timeStamp = mesg.GetTimestamp().GetTimeStamp() - startTime;
TimeSpan t = TimeSpan.FromSeconds(timeStamp);
var depth = mesg.GetDepth();
var tts = mesg.GetTimeToSurface();
var temp = mesg.GetTemperature();
var cnsLoad = mesg.GetCnsLoad();
var n2Load = mesg.GetN2Load();
var nextStopDepth = mesg.GetNextStopDepth();
var nextStopTime = mesg.GetNextStopTime();
var po2 = mesg.GetPo2();
var lat = mesg.GetPositionLat();
var longitude = mesg.GetPositionLong();
var ascentRate = mesg.GetAscentRate();
var flow = mesg.GetFlow();
var pressure = mesg.GetAbsolutePressure();
var ndlTime = mesg.GetNdlTime();
...
The rest of values come out correct, but the TTS is wildly off.
Is there special logic I need to apply when calculating real Time To Surface?
Thanks,
Eric