# Wrong footprint

Hi all! I am using Orekit to obtain a satellite footprint. I don’t get the result I expected (point of view oriented from satellite to Earth cemter). I share current code (unfinished) and obtained results. I don’t know how to resume to solve the problem. Could someone help me please? Thanks. Regards.

``````
AbsoluteDate target = UtilesTiempo.zonedDateTimeToAbsoluteDate(zonedDateTime);

SpacecraftState state = satelite.getTlePropagator().propagate(target);

//////////////
// Get the reference frame of the SpacecraftState (the inertial frame where the orbit is computed)
Frame refFrame = state.getFrame();

// Get the position of the SpacecraftState in ref frame
Vector3D satPosInRefFrame = state.getPVCoordinates().getPosition();

// Get the attitude of the spacecraft (a rotation from reference frame to "satellite" frame)
Attitude attitude = state.getAttitude();

Frame earthFrame = FramesFactory.getITRF(IERSConventions.IERS_2010, true);
Constants.WGS84_EARTH_FLATTENING, earthFrame);

Vector3D satPoint = state.getPVCoordinates().getPosition();
GeodeticPoint geoPoint = earth.transform(satPoint, state.getFrame(), state.getDate());

// Get the underlying topocentric frame of the geodetic point
TopocentricFrame topoFrame = new TopocentricFrame(earth, geoPoint, "topoFrame");

// Get the geodetic point position in reference frame
Vector3D geoPointInRefFrame = topoFrame.getPVCoordinates(target, refFrame).getPosition();

// Let O be the center of frame, S the satellite and P the geodetic point
// Compute satellite to geodetic point vector: SP = - OS + OP
Vector3D sat2GeoPoint = geoPointInRefFrame.subtract(satPosInRefFrame);

// Normalize the vector and rotate it using the attitude
Vector3D geoPointDirectionInSatFrame = attitude.getRotation().applyTo(sat2GeoPoint.normalize());
GeodeticPoint geoPoint2 = earth.transform(geoPointDirectionInSatFrame, state.getFrame(), state.getDate());

///////////////////////////
Transform inertToBody = state.getFrame().getTransformTo(earthFrame, state.getDate());

Transform fovToBody = new Transform(state.getDate(),
state.toTransform().getInverse(),
inertToBody);

CircularFieldOfView cfov =
////////////////////////////

List<List<GeodeticPoint>> footprint =
cfov.getFootprint(fovToBody, (OneAxisEllipsoid) earth, 0.1);

List<GeodeticPoint> list = footprint.get(0);

for (GeodeticPoint point : list) {
System.out.println("[" + FastMath.toDegrees(point.getLongitude()) + "," +
FastMath.toDegrees(point.getLatitude()) + "],");
}

}
``````

Result:

``````{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [-141.5172411592235,-57.91836266046175]
},
"properties": {
"name": "satellite"
}
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[-132.41358244563696,-55.906567564033715],
[-131.65484313535885,-55.22380029464376],
[-130.8549061727942,-54.3956117347211],
[-129.9915823584691,-53.3691807010093],
[-129.01842735610143,-52.05111697237609],
[-127.81927852526634,-50.242087364261636],
[-125.96181400270878,-47.30007203608624],
[-122.55694955723501,-41.28262367418792],
[-124.21970424711513,-40.6050599765803],
[-125.92477249412549,-39.98191919030188],
[-127.67172402724017,-39.416157301912165],
[-129.45909844500798,-38.911179495135926],
[-131.28435547042312,-38.47063897949086],
[-133.1438627473417,-38.09822260355926],
[-135.03293113869896,-37.797429454990194],
[-136.9459046118438,-37.571353218292224],
[-138.87630710236186,-37.42248249228903],
[-140.81704272761326,-37.352534804664124],
[-142.76063927275874,-37.36233915376196],
[-144.699519155996,-37.451778450069995],
[-146.6262782482441,-37.61979768118711],
[-148.53395180033442,-37.86447696433772],
[-150.41624856654187,-38.183162151833024],
[-152.2677386018745,-38.57264054649864],
[-154.08398621899042,-39.029346432772726],
[-155.86162603507546,-39.54958085212053],
[-157.59838580223067,-40.12973211559114],
[-159.29306399120077,-40.76648732945837],
[-160.945472498609,-41.457029941638424],
[-156.5562485101539,-48.21888557988871],
[-154.95331450274594,-50.75152331715437],
[-153.8285558828559,-52.40970391103288],
[-152.88909904121124,-53.643688401920954],
[-152.04435051587444,-54.61489576537794],
[-151.25606601733932,-55.403434736924616],
[-150.50539582182412,-56.05609979639917],
[-149.78204796894502,-56.60307822759021],
[-149.07991369014408,-57.06517387856565],
[-148.39506696237268,-57.457400312088616],
[-147.72477162185922,-57.79095528379086],
[-147.06696016843975,-58.074390017827334],
[-146.41994925771522,-58.31434292976934],
[-145.78228003803088,-58.51602141384927],
[-145.1526267480152,-58.683529569754434],
[-144.52974359626904,-58.82009711202853],
[-143.9124334794133,-58.92824213389291],
[-143.29952928249318,-59.0098877851892],
[-142.68988245160725,-59.066445527023355],
[-142.0823557472984,-59.09887308011614],
[-141.47581835076352,-59.10771224836719],
[-140.86914220930478,-59.093109786558365],
[-140.26119888840623,-59.05482298708047],
[-139.65085635544497,-58.99221042512437],
[-139.03697509870827,-58.904207132309054],
[-138.41840277912095,-58.789282189215804],
[-137.79396616256017,-58.64537513390759],
[-137.16245825676393,-58.469805389557216],
[-136.52261712639773,-58.25914566224108],
[-135.8730903083501,-58.00904515921027],
[-135.21237418883953,-57.71398008122568],
[-134.53870933569982,-57.36689435933945],
[-133.8498968699856,-56.958667357747984],
[-133.14296930046936,-56.47729496390105]
]
},
"properties": {
"prop0": "value0",
"prop1": 0.0
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[100.0, 0.0],
[101.0, 0.0],
[101.0, 1.0],
[100.0, 1.0],
[100.0, 0.0]
]
]
},
"properties": {
"prop0": "value0",
"prop1": {
"this": "that"
}
}
}
]
}
``````

Hello,

It seems that you have wrapped the `selectExtrapolator` in `TLEPropagator`. Did you pass a specific `AttitudeProvider` then? Otherwise the default will be aligned with the TEME frame, which may explain your result.

Best,
Romain.