Stormworks: Build and Rescue

Stormworks: Build and Rescue

评价数不足
EAIS
   
奖励
收藏
已收藏
取消收藏
Vehicles: Sea
标签: v1.3.15
文件大小
发表于
更新日期
64.884 KB
2021 年 12 月 6 日 上午 11:52
2021 年 12 月 7 日 上午 6:51
4 项改动说明 ( 查看 )
描述
This is an Extended Automatic Identification System. First of all, thanks to lunatigs for his microcontroller that is the basis of my microcontroller. This system is 100% compatible with his system.

https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1748013725

Changes

Multiplayer safety

In order for this microcontroller to be multiplayer safe, I am seeding the random generator with GPS coordinates before using it.

Slot reservation

This microcontroller uses time slots (aka ticks since midnight) to announce the next time slot, in order to avoid collisions. This also includes listening to other EAIS's announcements and not using their slots. Furthermore, the amount of time that passes between 2 transmitions is handled more dynamically. It ranges from 1 second at 16knots or above all the way down to 16 seconds while standing still.

More transmitted data

I also added the ability to include information about the navigational status and waypoint eta, as well as waypoint x and y coordinates.

Names

Yes, you read that right. This controller is able to transmit up to 20 characters of a ships name (as required by the standard). As lunatigs's version wasn't able to transmit text, I changed the character encoding to the AIS 6 bit ASCII encoding. It has a very limited set of characters that can be transmitted. See further down in the Sources section on the Wikipedia article about 6 bit character encodings to learn more about the limitations.

Debug output

In order to keep the size down, I removed both debug connectors. This microcontroller includes an unused lua code block that contains the code necessary to decode the text.

Usage notes
If you plan to include this into a ship that you'll upload to the workshop, please consider setting the "random IMO number" option to on in order to avoid number collisions in multiplayer games. Furthermore, it would be nice to name either me or lunatigs because of the work that went into making it.

Interface
I currently don't have an interface for this that features the entire featureset of this AIS, although one is in the making. However, this microcontroller is compatible to lunatigs's display, so you can use this for now.

Documentation

Compatibility

Other controller
Status
Description
Full
Communication works in both directions
Read
Using this addon, this controller can read transmissions from Alirus's controller

Sources

Wikipedia on AIS[en.wikipedia.org]
Deep dive about AIS messages 1, 2, 3[emsa.europa.eu] and 5[emsa.europa.eu]
More formal definition of the standard including the 6 bit ASCII encoding[www.itu.int]
Wikipedia on 6 bit character encodings. Scroll down to "SixBit ASCII (used by AIS)"[en.wikipedia.org]

Terms

Term
Explanation
imoNumber
Unique IMO number. Needs to be prefixed with "IMO" before display.
nameByte
First 5 characters of the ships name. Needs to be decoded using the decoder in the unused lua block.
shipType
Value between (including) 1 and 8. Explained further down.
shipLength
The length of the ship in meters.
shipWidth
The width of the ship in meters.
gpsX
The X coordinate of the ship.
gpsY
The Y coordinate of the ship.
speed
Speed of the ship in knots.
trueCompass
Heading of 0 to 360 in degrees.
nextTransmission
The time in ticks since midnight when the next transmission is planned to happen.
nameByte1
Characters 6 to 10 of the ships name.
nameByte2
Characters 11 to 15 of the ships name.
nameByte3
Characters 16 to 20 of the ships name.
navStat
The navigational status of the ship. Explained further down.
eta
The Estimated Time of Arrival of the ship at the next waypoint.
targetX
The X coordinate of the waypoint.
targetY
The Y coordinate of the waypoint.

Over the air

  1. imoNumber
  2. nameByte
  3. shipType
  4. shipLength
  5. shipWidth
  6. gpsX
  7. gpsY
  8. speed
  9. trueCompass
  10. nextTransmission
  11. nameByte1
  12. nameByte2
  13. nameByte3
  14. navStat
  15. eta
  16. targetX
  17. targetY

At the "AIS Data" output

  1. imoNumber
  2. nameByte
  3. shipType
  4. shipLength
  5. shipWidth
  6. gpsX
  7. gpsY
  8. speed
  9. trueCompass
  10. nameByte1
  11. nameByte2
  12. nameByte3
  13. navStat
  14. eta
  15. targetX
  16. targetY

shipType

One of the following:
ID
Explanation
1
Cargo Vessel
2
Tanker
3
Passenger Vessel
4
High Speed Craft
5
Tug or Special Craft
6
Fishing
7
Pleasure Craft
8
Unspecified Ship

navStat

One of the following:
ID
Explanation
0
under way using engine
1
at anchor
2
not under command
3
restricted manoeuvrability
4
constrained by her draught
5
moored
6
aground
7
engaged in fishing
8
under way sailing
9
reserved for future amendment of navigational status for ships carrying DG, HS, or MP, or IMO hazard or pollutant category C (HSC)
10
reserved for future amendment of navigational status for ships carrying DG, HS or MP, or IMO hazard or pollutant category A (WIG)
11-14
reserved for future use
15
not defined
3 条留言
ThatGr8CdnGamer 2022 年 9 月 20 日 下午 4:29 
okay, that's what I thought.

I really look forward to your version of the output system!
fabi123  [作者] 2022 年 9 月 19 日 上午 11:27 
You need to get it from whatever AP you are using.
ThatGr8CdnGamer 2022 年 9 月 19 日 上午 10:41 
Where do I pull the ETA from?