# simple nvector calculations

I love using nvector recipes that I find but I've only developed limited code on my own. I need some help for some GNSS data I'm trying to manipulate.

Here are example sentences from the receiver:

$PNVGBLS,054131.30,-0.012,0.998,0.019,0.999,90.66,1.09,R*39$GPGGA,054131.30,4053.3063717,N,08711.6009958,W,4,07,1.1,205.877,M,-34.072,M,0.3,0042*77


The PNVGBLS message is proprietary:

Latitude-projection of base-line, m
Longitude-projection of base-line, m
Height-projection of base-line, m
Base-line length (Rover-to-Base distance), m
Base-line course (angle between base-line vector and North direction), degrees
Base-line pitch (angle between base-line vector and horizontal), degrees


My interpretation of the 054131.30 observation:

latitude = 40.888439528333336 degrees
longitude = -87.19334993 degrees
altitude = 205.877 meters
separation = -34.072 meters (from WGS84)
latitude_p = -0.012 meters
longitude_p = 0.998 meters
height_p = 0.019 meters


The antennas are mounted on tractor as shown here: (The loader is raised during operation so that the antennas are parallel to the ground.) The tractor is now pointed almost directly North, so I believe the primary antenna is on the left.

First I want to be able to calculate the position of the second antenna. This should be a simple GeoPoint + Pvector operation, right? Here's some very bad code to start:

frame = nvector.FrameE(name='WGS84')
left = frame.GeoPoint(latitude=40.888439348333335, longitude=-87.19334976833333, z=-205.877, degrees=True)
delta = somemagic(-0.012, 0.998, 0.019)
delta_vector = delta.to_ecef_vector()
right = (left + delta_vector).to_geo_point()


Eventually I need to calculate the midpoint between the antennas as projected onto the ground, accounting for roll. I would use one half the delta between the antennas, then add an orthogonal vector to reach the ground?

I want to be as precise as possible given the data but I am fairly sure that if I can figure out some code I will miss something. Even if it looks right, I'm likely to introduce some error because I don't understand the calculations well.