Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional Dependent Variable Outputs #89

Closed
agonzalezpuerta opened this issue Nov 16, 2016 · 11 comments
Closed

Additional Dependent Variable Outputs #89

agonzalezpuerta opened this issue Nov 16, 2016 · 11 comments

Comments

@agonzalezpuerta
Copy link
Member

As promised, here is a list of dependent variables that would be nice to output. Cheers.

Alejandro


aerodynamic_load
heat_flux
heat_load

angle_of_attack
angle_of_sideslip
bank_angle

flight_path_angle
heading_angle

total_specific_energy

longitude;
geometric_latitude
geodetic_latitude

windspeed_velocity_coefficients_lvlh_frame

@DominicDirkx
Copy link
Member

Thanks for the list! A number of these are actually already available. You can save any of the angles in the AerodynamicsReferenceFrameAngles enum:

latitude (geometric)
longitude
heading angle
flight path angle
angle of attack
angle of side slip
bank angle

Through the BodyAerodynamicAngleVariableSaveSettings class (which is derived from SingleDependentVariableSaveSettings).

This leaves:

aerodynamic load
heat flux
heat load
total_specific_energy

If you have function to compute these three implemented/tested, you could make a pull request for them, and I'll see if I can link them to the dependent variable output/

geodetic_latitude

This is indeed a useful one, I'll think about how best to incorporate it.

windspeed_velocity_coefficients_lvlh_frame

I assume depends on your wind implementation/flight conditions modifications. Will definitely be useful to incorporate after those modifications have been made

@DominicDirkx
Copy link
Member

I've added the

aerodynamic load (norm of aerodynamic acceleration divided by g0).
stagnation point heat flux
geodetic latitude

To dependent variable output. I've added the code to the developments for #91

@agonzalezpuerta
Copy link
Member Author

agonzalezpuerta commented Nov 24, 2016

Thanks for the reply. This seems to solve the run-time errors. One additional issue though:

  1. The computed value for the geodetic latitude differs significantly from geocentric latitude throughout the entire descent.

One way to test this is to output both the geocentric and the geodetic latitudes with the Apollo Entry application. You will see that the geocentric latitude remains constant at 0.0 rad and the geodetic latitude increases from 0.0 rad (initial value) to 0.5071 rad. I can see that you have non-zero heading angle as part of the initial conditions, so you should expect the vehicle to deviate from the Equatorial plane. Thus, I suspect there could be an issue on how the geocentric latitude is retrieved.

@DominicDirkx
Copy link
Member

DominicDirkx commented Nov 24, 2016

Hi Alejandro,

Sorry, this is a bug. The quick fix for now: change flighConditions.cpp, line 48:

updateLatitudeAndLongitude_ = 0;

to:

updateLatitudeAndLongitude_ = 1;

I'll write a better fix for this later this week.

@mvandenbroeck
Copy link
Member

Hi all,

I just jump in here because I've a related question:

I would like to add the thrust_force_vector_dependent_variable as a dependent variable output.
I already got some help from Alejandro yesterday and made changes in the following files:

propagationOutputSettings.h
propagationOutputSettings.cpp
propagationOutput.cpp
propagationOutput.h

However, I'm not sure where to add the getCurrentThrustForce and setCurrentThrustForce functions.
Do I have to add them in flightConditions.h? Or is that file reserved for aerodynamic variables only? Do I have to make a new class in order to add those two functions?

Thanks,

Michael

@DominicDirkx
Copy link
Member

Hi Michael,

The thrust force (or actually the acceleration) can already be ouput as follows:

dependentVariables.push_back(
            boost::make_shared< SingleAccelerationDependentVariableSaveSettings >(
                thrust_acceleration, "Apollo", "Apollo", 1 ) );

For the thrust acceleration of the Apollo vehicle (note the double "Apollo" input argument, which is due to the fact that it is an acceleration acting on, and exerted by, the "Apollo" body. if you propagate the state of the vehicle, this will be in your equations of motion numerical solution. If you don't propagate the mass, you can just get the mass from the Body object directly, since F=m*a, you'll get the force.

@mvandenbroeck
Copy link
Member

Thanks for your quick reply!

Nice to hear that it is actually already implemented. I will undo my changes in those four files I mentioned and use the thrust_acceleration instead.

@mvandenbroeck
Copy link
Member

I've one more quick question though:

The thrust_accelerations will probably be output in the inertial frame, while I need them in the velocity-based LVLH frame. I could of course use the state history to transform the thrust acceleration from the inertial frame to the velocity-based LVLH frame after the propagation is finished, but is there some easy way to output them directly in the correct frame?

@DominicDirkx
Copy link
Member

No, I'm afraid that these rotation matrices are not saved (and doing so would not be trivial). However, you can save the position and velocity vector of any body you want w.r.t. to some other body (relative_position_dependent_variable and relative_velocity_dependent_variable). Using these as input to the function you wrote for the rotation matrix will allow you to transform the force between the frames

@mvandenbroeck
Copy link
Member

Ok thanks I will do the transformation after the propagation then.

@DominicDirkx
Copy link
Member

The pull request (#113) containing this code has now been opened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants