kedaman
Jul 28th, 2000, 10:57 PM
I don't know if there are any real good mathematicians here, but if there are any, i have a qwestion for you.
I wan't to have a calculation algoritm for a ballistics tracks, in other words projectiles that react to friction, friction that is calculated by Wind, the weight of the projectile and the velocity of the projectile. Also i need to attend the target's velocity (to predict where the target will be).
Therefore i have to provide the types i'm using for this case:
'For orientation: Coordinates and vectors
Type Iso2d
x As Single
y As Single
End Type
Type Iso3d
x As Single
y As Single
z As Single
End Type
'The target orientation
Type target
Position As Iso3d
Vector As Iso3d
End Type
'The projectile orientation
Type Projectile
Position As Iso3d
Vector As Iso3d
'Design As Byte 'hAmmoDesign
End Type
'The Weapon orientation
Type Weapon
'Design As Byte 'hWeaponDesign
'Direction As Byte
'target As integer 'htarget
Position as Iso3d
End Type
Type WeaponDesign
'TurretOffset() As PixelCOffset
'Turret() As DirectDrawSurface7
'range As Byte '(the length to which the weapon can reach)
MaxSpeed As Byte
MaxBias As Byte ' (The accurancy of the weapon, the smaller value, the more accurant)
'PrimaryDealy As Byte '(between shots)
'SecondaryDealy As Byte '(between reloadings)
'rounds As Byte '(amount of ammunition before reloading)
'ammunition As Byte 'hAmmoDesign (what type of ammunition is required)
'Weight As Byte ' In kg tblMacrovalue()
Weight As Single
MaxVerticalAngle As Single
'Info As DesignInfo
End Type
'Function InitiateProjectile(hWeapon As Integer) As Integer 'Returns the handle
Function InitiateProjectile(Weapon as Weapon, Target as Target, WeaponDesign as WeaponDesign, Wind as Iso2d) as Projectile
'ReDim Projectile(projectileCount)
'With Projectile(projectileCount)
With InitiateProjectile
'Hmm what to do here?
End With
'projectileCount = projectileCount + 1
End Function
MaxSpeed is the highest speed the initial velocity can be
MaxBias is maximum distance from the calculated target, meaning you add a bias to the target with RND
MaxVerticalAngle is the highest vertical angle the turret can have
Weight is the weight of the projectile
For calculating forces; you can use whatever constants for gravity and friction
So here is everything i can provide, you could ask anything if you don't undestand something.
I wan't to have a calculation algoritm for a ballistics tracks, in other words projectiles that react to friction, friction that is calculated by Wind, the weight of the projectile and the velocity of the projectile. Also i need to attend the target's velocity (to predict where the target will be).
Therefore i have to provide the types i'm using for this case:
'For orientation: Coordinates and vectors
Type Iso2d
x As Single
y As Single
End Type
Type Iso3d
x As Single
y As Single
z As Single
End Type
'The target orientation
Type target
Position As Iso3d
Vector As Iso3d
End Type
'The projectile orientation
Type Projectile
Position As Iso3d
Vector As Iso3d
'Design As Byte 'hAmmoDesign
End Type
'The Weapon orientation
Type Weapon
'Design As Byte 'hWeaponDesign
'Direction As Byte
'target As integer 'htarget
Position as Iso3d
End Type
Type WeaponDesign
'TurretOffset() As PixelCOffset
'Turret() As DirectDrawSurface7
'range As Byte '(the length to which the weapon can reach)
MaxSpeed As Byte
MaxBias As Byte ' (The accurancy of the weapon, the smaller value, the more accurant)
'PrimaryDealy As Byte '(between shots)
'SecondaryDealy As Byte '(between reloadings)
'rounds As Byte '(amount of ammunition before reloading)
'ammunition As Byte 'hAmmoDesign (what type of ammunition is required)
'Weight As Byte ' In kg tblMacrovalue()
Weight As Single
MaxVerticalAngle As Single
'Info As DesignInfo
End Type
'Function InitiateProjectile(hWeapon As Integer) As Integer 'Returns the handle
Function InitiateProjectile(Weapon as Weapon, Target as Target, WeaponDesign as WeaponDesign, Wind as Iso2d) as Projectile
'ReDim Projectile(projectileCount)
'With Projectile(projectileCount)
With InitiateProjectile
'Hmm what to do here?
End With
'projectileCount = projectileCount + 1
End Function
MaxSpeed is the highest speed the initial velocity can be
MaxBias is maximum distance from the calculated target, meaning you add a bias to the target with RND
MaxVerticalAngle is the highest vertical angle the turret can have
Weight is the weight of the projectile
For calculating forces; you can use whatever constants for gravity and friction
So here is everything i can provide, you could ask anything if you don't undestand something.