[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orekit Users] FieldOfView usage/help



Hi,

I'm new to using orekit and am hoping someone can help me understand how to
use/define field of views.

I'm trying to calculate when a satellite will be within a ground sites field
of view. The GroundFieldOfViewDetector seems to be perfect for this but I
can't figure out how to define the Field of View for the site. I tried looking
at the test case but wasn't able to fully understand it.

If the field of view is suppose to be centered at an azimuth 45 degrees (0 ==
East) with a horizontal half angle of 60 degrees (so total of 120) and a
elevation centered at 60 degrees above the horizon with a half angle of 30
degrees, how would I build that Field of View to use with the
GroundFieldOfViewDetector? How would I also put a min and max range limit on
the Field of View?

I previously had tried using a FixStepHandler before finding the
GroundFieldOfViewDetector. The handler code was this:

    public void handleStep(SpacecraftState spacecraftState, boolean b) throws
OrekitException {

        double elevation =
Math.toDegrees(frame.getElevation(spacecraftState.getPVCoordinates().getPosition(),

spacecraftState.getFrame(),

spacecraftState.getDate()));

        double azimuth =
Math.toDegrees(frame.getAzimuth(spacecraftState.getPVCoordinates().getPosition(),

spacecraftState.getFrame(),

spacecraftState.getDate())
                                        );

        double range =
frame.getRange(spacecraftState.getPVCoordinates().getPosition(),
                                      spacecraftState.getFrame(),
                                      spacecraftState.getDate());

        //if none of the checks are configured to happen, want to default to
save point.
        //else, check bounds for each parameter to determine if sat is within
limits.
        boolean save_state = true;
        if (check_azimuth && (azimuth < min_az || azimuth > max_az))
        {
            save_state = false;
        }
        if (check_elevation && (elevation < min_elevation || elevation >
max_elevation))
        {
            save_state = false;
        }
        if (check_range && (range < min_range || range > max_range))
        {
            save_state = false;
        }

        //if passed all checks, save
        if (save_state){
           ...

frame is a TopocentricFrame.


Thanks for any help or insight getting pointed in the right direction.