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

aero lua values not updated in StateWingPhysics and StateCar #502

Open
KiboOst opened this issue Nov 12, 2024 · 1 comment
Open

aero lua values not updated in StateWingPhysics and StateCar #502

KiboOst opened this issue Nov 12, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@KiboOst
Copy link

KiboOst commented Nov 12, 2024

Some aero values seems to not being updated in Lua

  • CAR.aeroLiftFront, aeroLiftRear, aeroDrag always return 0

  • ac.StateWingPhysics aoa is not updated with DRS activated
    If I get the DRS wing, in wings dev app its aoa is updated, not in lua StateWingPhysics

CPHYS = ac.getCarPhysics(0)
CAR = ac.getCar(0)

function script.update(dt)
	--ac.StateCar
	ac.debug('aeroLiftFront', CAR.aeroLiftFront)
	ac.debug('aeroLiftRear', CAR.aeroLiftRear)
	ac.debug('aeroDrag', CAR.aeroDrag)

	--ac.StateWingPhysics
	ac.debug('wings num', #CPHYS.wings)

	ref = 10
	ac.debug('_____wing Cl', CPHYS.wings[ref].cl)
	ac.debug('_____wing Cd', CPHYS.wings[ref].cl)
	ac.debug('_____wing h', CPHYS.wings[ref].groundHeight)
	ac.debug('_____wing aoa', CPHYS.wings[ref].aoa)
	ac.debug('_____wing angle', CPHYS.wings[ref].angle)
	ac.debug('_____wing yAngle', CPHYS.wings[ref].yawAngle)
end
@Marocco2 Marocco2 added the bug Something isn't working label Nov 12, 2024
@KiboOst
Copy link
Author

KiboOst commented Dec 31, 2024

Hi, just a follow up,
In python we can get:

ac.ext_getAeroSpeed()
ac.ext_getDrag()
ac.ext_getDownforce(0) #front
ac.ext_getDownforce(1) #rear
ac.ext_getDownforce(2) #total
ac.ext_getAngleSpeed()

But, these values load aeromap only when dev winds app is open!!
Once you close wings app, aeromap coefficients aren't applied anymore.
Could this be fixed ?

CAR.aeroLiftFront, CAR.aeroLiftRear and CAR.aeroDrag in lua should also work with car aeromap.

Let me know if you need some testing, check new fix, etc.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

2 participants