39 const double TWOPI = 6.28318530717958647693 ;
57 if (dopcenLinear != 0.0)
59 dopplerCentroid += dopcenLinear *
distance/1000;
63 int etatLoc =
localisationSAR(*geoEph, lambda,
distance, dopplerCentroid, sensVisee, semiMajorAxis , semiMinorAxis , height, &cart);
76 double dist ,
double fDop ,
int sensVisee ,
77 double equRadius ,
double polRadius ,
86 double rho2 , k , a , b , c , d , u , v , w ;
87 double x[4] ,
y[4] , z[4] , r[4] ;
96 const double KILO = 1.0e-3 ;
97 const double MEGA = 1.0e-6 ;
98 const double EPSILON = 1.0e-12 ;
101 double dist1 = dist * MEGA ;
102 double fDop1 = fDop * KILO ;
104 double he = (equRadius + h) * MEGA ;
105 double hp = (polRadius + h) * MEGA ;
110 double speedX = - posSpeed.
get_speed()[0] * KILO ;
111 double speedY = - posSpeed.
get_speed()[1] * KILO ;
112 double speedZ = - posSpeed.
get_speed()[2] * KILO ;
117 u = speedX * posY - speedY * posX ;
118 a = (speedX / u) * (1.0 - (he / hp) * (he / hp)) / 2.0 ;
119 b = (speedX * posZ - speedZ * posX) / u ;
120 rho2 = posX * posX + posY * posY + posZ * posZ ;
121 k = posX * speedX + posY * speedY + posZ * speedZ -
122 lambda * dist1 * fDop1 / 2.0 ;
123 c = (speedX * (he * he + rho2 - dist1 * dist1) - 2.0 * k * posX) / (2.0 * u);
125 u = speedZ - b * speedY ;
127 w = v * v - (speedX * speedX) * (he * he - c * c) ;
129 std::complex<double> aa[5];
130 aa[0] = std::complex<double>(w,0.0);
131 w = 2.0 * (u * v - (b * c) * (speedX * speedX)) ;
132 aa[1] = std::complex<double>(w,0.0) ;
133 w = u * u + 2.0 * a * v * speedY +
134 (speedX * speedX) * ((he / hp) * (he / hp) + b * b + 2.0 * a * c) ;
135 aa[2] = std::complex<double>(w,0.0) ;
136 w = 2.0 * a * (u * speedY - b * speedX * speedX) ;
137 aa[3] = std::complex<double>(w,0.0) ;
138 w = (speedX * speedX + speedY * speedY) * a * a ;
139 aa[4] = std::complex<double>(w,0.0) ;
148 for (
int i = 0 ; i <
n ; i++)
150 d = fabs(root[i].imag()) ;
153 z[nRoot] = root[i].real();
154 y[nRoot] = (a * z[nRoot] - b) * z[nRoot] + c ;
155 x[nRoot] = (k - (speedY *
y[nRoot] + speedZ * z[nRoot])) / speedX ;
168 for (
int i = 0 ; i < nRoot ; i++)
174 r[i] = fabs ((u * u + v * v + w * w) / (dist1 * dist1) - 1.0 ) ;
178 if (fabs (fDop) > EPSILON)
179 r[i] = r[i] + fabs (1.0 + 2.0 * (u + v + w) / (lambda * dist1 * fDop1));
181 r[i] = r[i] + fabs (2.0 * (u + v + w) / (lambda * dist1)) ;
185 r[i] = r[i] + fabs (u * u + v * v + w * w - 1.0) ;
194 for (
int i = 0 ; i < (nRoot - 1) ; i++)
197 int i2 = indice[i+1] ;
210 while (!isEnd && (i < nRoot))
213 u = posY * speedZ - posZ * speedY ;
214 v = posZ * speedX - posX * speedZ ;
215 w = posX * speedY - posY * speedX ;
219 d = (a * u + b * v + c * w) * sensVisee;
222 coordCart[0] =
x[i1] / MEGA ;
223 coordCart[1] =
y[i1] / MEGA ;
224 coordCart[2] = z[i1] / MEGA ;
This class represent an ephemeris in Geographic coordinates system.
void set_coordinates(double x, double y, double z)
virtual int ImageToWorld(double distance, JSDDateTime time, double height, double &lon, double &lat) const
This function is able to convert image coordinates into geodetic world coordinates using a geometric ...
SarSensor(SensorParams *params, PlatformPosition *position)
Constructor.
This class represents a coordinate in a geodesic reference.
This class handles the sensor parameters.
int localisationSAR(GeographicEphemeris posSpeed, double lambda, double dist, double fDop, int sensVisee, double equRadius, double polRadius, double h, RectangularCoordinate *cart) const
This function is able to convert image coordinates into rectangular world coordinates.
virtual ~SarSensor()
Destructor.
SightDirection get_sightDirection() const
This class represents an ephemeris.
double get_dopcen() const
os2<< "> n<< " > nendobj n
double get_semiMajorAxis() const
PlatformPosition * _position
This class provides basic location services.
double get_dopcenLinear() const
This class manages and solves an equation of the fourth degree.
double get_semiMinorAxis() const
This class represents a coordinate in a rectangular reference.
void AsGeodesicCoordinates(double demiGdAxe, double demiPtAxe, GeodesicCoordinate *geod)
This class represents a date.
float distance(double lat1, double lon1, double lat2, double lon2, int units)
const std::complex< double > * get_solutions() const