Gerber file format...help please

There doesn't seem to be a more appropriate thread to park this post in so general electronics will have to do.

I need to be able to process one of these files in a Windows app so I am trying to understand the format.

I have been referring to this document but unfortunately it is not entirely helpful - too much engineering/programming gibberish and not enough basic explanation.
http://www.apcircuits.com/Portals/0/Assets/Downloads/the_gerber_file_format_specification.pdf?ver=2015-06-13-175030-363

I more or less get thes bits:

Y-508000D1*
X-2286000Y-762000D2*
X-2540000D1*

I.E. Move to and line to commands with x and/or y coordinates.
But what units are the coordinates in? Are they steps or are they mm or inches? Or some other measurement I am not familiar with?

%TA.AperFunction,ComponentPad*%
%ADD15C,2.3*%
I understand this bit because in Diptrace I made my pads circles with a diameter of 2.3mm.
And 15 is just an ID value.
If I had other pads of different sizes then there would be additional entries in this section with different ID numbers.

%TF.FileFunction,Copper,L2,Bot*%
%TF.Part,Single*%
This is telling me the board type - single sided copper clad. But what do L2 and Bot mean?

%TA.AperFunction,Conductor*%
%ADD14C,2.0*%

But I don't understand what this is telling me and the gerber specification that explains this section is just gibberish to me with no context.

%TF.GenerationSoftware,Novarm,DipTrace,3.2.0.1*%
%TF.CreationDate,2018-11-07T12:25:27+09:00*%
%FSLAX35Y35*%
%MOMM*%
%TF.FileFunction,Copper,L2,Bot*%
%TF.Part,Single*%
%TA.AperFunction,Conductor*%
%ADD14C,2.0*%
%TA.AperFunction,ComponentPad*%
%ADD15C,2.3*%
G75*
G01*
%LPD*%
X-2794000Y-254000D2*
D14*
Y-508000D1*
X-2286000Y-762000D2*
X-2540000D1*
X-2794000D1*
Y-508000D1*
Y-254000D2*
Y508000D1*
X-2286000Y-762000D2*
X-762000D1*
Y-747873D1*
Y-508000D1*
Y508000D2*
X-254000D1*
Y-762000D1*
X1016000D1*
X1524000D1*
Y508000D1*
X1016000D1*
X-762000Y-747873D2*
X-254000Y-762000D1*
X1016000Y-508000D2*
Y-762000D1*
X1524000Y1016000D2*
Y508000D1*
X-2032000Y-254000D2*
Y-508000D1*
Y-254000D2*
Y762000D1*
Y1016000D1*
X-2794000D1*
X-1524000Y762000D2*
X-2032000D1*
X0D2*
Y1016000D1*
X-2032000D1*
X1016000D2*
X0D1*
X-2286000Y-2286000D2*
X-3302000D1*
Y762000D1*
X-2032000D1*
X-2286000Y-2286000D2*
X-2032000D1*
X0Y254000D2*
Y762000D1*
X-1270000D2*
Y254000D1*
X-762000D1*
X508000Y762000D2*
Y254000D1*
X1016000D1*
X0Y0D2*
Y-254000D1*
X1016000D2*
Y0D1*
X762000D2*
X1016000D1*
X-762000Y-254000D2*
Y0D1*
X-508000D2*
X-762000D1*
X254000D2*
Y-254000D1*
X-2286000Y-1778000D2*
X-2032000D1*
X762000Y-1270000D2*
Y-1778000D1*
Y-1270000D2*
X-2286000D1*
Y-1778000D1*
X-1524000D2*
Y-2032000D1*
Y-2286000D1*
X-2286000Y-2032000D2*
X-1524000D1*
X-2286000D2*
X-2794000D1*
Y-762000D1*
X-1524000Y-2286000D2*
Y-2540000D1*
X-508000D1*
X508000Y-1778000D2*
Y-1524000D1*
X-1524000D1*
Y-1778000D1*
X-508000Y-2032000D2*
X0D1*
Y-1778000D1*
X1016000Y-1270000D2*
Y-1778000D1*
X0Y-2540000D2*
Y-2286000D1*
X-1016000D1*
X254000Y-2540000D2*
Y-1778000D1*
D15*
X-2794000Y-508000D3*
Y-254000D3*
X-2286000Y-2286000D3*
X-2032000Y-1778000D3*
X762000Y0D3*
X254000D3*
X-2032000Y-508000D3*
Y-254000D3*
X-2286000Y-762000D3*
X-2540000D3*
X-1270000Y762000D3*
X-1524000D3*
X1016000Y-254000D3*
Y-508000D3*
X-762000Y0D3*
Y508000D3*
X1016000D3*
Y254000D3*
X-2794000Y1016000D3*
X-762000Y254000D3*
X-2794000Y508000D3*
X1016000Y0D3*
X0Y-254000D3*
X254000D3*
X-762000Y-508000D3*
Y-254000D3*
X0Y762000D3*
X508000D3*
X0Y0D3*
X-2286000Y-2032000D3*
X-1524000Y-1778000D3*
X-2032000Y-2286000D3*
X-508000Y0D3*
X-2286000Y-1778000D3*
X1016000Y1016000D3*
X1524000D3*
X-1524000Y-2286000D3*
X0Y254000D3*
X508000D3*
X-254000Y-1778000D3*
X0D3*
X762000Y-1270000D3*
X1016000D3*
X-508000Y-2032000D3*
X254000Y-1778000D3*
X508000D3*
X1016000D3*
X762000D3*
X-508000Y-2540000D3*
X-1016000Y-2286000D3*
X0Y-2540000D3*
X254000D3*
M02*

Units are designated by a MO command:
%MOIN*% for Inches

%MOMM*% for Millimeters

I don't see that in your code, so I'm not sure how that would be interpreted. The Gerber Spec says that is a mandatory command. Strange that it's missing. I also use DipTrace, and I took a look at one of the Gerber files, generated by DipTrace [and that successfully produced a set of PCBs], and that command is present in my file.

G04 DipTrace 3.0.0.2*
G04 BatteryManager.GBL*
%MOIN*%
G04 #@! TF.FileFunction,Copper,L2,Bot*
G04 #@! TF.Part,Single*

L2 is "Layer 2"
Bot means "Bottom Layer"

G04 signifies a comment. And, according to the gerber_file_specification, #@! is reserved for future standardized comments.

%TF.FileFunction,Copper,L2,Bot*% is saying that this file draws a Bottom layer, in Copper, and that it's Layer 2, of the PCB [thus it's a 2-layer PCB] -- but, it's still a comment, so it doesn't effect the CAM process. But, it might make it easier for the PCB manufacturer to know what the heck is going on in your file.

FileFunction is specified at: Sec 5.4.1.1 .FileFunction

AperFunction? Well, I have to admit I'm a bit rusty on this. Years ago I wrote a program to merge Gerber files. I got pretty tight with the whole Gerber file format, but a lot has faded, so this next explanation may not be complete:

An Aperture is like a pen tip, for stroking [drawing lines], and is like a rubber stamp when flashing [drawing shapes]. It's, basically, a shape. There are two shapes available for drawing lines [Circle & Rectangle], but for flashing, the imagination [and memory constraints] is the limit--i.e. pretty much any shape is possible! And the AperFunctionbasically specifies why the heck we're drawing this thing [like, if it's a pad, what kind of pad, or if it's copper, is it a conductive path or just a non-connected copper feature, like a logo, etc.].

And, AperFunction,Conductor means, the thing will be "Copper whose function is to connect pads
and/or to provide shielding." So, basically, we're drawing something that will provide a conductive path between pads, or will be a conductive path that provides shielding. And example of drawing something that isn't a conductive path is: drawing a logo on the PCB [which can be in copper, or can be silk screened, or perhaps etched, -???-].