import math
import numpy as np


class TotalPropagatedUncertainty:
	# Computes the total propagated error of the georeferencing equation found in georeference.py by multiplying its jacobian with the sensor covariance matrix
	def compute(self,latitude,longitude,ellipsoidalHeight,heading,pitch,roll,depth,x_offset,y_offset,z_offset,latitudeSigma,longitudeSigma,ellipsoidalHeightSigma,headingSigma,pitchSigma,rollSigma,depthSigma,xOffsetSigma,yOffsetSigma,zOffsetSigma):
		return np.array([
		[ (ellipsoidalHeightSigma**2)*(math.cos(latitude)**2)*(math.cos(longitude)**2) + ((math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.cos(roll) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(longitude)*math.sin(latitude) + (math.cos(roll)*math.sin(heading)*math.sin(pitch) - 			math.cos(heading)*math.sin(roll))*math.sin(longitude))**2)*(depthSigma**2) +
		((((math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.cos(longitude)*math.sin(latitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(longitude))*(depth + z_offset) + (math.cos(longitude)*math.cos(pitch)*math.sin(heading)*math.sin(latitude) - math.cos(heading)*math.cos(pitch)*math.sin(longitude))*x_offset + ((math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.cos(longitude)*math.sin(latitude) - (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.sin(longitude))*y_offset)**2)*(headingSigma**2) +
		(((ellipsoidalHeight + 6.37813700000000e6/math.sqrt(-0.00669437999014140*(math.sin(latitude)**2) + 1))*math.cos(longitude)*math.sin(latitude) - 42697.6727071805*(math.cos(latitude)**2)*math.cos(longitude)*math.sin(latitude)/((-0.00669437999014140*(math.sin(latitude)**2) + 1)**(3/2)) - (math.cos(longitude)*math.cos(pitch)*math.cos(roll)*math.sin(latitude) - 		(math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(latitude)*math.cos(longitude))*(depth + z_offset) + (math.cos(heading)*math.cos(latitude)*math.cos(longitude)*math.cos(pitch) + math.cos(longitude)*math.sin(latitude)*math.sin(pitch))*x_offset - (math.cos(longitude)*math.cos(pitch)*math.sin(latitude)*math.sin(roll) - (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(latitude)*math.cos(longitude))*y_offset)**2)*(latitudeSigma**2) +
		(((ellipsoidalHeight + 6.37813700000000e6/math.sqrt(-0.00669437999014140*(math.sin(latitude)**2) + 1))*math.cos(latitude)*math.sin(longitude) - (math.cos(latitude)*math.cos(pitch)*math.cos(roll)*math.sin(longitude) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(latitude)*math.sin(longitude) - (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.cos(longitude))*(depth + z_offset) - (math.cos(heading)*math.cos(pitch)*math.sin(latitude)*math.sin(longitude) - math.cos(longitude)*math.cos(pitch)*math.sin(heading) - math.cos(latitude)*math.sin(longitude)*math.sin(pitch))*x_offset - (math.cos(latitude)*math.cos(pitch)*math.sin(longitude)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.sin(latitude)*math.sin(longitude) - (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.cos(longitude))*y_offset)**2)*(longitudeSigma**2) +
		(((math.cos(heading)*math.cos(longitude)*math.cos(pitch)*math.cos(roll)*math.sin(latitude) + math.cos(pitch)*math.cos(roll)*math.sin(heading)*math.sin(longitude) - math.cos(latitude)*math.cos(longitude)*math.cos(roll)*math.sin(pitch))*(depth + z_offset) - (math.cos(heading)*math.cos(longitude)*math.sin(latitude)*math.sin(pitch) + math.cos(latitude)*math.cos(longitude)*math.cos(pitch) + math.sin(heading)*math.sin(longitude)*math.sin(pitch))*x_offset + (math.cos(heading)*math.cos(longitude)*math.cos(pitch)*math.sin(latitude)*math.sin(roll) + math.cos(pitch)*math.sin(heading)*math.sin(longitude)*math.sin(roll) - math.cos(latitude)*math.cos(longitude)*math.sin(pitch)*math.sin(roll))*y_offset)**2)*(pitchSigma**2) +
		(((math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(longitude)*math.sin(latitude) + (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.sin(longitude))*(depth + z_offset) - (math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.cos(roll) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(longitude)*math.sin(latitude) + (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.sin(longitude))*y_offset)**2)*(rollSigma**2) +
		((math.cos(heading)*math.cos(longitude)*math.cos(pitch)*math.sin(latitude) + math.cos(pitch)*math.sin(heading)*math.sin(longitude) - math.cos(latitude)*math.cos(longitude)*math.sin(pitch))**2)*(xOffsetSigma**2) +
		((math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(longitude)*math.sin(latitude) + (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.sin(longitude))**2)*(yOffsetSigma**2) +
		((math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.cos(roll) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(longitude)*math.sin(latitude) + (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.sin(longitude))**2)*(zOffsetSigma**2),


		(ellipsoidalHeightSigma**2)*(math.cos(latitude)**2)*math.cos(longitude)*math.sin(longitude) + (math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.cos(roll) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(longitude)*math.sin(latitude) + (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.sin(longitude))*(math.cos(latitude)*math.cos(pitch)*math.cos(roll)*math.sin(longitude) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(latitude)*math.sin(longitude) - (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.cos(longitude))*(depthSigma**2) +
		(((math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.cos(longitude)*math.sin(latitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(longitude))*(depth + z_offset) + (math.cos(longitude)*math.cos(pitch)*math.sin(heading)*math.sin(latitude) - math.cos(heading)*math.cos(pitch)*math.sin(longitude))*x_offset + ((math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.cos(longitude)*math.sin(latitude) - (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.sin(longitude))*y_offset)*(((math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.sin(latitude)*math.sin(longitude) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(longitude))*(depth + z_offset) + (math.cos(pitch)*math.sin(heading)*math.sin(latitude)*math.sin(longitude) + math.cos(heading)*math.cos(longitude)*math.cos(pitch))*x_offset + ((math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.sin(latitude)*math.sin(longitude) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(longitude))*y_offset)*(headingSigma**2) +
		((ellipsoidalHeight + 6.37813700000000e6/math.sqrt(-0.00669437999014140*(math.sin(latitude)**2) + 1))*math.cos(longitude)*math.sin(latitude) - 42697.6727071805*(math.cos(latitude)**2)*math.cos(longitude)*math.sin(latitude)/((-0.00669437999014140*(math.sin(latitude)**2) + 1)**(3/2)) - (math.cos(longitude)*math.cos(pitch)*math.cos(roll)*math.sin(latitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(latitude)*math.cos(longitude))*(depth + z_offset) + (math.cos(heading)*math.cos(latitude)*math.cos(longitude)*math.cos(pitch) + math.cos(longitude)*math.sin(latitude)*math.sin(pitch))*x_offset - (math.cos(longitude)*math.cos(pitch)*math.sin(latitude)*math.sin(roll) - (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(latitude)*math.cos(longitude))*y_offset)*((ellipsoidalHeight + 6.37813700000000e6/math.sqrt(-0.00669437999014140*(math.sin(latitude)**2) + 1))*math.sin(latitude)*math.sin(longitude) - 42697.6727071805*(math.cos(latitude)**2)*math.sin(latitude)*math.sin(longitude)/((-0.00669437999014140*(math.sin(latitude)**2) + 1)**(3/2)) - (math.cos(pitch)*math.cos(roll)*math.sin(latitude)*math.sin(longitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(latitude)*math.sin(longitude))*(depth + z_offset) + (math.cos(heading)*math.cos(latitude)*math.cos(pitch)*math.sin(longitude) + math.sin(latitude)*math.sin(longitude)*math.sin(pitch))*x_offset - (math.cos(pitch)*math.sin(latitude)*math.sin(longitude)*math.sin(roll) - (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(latitude)*math.sin(longitude))*y_offset)*(latitudeSigma**2) -
		((ellipsoidalHeight + 6.37813700000000e6/math.sqrt(-0.00669437999014140*(math.sin(latitude)**2) + 1))*math.cos(latitude)*math.cos(longitude) - (math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.cos(roll) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(longitude)*math.sin(latitude) + (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.sin(longitude))*(depth + z_offset) - (math.cos(heading)*math.cos(longitude)*math.cos(pitch)*math.sin(latitude) + math.cos(pitch)*math.sin(heading)*math.sin(longitude) - math.cos(latitude)*math.cos(longitude)*math.sin(pitch))*x_offset - (math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(longitude)*math.sin(latitude) + (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.sin(longitude))*y_offset)*((ellipsoidalHeight + 6.37813700000000e6/math.sqrt(-0.00669437999014140*(math.sin(latitude)**2) + 1))*math.cos(latitude)*math.sin(longitude) - (math.cos(latitude)*math.cos(pitch)*math.cos(roll)*math.sin(longitude) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(latitude)*math.sin(longitude) - (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.cos(longitude))*(depth + z_offset) - (math.cos(heading)*math.cos(pitch)*math.sin(latitude)*math.sin(longitude) - math.cos(longitude)*math.cos(pitch)*math.sin(heading) - math.cos(latitude)*math.sin(longitude)*math.sin(pitch))*x_offset - (math.cos(latitude)*math.cos(pitch)*math.sin(longitude)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.sin(latitude)*math.sin(longitude) - (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.cos(longitude))*y_offset)*(longitudeSigma**2) +
		((math.cos(heading)*math.cos(longitude)*math.cos(pitch)*math.cos(roll)*math.sin(latitude) + math.cos(pitch)*math.cos(roll)*math.sin(heading)*math.sin(longitude) - math.cos(latitude)*math.cos(longitude)*math.cos(roll)*math.sin(pitch))*(depth + z_offset) - (math.cos(heading)*math.cos(longitude)*math.sin(latitude)*math.sin(pitch) + math.cos(latitude)*math.cos(longitude)*math.cos(pitch) + math.sin(heading)*math.sin(longitude)*math.sin(pitch))*x_offset + (math.cos(heading)*math.cos(longitude)*math.cos(pitch)*math.sin(latitude)*math.sin(roll) + math.cos(pitch)*math.sin(heading)*math.sin(longitude)*math.sin(roll) - math.cos(latitude)*math.cos(longitude)*math.sin(pitch)*math.sin(roll))*y_offset)*((math.cos(heading)*math.cos(pitch)*math.cos(roll)*math.sin(latitude)*math.sin(longitude) - math.cos(longitude)*math.cos(pitch)*math.cos(roll)*math.sin(heading) - math.cos(latitude)*math.cos(roll)*math.sin(longitude)*math.sin(pitch))*(depth + z_offset) - (math.cos(heading)*math.sin(latitude)*math.sin(longitude)*math.sin(pitch) + math.cos(latitude)*math.cos(pitch)*math.sin(longitude) - math.cos(longitude)*math.sin(heading)*math.sin(pitch))*x_offset + (math.cos(heading)*math.cos(pitch)*math.sin(latitude)*math.sin(longitude)*math.sin(roll) - math.cos(longitude)*math.cos(pitch)*math.sin(heading)*math.sin(roll) - math.cos(latitude)*math.sin(longitude)*math.sin(pitch)*math.sin(roll))*y_offset)*(pitchSigma**2) +
		((math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(longitude)*math.sin(latitude) + (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.sin(longitude))*(depth + z_offset) - (math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.cos(roll) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(longitude)*math.sin(latitude) + (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.sin(longitude))*y_offset)*((math.cos(latitude)*math.cos(pitch)*math.sin(longitude)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.sin(latitude)*math.sin(longitude) - (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.cos(longitude))*(depth + z_offset) - (math.cos(latitude)*math.cos(pitch)*math.cos(roll)*math.sin(longitude) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(latitude)*math.sin(longitude) - (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.cos(longitude))*y_offset)*(rollSigma**2) +
		(math.cos(heading)*math.cos(longitude)*math.cos(pitch)*math.sin(latitude) + math.cos(pitch)*math.sin(heading)*math.sin(longitude) - math.cos(latitude)*math.cos(longitude)*math.sin(pitch))*(math.cos(heading)*math.cos(pitch)*math.sin(latitude)*math.sin(longitude) - math.cos(longitude)*math.cos(pitch)*math.sin(heading) - math.cos(latitude)*math.sin(longitude)*math.sin(pitch))*(xOffsetSigma**2) +
		(math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(longitude)*math.sin(latitude) + (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.sin(longitude))*(math.cos(latitude)*math.cos(pitch)*math.sin(longitude)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.sin(latitude)*math.sin(longitude) - (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.cos(longitude))*(yOffsetSigma**2) +
		(math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.cos(roll) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(longitude)*math.sin(latitude) + (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.sin(longitude))*(math.cos(latitude)*math.cos(pitch)*math.cos(roll)*math.sin(longitude) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(latitude)*math.sin(longitude) - (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.cos(longitude))*(zOffsetSigma**2),


		(ellipsoidalHeightSigma**2)*math.cos(latitude)*math.cos(longitude)*math.sin(latitude) + (math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.cos(roll) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(longitude)*math.sin(latitude) + (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.sin(longitude))*(math.cos(pitch)*math.cos(roll)*math.sin(latitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(latitude))*(depthSigma**2) -
		(x_offset*math.cos(latitude)*math.cos(pitch)*math.sin(heading) + (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*(depth + z_offset)*math.cos(latitude) + (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*y_offset*math.cos(latitude))*(((math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.cos(longitude)*math.sin(latitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(longitude))*(depth + z_offset) + (math.cos(longitude)*math.cos(pitch)*math.sin(heading)*math.sin(latitude) - math.cos(heading)*math.cos(pitch)*math.sin(longitude))*x_offset + ((math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.cos(longitude)*math.sin(latitude) - (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.sin(longitude))*y_offset)*(headingSigma**2) +
		((ellipsoidalHeight + 6.37813700000000e6/math.sqrt(-0.00669437999014140*(math.sin(latitude)**2) + 1))*math.cos(longitude)*math.sin(latitude) - 42697.6727071805*(math.cos(latitude)**2)*math.cos(longitude)*math.sin(latitude)/((-0.00669437999014140*(math.sin(latitude)**2) + 1)**(3/2)) - (math.cos(longitude)*math.cos(pitch)*math.cos(roll)*math.sin(latitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(latitude)*math.cos(longitude))*(depth + z_offset) + (math.cos(heading)*math.cos(latitude)*math.cos(longitude)*math.cos(pitch) + math.cos(longitude)*math.sin(latitude)*math.sin(pitch))*x_offset - (math.cos(longitude)*math.cos(pitch)*math.sin(latitude)*math.sin(roll) - (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(latitude)*math.cos(longitude))*y_offset)*((math.cos(latitude)*math.cos(pitch)*math.cos(roll) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(latitude))*(depth + z_offset) + (math.cos(heading)*math.cos(pitch)*math.sin(latitude) - math.cos(latitude)*math.sin(pitch))*x_offset + (math.cos(latitude)*math.cos(pitch)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.sin(latitude))*y_offset - (ellipsoidalHeight + 6.33543932729282e6/math.sqrt(-0.00669437999014140*(math.sin(latitude)**2) + 1))*math.cos(latitude) - 42411.8382613839*math.cos(latitude)*(math.sin(latitude)**2)/((-0.00669437999014140*(math.sin(latitude)**2) + 1)**(3/2)))*(latitudeSigma**2) -
		((math.cos(heading)*math.cos(longitude)*math.cos(pitch)*math.cos(roll)*math.sin(latitude) + math.cos(pitch)*math.cos(roll)*math.sin(heading)*math.sin(longitude) - math.cos(latitude)*math.cos(longitude)*math.cos(roll)*math.sin(pitch))*(depth + z_offset) - (math.cos(heading)*math.cos(longitude)*math.sin(latitude)*math.sin(pitch) + math.cos(latitude)*math.cos(longitude)*math.cos(pitch) + math.sin(heading)*math.sin(longitude)*math.sin(pitch))*x_offset + (math.cos(heading)*math.cos(longitude)*math.cos(pitch)*math.sin(latitude)*math.sin(roll) + math.cos(pitch)*math.sin(heading)*math.sin(longitude)*math.sin(roll) - math.cos(latitude)*math.cos(longitude)*math.sin(pitch)*math.sin(roll))*y_offset)*((math.cos(heading)*math.cos(latitude)*math.cos(pitch)*math.cos(roll) + math.cos(roll)*math.sin(latitude)*math.sin(pitch))*(depth + z_offset) - (math.cos(heading)*math.cos(latitude)*math.sin(pitch) - math.cos(pitch)*math.sin(latitude))*x_offset + (math.cos(heading)*math.cos(latitude)*math.cos(pitch)*math.sin(roll) + math.sin(latitude)*math.sin(pitch)*math.sin(roll))*y_offset)*(pitchSigma**2) +
		((math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(longitude)*math.sin(latitude) + (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.sin(longitude))*(depth + z_offset) - (math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.cos(roll) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(longitude)*math.sin(latitude) + (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.sin(longitude))*y_offset)*((math.cos(pitch)*math.sin(latitude)*math.sin(roll) - (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(latitude))*(depth + z_offset) - (math.cos(pitch)*math.cos(roll)*math.sin(latitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(latitude))*y_offset)*(rollSigma**2) - 
		(math.cos(heading)*math.cos(longitude)*math.cos(pitch)*math.sin(latitude) + math.cos(pitch)*math.sin(heading)*math.sin(longitude) - math.cos(latitude)*math.cos(longitude)*math.sin(pitch))*(math.cos(heading)*math.cos(latitude)*math.cos(pitch) + math.sin(latitude)*math.sin(pitch))* (xOffsetSigma**2) +
		(math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(longitude)*math.sin(latitude) + (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.sin(longitude))*(math.cos(pitch)*math.sin(latitude)*math.sin(roll) - (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(latitude))*(yOffsetSigma**2) +
		(math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.cos(roll) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(longitude)*math.sin(latitude) + (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.sin(longitude))*(math.cos(pitch)*math.cos(roll)*math.sin(latitude) - 	(math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(latitude))*(zOffsetSigma**2)
		],
		[
		(ellipsoidalHeightSigma**2)*(math.cos(latitude)**2)*math.cos(longitude)*math.sin(longitude) + (math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.cos(roll) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(longitude)*math.sin(latitude) + (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.sin(longitude))*(math.cos(latitude)*math.cos(pitch)*math.cos(roll)*math.sin(longitude) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(latitude)*math.sin(longitude) - (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.cos(longitude))*(depthSigma**2) +
		(((math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.cos(longitude)*math.sin(latitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(longitude))*(depth + z_offset) + (math.cos(longitude)*math.cos(pitch)*math.sin(heading)*math.sin(latitude) - math.cos(heading)*math.cos(pitch)*math.sin(longitude))*x_offset + ((math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.cos(longitude)*math.sin(latitude) - (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.sin(longitude))*y_offset)*(((math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.sin(latitude)*math.sin(longitude) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(longitude))*(depth + z_offset) + (math.cos(pitch)*math.sin(heading)*math.sin(latitude)*math.sin(longitude) + math.cos(heading)*math.cos(longitude)*math.cos(pitch))*x_offset + ((math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.sin(latitude)*math.sin(longitude) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(longitude))*y_offset)*(headingSigma**2) +
		((ellipsoidalHeight + 6.37813700000000e6/math.sqrt(-0.00669437999014140*(math.sin(latitude)**2) + 1))*math.cos(longitude)*math.sin(latitude) - 42697.6727071805*(math.cos(latitude)**2)*math.cos(longitude)*math.sin(latitude)/((-0.00669437999014140*(math.sin(latitude)**2) + 1)**(3/2)) - (math.cos(longitude)*math.cos(pitch)*math.cos(roll)*math.sin(latitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(latitude)*math.cos(longitude))*(depth + z_offset) + (math.cos(heading)*math.cos(latitude)*math.cos(longitude)*math.cos(pitch) + math.cos(longitude)*math.sin(latitude)*math.sin(pitch))*x_offset - (math.cos(longitude)*math.cos(pitch)*math.sin(latitude)*math.sin(roll) - (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(latitude)*math.cos(longitude))*y_offset)*((ellipsoidalHeight + 6.37813700000000e6/math.sqrt(-0.00669437999014140*(math.sin(latitude)**2) + 1))*math.sin(latitude)*math.sin(longitude) - 42697.6727071805*(math.cos(latitude)**2)*math.sin(latitude)*math.sin(longitude)/((-0.00669437999014140*(math.sin(latitude)**2) + 1)**(3/2)) - (math.cos(pitch)*math.cos(roll)*math.sin(latitude)*math.sin(longitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(latitude)*math.sin(longitude))*(depth + z_offset) + (math.cos(heading)*math.cos(latitude)*math.cos(pitch)*math.sin(longitude) + math.sin(latitude)*math.sin(longitude)*math.sin(pitch))*x_offset - (math.cos(pitch)*math.sin(latitude)*math.sin(longitude)*math.sin(roll) - (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(latitude)*math.sin(longitude))*y_offset)*(latitudeSigma**2) -
		((ellipsoidalHeight + 6.37813700000000e6/math.sqrt(-0.00669437999014140*(math.sin(latitude)**2) + 1))*math.cos(latitude)*math.cos(longitude) - (math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.cos(roll) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(longitude)*math.sin(latitude) + (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.sin(longitude))*(depth + z_offset) - (math.cos(heading)*math.cos(longitude)*math.cos(pitch)*math.sin(latitude) + math.cos(pitch)*math.sin(heading)*math.sin(longitude) - math.cos(latitude)*math.cos(longitude)*math.sin(pitch))*x_offset - (math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(longitude)*math.sin(latitude) + (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.sin(longitude))*y_offset)*((ellipsoidalHeight + 6.37813700000000e6/math.sqrt(-0.00669437999014140*(math.sin(latitude)**2) + 1))*math.cos(latitude)*math.sin(longitude) - (math.cos(latitude)*math.cos(pitch)*math.cos(roll)*math.sin(longitude) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(latitude)*math.sin(longitude) - (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.cos(longitude))*(depth + z_offset) - (math.cos(heading)*math.cos(pitch)*math.sin(latitude)*math.sin(longitude) - math.cos(longitude)*math.cos(pitch)*math.sin(heading) - math.cos(latitude)*math.sin(longitude)*math.sin(pitch))*x_offset - (math.cos(latitude)*math.cos(pitch)*math.sin(longitude)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.sin(latitude)*math.sin(longitude) - (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.cos(longitude))*y_offset)*(longitudeSigma**2) +
		((math.cos(heading)*math.cos(longitude)*math.cos(pitch)*math.cos(roll)*math.sin(latitude) + math.cos(pitch)*math.cos(roll)*math.sin(heading)*math.sin(longitude) - math.cos(latitude)*math.cos(longitude)*math.cos(roll)*math.sin(pitch))*(depth + z_offset) - (math.cos(heading)*math.cos(longitude)*math.sin(latitude)*math.sin(pitch) + math.cos(latitude)*math.cos(longitude)*math.cos(pitch) + math.sin(heading)*math.sin(longitude)*math.sin(pitch))*x_offset + (math.cos(heading)*math.cos(longitude)*math.cos(pitch)*math.sin(latitude)*math.sin(roll) + math.cos(pitch)*math.sin(heading)*math.sin(longitude)*math.sin(roll) - math.cos(latitude)*math.cos(longitude)*math.sin(pitch)*math.sin(roll))*y_offset)*((math.cos(heading)*math.cos(pitch)*math.cos(roll)*math.sin(latitude)*math.sin(longitude) - math.cos(longitude)*math.cos(pitch)*math.cos(roll)*math.sin(heading) - math.cos(latitude)*math.cos(roll)*math.sin(longitude)*math.sin(pitch))*(depth + z_offset) - (math.cos(heading)*math.sin(latitude)*math.sin(longitude)*math.sin(pitch) + math.cos(latitude)*math.cos(pitch)*math.sin(longitude) - math.cos(longitude)*math.sin(heading)*math.sin(pitch))*x_offset + (math.cos(heading)*math.cos(pitch)*math.sin(latitude)*math.sin(longitude)*math.sin(roll) - math.cos(longitude)*math.cos(pitch)*math.sin(heading)*math.sin(roll) - math.cos(latitude)*math.sin(longitude)*math.sin(pitch)*math.sin(roll))*y_offset)*(pitchSigma**2) +
		((math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(longitude)*math.sin(latitude) + (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.sin(longitude))*(depth + z_offset) - (math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.cos(roll) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(longitude)*math.sin(latitude) + (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.sin(longitude))*y_offset)*((math.cos(latitude)*math.cos(pitch)*math.sin(longitude)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.sin(latitude)*math.sin(longitude) - (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.cos(longitude))*(depth + z_offset) - (math.cos(latitude)*math.cos(pitch)*math.cos(roll)*math.sin(longitude) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(latitude)*math.sin(longitude) - (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.cos(longitude))*y_offset)*(rollSigma**2) +
		(math.cos(heading)*math.cos(longitude)*math.cos(pitch)*math.sin(latitude) + math.cos(pitch)*math.sin(heading)*math.sin(longitude) - math.cos(latitude)*math.cos(longitude)*math.sin(pitch))*(math.cos(heading)*math.cos(pitch)*math.sin(latitude)*math.sin(longitude) - math.cos(longitude)*math.cos(pitch)*math.sin(heading) - math.cos(latitude)*math.sin(longitude)*math.sin(pitch))*(xOffsetSigma**2) +
		(math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(longitude)*math.sin(latitude) + (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.sin(longitude))*(math.cos(latitude)*math.cos(pitch)*math.sin(longitude)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.sin(latitude)*math.sin(longitude) - (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.cos(longitude))*(yOffsetSigma**2) +
		(math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.cos(roll) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(longitude)*math.sin(latitude) + (math.cos(roll)*math.sin(heading)*math.sin(pitch) - 	math.cos(heading)*math.sin(roll))*math.sin(longitude))*(math.cos(latitude)*math.cos(pitch)*math.cos(roll)*math.sin(longitude) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(latitude)*math.sin(longitude) - (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.cos(longitude))*(zOffsetSigma**2),
		(ellipsoidalHeightSigma**2)*(math.cos(latitude)**2)*(math.sin(longitude)**2) + ((math.cos(latitude)*math.cos(pitch)*math.cos(roll)*math.sin(longitude) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(latitude)*math.sin(longitude) - (math.cos(roll)*math.sin(heading)*math.sin(pitch) - 	math.cos(heading)*math.sin(roll))*math.cos(longitude))**2)*(depthSigma**2) +
		((((math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.sin(latitude)*math.sin(longitude) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(longitude))*(depth + z_offset) + (math.cos(pitch)*math.sin(heading)*math.sin(latitude)*math.sin(longitude) + math.cos(heading)*math.cos(longitude)*math.cos(pitch))*x_offset + ((math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.sin(latitude)*math.sin(longitude) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(longitude))*y_offset)**2)*(headingSigma**2) +
		(((ellipsoidalHeight + 6.37813700000000e6/math.sqrt(-0.00669437999014140*(math.sin(latitude)**2) + 1))*math.sin(latitude)*math.sin(longitude) - 42697.6727071805*(math.cos(latitude)**2)*math.sin(latitude)*math.sin(longitude)/((-0.00669437999014140*(math.sin(latitude)**2) + 1)**(3/2)) - (math.cos(pitch)*math.cos(roll)*math.sin(latitude)*math.sin(longitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(latitude)*math.sin(longitude))*(depth + z_offset) + (math.cos(heading)*math.cos(latitude)*math.cos(pitch)*math.sin(longitude) + math.sin(latitude)*math.sin(longitude)*math.sin(pitch))*x_offset - (math.cos(pitch)*math.sin(latitude)*math.sin(longitude)*math.sin(roll) - (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(latitude)*math.sin(longitude))*y_offset)**2)*(latitudeSigma**2) +
		(((ellipsoidalHeight + 6.37813700000000e6/math.sqrt(-0.00669437999014140*(math.sin(latitude)**2) + 1))*math.cos(latitude)*math.cos(longitude) - (math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.cos(roll) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(longitude)*math.sin(latitude) + (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.sin(longitude))*(depth + z_offset) - (math.cos(heading)*math.cos(longitude)*math.cos(pitch)*math.sin(latitude) + math.cos(pitch)*math.sin(heading)*math.sin(longitude) - math.cos(latitude)*math.cos(longitude)*math.sin(pitch))*x_offset - (math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(longitude)*math.sin(latitude) + (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.sin(longitude))*y_offset)**2)*(longitudeSigma**2) +
		(((math.cos(heading)*math.cos(pitch)*math.cos(roll)*math.sin(latitude)*math.sin(longitude) - math.cos(longitude)*math.cos(pitch)*math.cos(roll)*math.sin(heading) - math.cos(latitude)*math.cos(roll)*math.sin(longitude)*math.sin(pitch))*(depth + z_offset) - (math.cos(heading)*math.sin(latitude)*math.sin(longitude)*math.sin(pitch) + math.cos(latitude)*math.cos(pitch)*math.sin(longitude) - math.cos(longitude)*math.sin(heading)*math.sin(pitch))*x_offset + (math.cos(heading)*math.cos(pitch)*math.sin(latitude)*math.sin(longitude)*math.sin(roll) - math.cos(longitude)*math.cos(pitch)*math.sin(heading)*math.sin(roll) - math.cos(latitude)*math.sin(longitude)*math.sin(pitch)*math.sin(roll))*y_offset)**2)*(pitchSigma**2) +
		(((math.cos(latitude)*math.cos(pitch)*math.sin(longitude)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.sin(latitude)*math.sin(longitude) - (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.cos(longitude))*(depth + z_offset) - (math.cos(latitude)*math.cos(pitch)*math.cos(roll)*math.sin(longitude) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(latitude)*math.sin(longitude) - (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.cos(longitude))*y_offset)**2)*(rollSigma**2) +
		((math.cos(heading)*math.cos(pitch)*math.sin(latitude)*math.sin(longitude) - math.cos(longitude)*math.cos(pitch)*math.sin(heading) - math.cos(latitude)*math.sin(longitude)*math.sin(pitch))**2)*(xOffsetSigma**2) +
		((math.cos(latitude)*math.cos(pitch)*math.sin(longitude)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.sin(latitude)*math.sin(longitude) - (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.cos(longitude))**2)*(yOffsetSigma**2) + 
		((math.cos(latitude)*math.cos(pitch)*math.cos(roll)*math.sin(longitude) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(latitude)*math.sin(longitude) - (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.cos(longitude))**2)*(zOffsetSigma**2),

		(ellipsoidalHeightSigma**2)*math.cos(latitude)*math.sin(latitude)*math.sin(longitude) + (math.cos(latitude)*math.cos(pitch)*math.cos(roll)*math.sin(longitude) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(latitude)*math.sin(longitude) - (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.cos(longitude))*(math.cos(pitch)*math.cos(roll)*math.sin(latitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(latitude))*(depthSigma**2) - 
		(x_offset*math.cos(latitude)*math.cos(pitch)*math.sin(heading) + (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*(depth + z_offset)*math.cos(latitude) + (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*y_offset*math.cos(latitude))*(((math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.sin(latitude)*math.sin(longitude) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(longitude))*(depth + z_offset) + (math.cos(pitch)*math.sin(heading)*math.sin(latitude)*math.sin(longitude) + math.cos(heading)*math.cos(longitude)*math.cos(pitch))*x_offset + 		((math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.sin(latitude)*math.sin(longitude) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(longitude))*y_offset)*(headingSigma**2) + 
		((ellipsoidalHeight + 6.37813700000000e6/math.sqrt(-0.00669437999014140*(math.sin(latitude)**2) + 1))*math.sin(latitude)*math.sin(longitude) - 42697.6727071805*(math.cos(latitude)**2)*math.sin(latitude)*math.sin(longitude)/((-0.00669437999014140*(math.sin(latitude)**2) + 1)**(3/2)) - (math.cos(pitch)*math.cos(roll)*math.sin(latitude)*math.sin(longitude) - 	(math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(latitude)*math.sin(longitude))*(depth + z_offset) + (math.cos(heading)*math.cos(latitude)*math.cos(pitch)*math.sin(longitude) + math.sin(latitude)*math.sin(longitude)*math.sin(pitch))*x_offset - (math.cos(pitch)*math.sin(latitude)*math.sin(longitude)*math.sin(roll) - 	(math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(latitude)*math.sin(longitude))*y_offset)*((math.cos(latitude)*math.cos(pitch)*math.cos(roll) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(latitude))*(depth + z_offset) + (math.cos(heading)*math.cos(pitch)*math.sin(latitude) - 	math.cos(latitude)*math.sin(pitch))*x_offset + (math.cos(latitude)*math.cos(pitch)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.sin(latitude))*y_offset - (ellipsoidalHeight + 6.33543932729282e6/math.sqrt(-0.00669437999014140*(math.sin(latitude)**2) + 1))*math.cos(latitude) - 	42411.8382613839*math.cos(latitude)*(math.sin(latitude)**2)/((-0.00669437999014140*(math.sin(latitude)**2) + 1)**(3/2)))*(latitudeSigma**2) -
		((math.cos(heading)*math.cos(pitch)*math.cos(roll)*math.sin(latitude)*math.sin(longitude) - math.cos(longitude)*math.cos(pitch)*math.cos(roll)*math.sin(heading) - math.cos(latitude)*math.cos(roll)*math.sin(longitude)*math.sin(pitch))*(depth + z_offset) - (math.cos(heading)*math.sin(latitude)*math.sin(longitude)*math.sin(pitch) + 	math.cos(latitude)*math.cos(pitch)*math.sin(longitude) - math.cos(longitude)*math.sin(heading)*math.sin(pitch))*x_offset + (math.cos(heading)*math.cos(pitch)*math.sin(latitude)*math.sin(longitude)*math.sin(roll) - math.cos(longitude)*math.cos(pitch)*math.sin(heading)*math.sin(roll) - math.cos(latitude)*math.sin(longitude)*math.sin(pitch)*math.sin(roll))*y_offset)*((math.cos(heading)*math.cos(latitude)*math.cos(pitch)*math.cos(roll) + math.cos(roll)*math.sin(latitude)*math.sin(pitch))*(depth + z_offset) - (math.cos(heading)*math.cos(latitude)*math.sin(pitch) - math.cos(pitch)*math.sin(latitude))*x_offset + (math.cos(heading)*math.cos(latitude)*math.cos(pitch)*math.sin(roll) + math.sin(latitude)*math.sin(pitch)*math.sin(roll))*y_offset)*(pitchSigma**2) +
		((math.cos(latitude)*math.cos(pitch)*math.sin(longitude)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.sin(latitude)*math.sin(longitude) - (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.cos(longitude))*(depth + z_offset) - (math.cos(latitude)*math.cos(pitch)*math.cos(roll)*math.sin(longitude) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(latitude)*math.sin(longitude) - (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.cos(longitude))*y_offset)*((math.cos(pitch)*math.sin(latitude)*math.sin(roll) - (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(latitude))*(depth + z_offset) - (math.cos(pitch)*math.cos(roll)*math.sin(latitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(latitude))*y_offset)*(rollSigma**2) -
		(math.cos(heading)*math.cos(pitch)*math.sin(latitude)*math.sin(longitude) - math.cos(longitude)*math.cos(pitch)*math.sin(heading) - math.cos(latitude)*math.sin(longitude)*math.sin(pitch))*(math.cos(heading)*math.cos(latitude)*math.cos(pitch) + math.sin(latitude)*math.sin(pitch))*(xOffsetSigma**2) +
		(math.cos(latitude)*math.cos(pitch)*math.sin(longitude)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.sin(latitude)*math.sin(longitude) - (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.cos(longitude))*(math.cos(pitch)*math.sin(latitude)*math.sin(roll) - (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(latitude))*(yOffsetSigma**2) +
		(math.cos(latitude)*math.cos(pitch)*math.cos(roll)*math.sin(longitude) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(latitude)*math.sin(longitude) - (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.cos(longitude))*(math.cos(pitch)*math.cos(roll)*math.sin(latitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(latitude))*(zOffsetSigma**2)
		],
		[ 
		(ellipsoidalHeightSigma**2)*math.cos(latitude)*math.cos(longitude)*math.sin(latitude) + (math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.cos(roll) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(longitude)*math.sin(latitude) + (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.sin(longitude))*(math.cos(pitch)*math.cos(roll)*math.sin(latitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(latitude))*(depthSigma**2) -
		(x_offset*math.cos(latitude)*math.cos(pitch)*math.sin(heading) + (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*(depth + z_offset)*math.cos(latitude) + (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*y_offset*math.cos(latitude))*(((math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.cos(longitude)*math.sin(latitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(longitude))*(depth + z_offset) + (math.cos(longitude)*math.cos(pitch)*math.sin(heading)*math.sin(latitude) - math.cos(heading)*math.cos(pitch)*math.sin(longitude))*x_offset + ((math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.cos(longitude)*math.sin(latitude) - (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.sin(longitude))*y_offset)* (headingSigma**2) +
		((ellipsoidalHeight + 6.37813700000000e6/math.sqrt(-0.00669437999014140*(math.sin(latitude)**2) + 1))*math.cos(longitude)*math.sin(latitude) - 42697.6727071805*(math.cos(latitude)**2)*math.cos(longitude)*math.sin(latitude)/((-0.00669437999014140*(math.sin(latitude)**2) + 1)**(3/2)) - (math.cos(longitude)*math.cos(pitch)*math.cos(roll)*math.sin(latitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(latitude)*math.cos(longitude))*(depth + z_offset) + (math.cos(heading)*math.cos(latitude)*math.cos(longitude)*math.cos(pitch) + math.cos(longitude)*math.sin(latitude)*math.sin(pitch))*x_offset - (math.cos(longitude)*math.cos(pitch)*math.sin(latitude)*math.sin(roll) - (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(latitude)*math.cos(longitude))*y_offset)*((math.cos(latitude)*math.cos(pitch)*math.cos(roll) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(latitude))*(depth + z_offset) + (math.cos(heading)*math.cos(pitch)*math.sin(latitude) - math.cos(latitude)*math.sin(pitch))*x_offset + (math.cos(latitude)*math.cos(pitch)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.sin(latitude))*y_offset - (ellipsoidalHeight + 6.33543932729282e6/math.sqrt(-0.00669437999014140*(math.sin(latitude)**2) + 1))*math.cos(latitude) - 42411.8382613839*math.cos(latitude)*(math.sin(latitude)**2)/((-0.00669437999014140*(math.sin(latitude)**2) + 1)**(3/2)))*(latitudeSigma**2) -
		((math.cos(heading)*math.cos(longitude)*math.cos(pitch)*math.cos(roll)*math.sin(latitude) + math.cos(pitch)*math.cos(roll)*math.sin(heading)*math.sin(longitude) - math.cos(latitude)*math.cos(longitude)*math.cos(roll)*math.sin(pitch))*(depth + z_offset) - (math.cos(heading)*math.cos(longitude)*math.sin(latitude)*math.sin(pitch) + math.cos(latitude)*math.cos(longitude)*math.cos(pitch) + math.sin(heading)*math.sin(longitude)*math.sin(pitch))*x_offset + (math.cos(heading)*math.cos(longitude)*math.cos(pitch)*math.sin(latitude)*math.sin(roll) + math.cos(pitch)*math.sin(heading)*math.sin(longitude)*math.sin(roll) - math.cos(latitude)*math.cos(longitude)*math.sin(pitch)*math.sin(roll))*y_offset)*((math.cos(heading)*math.cos(latitude)*math.cos(pitch)*math.cos(roll) + math.cos(roll)*math.sin(latitude)*math.sin(pitch))*(depth + z_offset) - (math.cos(heading)*math.cos(latitude)*math.sin(pitch) - math.cos(pitch)*math.sin(latitude))*x_offset + (math.cos(heading)*math.cos(latitude)*math.cos(pitch)*math.sin(roll) + math.sin(latitude)*math.sin(pitch)*math.sin(roll))*y_offset)*(pitchSigma**2) +
		((math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(longitude)*math.sin(latitude) + (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.sin(longitude))*(depth + z_offset) - (math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.cos(roll) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(longitude)*math.sin(latitude) + (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.sin(longitude))*y_offset)*((math.cos(pitch)*math.sin(latitude)*math.sin(roll) - (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(latitude))*(depth + z_offset) - (math.cos(pitch)*math.cos(roll)*math.sin(latitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(latitude))*y_offset)*(rollSigma**2) -
		(math.cos(heading)*math.cos(longitude)*math.cos(pitch)*math.sin(latitude) + math.cos(pitch)*math.sin(heading)*math.sin(longitude) - math.cos(latitude)*math.cos(longitude)*math.sin(pitch))*(math.cos(heading)*math.cos(latitude)*math.cos(pitch) + math.sin(latitude)*math.sin(pitch))*(xOffsetSigma**2) +
		(math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(longitude)*math.sin(latitude) + (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.sin(longitude))*(math.cos(pitch)*math.sin(latitude)*math.sin(roll) - (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(latitude))*(yOffsetSigma**2) +
		(math.cos(latitude)*math.cos(longitude)*math.cos(pitch)*math.cos(roll) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(longitude)*math.sin(latitude) + (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.sin(longitude))*(math.cos(pitch)*math.cos(roll)*math.sin(latitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(latitude))*(zOffsetSigma**2),  
		(ellipsoidalHeightSigma**2)*math.cos(latitude)*math.sin(latitude)*math.sin(longitude) + (math.cos(latitude)*math.cos(pitch)*math.cos(roll)*math.sin(longitude) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(latitude)*math.sin(longitude) - (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.cos(longitude))*(math.cos(pitch)*math.cos(roll)*math.sin(latitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(latitude))*(depthSigma**2) -
		(x_offset*math.cos(latitude)*math.cos(pitch)*math.sin(heading) + (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*(depth + z_offset)*math.cos(latitude) + (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*y_offset*math.cos(latitude))*(((math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.sin(latitude)*math.sin(longitude) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(longitude))*(depth + z_offset) + (math.cos(pitch)*math.sin(heading)*math.sin(latitude)*math.sin(longitude) + math.cos(heading)*math.cos(longitude)*math.cos(pitch))*x_offset + ((math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.sin(latitude)*math.sin(longitude) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(longitude))*y_offset)*(headingSigma**2) +
		((ellipsoidalHeight + 6.37813700000000e6/math.sqrt(-0.00669437999014140*(math.sin(latitude)**2) + 1))*math.sin(latitude)*math.sin(longitude) - 42697.6727071805*(math.cos(latitude)**2)*math.sin(latitude)*math.sin(longitude)/((-0.00669437999014140*(math.sin(latitude)**2) + 1)**(3/2)) - (math.cos(pitch)*math.cos(roll)*math.sin(latitude)*math.sin(longitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(latitude)*math.sin(longitude))*(depth + z_offset) + (math.cos(heading)*math.cos(latitude)*math.cos(pitch)*math.sin(longitude) + math.sin(latitude)*math.sin(longitude)*math.sin(pitch))*x_offset - (math.cos(pitch)*math.sin(latitude)*math.sin(longitude)*math.sin(roll) - (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(latitude)*math.sin(longitude))*y_offset)*((math.cos(latitude)*math.cos(pitch)*math.cos(roll) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(latitude))*(depth + z_offset) + (math.cos(heading)*math.cos(pitch)*math.sin(latitude) - math.cos(latitude)*math.sin(pitch))*x_offset + (math.cos(latitude)*math.cos(pitch)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.sin(latitude))*y_offset - (ellipsoidalHeight + 6.33543932729282e6/math.sqrt(-0.00669437999014140*(math.sin(latitude)**2) + 1))*math.cos(latitude) - 42411.8382613839*math.cos(latitude)*(math.sin(latitude)**2)/((-0.00669437999014140*(math.sin(latitude)**2) + 1)**(3/2)))*(latitudeSigma**2) -
		((math.cos(heading)*math.cos(pitch)*math.cos(roll)*math.sin(latitude)*math.sin(longitude) - math.cos(longitude)*math.cos(pitch)*math.cos(roll)*math.sin(heading) - math.cos(latitude)*math.cos(roll)*math.sin(longitude)*math.sin(pitch))*(depth + z_offset) - (math.cos(heading)*math.sin(latitude)*math.sin(longitude)*math.sin(pitch) + math.cos(latitude)*math.cos(pitch)*math.sin(longitude) - math.cos(longitude)*math.sin(heading)*math.sin(pitch))*x_offset + (math.cos(heading)*math.cos(pitch)*math.sin(latitude)*math.sin(longitude)*math.sin(roll) - math.cos(longitude)*math.cos(pitch)*math.sin(heading)*math.sin(roll) - math.cos(latitude)*math.sin(longitude)*math.sin(pitch)*math.sin(roll))*y_offset)*((math.cos(heading)*math.cos(latitude)*math.cos(pitch)*math.cos(roll) + math.cos(roll)*math.sin(latitude)*math.sin(pitch))*(depth + z_offset) - (math.cos(heading)*math.cos(latitude)*math.sin(pitch) - math.cos(pitch)*math.sin(latitude))*x_offset + (math.cos(heading)*math.cos(latitude)*math.cos(pitch)*math.sin(roll) + math.sin(latitude)*math.sin(pitch)*math.sin(roll))*y_offset)*(pitchSigma**2) +
		((math.cos(latitude)*math.cos(pitch)*math.sin(longitude)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.sin(latitude)*math.sin(longitude) - (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.cos(longitude))*(depth + z_offset) - (math.cos(latitude)*math.cos(pitch)*math.cos(roll)*math.sin(longitude) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(latitude)*math.sin(longitude) - (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.cos(longitude))*y_offset)*((math.cos(pitch)*math.sin(latitude)*math.sin(roll) - (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(latitude))*(depth + z_offset) - (math.cos(pitch)*math.cos(roll)*math.sin(latitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(latitude))*y_offset)*(rollSigma**2) -
		(math.cos(heading)*math.cos(pitch)*math.sin(latitude)*math.sin(longitude) - math.cos(longitude)*math.cos(pitch)*math.sin(heading) - math.cos(latitude)*math.sin(longitude)*math.sin(pitch))*(math.cos(heading)*math.cos(latitude)*math.cos(pitch) + math.sin(latitude)*math.sin(pitch))*(xOffsetSigma**2) +
		(math.cos(latitude)*math.cos(pitch)*math.sin(longitude)*math.sin(roll) + (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.sin(latitude)*math.sin(longitude) - (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*math.cos(longitude))*(math.cos(pitch)*math.sin(latitude)*math.sin(roll) - (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(latitude))*(yOffsetSigma**2) +
		(math.cos(latitude)*math.cos(pitch)*math.cos(roll)*math.sin(longitude) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(latitude)*math.sin(longitude) - (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*math.cos(longitude))*(math.cos(pitch)*math.cos(roll)*math.sin(latitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(latitude))*(zOffsetSigma**2),
		((math.cos(pitch)*math.cos(roll)*math.sin(latitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(latitude))**2)*(depthSigma**2) +
		((x_offset*math.cos(latitude)*math.cos(pitch)*math.sin(heading) + (math.cos(roll)*math.sin(heading)*math.sin(pitch) - math.cos(heading)*math.sin(roll))*(depth + z_offset)*math.cos(latitude) + (math.sin(heading)*math.sin(pitch)*math.sin(roll) + math.cos(heading)*math.cos(roll))*y_offset*math.cos(latitude))**2)*(headingSigma**2) +
		(((math.cos(latitude)*math.cos(pitch)*math.cos(roll) + (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.sin(latitude))*(depth + z_offset) + (math.cos(heading)*math.cos(pitch)*math.sin(latitude) - math.cos(latitude)*math.sin(pitch))*x_offset + (math.cos(latitude)*math.cos(pitch)*math.sin(roll) + 	(math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.sin(latitude))*y_offset - (ellipsoidalHeight + 6.33543932729282e6/math.sqrt(-0.00669437999014140*(math.sin(latitude)**2) + 1))*math.cos(latitude) - 42411.8382613839*math.cos(latitude)*(math.sin(latitude)**2)/((-0.00669437999014140*(math.sin(latitude)**2) + 1)**(3/2)))**2)*(latitudeSigma**2) +
		(((math.cos(heading)*math.cos(latitude)*math.cos(pitch)*math.cos(roll) + math.cos(roll)*math.sin(latitude)*math.sin(pitch))*(depth + z_offset) - (math.cos(heading)*math.cos(latitude)*math.sin(pitch) - math.cos(pitch)*math.sin(latitude))*x_offset + (math.cos(heading)*math.cos(latitude)*math.cos(pitch)*math.sin(roll) + 	math.sin(latitude)*math.sin(pitch)*math.sin(roll))*y_offset)**2)*(pitchSigma**2) +
		(((math.cos(pitch)*math.sin(latitude)*math.sin(roll) - (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(latitude))*(depth + z_offset) - (math.cos(pitch)*math.cos(roll)*math.sin(latitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + 	math.sin(heading)*math.sin(roll))*math.cos(latitude))*y_offset)**2)*(rollSigma**2) +
		((math.cos(heading)*math.cos(latitude)*math.cos(pitch) + math.sin(latitude)*math.sin(pitch))**2)*(xOffsetSigma**2) +
		((math.cos(pitch)*math.sin(latitude)*math.sin(roll) - (math.cos(heading)*math.sin(pitch)*math.sin(roll) - math.cos(roll)*math.sin(heading))*math.cos(latitude))**2)*(yOffsetSigma**2) +
		((math.cos(pitch)*math.cos(roll)*math.sin(latitude) - (math.cos(heading)*math.cos(roll)*math.sin(pitch) + math.sin(heading)*math.sin(roll))*math.cos(latitude))**2)*(zOffsetSigma**2) +
		(ellipsoidalHeightSigma**2)*(math.sin(latitude)**2)
		]
		])
