Find GPS coordinates of new location with respect to another GPS location at a range, azimuth and elevation & roll, pitch and yaw
I have GPS coordinates of my quadcopter A  LatA, LongA and HeightA.
My quadcopter attitude is not straight and level, it has current Roll angle  RollA, current Pitch angle  PitchA and Current Heading HdgA with respect to North.
My quadcopter focusses/throws a light at a range R meters, elevation E degrees (with respect to horizontal plane of quadcopter), Azimuth A (with respect to nose/longitudinal axes of quadcopter).
I need to find the GPS coordinates of location where my quadcopter focusses its light.
do you know?
how many words do you know
See also questions close to this topic

How to make MathJax faster?
I was working on a website that contains a lot of mathematical expressions. I use MathJax with React (using 'reactmathjaxpreview') but I noticed that rendering math equations is slow and can be noticed while refreshing the page. I compared with websites that are using MathJax like Mathematics Stack Exchange and I found that the equations are rendered faster (even with pages that contain a big amount of math expression). So why my math is rendered slower? And how to make it fast like Mathematics Stack Exchange?
Note: I tried to use KaTex with react which was faster than MathJax, But there were some problems with the positioning of fractions and roots and the text style. So I returned to MathJax as it also provides more latex functions and is used more than KaTex.
Note: The problem seems to be worse in cases where math expressions are contained in tables, as they are written in separated
<MathJax />
components.For example, this piece of code is rendered slowly, however it contains only 9 math expressions. (some of the pages I work on contain more than 50 separated math expressions (even while using environments like 'align' environment).
<div> <table className="tablestylea2"> <thead> <tr> <th>Radical in the integral</th> <th>Trigonometric substitution</th> <th>Hyperbolic substitution</th> </tr> </thead> <tbody> <tr> <td><MathJax math={String.raw`$\sqrt{a^2x^2}$`} /></td> <td><MathJax math={String.raw`$x = a \sin (\theta)$`} /></td> <td><MathJax math={String.raw`$x = a \tanh (\phi)$`} /></td> </tr> <tr> <td><MathJax math={String.raw`$\sqrt{a^2+x^2}$`} /></td> <td><MathJax math={String.raw`$x = a \tan (\theta)$`} /></td> <td><MathJax math={String.raw`$x = a \sinh (\phi)$`} /></td> </tr> <tr> <td><MathJax math={String.raw`$\sqrt{x^2a^2}$`} /></td> <td><MathJax math={String.raw`$x = a \sec (\theta)$`} /></td> <td><MathJax math={String.raw`$x = a \cosh (\phi)$`} /></td> </tr> </tbody> </table> </div> \\ Just an example
Thanks in advance.

I don't know how the two operators work together
if(rightPressed && paddleX < canvas.widthpaddleWidth) { paddleX += 7; } else if(leftPressed && paddleX > 0) { paddleX = 7; }
&&, <
Doesn't the first operator end with true or false? How do you calculate it with the inequality sign?

Can I estimate the probability of an inventory dropping below a given level in the future based on historical inventory levels?
I am looking to estimate the probability of stocking out of inventory if I liquidate some units. For example, if I have 100 inventory units today and liquidate 20 of them tomorrow, what will the odds be that I am short on units in one year, two years, etc. Presumably, if I can sell inventory with a low risk of being short, then this is beneficial.
A few supporting details:
 I know my current inventory, and I have monthly data on historical inventory level Inventory levels do not have a clear upward/downward trend, but fluctuate quite significantly
 I want to forecast the likelihood of inventory dropping below a given level over a ten year span (to inform a liquidation decision)
 My initial thinking was to look at variance and use this information to create a confidence interval under the normal distribution, but my understanding is that this is flawed since each month of inventory is independent
Does anyone know how I can approach this mathematically?
Thanks in advance for the help!

Rotate and translate image from center to all directions one by one in ios swift
I am trying to make a demo of animation for learning but i am having issue regarding coordinate system of apple and how does it work when trying for animations. The issue is i have 6 static images stacked upon each other as pile of playing cards and have 6 empty views in all directions which is of same height and width as the pile cards height width. Now how do i rotate and translate card 6 to bottomleft then card 5 to topleft then card 4 to top center card3 to topright then card 2 to bottom right and card1 to bottom center i.e more like a playing card distribution animation

C# Rotate pictureBox , I want to move the bus vertically and I cant, can you help me of coding?
using System.Drawing; using System.Windows.Forms; public partial class Form1 : Form { public bool move_right, move_left, move_up, move_down; public int speed = 10; public int score = 0; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { timer1.Start(); } private void timer1_Tick(object sender, EventArgs e) { if (move_left == true && pictureBox2.Left > 0) { pictureBox2.Left = speed; } if (move_right == true && pictureBox2.Left < 665) { pictureBox2.Left += speed; } if (move_up == true && pictureBox2.Top > 0) { pictureBox2.Top = speed; } if (move_down == true && pictureBox2.Top < 366) { pictureBox2.Top += speed; } } private void Form1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Left) { move_left = true; } if (e.KeyCode == Keys.Right) { move_right = true; } if (e.KeyCode == Keys.Up) { move_up = true; } if (e.KeyCode == Keys.Down) { move_down = true; } } private void Form1_KeyUp(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Left) { move_left = false; } if (e.KeyCode == Keys.Right) { move_right = false; } if (e.KeyCode == Keys.Up) { move_up = false; } if (e.KeyCode == Keys.Down) { move_down = false; } } }

translate an image after rotation without using library
I try to rotate an image clockwise 45 degree and translate the image 50,50. Rotation process works fine:(I refer to this page:How do I rotate an image manually without using cv2.getRotationMatrix2D)
import numpy as np import math from scipy import ndimage from PIL import Image # inputs img = ndimage.imread("A.png") rotation_amount_degree = 45 # convert rotation amount to radian rotation_amount_rad = rotation_amount_degree * np.pi / 180.0 # get dimension info height, width, num_channels = img.shape # create output image, for worst case size (45 degree) max_len = int(math.sqrt(height*height + width*width)) rotated_image = np.zeros((max_len, max_len, num_channels)) #rotated_image = np.zeros((img.shape)) rotated_height, rotated_width, _ = rotated_image.shape mid_row = int( (rotated_height+1)/2 ) mid_col = int( (rotated_width+1)/2 ) # for each pixel in output image, find which pixel #it corresponds to in the input image for r in range(rotated_height): for c in range(rotated_width): # apply rotation matrix, the other way y = (rmid_col)*math.cos(rotation_amount_rad) + (cmid_row)*math.sin(rotation_amount_rad) x = (rmid_col)*math.sin(rotation_amount_rad) + (cmid_row)*math.cos(rotation_amount_rad) # add offset y += mid_col x += mid_row # get nearest index #a better way is linear interpolation x = round(x) y = round(y) #print(r, " ", c, " corresponds to> " , y, " ", x) # check if x/y corresponds to a valid pixel in input image if (x >= 0 and y >= 0 and x < width and y < height): rotated_image[r][c][:] = img[y][x][:] # save output image output_image = Image.fromarray(rotated_image.astype("uint8")) output_image.save("rotated_image.png")
However, when I try to translate the image. I edited the above code to this:
if (x >= 0 and y >= 0 and x < width and y < height): rotated_image[r50][c50][:] = img[y][x][:]
But I got something like this:
It seems the right and the bottom did not show the right pixel. How could I solve it? Any suggestions would be highly appreciated.

Is there still a way to use RTKLIB with a Novatel OEM3 card?
I have a Novatel OEM3 card which can't handle the GPS week rollover, it gives 2002 as the current year.
As the OEM3 protocol is supported by RTKLIB, is there a workaround or patch for RTKLIB? So that I can still use this card?

GNSSSDR on Windows?
I know the answer might be negative, but is there any way to run GnssSdr on Windows Instead of Linux/Mac OS? I Use it on Linux Already But I have just wondered if it can be done. only related answers please.

ggplot crossbar mislocalization in logscaled data
I want to plot my data as a scatter plot with the mean+sem error bar by using
ggplot2
. I am usingstat_summary
to add the mean bar and errorbar. As the variation is pretty huge, I usedscale_y_continuous
to transform the y axis as a log10 scale for better visualization.Here is the example data:
Value < c(815,2467,4130,32588,171,68,582,476) Treatment < c(rep("Ctl",4),rep("Mutant",4)) data.frame(Value, Treatment)
It works fine when I use the linear yaxis. The crossbar localized on 10000, the mean of
Ctl
group.plot_linear < dat %>% ggplot(aes(x=Treatment, y=Value, color = Treatment)) + geom_dotplot(aes(color = Treatment), fill = "white", stroke = 2, binaxis='y', stackdir='center', dotsize = 1, position=position_dodge(0.9)) + stat_summary(fun = mean, geom = "crossbar", size = 1, width = 0.6, position=position_dodge(0.9)) + stat_summary(fun.data = mean_se, geom = "errorbar", size = 0.5, width = 0.3, position=position_dodge(0.9)) + theme_bw()
However, if I log transform the y axis, the crossbar for the mean value of
Ctl
always localizes on the secondhighest point (4130) but not the mean point (10000).plot_log < dat %>% ggplot(aes(x=Treatment, y=Value, color = Treatment)) + geom_dotplot(aes(color = Treatment), fill = "white", stroke = 2, binaxis='y', stackdir='center', dotsize = 1, position=position_dodge(0.9)) + stat_summary(fun = mean, geom = "crossbar", size = 1, width = 0.6, position=position_dodge(0.9)) + stat_summary(fun.data = mean_se, geom = "errorbar", size = 0.5, width = 0.3, position=position_dodge(0.9)) + theme_bw() + # log scaled y axis scale_y_continuous(trans = log10_trans(), breaks = trans_breaks("log10", function(x) 10^x))
I don't understand the logic of this wired localization for the crossbar.
Is there a way to plot the mean bar for the logscaled data?
Thanks a lot!

Abstract Class in Acceleo Transformation
how to show the abstract class in generate.mtl file of Accelo transformation into java. Currently, I am writing this code but it's not working...
[if (aClass.isAbstract=true)] public abstract class [aClass.name.toUpperFirst()/] [/if] [if (aClass.isAbstract=false)] public class [aClass.name.toUpperFirst()/] [/if]