示例#1
0
文件: phocube.cpp 项目: jlaura/isis3
// Computes the special MORPHOLOGY and ALBEDO planes
MosData *getMosaicIndicies(Camera &camera, MosData &md) {
  const double Epsilon(1.0E-8);
  Angle myphase;
  Angle myincidence;
  Angle myemission;
  bool mysuccess;
  camera.LocalPhotometricAngles(myphase, myincidence, myemission, mysuccess);
  if (!mysuccess) {
    myemission.setDegrees(camera.EmissionAngle());
    myincidence.setDegrees(camera.IncidenceAngle());
  }
  double res = camera.PixelResolution();
  if (fabs(res) < Epsilon) res = Epsilon;

  md = MosData();  // Nullifies the data
  if (myemission.isValid()) {
    // Compute MORPHOLOGY
    double cose = cos(myemission.radians());
    if (fabs(cose) < Epsilon) cose = Epsilon;
    // Convert resolution to units of KM
    md.m_morph = (res / 1000.0) / cose;

    if (myincidence.isValid()) {
      // Compute ALBEDO
      double cosi = cos(myincidence.radians());
      if (fabs(cosi) < Epsilon) cosi = Epsilon;
      //  Convert resolution to KM
      md.m_albedo = (res / 1000.0 ) * ( (1.0 / cose) + (1.0 / cosi) );
    }
  }

  return (&md);
}
示例#2
0
int main() {

	Vector2<int> vec;
	vec.setX(2);
	vec.setY(3);

	Vector2<double> p1(-3, -2);
	Vector2<double> p2(0, 0);
	Angle angle3 = Angle::getAngleBetween(p2, p1);
	std::cout << angle3.getDegrees() << std::endl;

	std::cout << "Vector " << vec.toString() << std::endl;

	Angle angle;
	angle.setDegrees(90);
	std::cout << "first angle " << angle.getDegrees() << std::endl;
	
	Angle angle2;
	angle2.setDegrees(20);
	std::cout << "second angle " << angle2.getDegrees() << std::endl;

	angle += angle2;
	std::cout << "first angle is now " << angle.getDegrees() << std::endl;

	system("pause");
	
	
	return 0;
}
void Pulsar::TimerIntegration::unpack_Pointing ()
{
  Angle angle;

  Reference::To<Pointing> pointing = new Pointing;

  pointing->set_local_sidereal_time (mini.lst_start);

  angle.setDegrees (mini.feed_ang);
  pointing->set_feed_angle (angle);

  angle.setDegrees (mini.para_angle);
  pointing->set_parallactic_angle (angle);

  angle.setDegrees (mini.tel_az);
  pointing->set_telescope_azimuth (angle);

  angle.setDegrees (mini.tel_zen);
  pointing->set_telescope_zenith (angle);

  add_extension (pointing);
}
示例#4
0
/**
* Static member function for creating angle object from degrees.
* Returns new angle instance and sets it's angle to given degree value.
*/
Angle Angle::fromDegrees(double degrees) {
	Angle angle;
	angle.setDegrees(degrees);
	return angle;
}