Skip to content
Snippets Groups Projects
Commit 07f3e5b0 authored by Jesse Mapel's avatar Jesse Mapel Committed by Kristin
Browse files

Fixed some docs (#192)

* Fixed some docs

* Fixed typos
parent a64aa21c
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,8 @@
using json = nlohmann::json;
// Calculates a rotation matrix from Euler angles
// in - euler[3]
// out - rotationMatrix[9]
void calculateRotationMatrixFromEuler(
double euler[],
double rotationMatrix[])
......@@ -27,6 +29,8 @@ void calculateRotationMatrixFromEuler(
// uses a quaternion to calclate a rotation matrix.
// in - q[4]
// out - rotationMatrix[9]
void calculateRotationMatrixFromQuaternions(
double q[4],
double rotationMatrix[9])
......@@ -48,6 +52,16 @@ void calculateRotationMatrixFromQuaternions(
rotationMatrix[8] = -q[0] * q[0] - q[1] * q[1] + q[2] * q[2] + q[3] * q[3];
}
// Compue the distorted focal plane coordinate for a given image pixel
// in - line
// in - sample
// in - sampleOrigin - the origin of the ccd coordinate system relative to the top left of the ccd
// in - lineOrigin - the origin of the ccd coordinate system relative to the top left of the ccd
// in - sampleSumming
// in - startingSample - first ccd sample for the image
// in - iTransS[3] - the transformation from focal plane to ccd samples
// in - iTransL[3] - the transformation from focal plane to ccd lines
// out - natFocalPlane
void computeDistortedFocalPlaneCoordinates(
const double& line,
const double& sample,
......@@ -77,6 +91,11 @@ void computeDistortedFocalPlaneCoordinates(
};
// Define imaging ray in image space (In other words, create a look vector in camera space)
// in - undistortedFocalPlaneX
// in - undistortedFocalPlaneY
// in - zDirection - Either 1 or -1. The direction of the boresight
// in - focalLength
// out - cameraLook[3]
void createCameraLookVector(
const double& undistortedFocalPlaneX,
const double& undistortedFocalPlaneY,
......@@ -95,6 +114,7 @@ void createCameraLookVector(
cameraLook[2] /= magnitude;
}
// convert a measurement
double metric_conversion(double val, std::string from, std::string to) {
json typemap = {
{"m", 0},
......@@ -551,6 +571,8 @@ double getSemiMinorRadius(json isd, csm::WarningList *list) {
return radius;
}
// Gets the type of distortion model from the isd. If none is specified defaults
// to transverse
DistortionType getDistortionModel(json isd, csm::WarningList *list) {
json distoriton_subset = isd.at("optical_distortion");
......
......@@ -12,10 +12,6 @@
using json = nlohmann::json;
// TODO all commented out expects are failing and need to either have updated numbers
// for the line scanner test cases, or we need to figure out why the line scanner
// is not honoring this functionality.
TEST_F(ConstVelocityLineScanSensorModel, State) {
std::string modelState = sensorModel->getModelState();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment