OpenLLM-France/wikimedia huggingface dataset:
# Open Standards/Multipurpose AC-Battery/Mechanical specification

This chapter describes the mechanical requirements and definitions for a multipurpose AC-battery pack.

# Requirements:

The mechanical construction has to fulfill the following requirements:
- All the accumulator packs have the same defined length and width. They shall be useable in e-Bikes as well as in electric vehicles.
- There are three variants in height.
- All sizes shall fit on the same holder and connector.
- They shall have a carry / fix / release handle with comfortable diameter and sufficient space for the fingers.
- The accumulator packs shall have small wheels at the connector side to ease insertion.
- The ground plane common to all sizes has to be flat and support heat sinking.
- The weight shall not exceed the weight of a six pack of coke bottles (12Kg).
- The accumulator packs shall withstand rain

# Specification:
## Dimensions:

All battery packs shall have an overall length of 360mm without the handle.
All battery packs shall have an overall with of 100mm exclusive the handle arms and fixation and w with of 105mm inclusive the handle arms and fixation. The fixation and the insertio wheels shall have a with of 2mm on each side. A tongue and grouve ring is used to make the connection side waterproof. The connector side is symmetrically. There are three sizes of AC batteries: small (50mm), medium (100mm) and large (200mm).

## Connectors:

For power connection there are two female ring contacts inside with a diameter of 10mm. They shall have the ability to carry up to 300A continuous current and insulation for 3000V. For control connection, there are 3x3 female connectors inside. type: "PHOENIX CONTACT - 1792760 - PLUG, FREE, 5.08MM, 3WAY" (better suggestions welcome). Current rating: >0,1A, insultion voltage: 3000V.
Connection right side: Power pole MINUS if positive voltage is requested.
Upper pin : RX data from control unit (or previous battery pack)
Intermediate pin: Signal ground for RX data and marker
Lower pin: Input Marker from control unit (or previous battery pack)
Connection left side: Power pole PLUS if positive voltage is requested.
Upper pin : TX data to next battery pack (or control unit)
Intermediate pin: Signal ground for TX data and marker
Lower pin: Output Marker to next battery pack (or control unit)
Connection in the middle:
Upper pin : Input command signal from control unit
Intermediate pin: Signal ground for trigger and command signal
Lower pin: Input trigger signal from control unit
# Open Standards/Multipurpose AC-Battery/Presentation

This presentation slides show you some details about the use of a multipurpose AC-Battery.
Introduction slide 1
Introduction slide 2
Introduction slide 3
Introduction slide 4
Introduction slide 5
# Open Standards/Multipurpose AC-Battery

A multipurpose AC-Battery is in fact a accumulator pack with electronics providing a selectable output voltage, even AC. It has a few variants in size (S, M, L) which fit on the same holder and connectors. Multipuppose AC-Battery packs are not bound to a special product. They can be used for e-Bikes, lawn mowers, vacuum cleaners, power tools, e-bikes, electric vehicles, plug-in hybrids and much more. They can be directly charged via AC grid or solar power panels without the need of inverters.
Chapters in this specification:
* Presentation
* Mechanical specification
* Electrical specification
* Data specification
* Logic implementation examples
* Application examples
* Questions and answers
This specification is under construction. You can participate in defining a real multipurpose thing.
Attention: This standards and the ideas inside are free for use. Nevertheless, check for intellectual property rights (patents) before commercial use. The "view history" tag is helpful in case of doubt what came first.
# Open Standards/Multipurpose AC-Battery/Logic implementation examples

Here you can see the result of a Simulink simulation of a multipurpose AC battery pack, generating a sin wave:
The upper curve shows desired and actual voltage, the lower shows the commands. 0 = idle, 1 = one up, 2 = one negative up, 3 = down.
This implementation examples show sheets of a running Simulink demo. Here you can see one (incomplete) test implementation consisting of:
- the system overview
- the ControlInterface
- one complete multipurpose AC battery pack (consising of 4 rows&polarity switches, 6 switch cells each)
- one of four switch groups with decoder, polarity switch and 6 switch cells
- Decoder for retrieving PosUp, NegUp, Down, Idle and Reset command
- Logic for positive or negative output voltage (with polarity change protection if not all cells are switched off)
- Logic of every switch cell (p.e. control of a half bridge)
The control algorithm is a simple integrator in software. Here is the matlab function code:
# Open Standards/Multipurpose AC-Battery/Questions and answers

This page answers most upcoming questions (FAQs).

# FAQs
## Isn't it crazy to use hundreds of MOS-FETs instead of six in an B6-bridge?

Well, if only the number is regarded - yes. But there are significant differences. First, the MOS-FETs have to switch maximum 10 V instead of 600 V, 1200 V or more. And they can do this slowly within 100–300 ns. This reduces the switching losses to a minimum, and distributes it over many devices. So standard parts from user electronics can be used instead of state-of-the-art large and high-speed chips.
Second, there is no need for separate charger and motor inverter anymore, because the same power electronic is used for many purposes.

## In a conventional battery charger I need a transformer, the AC battery also needs a coil for buffering ripple currents - so what?

The point is the SIZE of the coil. Example: A solar inverter for 20 KVA is switching about 600 V and needs a storage coil with a weight of roughly 10 kg. An AC battery pack can only switch about 7 V up or down, means for the same ripple current and power rating the coil reduces to roughly 0.12 kg. Even more, there is no need for buffer capacitors, and EMC problems are reduced to a minimum.

## Why don't we have these battery packs today?

AC battery packs are a simple and logical solution. Well, I was told that "producers want to differentiate from others with their own battery technology", meaning that a standardized product is not desired. May be it is possible to earn more money with a lot of additional products (chargers, battery management, inverters, express chargers,...) than with a simple solution.
On the other hand, the standard product can be sold (or rented) in really large volumes, without the need of high development costs necessary for different products. Earning money with AC battery packs is possible, too. But in another way of business as we have today.
# No Man's Sky/Money-making/Local goods

The concept is simple: each system will have different locally-produced goods, as well as demands. It's a bit like a rock-paper-scissors game. You should buy as many local goods as possible. After you stocked up, warp to another system that wants it, and sell the goods. Maybe use this time for an inventory upgrade, then go and buy the local goods of this new system.
Before buying more goods, consider exploring a few planets. This will allow you to find some cool items to sell, resupply, and get units by scanning new discoveries. Uploading the discoveries on the pause menu will net you some extra nanites, another type of currency.

## Complex notes to remember
### System types

There are four types of systems:
* Industry (cog): demands minerals, exports tech
* Power generator (power pack): demands tech, exports power
* Mining (pickaxe): demands power, exports minerals
* Science (potion): demands science equipment, exports exotic goods

### Demand and supply amounts

Each system also has a supply amount. Larger amounts means you won't get much money from the system, due to low demand, but you may be able to buy more goods in those systems for a lower price.
Smaller supply amounts mean everything has higher demand, meaning you profit more from selling, but spend more money on goods than usual. You still profit, but in a different way. Better suited for ending your trading cycle when you get bored and want to do something else.
To see the amounts, get the "System Economy Scanner" starship upgrade from the Anomaly, then open the galaxy map. Look for systems with more white dots next to the economy image. These are more profitable places to begin the trading cycle.

## Tips

* Stay away from pirate-controlled systems. They are bad news for traders, and offer no safe goods to buy to sell elsewhere. They offer illegal stuff, which nets more money, but that is considered smuggling.
* Pirates will scan your ship at times, and when they see your 40-million-units worth of cargo, they will attack. Consider getting a cargo scan deflector upgrade for your ship. Getting the upgrade allows you to block these scans, giving more time to escape.
# Noli Me Tangere/Chapter X

Chapter X " Elias and Salome"
Summary: Salome waits desperately for Elias, thinking that he would pass by the water any time soon. Elias, however, is nowhere to be seen because he is in fact hiding from the authorities who are currently patrolling the lake. When the two finally get to meet, Salome tells the youth of her plan to move to Mindoro and live with her relatives, and requests that he go with her. Elias, however, refuses her offer because he does not want her to be entangled with the tragedies and troubles of his past. He tells the lady that she must marry an honorable and respectable man, one whom she truly deserves and who can make her happy.
The chapter 'Elias and Salome' was originally the chapter 25 of Noli Me Tangere but when they found the original manuscript, it has a large 'X' mark on it so that they called it Chapter X. Rizal removed it during the actual printing of the book due to financial constraints.
# No Man's Sky/Glitched Planets

    Note: Glitched planets are not bugs, but features
A "glitched" planet is a rare occurrence. The planet's fauna is all turned into a strange form, while all flora and minerals take a specific shape. Possible forms include:
* Dark pillars with orange-ish lines running up them. Fauna are transferred into flying yellow crystals.
* Small, dark hexagonal pillars, with creatures being quite similar to everything else.
* Round spherical objects with hexagonal shapes all over it. Fauna share the same shape as everything else and roll around.
* Large pillars with orange stripes running up them. Fauna are in the shape of flying blue circles, a lot like plasma.
If you continue to explore the planet, you will eventually find a collectible decoration for your base that closely matches the planet's flora and minerals.
You may also come across a boundary failure, a large ring structure, with a terminal at the base of it, allowing you to unlock some game lore on the downfall of other universes.
# No Man's Sky/Money-making

Money is very important in No Man's Sky. You need it to buy upgrades, materials for upgrades, fuel, new ships or multi-tools, and other stuff.
    Safe: these methods will attract minimal attention to the sentinels
    Dangerous: more dangerous methods for when you need more money
* Smuggled contraband
* Rare resources
# Noli Me Tangere/Chapter 26

Outside the town the hill-folk, the kasamá, are putting on their best clothes to carry to the houses of their landlords well-fattened chickens, wild pigs, deer, and birds. Some load firewood on the heavy carts, others fruits, ferns, and orchids, the rarest that grow in the forests, others bring broad-leafed caladiums and flame-colored tikas-tikas blossoms to decorate the doors of the houses.
Kung ang isalúbong sa iyong pagdating Ay masayang maukha’t may pakitang giliw, Lalong pag-iñgata’t kaaway na lihim — Baltazar was no less a thinker than a poet.
End of The Fiesta (Chapter 26 of Noli Me Tangere) By: Dr. Jose P. Rizal First Published at: Berlin, Germany Finished: February 21, 1887)
# No Man's Sky/Money-making/Rare resources

One way to get many units is to collect rare resources from planets. However, some are dangerous to get without taking damage, like living pearls. Others are in dangerous places, like albumen pearls. And some, like gravitino balls, summon sentinels when taken.

## Tips

* Look underground, in caves for humming sacks.
* Look for clams underwater. Shoot one to open it, then quickly take the pearl before the clam closes. Don't get too close, as clams deal damage when they close.
* You can get gravitino balls in planets with high sentinel activity, but be warned: taking one will immediately anger sentinels and increase your wanted level to 3.
# No Man's Sky/Money-making/Smuggled contraband

This is a fast way to get very large amounts of units. However, it makes you more likely to be attacked in space by sentinels and non-pirates.
The concept is simple: go to pirate-controlled systems, land on the space station, and buy the illegal contraband. Then warp to another system and sell them for a large profit nearing fifty-thousand to a hundred-thousand or more per item.

## Tips

* Try getting the cargo scan deflector starship upgrade. It unlocks the ability to block ship scans. Find the button in the quick menu, under "utilities". You can buy blueprints at the Anomaly.
# Khepera III Toolbox/The Toolbox/Modules/nmea

The nmea module parses a stream of NMEA 0183 messages.

## Description

nmea_parser_init initializes a new NMEA parser. After initialization, the following hook functions can be set in the parser structure:
* hook_process_message: Called whenever a complete and correct message is received.
* hook_process_message_checksum_error: Called whenever a complete message with a wrong checksum is received. Such messages should be discarded.
* hook_process_unrecognized_char: Called whenever a char which does not belong to a message is received.
Data must then be passed to nmea_parser_process_data, which parses the stream and calls the appropriate hook function.

## Sending NMEA Messages

Sending NMEA messages is usually done by printing the corresponding values directly with printf. However, there may be situations in which you want to send an NMEA message structure as correctly formatted NMEA message. This is done as follows:
# Khepera III Toolbox/The Toolbox/Modules/odometry goto

The odometry_goto module implements a simple feedback algorithm a differential-drive vehicle to move towards a given position ($x$, $y$). It uses the odometry_track module to estimate the current position of the robot.

## Description

This module is always used in combination with the odometry_track module.
odometry_goto_start sets up a sOdometryGoto structure and assigned a sOdometryTrack structure to it. The latter must have been initialized beforehand (but could have been initialized much earlier and used already).
The target position is set with odometry_goto_set_goal. Inside the main loop, odometry_goto_step, called right after odometry_track_step, calculates the new wheel speeds and put them inside the result structure. These speed values should be set khepera3_drive_set_speed. Note that the target position may be changed at any time. The odometry_goto_step function will calculate the motor speeds for the currently configured target position.
In addition to the motor speeds, the result structure provides a two more useful fields:
* closetogoal: Set as soon as the robot comes so close to the target position that it starts decelerating.
* atgoal: Set if the robot has reached the target position.
# Khepera III Toolbox/Writing your Own Modules

If you add want to use the same piece of code in multiple programs (i.e. a sensor board interface, or a common algorithm), it may be useful to create a module. Such a module can be included and used in all your programs.
The Khepera III Toolbox provides you with a module template and a Makefile.

## Preparing the Environment

Make sure that you have a working development environment as described in Writing your Own Programs.

## Creating a New Module

To create a new module, type
where my_new_module denotes the name of your module. This creates a folder my_new_module with a header and an implementation file (my_new_module.h ,my_new_module.c). A Makefile is created as well.
To check if everything is all right, try to compile the new module:
This should create an archive my_new_module.a.
You can now edit the files my_new_module.h and my_new_module.c. In case your module is more complex, you can of course create additional my_new_module_*.c and my_new_module_*.h files (note the prefix my_new_module_!). All these additional files will automatically be compiled and available to the programs including the module.

## Testing the Module

A module cannot be executed by itself. To test a module, you must create a program that includes this module. To include your module, add the following line to the Makefile of your program:
This will tell the compiler to look for the *.h files of that module, and to integrate the my_new_module.a archive into the program. (If your program needs multiple modules, simply add them on the same line. Note that all module folders must reside at the same location.)
Now, you can use the functions of the module in your program, and test them therewith. Note that whenever you change code in your module, you need to first recompile the module, and then recompile the program.

## Miscellaneous
### Renaming a Module

The name of the binary executable can be changed in the Makefile by modifying the line
Note that the archive should always have the same name as the project folder, suffixed by .a.

### Including Modules in a Module

A module can include other modules. To include standard modules, add the following line (with the modules you want to add, of course) to the Makefile:
To include other modules that you wrote on your own, add
to the Makefile.

### SVN / Versioning System Issues

Just as for programs, we strongly suggest using a versioning system such as SVN (Subversion) to store your Khepera III modules. SVN is probably the most prominent system today, and easy to set up and use.
If you are using a versioning system, you should check in the following files of your module:
* All source files (*.c, *.h)
* The Makefile
* The compiled archive (*.a) (such that a compiled copy is available for those who don't have a compiler set up)
* Any additional files that the program needs
You should not check in:
* Intermediate compilation files (*.o, *.d)
# Khepera III Toolbox/The Toolbox/Modules/odometry track

The odometry_track module implements the odometry equations for a differential-drive vehicle and allows to track the robot's position ($x$, $y$, $\theta$) over time. Fosamax Class Action blog

## Description

odometry_track_start sets up a sOdometryTrack structure and reads the odometry calibration values from /etc/khepera/odometry. If that file is not available (or does not contain a valid configuration), default values are used. After calling this function, the initial position can be changed by modifying the result fields of the structure. odometry_track_start also reads the current motor positions and should therefore be called immediately before entering the main loop.
Inside the main loop, odometry_track_step is called to read the new motor positions and update the position estimate in the result fields.

## Calibration

The default calibration values should give acceptable results on most Khepera III robots. Through a calibration procedure, the precision can be significantly improved, however.

## Providing Motor Positions from Other Sources

The functions mentioned above read the motor positions automatically with the khepera3_drive_getposition function. If this is not desired, the functions odometry_track_start_pos and odometry_track_step_pos can be used.
# Khepera III Toolbox/The Toolbox/Modules/i2c stream

The i2c_stream module implements a simple I2C data streaming protocol. The device from which data is streamed must implement that same protocol as well.

## Synopsis

Check out the source code of the i2c_stream_read program for an example.

## Description

This module uses the i2cal module to transfer data blocks from the external device (chip) to the program. It basically consists of two functions:
* i2c_stream_read_start, to start streaming
* i2c_stream_read_next, which has to be called frequently (and in more or less regular intervals) to read the available data blocks
The following four settings need to be provided to the module
* device: the I2C address of the device to query
* reg: the I2C register from which the stream is read
* block_size: the size of one block (in bytes)
* block_count_max: the maximum number of blocks to transfer at once (this value must be <= 128 / block_size)

## Streaming Protocol

The protocol used for data streaming is very simple: To reset the stream, the module first sends the register followed by a 1. To read a chunk, the module sends the register and then reads a multiple of (block_size + 1) bytes from the device. The first byte of a block is a status byte which can take one of the following values:
* 255 (I2C_STREAM_BUFFER_OVERRUN): A buffer overrun occurred on the device, i.e. the blocks were not read fast enough.
* 254 (I2C_STREAM_EMPTY): The block does not contain any data.
* 0..253: the available number of blocks on the device
# Khepera III Toolbox/The Toolbox/Modules/measurement

The measurement module provides a common framework for all programs which solely read a sensor (or several sensors) and report the result. Programs using this module therefore accept the same command line options to specify
* the interval between two measurements (-w US)
* the number of measurements to be taken (-r N or just -r for continuous measurements)
* whether to print the results
** right after measuring (default)
** at the end (-f)
** not at all (-F)

## Synopsis

Check out the source code of the battery program for an example.

## Description

This module controls the main program flow and requires only two hook functions:
* A hook function take one measurement (hook_measure)
* A hook function to print one measurement (hook_print)
Furthermore, an array for storing intermediate measurement must be provided.