orbitersim / orbiter

Open-source repository of Orbiter Space Flight Simulator
MIT License
1.61k stars 220 forks source link

[Lua]Add some oapiGetPlanetxxx functions #494

Closed TheGondos closed 1 month ago

TheGondos commented 2 months ago

This PR add some planet related oapi functions: -get_planetobliquity -get_planettheta -get_planetobliquitymatrix -get_planetcurrentrotation -planet_hasatmosphere -get_planetatmparams -get_groundvector -get_windvector -get_planetjcoeffcount -get_planetjcoeff,

DarkWanderer commented 2 months ago

Any chance some tests could be added for these?

TheGondos commented 2 months ago

I should be able to add some unit tests, except maybe for get_windvector as it probably depends on how the physics is configured

TheGondos commented 1 month ago

I added some unit tests but I could not cover everything : -get_planettheta, get_planetobliquitymatrix and get_planetcurrentrotation change over time, I have no clue how to validate this -get_windvector requires activating the wind option, it's not something we can do from CTests -get_planetjcoeffcount returns 0, even after activating non spherical gravity sources, I must be missing something...