How do I calculate a lon/lat from an existing coordinate set and offsets?

74 views Asked by At

I have an problem I need some help with. I have 2 sensors (a weather sensor and a camera) mounted under a large balloon (basically). The weather sensor records pitch, roll, yaw, altitude, heading (0-360), lon and lat. I also have x,y,z values that represent the offset distance that the weather sensor is from the camera. The camera does not have it's own INS so the values from the weather sensor are sent to the camera. However, since those values are coming from the weather sensor that is not in the same position as the camera, the values are not accurate. I need to perform calculations on the values before sending them to the camera and that is where I need help.

For the record:

  • Both devices are facing the front of the craft
  • The X is the Front to Back axis
  • The Y is the Top to Bottom axis
  • The Z is the Left to Right axis

coordinate planes diagram

I know the formula to get coordinates for a target point given a starting point, bearing, and distance. I can get the distance by using the Pythagorean Theorem (using the measured X and Z values). Those are 10.58055" and 17.53322" respectively. We already have the starting point (it comes from the weather sensor).

First, am I on the right track here? Second, how do I appropriately calculate bearing? I can use trig to get the angle that the weather sensor is offset from the camera, which I think is required. I also think I need to account for the orientation of the sensor to the camera (i.e. if the weather sensor is in front of the camera, it needs to "turn around" to get to the camera). This would mean that if the X value is negative and the Z value is positive, I would subtract my angle (let's call it theta) from 180. However, that would only work if I was heading north so I believe you then need to add in the heading (that came from the weather sensor).

I think I am close on this. I need some smarter people letting me know if I am approaching this correctly and then possibly little things like the appropriate way to handle the bearing measurement going above 360 (which I believe is to just subtract 360).

0

There are 0 answers