Skip to content
Snippets Groups Projects
Commit 4408f639 authored by Gaëlle USSEGLIO's avatar Gaëlle USSEGLIO
Browse files

ENH : Return velocity vector in WorldToSatPositionAndVelocity of ossimSensorAdapter and add test

parent 7da52347
No related branches found
No related tags found
1 merge request!5Enhance otb sar sensor model adapter
......@@ -95,8 +95,9 @@ public:
/** Transform world point (lat,lon,hgt) to cartesian point (x,y,z) */
bool WorldToCartesian(const Point3DType & inGeoPoint, Point3DType & outCartesianPoint) const;
/** Transform world point (lat,lon,hgt) to satellite position (x,y,z)*/
bool WorldToSatPosition(const Point3DType & inGeoPoint, Point3DType & satelitePosition) const;
/** Transform world point (lat,lon,hgt) to satellite position (x,y,z) and satellite velocity */
bool WorldToSatPositionAndVelocity(const Point3DType & inGeoPoint, Point3DType & satelitePosition,
Point3DType & sateliteVelocity) const;
static bool ImageLineToDeburstLine(const std::vector<std::pair<unsigned long,unsigned long> >& lines, unsigned long imageLine, unsigned long & deburstLine);
......
......@@ -189,7 +189,9 @@ bool SarSensorModelAdapter::WorldToCartesian(const Point3DType & inGeoPoint, Poi
}
bool SarSensorModelAdapter::WorldToSatPosition(const Point3DType & inGeoPoint, Point3DType & satelitePosition) const
bool SarSensorModelAdapter::WorldToSatPositionAndVelocity(const Point3DType & inGeoPoint,
Point3DType & satelitePosition,
Point3DType & sateliteVelocity) const
{
if(m_SensorModel.get() == ITK_NULLPTR)
{
......@@ -216,6 +218,10 @@ bool SarSensorModelAdapter::WorldToSatPosition(const Point3DType & inGeoPoint, P
satelitePosition[1] = sensorPos.y();
satelitePosition[2] = sensorPos.z();
sateliteVelocity[0] = sensorVel.x();
sateliteVelocity[1] = sensorVel.y();
sateliteVelocity[2] = sensorVel.z();
return true;
}
......
......@@ -62,7 +62,7 @@ int otbSarSensorModelAdapterTest(int itkNotUsed(argc), char* argv[])
otb::SarSensorModelAdapter::Point2DType out1,out2;
otb::SarSensorModelAdapter::Point3DType in;
otb::SarSensorModelAdapter::Point3DType in, out3, out4, out5;
// GCP 99 from input geom file
//support_data.geom.gcp[99].world_pt.hgt: 2.238244926818182e+02
......@@ -75,6 +75,10 @@ int otbSarSensorModelAdapterTest(int itkNotUsed(argc), char* argv[])
sensorModel->WorldToLineSample(in,out1);
sensorModel->WorldToLineSampleYZ(in,out1,out2);
sensorModel->WorldToCartesian(in, out5);
sensorModel->WorldToSatPositionAndVelocity(in,out3, out4);
return EXIT_SUCCESS;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment