15#include "IException.h"
16#include "RadarPulseMap.h"
17#include "RadarGroundRangeMap.h"
18#include "RadarSlantRangeMap.h"
19#include "RadarGroundMap.h"
20#include "RadarSkyMap.h"
56 QString msg =
"Cube does not appear to be a mini RF image";
64 double groundRangeResolution = inst[
"ScaledPixelHeight"];
76 SpiceDouble etStart =
iTime((QString)inst[
"StartTime"]).
Et();
82 double lineRate = (double) inst[
"LineExposureDuration"];
85 double incidenceAngle = (double) inst[
"IncidenceAngle"];
86 incidenceAngle = incidenceAngle *
Isis::PI / 180.0;
89 double azimuthResolution = (double) inst[
"AzimuthResolution"];
90 azimuthResolution = azimuthResolution / 1000.0;
93 double rangeResolution = (double) inst[
"RangeResolution"];
99 double frequency = (double) inst[
"Frequency"];
100 double waveLength = clight_c() / frequency;
106 Radar::LookDirection ldir = Radar::Right;
107 if((QString)inst[
"LookDirection"] ==
"LEFT") {
110 RadarGroundRangeMap::setTransform(
naifIkCode(), groundRangeResolution,
122 double range_sigma = rangeResolution * sin(incidenceAngle) * 100;
123 double etMid = etStart + 0.5 * (this->
ParentLines() + 1) * lineRate;
127 groundRangeResolution);
128 slantRangeMap->SetCoefficients(inst[
"RangeCoefficientSet"]);
137 double etEnd = etStart + this->
ParentLines() * lineRate + lineRate;
138 etStart = etStart - lineRate;
153 vequ_c((SpiceDouble *) & (spaceCraft->Coordinate()[0]), Ssc);
154 vequ_c((SpiceDouble *) & (spaceCraft->Velocity()[0]), Ssc + 3);
156 SpiceDouble BJ[6][6];
157 rav2xf_c(&(bodyFrame->Matrix()[0]), (SpiceDouble *) & (bodyFrame->AngularVelocity()[0]), BJ);
159 mxvg_c(BJ, Ssc, 6, 6, Ssc);
164 vequ_c(Ssc + 3, Vsc);
168 double R =
radii[0].kilometers();
169 double height = sqrt(Xsc[0] * Xsc[0] + Xsc[1] * Xsc[1] + Xsc[2] * Xsc[2]) - R;
170 double speed = vnorm_c(Vsc);
171 double dopplerSigma = 2.0 * speed * azimuthResolution / (waveLength *
172 height / cos(incidenceAngle)) * 100.;
174 slantRangeMap->SetWeightFactors(range_sigma, dopplerSigma);
184 std::string msg =
"Cannot generate CK for MiniRF";
195 std::string msg =
"Cannot generate CK for MiniRF";
QString m_spacecraftNameLong
Full spacecraft name.
int ParentLines() const
Returns the number of lines in the parent alphacube.
double PixelPitch() const
Returns the pixel pitch.
friend class RadarGroundMap
A friend class to calculate focal length.
virtual double PixelResolution()
Returns the pixel resolution at the current position in meters/pixel.
void SetFocalLength()
Reads the focal length from the instrument kernel.
void SetPixelPitch()
Reads the Pixel Pitch from the instrument kernel.
double FocalLength() const
Returns the focal length.
QString m_instrumentNameShort
Shortened instrument name.
friend class RadarSlantRangeMap
A friend class to calculate focal length.
QString m_spacecraftNameShort
Shortened spacecraft name.
int Samples() const
Returns the number of samples in the image.
QString m_instrumentNameLong
Full instrument name.
IO Handler for Isis Cubes.
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
Distance measurement, usually in meters.
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
@ Programmer
This error is for when a programmer made an API call that was illegal.
LRO Mini-RF SAR and Chandrayaan 1 Mini-RF SAR.
virtual int CkReferenceId() const
CK Reference ID.
virtual int CkFrameId() const
CK frame ID.
MiniRF(Cube &cube)
Initialize the Mini-RF SAR radar model for LRO and Chandrayaan 1.
Contains multiple PvlContainers.
Container for cube-like labels.
@ Traverse
Search child objects.
Generic class for Radar Cameras.
Convert between undistorted focal plane coordinate (slant range) and ground coordinates.
void SetDopplerSigma(double dopplerSigma)
Set the doppler sigma.
void SetRangeSigma(double rangeSigma)
Set the range sigma.
Construct a mapping between image sample and Radar ground range.
Convert between alpha image coordinates and radar sample, time coordinates.
Convert between slantrange/groundrange and ra/dec coordinates.
Convert between radar ground range and slant range.
void setTime(const iTime &time)
By setting the time you essential set the position of the spacecraft and body as indicated in the cla...
double SpacecraftAltitude()
Returns the distance from the spacecraft to the subspacecraft point in km.
virtual SpiceRotation * bodyRotation() const
Accessor method for the body rotation.
virtual void createCache(iTime startTime, iTime endTime, const int size, double tol)
This method creates an internal cache of spacecraft and sun positions over a specified time range.
void radii(Distance r[3]) const
Returns the radii of the body in km.
virtual SpicePosition * instrumentPosition() const
Accessor method for the instrument position.
SpiceInt naifIkCode() const
This returns the NAIF IK code to use when reading from instrument kernels.
Obtain SPICE position information for a body.
Obtain SPICE rotation information for a body.
Parse and return pieces of a time string.
double Et() const
Returns the ephemeris time (TDB) representation of the time as a double.
This is free and unencumbered software released into the public domain.
const double PI
The mathematical constant PI.
Namespace for the standard library.