[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orekit Users] Technical problem to use the class CircularFieldOfView
Le 03/08/2011 16:52, cedric.goulard@cassidian.com a écrit :
> Dear Orekit team,
Hello Cédric,
>
> I’m trying to use your framework for some applications. And, I encounter some
> technical problems about the class “CircularFieldOfViewDetector” to obtain
> a prediction above a ground station.
>
> In fact, I can’t to define the direction of the “fov” centre to have the
> same prediction provided by an elevation event. The elevation angle is 5
> degree. I don’t understand why the results are so different. I just want to
> define a “fov” centre that points to the earth by using the satellite as
> the origin.
>
> In order to detect if a ground station is in the field of view, I follow this
> process:
> - First, I define a propagator by use TLE data with an initial date
> definition:
> String line1 = "1 25977U 99064A 09191.04881908
> -.00000525 00000-0 -65532-4 0 4293";
> String line2 = "2 25977 98.3412 192.6075 0000606
> 205.7418 154.3625 14.77702155515307";
> TLE tle = new TLE(line1, line2);
> propagator = TLEPropagator.selectExtrapolator(tle);
>
> - In a second time, I define an initial orbit with an inertial frame:
> inertialFrame = FramesFactory.getTEME(false);
> PVCoordinates pvCoordinates =
> propagator.getPVCoordinates(initialDate);
> Orbit initialOrbit = new KeplerianOrbit(pvCoordinates,
> inertialFrame, initialDate, MU);
>
> - Then, I define the earth ellipsoid earth:
> // earth and frame
> Frame ITRF2005 = FramesFactory.getITRF2005(); //
> terrestrial frame at an arbitrary date
> OneAxisEllipsoid earth = new OneAxisEllipsoid(AE, 0,
> ITRF2005);
Here, the Earth you defined is not elliptical, but spherical. I guees
you did that to compare the two events types based on simpler geometry.
>
> - I define the position of the ground station to detect with a
> topocentric frame (“lat” in radian, “lon” in radian, altitude = 0)
> final GeodeticPoint geodeticPoint = new
> GeodeticPoint(lat, lon, altitude);
> final TopocentricFrame naiFrame = new
> TopocentricFrame(earth, geodeticPoint, "Station");
>
> - Next, I use a kleperian propagator with the initial orbit and a
> nadir attitude (in order to have the z axis oriented to the earth)
> // propagator : consider a simple keplerian motion
> (could be more elaborate)
> NadirPointing nardirAttitude = new
> NadirPointing(earth);
> Propagator kepler = new
> KeplerianPropagator(initialOrbit, nardirAttitude);
> kepler.setEphemerisMode();
This propagation will be very far from reality (even farther than
traditional Kepler). You retrieve your initial orbit from a TLE. TLE is
something special, they are not simple orbits elements, but rather a
combination of orbital elements *and* a propagation model. They can only
be propagated using SGP4/SDP4 as they are in some sense mean elements
dedicated to their model. Extracting the sate at one time only like you
did and then providing this to another model (be it Kepler,
Eckstein-Heschler, numeric or anything else) is doomed.
Using both TLE and event detection is tricky in the released versions
(up to 5.x). It has been vastly improved in the current development
version (which will become 6.0 upon release): TLE propagation now
implements all required interfaces to handle events, modes, step
handlers ... I would suggest you to switch to this version (you can
retrieve it from the Git repository in the Orekit forge) and to use
directly the TLE propagator.
>
> - I define finally the event before adding it into the kleperian
> propagator
> // define the field of view of the satellite
> double halfAperture = Math.toRadians(40);
The 40 degrees aperture is inconsistent with the elevation below.
> double maxCheck = 60;
> Vector3D center = Vector3D.PLUS_K;
> EventDetector event = new
> CircularFieldOfViewDetector(maxCheck, naiFrame, center, halfAperture);
> // add event to be detected
> kepler.addEventDetector(event);
> // propagate from the initial date to the first raising
> or for the fixed duration
> kepler.propagate(initialDate.shiftedBy(duration));
>
> Remark: to define the elevation event with which I compare the results, I
> create an instance of the ElevationDetector as following:
> EventDetector event = new ElevationDetector(60,
> Math.toRadians(5), naiFrame);
The 5 degrees elevation is inconsisten with the aperture above.
Lets consider a simplified case, with a spherical Earth and a circular
orbit (your orbit has a 0.0011 eccentricity so the hypothesis is not
perfect). I'll use TeX notation for equations below.
Let R be Earth radius (6378.136 km for example)
Let r be the satellite distance to Earth center (about 7016.148 km on
2009-07-10T04:57:47.739 using Kepler only propagation in your case)
Let \eta be the threshold elevation (5 degrees in your case)
Let \gamma be the station/Earth/spacecraft angle measured from Earth center
Let \phi be the Earth/spacecraft/station angle measured from spacecraft.
We want to compute \phi corresponding to the half aperture in the
circular field of view detector.
We have the following relations, which allow to compute all angles in
all cases (note that \eta may be negative, the following expression do
support it correctly).
\tan\eta =
\frac{r \cos\gamma - R}{r \sin\gamma}
\tan\frac{\gamma}{2} =
\frac{\sqrt{r^2-R^2\cos^2\eta}-r\sin\eta}{(r+R)\cos\eta}
\tan\phi =
\frac{R \sin\gamma}{r - R \cos\gamma}
\tan\frac{\gamma}{2} =
\frac{R \cos\phi - \sqrt{R^2-r^2\sin^2\phi}}{(r+R)\sin\phi}
So with your data, you get \phi = 64.905 degrees, not 40 degrees.
Note that this value changes with spacecraft altitude.
Using this value for \phi and using an initial date at TLE date, a
propagation period of 86400 second (making sure propagation does not
stop at events), setting both events detectors in the propagator and
using a station at lat = 45 degrees, lon = 1 degree, alt = 100m I get a
few FOV events alone (the circular field of view detector does not
consider Earth masking, so it detects the station when the satellite is
on the other side of the Earth and I also get coupled FOV/elevation
events. These events are:
first set :
elevation : 2009-07-10T04:57:47.739
FOV : 2009-07-10T04:57:47.905
elevation : 2009-07-10T05:06:50.027
FOV : 2009-07-10T05:06:56.461
second set :
elevation : 2009-07-10T06:33:47.428
FOV : 2009-07-10T06:33:48.303
elevation : 2009-07-10T06:44:07.826
FOV : 2009-07-10T06:44:13.059
third set :
elevation : 2009-07-10T15:57:02.659
FOV : 2009-07-10T15:57:04.701
FOV : 2009-07-10T16:06:23.933
elevation : 2009-07-10T16:06:27.967
fourth set:
elevation : 2009-07-10T17:33:00.639
FOV : 2009-07-10T17:33:01.916
FOV : 2009-07-10T17:43:04.577
elevation : 2009-07-10T17:43:08.390
So with the fixed value for FOV aperture, the results are consistent.
If you want, I can provide a demonstration for the expression above.
Hope this helps,
Luc
>
> Can you help me to define a correct “fov” centre, and so, to explain my
> errors?
> Best regards,