Q:

Formula for rotating half degree square map/data frames in projected coordinate system so that they look straight?

I am currently developing a map series using ArcPy with ArcGIS Pro.  I am not using the Map Series functionality for this because I need to have lots of control over what is on each map sheet, and there are many exceptions to its many rules.  Instead of using Map Series functionality I am simply using a search cursor to iterate through the map series index and setting the camera extent of the map frame to each map sheet.
For each map frame only one of three map frames is visible, because there is a map frame for each of the UTM/MGA zones in my "third" of Australia.  I use the mean of xMin and xMax of each sheet extent to decide which zone I am in and choose the appropriate map frame to use.
I am using 30 minute (half degree) square map sheets in GDA94, and drawing them in a projected MGA Zone which means they are no longer quite square and depending on where each sheet is in the zone that almost square may be "rotated" slightly.  My understanding is that cartographers will usually "straighten" up the map by rotating it slightly.  Often this is done by eye but my understanding is that there is a formula that can be used to calculate the amount of rotation that is needed to make each sheet look straight.  An example rotation value is `-0.0782913899729035.
Is anyone familiar with the formula that I am trying to describe and able to point me at where I may be able to find details of it for Australia (MGA zones) or globally (UTM zones)?

A:

I have not written the code yet but with help from the comments it seems like that may actually be quite straightforward to do.  The key hint comes from a comment by @MichaelMiles-Stimson:

It was basically the average of X top to bottom in projected
  coordinates to get a trend line for the centre of the map then
  calculating the angle that line is apparently rotated from normal
  using Pythagorean calculus.

I think the steps that I will use are:

Project lat/long values from centre bottom (xCen,yMin) and centre top (xCen,yMax) of the sheet into the appropriate MGA/UTM zone for that sheet.
Use Pythagorean theorem to calculate the angle of the line between centre bottom and centre top in MGA/UTM (metre) vazlues.

