Is there a specific order to follow in No Man's Sky main story?

P

pinckerman

I have 3 different active main missions:

  • Ghosts in the Machine (from Artemis Path)
  • Atlas Path
  • Space Anomaly

I was trying to complete the first one, then Apollo warned me that following the next step could prevent me to return to my base for a while, like a sort of "point of no return".
Should I focus on other missions before proceeding with Artemis Path?
 

Unreplied Threads

How to fix erased On-Board Usb-Blaster FPGA (MAX II EPM240T100C3 on board Terasic DE10-Lite)

  • Lion
  • Physics
  • Replies: 0
I have Terasic DE10-Lite board (with Altera MAX10 fpga), which use Altera Max II EPM240T100C3N (and usb-b + ftdi chip) for on-board usb-blaster logic. After explore 8 pins jtag holes on the board, i flash via that jtag and external usb-blaster cable ( to MAX II fpga ) stock hello world.

Previously i read (Examine) original MAX II bitstream to file (according to Messages there wasnt errors and file was save succefully). After understand that on-board usb-blaster stop work, and Max II used for it, i try recover Max II and flash original bitstream file (operation ends successfully) but on-board usb-blaster still dont work.

I explore all forums and github but didnt find any on-board usb-blaster bitstreams or HDL sources of usb-blaster to try flash. So what can i do now ? Ask someone with same board to dump MAX II bitstream and share to me?

enter image description here

Calculating Core Loss Coefficient (Kfe) for Ferrite Materials

  • Hector
  • Physics
  • Replies: 0
I'm having trouble calculating the core loss coefficient Kfe for ferrite materials. I'm referencing Chapter 15 of "Fundamentals of Power Electronics" by Robert W. Erickson and Dragan Maksimović.

The textbook defines Kfe in units of W cm-3 Tβ, where β is the core loss exponent. For modern ferrite materials, β is between 2.6 and 2.8. In the Cuk converter example (15.3.1), a ferrite pot core with Kfe = 24.7 W cm-3 Tβ is used, while in example 15.3.2, Kfe = 7.6 W cm-3 Tβ.

I attempted to calculate Kfe using Steinmetz's equation with datasheet parameters from Ferroxcube's "Soft Ferrites and Accessories" for materials 3C91 and 3C93:

For 3C91 (100 kHz, β = 2.7, Bpeak = 200 mT, Pv = 300 kW m-3):

$$K_{fe} = (0.3\ \mathrm{W\,cm^{-3}}) / ((0.2T)^{2.7}) \approx 23.13\ \mathrm{W\,cm^{-3}\,T^\beta}$$

For 3C93 (100 kHz, β = 2.7, Bpeak = 100 mT, Pv = 50 kW m-3):

$$K_{fe} = (0.05\ \mathrm{W\,cm^{-3}}) / ((0.1T)^{2.7}) \approx 25.06\ \mathrm{W\,cm^{-3}\,T^{\beta}}$$

Questions:

  1. Are my calculations correct, or am I missing something?
  2. Is there a better way to compute the core loss coefficient (Kfe) for ferrite materials?

How can a resonance circuit work as a current amplifier?

  • lastime
  • Physics
  • Replies: 0
I have been working on current amplifiers for my RF circuit. I was thinking about pre-amplifying the current by a tank circuit. The input of the circuit is just a mp3 player, which has not much current, so I looked up for the frequency, which was 128k for the output. I calculated a tank circuit with this given frequency, and I have seen it takes a capacitor of 103nF and an inductor of 15uH. I placed a resistor of 10 ohm at the end. I had no 1nF capacitors, so I managed to reduce the capacitor to 100nF. It gave good result in simulation software like illustrated below. The amperemeter can be replaced with a headphone, for example. I measured the current between input (green line) and output (red line) of the circuit in simulation and I saw there is a big gain for current at output. As I soldered the components together and tested it at workplace, I had a less sound quality, and the result was almost the same as the output of sound from mp3 player. My question is that, if I pre-amplified and soldered the right way and if there are differences between reality and the outputs of simulation software?

circuit

Calculating for impedance matching of more complex circuits

  • lastime
  • Physics
  • Replies: 0
When I start off to calculate the impedance from Z-input, how can I reach to antenna's Z-output which may be variable, for example 50 ohm. I have several good links on Internet:

https://www.omnicalculator.com/other/impedance-matching

for impedance matching for several impedance types

https://keisan.casio.com/exec/system/1258032615

for impedance calculating of circuit components

https://www.omnicalculator.com/physics/capacitive-reactance

for calculating the reactance of capacitors

https://www.omnicalculator.com/physics/voltage-divider

voltage divider tool

Are there any tools on Internet, which calculate all impedances in circuit automatically, maybe freeware?

The circuit below is just an example for impedances, which I want to calculate. Especially, I want to know the Z-input and the Z-output. What if I want to boost the power to antenna by impedance matching for better and strong transmission.

+5V and GND are connections for power supply. I use DC voltage as the source and the input(+) is used for AC waves like sound from mp3 player, for example.

circuit

Как в Aiogram получить айди пользователя из предыдущего сообщения?

  • notmysteryeex
  • Technology
  • Replies: 0
Code:
@create_user.callback_query(F.data == 'create_profile')
async def create_profile(call: CallbackQuery, state: FSMContext):
    await state.set_state(Profile.name)
    file = InputMediaPhoto(
        media='AgACAgIAAxkBAAO4ZkCUO8Jt3thlGWxcqCwrfZw6oUgAApnUMRvWJglKXE1X46IJrB4BAAMCAAN4AAM1BA',
        caption='Введите ваше настоящее имя:'
    )
    await call.message.edit_media(
        media=file,
        reply_markup=profile_name_kb(call.message.from_user.first_name)
    )

В клавиатуру нужно передать имя пользователя, но там высвечивается имя бота. Как это сделать?

Через командную строку не работает код

Всем привет. Такой вопрос, у меня не работает код через командную строку. Суть в чём. Моя программа должна загружать вопрос и ответ из файла. Если тестировать через отладчик, то всё хорошо. А если программу запускать через командную строку, то вопросы с ответами не записываются в структуру. Скорее даже не открывается файл с вопросами и не происходит запись переменных структуры Question. Подскажите пожалуйста в чём ошибка. За ранее Спасибо.

Code:
#include <iostream>
#include <fstream>      // Работа с файлами
#include <string>       // Для std::getline и string
#include <random>       // Рандом чисел
#include "Windows.h"    // Подключить русский язык в консоли

using namespace std;

char KEY{ '|' };    // Разделитель вопрос|ответ

// Ф-ция для кандома чисел
int randNumber(const int& min, const int& max);

// Структура вопроса
struct Question {
    string question{ "ERROR" }; // Вопрос
    string answer{};    // Ответ на вопрос
    string path{ "baza-voprosov-viktoriny-online.txt" };    // Имя файла с вопросами

    Question() {
        int rand_question{ randNumber(1, 4107) };   // Рандомим номер вопроса

        ifstream database_of_questions;
        database_of_questions.open(path);

        if (database_of_questions.is_open()) {
            for (int i{}; i < rand_question; ++i) {
                getline(database_of_questions, question, KEY);
                getline(database_of_questions, answer);
            }
        }
        database_of_questions.close();
    }
};

// Стр. старт игры
struct startGame {
    string entering_response{}; // Ввод ответа пользователем
    Question* question;         // База вопросов
    int right{};                // Счётчик правильных ответов

    startGame(const int number_questions) : question{ new Question[number_questions] } {

        for (int i{}; i < number_questions; ++i) {
            cout << "Вопрос: " << question[i].question << endl
                << "Введите ответ на " << i + 1 << " вопрос -> ";
            cin >> entering_response;

            if (question[i].answer == entering_response) {
                cout << "Правильно\n" << endl;
                ++right;
            }
            else {
                cout << "Не верно\n" << endl;
            }
        }
    }

    ~startGame() {
        delete[] question;
    }
};

int main(int argc, char* argv[])
{
    setlocale(LC_ALL, "Russian");
    SetConsoleCP(1251);
    SetConsoleOutputCP(1251);

    int value{1};

    if (argc > 1)
        value = atoi(argv[1]);

    startGame game{ value };

    return 0;
}

int randNumber(const int& min, const int& max) {
    random_device rd;
    mt19937 gen(rd());
    uniform_int_distribution<> dist(min, max);

    return dist(gen);
}

Приложение закрывается при попытке приконнектить сигнал к слоту

  • hermann.minkowski
  • Technology
  • Replies: 0
Проблема в следующем - интерактивно создается линия.

Левая кнопка мыши - добавить точку.
Правая кнопка - закончить создание линии.

Добавление точек проходит без ошибок, но при нажатии ПКМ - окно приложения просто закрывается, без каких-либо ошибок и предупреждений.

Привожу пример, по максимуму удалил лишнее. Отладка доходит до 93 строки:

Code:
node.change_position_signal.connect(self.update_point_positions)

и все молча закрывается.



Обычно удается самому решить проблему, но тут я уже в отчаянии, уже три дня потратил на эту проблему.

main.py

Code:
from PyQt5.QtWidgets import (QGraphicsPathItem, QGraphicsObject, QApplication, 
                                QGraphicsView, QGraphicsScene, QGraphicsItem)
from PyQt5.QtCore import Qt, pyqtSignal, QMarginsF, QRectF, QPointF, pyqtSlot
from PyQt5.QtGui import (QPainter, QPainterPath, QPainterPathStroker, QColor, 
                                                                QPen, QBrush)

class MVGraphicsLinkTest(QGraphicsPathItem, QGraphicsObject):

    def __init__(self, scene):
        super().__init__()
        scene.addItem(self)

        self.setFlag(QGraphicsItem.ItemIsFocusable, True)
        self.setAcceptHoverEvents(True)
        # lines width
        self._width = 10

        self._color = QColor(0, 100, 0, 255)
        self._brush = QBrush(self._color)
        self.setBrush(self._brush)
        self.setPen(QPen(Qt.NoPen))
        # stroker
        self._path_stroker = QPainterPathStroker()
        self._path_stroker.setWidth(self._width)
        self._path_stroker.setCapStyle(Qt.RoundCap)
        self._path_stroker.setJoinStyle(Qt.RoundJoin)
        self._path_stroker.setDashPattern(Qt.SolidLine)
        # init first point
        self.nodes = [MVGraphicsLinkNode(QPointF(10,10))]
        self.points = [QPointF(10,10)]
        # init dummy point
        self._dummy_mode = True
        self._dummy_node = MVGraphicsLinkNode(QPointF(10,10), parent=self)
        self._dummy_point = QPointF(10,10)

        self.update_path()

        self.grabMouse()

    def color(self):
        return self._color

    def update_path(self):
        self.prepareGeometryChange()
        for i, point in enumerate(self.points):
            if i==0:
                self._path = QPainterPath(point)
            else:
                self._path.lineTo(point)
        if self._dummy_mode:
            self._path.lineTo(self._dummy_point)
        self.setPath(self._path_stroker.createStroke(self._path))

    def mousePressEvent(self, e):
        if e.button() == Qt.LeftButton:
            # builds line
            if self._dummy_mode:
                self.points.append(e.pos())
                self.nodes.append(self._dummy_node)
                self._dummy_node = MVGraphicsLinkNode(e.pos(), parent=self)

        if e.button() == Qt.RightButton:
            # exit dummy mode and saving points
            if self._dummy_mode:
                self._dummy_mode = False
                self._dummy_point = None
                self.scene().removeItem(self._dummy_node)
                self._dummy_node = None
                self.connect_nodes()
                self.update_path()
                self.ungrabMouse()
                if len(self.points)<2:
                    self.delete_self()
        super().mousePressEvent(e)
        e.accept()

    def mouseMoveEvent(self, e):
        if self._dummy_mode:
            self._dummy_point = e.pos()
            self._dummy_node.setPos(self._dummy_point)
            self.update_path()
        super().mouseMoveEvent(e)

    def connect_nodes(self):
        # connecting node signals
        for i, node in enumerate(self.nodes):
            node.set_index(i)

            ########################################
            # CRUSH ON THIS LINE 
            node.change_position_signal.connect(self.update_point_positions)
            node.delete_signal.connect(self.delete_node)

    def disconnect_nodes(self):
        # disconnecting node signals
        for node in self.nodes:
            node.change_position_signal.disconnect()
            node.delete_signal.disconnect()

    def delete_node(self, index):
        if len(self.points)>2:
            self.disconnect_nodes()
            self.points.pop(index)
            del_node = self.nodes.pop(index)
            self.scene().removeItem(del_node)
            self.connect_nodes()
            self.update_path()

            print('scene items: {0}'.format(len(self.scene().items())))

    @pyqtSlot()
    def update_point_positions(self):
        for i, node in enumerate(self.nodes):
            self.points[i] = node.scenePos()
        self.update_path()

class MVGraphicsLinkNode(QGraphicsObject):
    change_position_signal = pyqtSignal()
    delete_signal = pyqtSignal(int)
    def __init__(self, pos, movable=True, parent=None):
        super().__init__(parent=parent)
        self.setPos(pos)
        self._movable = movable
        self._index = -1

        self.setFlag(QGraphicsItem.ItemIsMovable, self._movable)
        self.setFlag(QGraphicsItem.ItemIsSelectable, self._movable)
        self.setFlag(QGraphicsItem.ItemSendsScenePositionChanges, True)
        self.setAcceptHoverEvents(True)
        self.setEnabled(self._movable)

        self._hover = False
        self._size = 12

        self._color = QColor(200, 200, 50, 200)
        if parent:
            self._color = parent.color()
        self._color_sel = QColor(self._color)
        self._color_sel.setAlpha(100)

        self._brush1 = QBrush(self._color_sel)
        self._brush2 = QBrush(self._color)
        self._pen = QPen(QColor(0, 0, 0), 1.0, Qt.SolidLine)

    def set_index(self, index):
        self._index = index
        self.setToolTip('index = {0}'.format(self._index))

    def itemChange(self, change, value):
        if change == QGraphicsItem.ItemScenePositionHasChanged and self.scene():
            self.change_position_signal.emit()
        return super().itemChange(change, value)

    def size(self):
        if self._hover:
            return 2*self._size
        else:
            return self._size

    def boundingRect(self):
        return QRectF(-self._size, -self._size,
                                                2*self._size, 2*self._size)

    def shape(self):
        path = QPainterPath()
        path.addEllipse(QPointF(), self.size()/2, self.size()/2)
        return path

    def paint(self, painter, option, widget=None):
        painter.setBrush(self._brush1)
        painter.setPen(self._pen)
        if self._hover or self.isSelected():
            painter.drawEllipse(QPointF(), self._size, self._size)
        painter.setBrush(self._brush2)
        painter.drawEllipse(QPointF(), self._size/2, self._size/2)

    def hoverEnterEvent(self, e):
        self._hover = self._movable
        super().hoverLeaveEvent(e)

    def hoverLeaveEvent(self, e):
        self._hover = False
        super().hoverLeaveEvent(e)

    def mouseDoubleClickEvent(self, e):
        print('delete sender: {0}'.format(self._index))
        self.delete_signal.emit(self._index)
        super().mouseDoubleClickEvent(e)


if __name__ == '__main__':
    import sys

    app = QApplication(sys.argv)
    view = QGraphicsView()
    view.setDragMode(QGraphicsView.RubberBandDrag)
    scene = QGraphicsScene()
    m = QMarginsF(30, 30, 30, 30)
    scene_rect = QRectF(0, 0, 600, 600)
    scene.setSceneRect(scene_rect.marginsAdded(m))
    view.setScene(scene)
    view.setRenderHint(QPainter.Antialiasing)
    view.fitInView(scene.sceneRect(), Qt.KeepAspectRatio)

    MVGraphicsLinkTest(scene)

    view.show()
    sys.exit(app.exec_())
Top