Isis 3 Programmer Reference
CameraSkyMap.cpp
1 
6 /* SPDX-License-Identifier: CC0-1.0 */
7 
8 #include "CameraSkyMap.h"
9 #include "NaifStatus.h"
10 
11 namespace Isis {
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 }
Isis::CameraSkyMap::SetSky
virtual bool SetSky(const double ra, const double dec)
Compute undistorted focal plane coordinate from ra/dec.
Definition: CameraSkyMap.cpp:65
Isis::CameraSkyMap::p_focalPlaneX
double p_focalPlaneX
Undistorted x value for the focal plane.
Definition: CameraSkyMap.h:59
Isis::CameraSkyMap::p_camera
Camera * p_camera
The main camera to calculate distortions on.
Definition: CameraSkyMap.h:55
Isis::Camera::SetSkyMap
void SetSkyMap(CameraSkyMap *map)
Sets the Sky Map.
Definition: Camera.cpp:2401
Isis::CameraSkyMap::SetFocalPlane
virtual bool SetFocalPlane(const double ux, const double uy, const double uz)
Compute ra/dec from focal plane coordinate.
Definition: CameraSkyMap.cpp:34
Isis::NaifStatus::CheckErrors
static void CheckErrors(bool resetNaif=true)
This method looks for any naif errors that might have occurred.
Definition: NaifStatus.cpp:28
Isis::Camera
Definition: Camera.h:236
Isis::CameraSkyMap::p_focalPlaneY
double p_focalPlaneY
Undistorted y value for the focal plane.
Definition: CameraSkyMap.h:60
Isis::Camera::FocalLength
double FocalLength() const
Returns the focal length.
Definition: Camera.cpp:2732
Isis::Sensor::SetLookDirection
bool SetLookDirection(const double v[3])
Sets the look direction of the spacecraft.
Definition: Sensor.cpp:141
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::CameraSkyMap::CameraSkyMap
CameraSkyMap(Camera *parent)
Constructor a map between focal plane x/y and right acension/declination.
Definition: CameraSkyMap.cpp:17