Here are suggested additions to the existing sample structure in order
to accommodate dive logs from rebreather systems.
struct sample {
duration_t time;
depth_t depth;
temperature_t temperature;
pressure_t cylinderpressure;
int sensor; /* pressure of primary cylinder */
int pdiluent; /* pressure of diluent cylinder in CCR dive log*/
duration_t ndl;
duration_t stoptime;
depth_t stopdepth;
bool in_deco;
int cns;
int po2 // O2 reading from 1st O2 sensor in CCR divelog
int o2sensor2; // O2 reading from 2nd O2 sensor in CCR divelog
int o2sensor3; // O2 reading from 3rd O2 sensor in CCR divelog
int ccrsetpoint; // CCR O2 setpoint
int heartbeat;
int bearing;
};
The above changes add four integers (i.e. 16 bytes of int32) to the sample
structure in order to accomodate rebreather dive logs. These are necessitated
because of the large amount of information logged by rebreather dive computers
and which most rebreather divers would consider as pretty important because it
allows evaluation of the oxygen sensors as well as the efficiency of the oxygen
management system during a dive. There is talk that some of the new rebreather
systems will include an inline CO2 sensor as well.
The concern is about bloat in the size of dive logs if several fields are added
to the existing sample structure. I assume that the int variables in the
structure are int32. There is clearly no need for a signed integer. Would it be
helpful at all if the int variables are changed to uint16? That would decrease
the size of the above structure by 18 bytes.
I have a suspicion that such a change (to uint16) would have repercussions in
many places within the existing code base.
What is the most productive approach?
Kind regards,
willemf
_______________________________________________
subsurface mailing list
subsurface@hohndel.org
http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface