double halfAperture = GaiaParam.Satellite.FOV_AC*GaiaParam.Nature.DEGREE_RADIAN/2;
// Create and initialize a Gaia instance with default values
Gaia gaia = new Gaia();
// This method returns the list of all the transits
ArrayList<Transit> fov1Transits = gaia.attitude.inverseScan(vICRS, halfAperture, gaia.getTelescope(FoV.FOV1));
ArrayList<Transit> fov2Transits = gaia.attitude.inverseScan(vICRS, halfAperture, gaia.getTelescope(FoV.FOV2));
System.out.println("GJ 876 will transit "+fov1Transits.size()+" times in FOV1 during the mission.");
System.out.println("GJ 876 will transit "+fov2Transits.size()+" times in FOV2 during the mission.");
// Merge arrays
ArrayList<Transit> allTransits = new ArrayList<Transit>();
allTransits.addAll(fov1Transits);
allTransits.addAll(fov2Transits);
// Print astrometry information
System.out.println("\n-- astrometric data -- ");
for ( Transit tr : allTransits ) {
final boolean relativity = false; // whether to include relativity
final double lambda = 600.0; // wavelength in nm
GaiaSimuTime time = tr.getGSTime();
Astrometry ast = star.getAstrometry();
double trAlpha = ast.getCoMRSAstrometricParam(time, relativity).getAlpha();
double trDelta = ast.getCoMRSAstrometricParam(time, relativity).getDelta();
GVector3d comrs = ast.getCoMRSPosition(time, relativity);
System.out.println(comrs);
System.out.println(time);
System.out.println(tr.getFov());
GVector3d fprs = gaia.fromCoMRStoFPRS(comrs, time, tr.getFov(), GaiaSimuEnums.FpField.AF, lambda);
GVector3d fieldAngles = gaia.fromFPRStoFieldAngles(fprs, tr.getFov());
System.out.printf("%.15e,\t%.15e,\t%.15e,\t%.15e,\t%.15e\n", time.getJD(),
fieldAngles.getX(), fieldAngles.getY(), trAlpha, trDelta);
}