That helps thanks. Still quite confused though. Do you know how they assign the letters to each pressure group?
The letters is just arbitrary letters picked by the different certification organizations. and a table for one organization will give you a different letter than an another table from an another organization for the exact same dive.
The letter means nothing unless the user know what table is used for the logic, and frankly it is not that useful in divelog software, since the user don't have the possibility to choose what table to use (unless you implement a lot of tables). but if this is the functionality you want to implement just copy a table from an open source like the U.S Navy table or the Norwegian Standard table, creating lookup arrays and out put the result.
A much more useful functionality is to implement the actual algorithm for nitrogen absorption and saturation in body tissues (like Buhlmann ZHL-16) or variable bubble growth algorithms like the VBM, and simulate the loading based on the diveprofile (this is the same class of algorithms that is used in dive computers). The Buhlmann algorithms is very easy to implement.
"Deco for Divers" have a nice, easy to understand chapter explaining the Buhlmann algorithm.
This web page is a step by step on how to implement it in code (his code implementation is flawed but good enough to visualize the loading in an dive log software, wouldn't use it for a deco dive planning software)
"The physics of scuba diving" has a chapter on modeling the nitrogen absorption (short and concentrate on pre-buhlmann algorithm (Haldane)).
If you want to implement gradient factors into the buhlmann algorithm, here is a nice
starting point.
And here is a document writen by
Eric Baker explaning the M-Values
For more in depth info and theory, you have the books writen by Buhlmann him self.