[Mod] PA-28 [pa28]

User avatar
apercy
Member
Posts: 637
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

[Mod] PA-28 [pa28]

by apercy » Post

PA-28

It doesn't fit anything. Some people will dislike it as always. But here we have another plane!

https://github.com/APercy/pa28
https://content.minetest.net/packages/apercy/pa28/
screenshot_20220501_153954.png
screenshot_20220501_153954.png (488.33 KiB) Viewed 3142 times
This is an implementation for minetest of the Piper PA28. It is far from the real
plane, as it is adapted to a minetest scale and behaviour. It was inspired on
brazilian version of it, the EMB-712 Tupi.

It flies like any other airplane I made, but low wing and with more ground effect. Is expected that it's more quick than the supercub. It can carry 4 people.
If you find a bug, tell me.
The operation manual and more blablabla you can read just typing "/pa28_manual"

Have a good flight!
Last edited by apercy on Thu May 05, 2022 11:21, edited 2 times in total.

User avatar
apercy
Member
Posts: 637
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] PA-28 [pa28]

by apercy » Post

pilot position fixed. Dont forget to update the airutils mod

User avatar
apercy
Member
Posts: 637
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] PA-28 [pa28]

by apercy » Post

fixed bug on destroy

User avatar
apercy
Member
Posts: 637
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] PA-28 [pa28]

by apercy » Post

Improved today. Added an Automatic direction finding (ADF) to compass function. On plane menu, set the map coordinates (x and z) and turn ADF on. The yellow arrow will point the destiny direction, just align the airplane with the arrow and have a good flight.
Need to update the airutils lib

User avatar
apercy
Member
Posts: 637
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] PA-28 [pa28]

by apercy » Post

Updated today. The movement was changed from set_acceleration to set_velocity. Now the ADF have support for cgpsmap marked maps, you have just to right click the plane from inside using it to set the coordinates. But it's possible to set it manually from plane form too.
The autopilot works from plane menu too

User avatar
apercy
Member
Posts: 637
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] PA-28 [pa28]

by apercy » Post

more fixes comited

User avatar
apercy
Member
Posts: 637
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] PA-28 [pa28]

by apercy » Post

Now fixed stall on cruise speed

User avatar
apercy
Member
Posts: 637
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] PA-28 [pa28]

by apercy » Post

many thanks to josiah_wi for all the bugs discovered today!
All fixed :)

User avatar
apercy
Member
Posts: 637
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] PA-28 [pa28]

by apercy » Post

Fixed ghost collision on snow. And added a more elegant and painfull way to lose the airplane on water

User avatar
apercy
Member
Posts: 637
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] PA-28 [pa28]

by apercy » Post

Takeoff run adjusted, but please, update the airutils again, because I made the beziercurve method public to fake a low lift during the takeoff run

User avatar
apercy
Member
Posts: 637
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] PA-28 [pa28]

by apercy » Post


User avatar
apercy
Member
Posts: 637
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] PA-28 [pa28]

by apercy » Post

Fixed the command compression at dive, thanks to Stella for the repport
Added damage by overspeed, each 2 seconds.

User avatar
Wizard Of mkdir
Member
Posts: 26
Joined: Tue Aug 17, 2021 14:18
GitHub: wizardofgcc
In-game: Wizard Of mkdir

Re: [Mod] PA-28 [pa28]

by Wizard Of mkdir » Post

This is an incredible mod! This airplane is really the next step from the previous ones. However, I am experiencing an issue, the engine randomly keeps stopping sometimes midflight, and the plane crashes like a stone down. Is this a bug or am I doing something wrong?

User avatar
apercy
Member
Posts: 637
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] PA-28 [pa28]

by apercy » Post

Wizard Of mkdir wrote:
Fri May 13, 2022 18:00
This is an incredible mod! This airplane is really the next step from the previous ones. However, I am experiencing an issue, the engine randomly keeps stopping sometimes midflight, and the plane crashes like a stone down. Is this a bug or am I doing something wrong?
Thank you!!!
I need more details, but try check the fuel level. Or if you collided with something. Now the engine stops after hard collisions. And update the airutils lib

User avatar
MisterE
Member
Posts: 691
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] PA-28 [pa28]

by MisterE » Post

would the engine stop if it hit an ignore node?

User avatar
apercy
Member
Posts: 637
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] PA-28 [pa28]

by apercy » Post

MisterE wrote:
Fri May 13, 2022 21:17
would the engine stop if it hit an ignore node?
If it is solid, yes.

User avatar
MisterE
Member
Posts: 691
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] PA-28 [pa28]

by MisterE » Post

apercy wrote:
Fri May 13, 2022 21:30
MisterE wrote:
Fri May 13, 2022 21:17
would the engine stop if it hit an ignore node?
If it is solid, yes.
then that is a problem... imo, you should check specifically for ignore node collisions, because if the engine stops with that, then you can have lag that kills your flight pretty easily

User avatar
apercy
Member
Posts: 637
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] PA-28 [pa28]

by apercy » Post

MisterE wrote:
Sat May 14, 2022 18:15
apercy wrote:
Fri May 13, 2022 21:30
MisterE wrote:
Fri May 13, 2022 21:17
would the engine stop if it hit an ignore node?
If it is solid, yes.
then that is a problem... imo, you should check specifically for ignore node collisions, because if the engine stops with that, then you can have lag that kills your flight pretty easily
right, I'll think a solution, thank you!

L-Dog
Member
Posts: 481
Joined: Sat Jun 19, 2021 12:49
GitHub: N-nec
In-game: L-Dog

Re: [Mod] PA-28 [pa28]

by L-Dog » Post

I seemed to trigger the error with this plane.

2022-06-01 01:54:56: WARNING[Server]: LuaEntitySAO::step() id=6399 is attached to nonexistent parent. This is a bug.
2022-06-01 01:54:56: WARNING[Server]: LuaEntitySAO::step() id=6398 is attached to nonexistent parent. This is a bug.
2022-06-01 01:54:56: WARNING[Server]: LuaEntitySAO::step() id=6397 is attached to nonexistent parent. This is a bug.
2022-06-01 01:54:56: WARNING[Server]: LuaEntitySAO::step() id=6396 is attached to nonexistent parent. This is a bug.
2022-06-01 01:54:56: WARNING[Server]: LuaEntitySAO::step() id=6395 is attached to nonexistent parent. This is a bug.
2022-06-01 01:54:56: WARNING[Server]: LuaEntitySAO::step() id=6394 is attached to nonexistent parent. This is a bug.
2022-06-01 01:54:56: WARNING[Server]: LuaEntitySAO::step() id=6393 is attached to nonexistent parent. This is a bug.
2022-06-01 01:54:59: ACTION[Main]: Server: Shutting down
2022-06-01 01:55:12: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod '??' in callback luaentity_Step(): /usr/share/minetest/builtin/common/vector.lua:206: attempt to perform arithmetic on field 'x' (a nil value)
2022-06-01 01:55:12: ERROR[Main]: stack traceback:
2022-06-01 01:55:12: ERROR[Main]: /usr/share/minetest/builtin/common/vector.lua:206: in function 'multiply'
2022-06-01 01:55:12: ERROR[Main]: /home/xxxxx/.minetest/mods/pa28/custom_physics.lua:77: in function 'physics'
2022-06-01 01:55:12: ERROR[Main]: /home/xxxxx/.minetest/mods/pa28/entities.lua:310: in function 'func'
2022-06-01 01:55:12: ERROR[Main]: /usr/share/minetest/builtin/profiler/instrumentation.lua:107: in function 'func'
2022-06-01 01:55:12: ERROR[Main]: /usr/share/minetest/builtin/profiler/instrumentation.lua:107: in function </usr/share/minetest/builtin/profiler/instrumentation.lua:100>


Full Error code... Whats this mod '??' ... sounds strange.

it was triggered at 57.4 blocks up at half-power.

wsor4035
Member
Posts: 181
Joined: Sun Aug 11, 2019 21:23
GitHub: wsor4035
IRC: wsor
In-game: wsor

Re: [Mod] PA-28 [pa28]

by wsor4035 » Post

mod ?? is what the engine uses when it has no idea which mod caused the crash. also, fyi, the engine can get the mod name to blame wrong sometimes, better to trust the stack trace
j5uBLfc6NxgersvVj5D5dIsiKDkoQb0o

User avatar
apercy
Member
Posts: 637
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] PA-28 [pa28]

by apercy » Post

wsor4035 wrote:
Wed Jun 01, 2022 03:17
mod ?? is what the engine uses when it has no idea which mod caused the crash. also, fyi, the engine can get the mod name to blame wrong sometimes, better to trust the stack trace
I’ll try to reproduce and maybe fix it. Lets see what I can find

User avatar
apercy
Member
Posts: 637
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] PA-28 [pa28]

by apercy » Post

One first thing I see is the list of attached items to non existent parent. Is really the same number of attachments I do on plane at on_activate step

pa28:p_lights
pa28:light
pa28:engine
pa28:seat_base
pa28:seat_base
pa28:seat_base
pa28:seat_base

Someway the parent object was destroyed, the plane itself, by something external, a behaviour not originaly planned.

So when at physics call I try to make and use the new_velocity table, all break, because it is nil yet and I forgot to check it before. My fault.

Code: Select all

new_velocity = vector.add(new_velocity, vector.multiply(self._last_accell, self.dtime))
So now I check the new_velocity before any operation with it
The fix it's at contentDB now

Thank you for the report

User avatar
steeeeeven
Member
Posts: 32
Joined: Mon May 02, 2022 03:02
GitHub: none
IRC: non e
In-game: steeeeeven

Re: [Mod] PA-28 [pa28]

by steeeeeven » Post

Hi

Me and my brothers are really into your stuff, and i mean really loving it!
but there is one problem..... no super fast fighter jets.
My suggestion would be to make a f-16.... but that is besides the point.
as always you exceed to well beyond the boundary's of mod - making and physics.
your planes are excellent
your trains and your subs and your helicopters.
they also exceed all expectations.

And thank you again for what you are doing for the Minetest community
Kind regards:Steeeeeven
Last edited by steeeeeven on Fri Jan 26, 2024 13:10, edited 1 time in total.

User avatar
apercy
Member
Posts: 637
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] PA-28 [pa28]

by apercy » Post

Thank you!
The jet is in my plans, but at current state of the minetest it isn't possible yet. The map load will suffer a lot and we need a better camera for it.

User avatar
steeeeeven
Member
Posts: 32
Joined: Mon May 02, 2022 03:02
GitHub: none
IRC: non e
In-game: steeeeeven

Re: [Mod] PA-28 [pa28]

by steeeeeven » Post

apercy wrote:
Wed Jul 27, 2022 13:56
Thank you!
The jet is in my plans, but at current state of the minetest it isn't possible yet. The map load will suffer a lot and we need a better camera for it.
Ok
And thank you again!

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests