double semiMajorAxis = 0.2; // semi-maj. axis (A.U.) of the secondary (a2)
double timePeriastron = 1.0; // (days)
double massPlanet = 1.0; // (Jupiter masses)
// Generate orbital parameters
OrbitalParams orbitalParams = new OrbitalParams(
period,
timePeriastron,
semiMajorAxis,
eccentricity,
omega2,
inclination,
nodeAngle);
// Star data
long idRoot = 1223345453L;
double magMv = 8.0; // Absolute magnitude
double distance = 100; // (pc?)
double vMinusI = 2.0; // Intrinsec Mean (V-I) colour
double absV = 0.1; // Interstellar absortion in the V band
double x = 10; // Galactic coordinates and proper motions
double y = 9;
double z = 8;
double U = 0.1;
double V = 0.2;
double W = 0.3;
double teff = 5500; // (K?)
double feH = 0.1; // [Fe/H]
double logg = 4.4; // log g (cgs)
double mass = 1.2; // (Msun?)
double magBol = 4.3; // (Compute from bolometric corrections)
double radius = 2.0; // (Rsun?)
int pop = 6; // (Besancon model. 6: 5-7 Gyr)
// Generate spectral type
SpectralType spectralType = new SpectralType(teff, logg);
// Generate photometry
Photometry photometry = new Photometry(magMv, distance, vMinusI, absV);
// Generate astrometry
StellarAstrometry stellarAstrometry = new StellarAstrometry( x, y, z, U, V, W );
// Generate physics.
// Use of this constructur is discouraged, but it should be enough to generate photometry
StarPhysicalParameters starPhysicalParameters =
new StarPhysicalParameters( teff, feH, logg, mass, spectralType, magBol, radius, pop);
// Generate star
gaiasimu.universe.source.stellar.Star star =
new gaiasimu.universe.source.stellar.Star(
idRoot, photometry, stellarAstrometry, starPhysicalParameters);
// Exoplanet generator
ExoPlanetGenerator exoPlanetGenerator = new ExoPlanetGenerator();
// Generate exoplanet
// StellarSource exoplanet = exoPlanetGenerator.generateSystem( star, orbitalParams );
/* Exception in thread "main" gaiasimu.SimuException: Mass of component 1 not initialized
at gaiasimu.universe.source.stellar.StarSystem.computeMass(StarSystem.java:171)
at gaiasimu.universe.source.stellar.StarSystem.setPhysicalParameters(StarSystem.java:153)
at gaiasimu.universe.source.stellar.StarSystem.<init>(StarSystem.java:115)
at gaiasimu.universe.generator.ExoPlanetGenerator.generateSystem(ExoPlanetGenerator.java:174)
at newExamples.GogGbinTest.main(GogGbinTest.java:232)
*/
// DU437 simulator
DmsSimuDU437 dmsSimuDU437 = new DmsSimuDU437();
OrbitalParams orbitalParams2 = dmsSimuDU437.generateOrbitalParams(
star, massPlanet, period, timePeriastron, eccentricity, omega2, nodeAngle, inclination);
StellarSource systemRandom = dmsSimuDU437.generate(star, new Random());
StellarSource systemOnePlanet = dmsSimuDU437.generateSystem(star, orbitalParams2);