Q:

Cancelling units in two-argument ArcTan

Consider  
ArcTan[3, -3]  
(* out: *) -Pi/4  

ArcTan[3 a Sin[t/2], -3 a Sin[t/2]]
(* out: *) ArcTan[3 a Sin[t/2], -3 a Sin[t/2]]  

However, we can fix the second one with some assumptions (where applicable)  
$Assumptions = a > 0 && Pi > t > 0  
Refine@ArcTan[3 a Sin[t/2], -3 a Sin[t/2]]
(* out: *) -Pi/4  

I need a way to force mathematica to similarly realize it can cancel units in the ArcTan (which is basically a ratio, except for the sign consideration for the quadrant).  
For example, say I now have   
$Assumptions = a > 0 && Pi > t > 0   
aa=(4 Pi/(3 Sqrt[3]))(Quantity[1.42, "Angstroms"])^(-1)  
b=(Quantity[5, "Angstroms"])^(-1)
ArcTan[b+3 aa Sin[t/2],-b-3 aa Sin[t/2]]

How can I force Mathematica to recognize that these arguments are just +c and -c and thus the ArcTan significantly reduces?   
I wish to avoid removing the units here artificially with QuantityMagnitude[] because elswhere in these expressions the units appear outside of these ArcTan[]s. However, a last ditch solution would be one that simply searched for these ArcTan[] and applied QuantityMagnitude[] to their arguments, I suppose. 

A:

I solved the problem with help and ideas from answers here, primarily inspiration from george2079's answer, by introducing a new function (so as not to alter the underlying definition of ArcTan). In the context of my research, this was actually quite natural, but might be a slight extra step for some.   
The solution works for arguments of the same dimension type (length, or time, etc.) and also accounts for the different scales within units of those types (mm vs. m, etc.) Also, the quadrant-sign aspect of the two-argument ArcTan is preserved correctly. Finally, I have written it so that if incommensurate units are attempted, the function returns itself (and the user should be wary that something else is wrong, as such a statement is meaningless).
j[x_, y] /; QuantityUnit@UnitConvert[x] == QuantityUnit@UnitConvert[y] := 
ArcTan[QuantityMagnitude@UnitConvert[x], QuantityMagnitude@UnitConvert[y]]  

then  
p = Quantity[3000, "mm"]
q = Quantity[-3, "m"]
z = Quantity[14, "eV"]
j[{3, -3}]
j[{p, q}]
j[{p, z}]  

gives the desired outputs  
(* out: *) 3000 mm
(* out: *) -3 m
(* out: *) 14 eV
(* out: *) -Pi/4
(* out: *) -Pi/4
(* out: *) ArcTan[3000 m, 14 eV]

