If it helps, here was my python script to go from UDDF to CSV. Anyone good at python would not like the way I did this, but it works. A more proper way to do this would be to use the ElementTree module, which is intended to parse XML, which is what the UDDF file is, but I didn't take the time to figure out how to use that module.
import re
uddf_file = open("c:/temp/python/uddf_to_csv/UDDF_20230710_0748.xml", "r")
csv_file = open("c:/temp/python/uddf_to_csv/UDDF_20230710_0748.csv", "x")
while True:
uddf_line = uddf_file.readline()
uddf_line.rstrip('\r\n')
depth_val = re.search("depth", uddf_line)
if depth_val: depth_val_num = re.findall(r'\d+', uddf_line)
if depth_val: csv_file.write(depth_val_num[0] + "." + depth_val_num[1] + ",")
time_val = re.search("divetime", uddf_line)
if time_val: time_val_num = re.findall(r'\d+', uddf_line)
if time_val: csv_file.write(time_val_num[0] + "." + time_val_num[1] + ",")
temp_val = re.search("temperature", uddf_line)
if temp_val: temp_val_num = re.findall(r'\d+', uddf_line)
if temp_val: csv_file.write(temp_val_num[0] + "." + temp_val_num[1] + "\n")
if not uddf_line: break;
uddf_file.close()
csv_file.close()
import re
uddf_file = open("c:/temp/python/uddf_to_csv/UDDF_20230710_0748.xml", "r")
csv_file = open("c:/temp/python/uddf_to_csv/UDDF_20230710_0748.csv", "x")
while True:
uddf_line = uddf_file.readline()
uddf_line.rstrip('\r\n')
depth_val = re.search("depth", uddf_line)
if depth_val: depth_val_num = re.findall(r'\d+', uddf_line)
if depth_val: csv_file.write(depth_val_num[0] + "." + depth_val_num[1] + ",")
time_val = re.search("divetime", uddf_line)
if time_val: time_val_num = re.findall(r'\d+', uddf_line)
if time_val: csv_file.write(time_val_num[0] + "." + time_val_num[1] + ",")
temp_val = re.search("temperature", uddf_line)
if temp_val: temp_val_num = re.findall(r'\d+', uddf_line)
if temp_val: csv_file.write(temp_val_num[0] + "." + temp_val_num[1] + "\n")
if not uddf_line: break;
uddf_file.close()
csv_file.close()