Isis 3 Programmer Reference
CameraSkyMap.cpp
1
6/* SPDX-License-Identifier: CC0-1.0 */
7
8#include "CameraSkyMap.h"
9#include "NaifStatus.h"
10
11namespace Isis {
17 CameraSkyMap::CameraSkyMap(Camera *parent) {
18 p_camera = parent;
19 p_camera->SetSkyMap(this);
20 }
21
34 bool CameraSkyMap::SetFocalPlane(const double ux, const double uy,
35 double uz) {
37
38 SpiceDouble lookC[3];
39 lookC[0] = ux;
40 lookC[1] = uy;
41 lookC[2] = uz;
42
43 SpiceDouble unitLookC[3];
44 vhat_c(lookC, unitLookC);
45 p_camera->SetLookDirection(unitLookC);
46
48
49 return true;
50 }
51
65 bool CameraSkyMap::SetSky(const double ra, const double dec) {
66 p_camera->Sensor::SetRightAscensionDeclination(ra, dec);
67 double lookC[3];
68 p_camera->Sensor::LookDirection(lookC);
69 double scale = p_camera->FocalLength() / lookC[2];
70 p_focalPlaneX = lookC[0] * scale;
71 p_focalPlaneY = lookC[1] * scale;
72 return true;
73 }
74}
void SetSkyMap(CameraSkyMap *map)
Sets the Sky Map.
Definition Camera.cpp:2431
double FocalLength() const
Returns the focal length.
Definition Camera.cpp:2762
virtual bool SetSky(const double ra, const double dec)
Compute undistorted focal plane coordinate from ra/dec.
Camera * p_camera
The main camera to calculate distortions on.
double p_focalPlaneY
Undistorted y value for the focal plane.
virtual bool SetFocalPlane(const double ux, const double uy, const double uz)
Compute ra/dec from focal plane coordinate.
double p_focalPlaneX
Undistorted x value for the focal plane.
static void CheckErrors(bool resetNaif=true)
This method looks for any naif errors that might have occurred.
bool SetLookDirection(const double v[3])
Sets the look direction of the spacecraft.
Definition Sensor.cpp:143
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16