infotechggs
New member
- Joined
- May 29, 2014
- Messages
- 10
- Reaction score
- 0
- Points
- 1
Dear friend,following this post and the Martins suggestion
http://www.orbiter-forum.com/showthread.php?p=224490&highlight=f107#post224490
with this code i'm able to get the atmosferics data (T,rho,p) just passing the altitude
At this point i would like to modify the solax flux value to a number different from the default (should be 140) and use the respective atmo data that should be changed (T,rho,p).
Using the value "inparam.flag = atm2->PRM_ALT;"i've flagged the altitude but i would like to flag also the PRM_FBR and PRM_F, so how can i add the others flags?
Do you have any suggestions to change the solar flux from the default value?
Thanks in advance
Ok problem solved
The good Cristiapi, give me the right suggestion and now the i'm able to get the Athmosphere data corrected for any solar flux or geomagnetic activity.
just add
inparam.flag = atm2->PRM_ALT | atm2->PRM_FBR | atm2->PRM_F;
and set
inparam.ap = 13.0;
inparam.f107bar = 300;///(Default 140)
inparam.f107 = inparam.f107bar;
Make a function to change the solar flux and geomagnet and evaluate the results.
Thanks
Enrico
http://www.orbiter-forum.com/showthread.php?p=224490&highlight=f107#post224490
with this code i'm able to get the atmosferics data (T,rho,p) just passing the altitude
Code:
////////////Function 1
double GetAtmospheredata(CELBODY* planet, double Altitude)// alt in meters
{
if (planet==NULL)
{
return 0.0;
};
ATMPARAM atm;
ATMOSPHERE* atm2;
ATMOSPHERE::PRM_IN inparam ;
ATMOSPHERE::PRM_OUT outparam;
//ATMOSPHERE::PRM_IN_FLAG paramflag;
CELBODY2 * pl2;
pl2 = (CELBODY2 *) planet;
//double solar_flux = pl2->GetAtmosphere()->PRM_F;
atm2 = pl2->GetAtmosphere();
//paramflag = atm2->PRM_ALT;
[COLOR="Red"] inparam.flag = atm2->PRM_ALT; ///without the flag the data is no updated [/COLOR]
//inparam.flag = atm2->PRM_F;
//inparam.flag = atm2->PRM_FBR;
//inparam.flag = atm2->PRM_F;
inparam.alt = Altitude;
inparam.lat = 0.0;
inparam.lng = 0.0;
inparam.ap = 3.0;
//inparam.f107bar = 300;
//inparam.f107 = 300;
//inparam.f107 = inparam.f107bar;
if (atm2->clbkParams(&inparam, &outparam)==true)
{
return outparam.rho;
//return outparam.T;
//return outparam.p;
}
else
{
return 10.0;
};
}
//////////Function 2
double GetAtmospheredata2(CELBODY* planet, double Altitude)// alt in meters
{
if (planet==NULL)
{
return 0.0;
};
ATMPARAM atm;
if (planet->clbkAtmParam(Altitude, &atm)==true)
{
return atm.rho;
}
else
{
return 0.0;
};
}
////////////////////////////////////////////////
Using the value "inparam.flag = atm2->PRM_ALT;"i've flagged the altitude but i would like to flag also the PRM_FBR and PRM_F, so how can i add the others flags?
Do you have any suggestions to change the solar flux from the default value?
Thanks in advance
Ok problem solved
The good Cristiapi, give me the right suggestion and now the i'm able to get the Athmosphere data corrected for any solar flux or geomagnetic activity.
just add
inparam.flag = atm2->PRM_ALT | atm2->PRM_FBR | atm2->PRM_F;
and set
inparam.ap = 13.0;
inparam.f107bar = 300;///(Default 140)
inparam.f107 = inparam.f107bar;
Make a function to change the solar flux and geomagnet and evaluate the results.
Thanks
Enrico
Last edited: